0
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?

PlatformIOでM5Stack CoreS3 + M5Unifiedをビルド時のエラー解決方法

Last updated at Posted at 2025-09-18

実施環境

  • PlatformIO
  • M5Stack CoreS3

発生した問題

PlatformIOで以下の設定を使ってビルドを行ったところ、M5Unifiedに含まれる M5GFX がエラーで落ちました。

[env:m5stack-cores3]
platform = espressif32@6.8.1
board = m5stack-cores3
framework = arduino
lib_deps =
    m5stack/M5Unified@^0.2.7

エラーメッセージ

.pio/libdeps/m5stack-cores3/M5GFX/src/lgfx/v1/platforms/esp32/Panel_EPD.cpp: In static member function 'static void lgfx::v1::Panel_EPD::task_update(lgfx::v1::Panel_EPD*)':
.pio/libdeps/m5stack-cores3/M5GFX/src/lgfx/v1/platforms/esp32/Panel_EPD.cpp:1003:27: error: no match for 'operator!=' (operand types are 'const lgfx::v1::Panel_EPD::update_data_t' and 'lgfx::v1::Panel_EPD::update_data_t')
             if (prev_data != new_data) { break; }
                 ~~~~~~~~~~^~~~~~~~~~~
*** [.pio/build/m5stack-cores3/libdc8/M5GFX/lgfx/v1/platforms/esp32/Panel_EPD.cpp.o] Error 1

Arduino IDEでは同じコードが通るのに、PlatformIOでは失敗する状況でした。

Arduino IDEで動作した環境

  • ボード: M5Stack 3.2.2
  • ライブラリ: M5Unified 0.2.8

この環境の場合、内部的にいかが参照されるそうです。

  • Arduino-ESP32 v3.2.2
  • ESP-IDF v5.1.2

原因

PlatformIOではデフォルトでArduino-ESP32 v2.x.x系を使用していためM5Unifiedを使った時にCoreS3のビルドが通らないのだと考えられます。

解決方法

PlatformIOの platform をArduino IDEと同等のバージョンに指定することで解決しました。

修正版 platformio.ini

[env:m5stack-cores3]

; プラットフォームの設定をArduino IDE互換にする
platform = https://github.com/pioarduino/platform-espressif32/releases/download/stable/platform-espressif32.zip

board = m5stack-cores3
framework = arduino
monitor_speed = 115200

lib_deps =
    m5stack/M5Unified

まとめ

  • Arduino IDEでは通るのに、PlatformIOではエラーになる場合は、
    esp-ide バージョンの違いが原因であることが多い。
  • platform をArduino IDEと揃えることで、PlatformIOでも安定してビルド可能。

この記事が同じ問題で悩む方の助けになれば幸いです!

追記

どうやらそうでもないっぽいです。
あくまでもこのようなエラーが出た時の解決方法の一例としてみてくれたら嬉しいです。

0
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
0
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?