<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[M5Dail platformio setup problems]]></title><description><![CDATA[<p dir="auto">Hello all. I bought the M5Dail and wanted to program it using platformio.<br />
But I am not able to get it to work.<br />
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<br />
I work in linux mint.<br />
my platformio.ini is:</p>
<pre><code>[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
</code></pre>
<p dir="auto">my main.c is:</p>
<pre><code>#include &lt;Arduino.h&gt;
#include "M5Dial.h"
#include &lt;M5GFX.h&gt;
#include &lt;M5Unified.h&gt;



void setup() {
  
}

void loop() {
 
}

</code></pre>
<p dir="auto">and the build output is:</p>
<pre><code> *  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) &gt; 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 -&gt; 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. 

</code></pre>
<p dir="auto">I believe that the SPI pins are not defined, and I am not sure how to correct this.</p>
<p dir="auto">Questions:</p>
<ul>
<li>
<p dir="auto">do i need: <br />
#include &lt;M5GFX.h&gt;<br />
#include &lt;M5Unified.h&gt;<br />
most examples only have:<br />
#include "M5Dial.h"</p>
</li>
<li>
<p dir="auto">wat to do with:<br />
;platform_packages = <a href="http://tool-esptool.py" target="_blank" rel="noopener noreferrer nofollow ugc">tool-esptool.py</a>@<a href="https://github.com/tasmota/esptool/releases/tag/v4.8.1.1/esptool-linux-amd64.zip" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/tasmota/esptool/releases/tag/v4.8.1.1/esptool-linux-amd64.zip</a><br />
;platform_packages = <a href="http://tool-esptool.py" target="_blank" rel="noopener noreferrer nofollow ugc">tool-esptool.py</a>@<a href="https://github.com/tasmota/esptool/releases/tag/v4.7.4/esptool.zip" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/tasmota/esptool/releases/tag/v4.7.4/esptool.zip</a><br />
in my platformio.ini.<br />
I think they are not necessary because <a href="http://esptool.py" target="_blank" rel="noopener noreferrer nofollow ugc">esptool.py</a> is already mentioned in the build output, but it is not the latest version.</p>
</li>
<li>
<p dir="auto">And last but not least what to do with the spi pin error.<br />
If somebody can point me in the right direction, it would be greatly appreciated<br />
I know that as long I can get "hello world" to work, I'm going to have lots of fun with the M5Dail</p>
</li>
</ul>
]]></description><link>https://community.m5stack.com/topic/7046/m5dail-platformio-setup-problems</link><generator>RSS for Node</generator><lastBuildDate>Fri, 10 Apr 2026 11:32:11 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/7046.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 02 Dec 2024 12:05:32 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to M5Dail platformio setup problems on Mon, 02 Dec 2024 15:26:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/4037">@felmue</a> it works,great.<br />
thank you felmue.</p>
]]></description><link>https://community.m5stack.com/post/27303</link><guid isPermaLink="true">https://community.m5stack.com/post/27303</guid><dc:creator><![CDATA[BertM]]></dc:creator><pubDate>Mon, 02 Dec 2024 15:26:41 GMT</pubDate></item><item><title><![CDATA[Reply to M5Dail platformio setup problems on Mon, 02 Dec 2024 13:41:56 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/192792">@BertM</a></p>
<p dir="auto">I get the same error using platform 6.4.0 which supports Arduino 2.0.11.<br />
You can see the used platform / Arduino version in your log:</p>
<pre><code>PLATFORM: Espressif 32 (6.4.0) &gt; M5Stack StampS3
framework-arduinoespressif32 @ 3.20011.230801 (2.0.11)
</code></pre>
<p dir="auto">Try modifying the <code>platform</code> parameter to:</p>
<pre><code>platform = espressif32@6.9.0 ;  6.9.0 - 2.0.17
</code></pre>
<p dir="auto">This should download platform version 6.9.0 with Arduino version 2.0.17 and with that the error is gone for me.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/27300</link><guid isPermaLink="true">https://community.m5stack.com/post/27300</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Mon, 02 Dec 2024 13:41:56 GMT</pubDate></item></channel></rss>