Description
Hi --
I noticed that the name included in the arduino-esp32 boards.txt
section for M5Stack included hyphens in the build.board=
assignment:
m5stack-core-esp32.build.board=M5Stack-Core-ESP32
When compiling under the Arduino IDE, the build.board=
definition can usually be used as a macro target in a preprocessor conditional (eg. #ifdef
). Unfortunately, hyphens are not valid characters in the macro name. As a result, attempting an #ifdef M5Stack-Core-ESP32
will typically result in an extra tokens at end of #ifdef directive
error/warning (and I believe the compiler will interpret the statement as #ifdef M5Stack
instead).
This issue could potentially be avoided if the boards.txt
submission were renamed without hyphens, eg:
m5stack-core-esp32.build.board=M5Stack_Core_ESP32
At the moment this may not cause many issues, but I suspect it could result in macro collisions if M5Stack were to release other variants (eg. M5Stack-Core-zzz
) in the future. Anyways, just a minor suggestion.