Hi!
Cannot use platform.io to upload to M5 Stack, even when using the simplest “Hello world” sketch.
Works absolutely fine via the Arduino IDE. But would like to keep all of my project in Platform.io if possible. I can’t seem to find any recorded fixes, so not sure if it’s something wrong with my install, or previous changes to something system-wise before I moved to platformio.
Any and all help would be appreciated!
Will always get
Uploading .pio/build/m5stack-core2/firmware.bin
sh: -c: line 0: unexpected EOF while looking for matching `"’
sh: -c: line 1: syntax error: unexpected end of file
Code:
#include <Arduino.h>
#include <M5Core2.h>
void setup(){
M5.begin();
M5.Lcd.print("Hello world!");
}
void loop() {
M5.update();
}
Platformio.ini:
[env:m5stack-core2]
platform = espressif32
board = m5stack-core2
framework = arduino
lib_deps = m5stack/M5Core2@^0.1.2
upload_port = /dev/tty.wchusbserial53810043471
Error:
Processing m5stack-core2 (platform: espressif32; board: m5stack-core2; framework: arduino)
----------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/m5stack-core2.html
PLATFORM: Espressif 32 (3.4.0) > M5Stack Core2
HARDWARE: ESP32 240MHz, 4.31MB RAM, 16MB Flash
DEBUG: Current (esp-prog) External (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.10006.210326 (1.0.6)
- tool-esptoolpy 1.30100.210531 (3.1.0)
- tool-mkspiffs 2.230.0 (2.30)
- toolchain-xtensa32 2.50200.97 (5.2.0)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 29 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <M5Core2> 0.1.2
| |-- <Wire> 1.0.1
| |-- <SPIFFS> 1.0
| | |-- <FS> 1.0
| |-- <FS> 1.0
| |-- <SPI> 1.0
| |-- <HTTPClient> 1.2
| | |-- <WiFi> 1.0
| | |-- <WiFiClientSecure> 1.0
| | | |-- <WiFi> 1.0
| |-- <SD(esp32)> 1.0.5
| | |-- <FS> 1.0
| | |-- <SPI> 1.0
Building in release mode
Retrieving maximum program size .pio/build/m5stack-core2/firmware.elf
Checking size .pio/build/m5stack-core2/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [ ] 0.4% (used 17352 bytes from 4521984 bytes)
Flash: [= ] 6.7% (used 438907 bytes from 6553600 bytes)
Configuring upload protocol...
AVAILABLE: esp-prog, espota, esptool, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa
CURRENT: upload_protocol = esptool
Looking for upload port...
Use manually specified:
/dev/tty.wchusbserial53810043471
Uploading .pio/build/m5stack-core2/firmware.bin
sh: -c: line 0: unexpected EOF while looking for matching `"'
sh: -c: line 1: syntax error: unexpected end of file
*** [upload] Error 2
================================================================== [FAILED] Took 2.93 seconds ==================================================================
The terminal process "platformio 'run', '--target', 'upload'" terminated with exit code: 1.```