M5Stamp won’t compile factory Arduino examples.
I can’t get the factory examples to compile for the M5Dial (based upon the M5Stamp-S3)
Platformio.ini
[env:m5stack-stamps3]
platform = espressif32
board = m5stack-stamps3
framework = arduino
lib_extra_dirs = ~/Documents/Arduino/libraries
lib_deps =
m5stack/M5Dial@^1.0.2
m5stack/M5Unified@^0.1.11
m5stack/M5GFX@^0.1.11
Build output:
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
Converting rfid.ino
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.1.11
|-- M5GFX @ 0.1.11
Building in release mode
Compiling .pio\build\m5stack-stamps3\src\rfid.cpp.o
Compiling .pio\build\m5stack-stamps3\src\rfid.ino.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\libc60\Wire\Wire.cpp.o
Compiling .pio\build\m5stack-stamps3\libcd9\SPI\SPI.cpp.o
Compiling .pio\build\m5stack-stamps3\libf67\M5GFX\M5GFX.cpp.o
Compiling .pio\build\m5stack-stamps3\libf67\M5GFX\lgfx\Fonts\IPA\lgfx_font_japan.c.o
Compiling .pio\build\m5stack-stamps3\libf67\M5GFX\lgfx\Fonts\efont\lgfx_efont_cn.c.o
Compiling .pio\build\m5stack-stamps3\libf67\M5GFX\lgfx\Fonts\efont\lgfx_efont_ja.c.o
Compiling .pio\build\m5stack-stamps3\libf67\M5GFX\lgfx\Fonts\efont\lgfx_efont_kr.c.o
Compiling .pio\build\m5stack-stamps3\libf67\M5GFX\lgfx\Fonts\efont\lgfx_efont_tw.c.o
Compiling .pio\build\m5stack-stamps3\libf67\M5GFX\lgfx\utility\lgfx_pngle.c.o
Compiling .pio\build\m5stack-stamps3\libf67\M5GFX\lgfx\utility\lgfx_qoi.c.o
Compiling .pio\build\m5stack-stamps3\libf67\M5GFX\lgfx\utility\lgfx_qrcode.c.o
Compiling .pio\build\m5stack-stamps3\libf67\M5GFX\lgfx\utility\lgfx_tjpgd.c.o
Compiling .pio\build\m5stack-stamps3\libf67\M5GFX\lgfx\utility\miniz.c.o
Compiling .pio\build\m5stack-stamps3\libf67\M5GFX\lgfx\v1\LGFXBase.cpp.o
Compiling .pio\build\m5stack-stamps3\libf67\M5GFX\lgfx\v1\LGFX_Button.cpp.o
Compiling .pio\build\m5stack-stamps3\libf67\M5GFX\lgfx\v1\LGFX_Sprite.cpp.o
Compiling .pio\build\m5stack-stamps3\libf67\M5GFX\lgfx\v1\lgfx_fonts.cpp.o
Compiling .pio\build\m5stack-stamps3\libf67\M5GFX\lgfx\v1\misc\DividedFrameBuffer.cpp.o
Compiling .pio\build\m5stack-stamps3\libf67\M5GFX\lgfx\v1\misc\SpriteBuffer.cpp.o
Compiling .pio\build\m5stack-stamps3\libf67\M5GFX\lgfx\v1\misc\common_function.cpp.o
Compiling .pio\build\m5stack-stamps3\libf67\M5GFX\lgfx\v1\misc\pixelcopy.cpp.o
Compiling .pio\build\m5stack-stamps3\libf67\M5GFX\lgfx\v1\panel\Panel_Device.cpp.o
Compiling .pio\build\m5stack-stamps3\libf67\M5GFX\lgfx\v1\panel\Panel_FrameBufferBase.cpp.o
Compiling .pio\build\m5stack-stamps3\libf67\M5GFX\lgfx\v1\panel\Panel_GDEW0154M09.cpp.o
Compiling .pio\build\m5stack-stamps3\libf67\M5GFX\lgfx\v1\panel\Panel_HasBuffer.cpp.o
Compiling .pio\build\m5stack-stamps3\libf67\M5GFX\lgfx\v1\panel\Panel_IT8951.cpp.o
Compiling .pio\build\m5stack-stamps3\libf67\M5GFX\lgfx\v1\panel\Panel_LCD.cpp.o
Compiling .pio\build\m5stack-stamps3\libf67\M5GFX\lgfx\v1\panel\Panel_M5HDMI.cpp.o
Compiling .pio\build\m5stack-stamps3\libf67\M5GFX\lgfx\v1\panel\Panel_M5UnitGLASS.cpp.o
Compiling .pio\build\m5stack-stamps3\libf67\M5GFX\lgfx\v1\panel\Panel_M5UnitLCD.cpp.o
Compiling .pio\build\m5stack-stamps3\libf67\M5GFX\lgfx\v1\panel\Panel_SSD1306.cpp.o
Compiling .pio\build\m5stack-stamps3\libf67\M5GFX\lgfx\v1\platforms\esp32\Bus_I2C.cpp.o
src/rfid.cpp: In function 'void setup()':
src/rfid.cpp:26:57: warning: 'void lgfx::v1::LGFXBase::setTextFont(const lgfx::v1::IFont*)' is deprecated: use setFont(&fonts::Font) [-Wdeprecated-declarations]
M5Dial.Display.setTextFont(&fonts::Orbitron_Light_32);
^
In file included from .pio/libdeps/m5stack-stamps3/M5GFX/src/M5GFX.h:22,
from .pio/libdeps/m5stack-stamps3/M5Unified/src/M5Unified.hpp:19,
from .pio/libdeps/m5stack-stamps3/M5Unified/src/M5Unified.h:5,
from .pio/libdeps/m5stack-stamps3/M5Dial/src/M5Dial.h:4,
from src/rfid.cpp:19:
.pio/libdeps/m5stack-stamps3/M5GFX/src/lgfx/v1/LGFXBase.hpp:733:10: note: declared here
void setTextFont(const IFont* font = nullptr) { setFont(font); }
^~~~~~~~~~~
Compiling .pio\build\m5stack-stamps3\libf67\M5GFX\lgfx\v1\platforms\esp32\Bus_Parallel8.cpp.o
D:/My Documents/PlatformIO/Projects/231126-105121-m5stack-stamps3/src/rfid.ino: In function 'void setup()':
D:/My Documents/PlatformIO/Projects/231126-105121-m5stack-stamps3/src/rfid.ino:26:57: warning: 'void lgfx::v1::LGFXBase::setTextFont(const lgfx::v1::IFont*)' is deprecated: use setFont(&fonts::Font) [-Wdeprecated-declarations]
M5Dial.Display.setTextFont(&fonts::Orbitron_Light_32);
^
In file included from .pio/libdeps/m5stack-stamps3/M5GFX/src/M5GFX.h:22,
from .pio/libdeps/m5stack-stamps3/M5Unified/src/M5Unified.hpp:19,
from .pio/libdeps/m5stack-stamps3/M5Unified/src/M5Unified.h:5,
from .pio/libdeps/m5stack-stamps3/M5Dial/src/M5Dial.h:4,
from D:/My Documents/PlatformIO/Projects/231126-105121-m5stack-stamps3/src/rfid.ino:19:
.pio/libdeps/m5stack-stamps3/M5GFX/src/lgfx/v1/LGFXBase.hpp:733:10: note: declared here
void setTextFont(const IFont* font = nullptr) { setFont(font); }
^~~~~~~~~~~
C:/Users/simon/.platformio/packages/framework-arduinoespressif32/libraries/SPI/src/SPI.cpp: In member function 'void SPIClass::begin(int8_t, int8_t, int8_t, int8_t)':
C:/Users/simon/.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;
^~~
Compiling .pio\build\m5stack-stamps3\libf67\M5GFX\lgfx\v1\platforms\esp32\Bus_SPI.cpp.o
C:/Users/simon/.platformio/packages/framework-arduinoespressif32/libraries/SPI/src/SPI.cpp:88:37: note: suggested alternative: 'SCL' _sck = (_spi_num == FSPI) ? SCK : -1;
^~~
SCL
C:/Users/simon/.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;
^~~~
C:/Users/simon/.platformio/packages/framework-arduinoespressif32/libraries/SPI/src/SPI.cpp:89:38: note: suggested alternative: 'EIO' _miso = (_spi_num == FSPI) ? MISO : -1;
^~~~
EIO
C:/Users/simon/.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;
^~~~
C:/Users/simon/.platformio/packages/framework-arduinoespressif32/libraries/SPI/src/SPI.cpp:90:38: note: suggested alternative: 'M_PI'
_mosi = (_spi_num == FSPI) ? MOSI : -1;
^~~~
M_PI
C:/Users/simon/.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;
^~
C:/Users/simon/.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\libf67\M5GFX\lgfx\v1\platforms\esp32\Light_PWM.cpp.o
Compiling .pio\build\m5stack-stamps3\libf67\M5GFX\lgfx\v1\platforms\esp32\Panel_CVBS.cpp.o
Compiling .pio\build\m5stack-stamps3\libf67\M5GFX\lgfx\v1\platforms\esp32\common.cpp.o
*** [.pio\build\m5stack-stamps3\libcd9\SPI\SPI.cpp.o] Error 1
Compiling .pio\build\m5stack-stamps3\libf67\M5GFX\lgfx\v1\platforms\esp32c3\Bus_Parallel8.cpp.o
=================================================== [FAILED] Took 12.12 seconds ================
It has probably been solved a 1000 times before, However I can’t find an example that works.
If I run the same example through Arduino 2.x I don’t have a problem.
Yours Simon M.