#author("2019-01-27T11:12:48+09:00","default:ichinomoto","ichinomoto") #author("2019-01-27T13:16:20+09:00","default:ichinomoto","ichinomoto") *M5Stack [#x73be186] **Documents [#cffc1160] https://m5stack.readthedocs.io/en/master/index.html C言語API~ https://github.com/m5stack/M5Stack/blob/master/src/M5Stack.h#L19 **PlatformIO [#cde8b670] https://docs.platformio.org/en/latest/ 参考~ https://qiita.com/zakkied/items/cbbccdc1be4e4da9f7f9 ユーザー権限でシリアルポートにアクセスする設定を足しておく~ https://wiki.ekesete.net/index.php?Linux/udev ***プロジェクト初期化 [#pbe89e3e] ~/.local/bin/pio init -b m5stack-core-esp32 fireは ~/.local/bin/pio init -b m5stack-fire これでplatform.iniが生成されるので以下の内容を書き込み。 [env:m5s-core] platform = espressif32 board = m5stack-core-esp32 upload_port = /dev/ttyUSB0 upload_speed = 1500000 board_build.mcu = esp32 board_build.f_cpu = 240000000L board_build.flash_mode = qio framework = arduino lib_deps = M5Stack ;lib_extra_dirs = 他の参照DIRがあればここに追加 ; ;build_flags = ; -L**** 追加のライブラリなどがあればここに追加 ; Serial Monitor options monitor_speed = 115200 ***ビルドと書き込み [#y973eb55] ~/.local/bin/pio run -t upload ***clean [#n8c35359] ~/.local/bin/pio run -t clean **esptool [#d28e9c07] デバイスアクセスツール~ 手動で書き込む場合に必要 参考~ https://github.com/espressif/esptool ***install [#v30c4465] pip install esptool ***elf to bin [#t1e76348] esptool.py --chip esp32 elf2image my_esp32_app.elf ***消去 [#h30b0f9e] esptool.py --chip esp32 --port /dev/ttyUSB0 -b 1500000 erase_flash ***書き込み [#i92da791] esptool.py --chip esp32 --port /dev/ttyUSB0 -b 1500000 write_flash --flash_mode dio -z 0x1000 firmware.bin