M5Dail platformio setup problems
-
Hello all. I bought the M5Dail and wanted to program it using platformio.
But I am not able to get it to work.
To find out why I reduced it to its most simple form, load the lib debs and include the necessary headers. And it gave me the same errors
I work in linux mint.
my platformio.ini is:[env:m5stack-stamps3] platform = espressif32 board = m5stack-stamps3 framework = arduino lib_deps = m5stack/M5Dial @ ^1.0.2 m5stack/M5Unified @ ^0.2.1 m5stack/M5GFX @ ^0.2.0 ;I had to use the following in other esp32 projects for usb serial communication build_flags = -DARDUINO_USB_CDC_ON_BOOT=1 ;I had to use this in other esp32 projects for usb serial communication ;The following was recommended by a you-tube video but i cant get it to work ;platform_packages = tool-esptool.py@https://github.com/tasmota/esptool/releases/tag/v4.8.1.1/esptool-linux-amd64.zip ;platform_packages = tool-esptool.py@https://github.com/tasmota/esptool/releases/tag/v4.7.4/esptool.zip
my main.c is:
#include <Arduino.h> #include "M5Dial.h" #include <M5GFX.h> #include <M5Unified.h> void setup() { } void loop() { }
and the build output is:
* Executing task in folder M5Dialtest2: platformio run Processing m5stack-stamps3 (platform: espressif32; board: m5stack-stamps3; framework: arduino) ----------------------------------------------------------------------------------------------------------------------------------------------------- Verbose mode can be enabled via `-v, --verbose` option CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/m5stack-stamps3.html PLATFORM: Espressif 32 (6.4.0) > M5Stack StampS3 HARDWARE: ESP32S3 240MHz, 320KB RAM, 8MB Flash DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-builtin, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa) PACKAGES: - framework-arduinoespressif32 @ 3.20011.230801 (2.0.11) - tool-esptoolpy @ 1.40501.0 (4.5.1) - toolchain-riscv32-esp @ 8.4.0+2021r2-patch5 - toolchain-xtensa-esp32s3 @ 8.4.0+2021r2-patch5 LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf LDF Modes: Finder ~ chain, Compatibility ~ soft Found 36 compatible libraries Scanning dependencies... Dependency Graph |-- M5Dial @ 1.0.2 |-- M5Unified @ 0.2.1 |-- M5GFX @ 0.2.0 Building in release mode Compiling .pio/build/m5stack-stamps3/src/main.cpp.o Building .pio/build/m5stack-stamps3/bootloader.bin Generating partitions .pio/build/m5stack-stamps3/partitions.bin esptool.py v4.5.1 Creating esp32s3 image... Merged 1 ELF section Successfully created esp32s3 image. Compiling .pio/build/m5stack-stamps3/lib95d/SPI/SPI.cpp.o Compiling .pio/build/m5stack-stamps3/libfb1/Wire/Wire.cpp.o /home/bert/.platformio/packages/framework-arduinoespressif32/libraries/SPI/src/SPI.cpp: In member function 'void SPIClass::begin(int8_t, int8_t, int8_t, int8_t)': /home/bert/.platformio/packages/framework-arduinoespressif32/libraries/SPI/src/SPI.cpp:88:37: error: 'SCK' was not declared in this scope _sck = (_spi_num == FSPI) ? SCK : -1; ^~~ /home/bert/.platformio/packages/framework-arduinoespressif32/libraries/SPI/src/SPI.cpp:88:37: note: suggested alternative: 'SCL' _sck = (_spi_num == FSPI) ? SCK : -1; ^~~ SCL /home/bert/.platformio/packages/framework-arduinoespressif32/libraries/SPI/src/SPI.cpp:89:38: error: 'MISO' was not declared in this scope _miso = (_spi_num == FSPI) ? MISO : -1; ^~~~ /home/bert/.platformio/packages/framework-arduinoespressif32/libraries/SPI/src/SPI.cpp:89:38: note: suggested alternative: 'EIO' _miso = (_spi_num == FSPI) ? MISO : -1; ^~~~ EIO /home/bert/.platformio/packages/framework-arduinoespressif32/libraries/SPI/src/SPI.cpp:90:38: error: 'MOSI' was not declared in this scope _mosi = (_spi_num == FSPI) ? MOSI : -1; ^~~~ /home/bert/.platformio/packages/framework-arduinoespressif32/libraries/SPI/src/SPI.cpp:90:38: note: suggested alternative: 'M_PI' _mosi = (_spi_num == FSPI) ? MOSI : -1; ^~~~ M_PI /home/bert/.platformio/packages/framework-arduinoespressif32/libraries/SPI/src/SPI.cpp:91:36: error: 'SS' was not declared in this scope _ss = (_spi_num == FSPI) ? SS : -1; ^~ /home/bert/.platformio/packages/framework-arduinoespressif32/libraries/SPI/src/SPI.cpp:91:36: note: suggested alternative: 'PS' _ss = (_spi_num == FSPI) ? SS : -1; ^~ PS Compiling .pio/build/m5stack-stamps3/libfd2/M5GFX/M5GFX.cpp.o *** [.pio/build/m5stack-stamps3/lib95d/SPI/SPI.cpp.o] Error 1 ============================================================ [FAILED] Took 5.01 seconds ============================================================ * The terminal process "platformio 'run'" terminated with exit code: 1. * Terminal will be reused by tasks, press any key to close it.
I believe that the SPI pins are not defined, and I am not sure how to correct this.
Questions:
-
do i need:
#include <M5GFX.h>
#include <M5Unified.h>
most examples only have:
#include "M5Dial.h" -
wat to do with:
;platform_packages = tool-esptool.py@https://github.com/tasmota/esptool/releases/tag/v4.8.1.1/esptool-linux-amd64.zip
;platform_packages = tool-esptool.py@https://github.com/tasmota/esptool/releases/tag/v4.7.4/esptool.zip
in my platformio.ini.
I think they are not necessary because esptool.py is already mentioned in the build output, but it is not the latest version. -
And last but not least what to do with the spi pin error.
If somebody can point me in the right direction, it would be greatly appreciated
I know that as long I can get "hello world" to work, I'm going to have lots of fun with the M5Dail
-
-
Hello @BertM
I get the same error using platform 6.4.0 which supports Arduino 2.0.11.
You can see the used platform / Arduino version in your log:PLATFORM: Espressif 32 (6.4.0) > M5Stack StampS3 framework-arduinoespressif32 @ 3.20011.230801 (2.0.11)
Try modifying the
platform
parameter to:platform = espressif32@6.9.0 ; 6.9.0 - 2.0.17
This should download platform version 6.9.0 with Arduino version 2.0.17 and with that the error is gone for me.
Thanks
Felix -
@felmue it works,great.
thank you felmue.