3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

M5StickCPlusをPlatformIOで書いてて困ったこと。

Last updated at Posted at 2023-08-21

使用しているハード・ソフト

  • mac studio(2022)
  • VSCode
  • PlatformIO
  • M5StickCPlus

困ったこと

ビルドに成功しない

 初歩的な部分で躓いてしまったなぁと思いましたが、以前は成功しているため原因を探ろうとターミナルログを見てみるとヘッダがないらしい。

**************************************************************
* Looking for Wire.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:Wire.h"
* Web  > https://registry.platformio.org/search?q=header:Wire.h
*
**************************************************************

 #include <Wire.h>
          ^~~~~~~~
compilation terminated.

こんな感じのがいくつか出てきた。
今回は以下のファイルが見当たらなかったらしい。

  • Wire.h
  • SPI.h
  • Fs.h

以下のサイトを参考にして解決することができた。

私も同様に.iniファイルに書き込んだところ解決しました。(バージョン書くべきなんだろうなと思いながら…)

lib_deps = 
    m5stack/M5StickCPlus@^0.0.9
    Wire
    SPI
    Fs
    ESP32Servo

esptool write_flash: error:

PlatfoprmIOにてコードを完成させ、実際にM5StickCPlusへと書き込もうとした際に発生しました。

esptool write_flash: error: argument <address> <filename>: 
[Errno 2] No such file or directory:

こんな感じのエラーでしたが要はディレクトリが見つからない旨を示しています。
ここで困ったことがディレクトリが実際には存在していることです。

以前macbook(2016)にて扱った際には平常運転でしたので、何が問題なのか探って色々なサイトを見ていましたがMacの例は見当たらず。
 ですがユーザディレクトリ下にて作業を行なっている際に発生する事例がいくつかあったため、platform IOにてプロジェクトを作成する際にデフォルトのディレクトリで作成をしたところ成功しました。(Macの場合はアクセス権限が取得できてないのでしょうかね???)
スクリーンショット 2023-08-21 11.28.53.png

3
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?