Closed vdiogo closed 3 months ago
I was able to compile the code (commented some lines of code) so I am now down to not being able to install it:
Processing m5stickcplus2 (platform: espressif32; board: m5stick-c; framework: arduino)
-------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/m5stick-c.html
PLATFORM: Espressif 32 (6.5.0) > M5Stick-C
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, 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.20014.231204 (2.0.14)
- tool-esptoolpy @ 1.40501.0 (4.5.1)
- tool-mkfatfs @ 2.0.1
- tool-mklittlefs @ 1.203.210628 (2.3)
- tool-mkspiffs @ 2.230.0 (2.30)
- toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 39 compatible libraries
Scanning dependencies...
Dependency Graph
|-- M5StickCPlus2 @ 1.0.2
|-- PubSubClient @ 2.8.0
|-- ArduinoOTA @ 2.0.0
|-- WiFi @ 2.0.0
|-- EEPROM @ 2.0.0
|-- WiFiClientSecure @ 2.0.0
Building in release mode
Retrieving maximum program size .pio/build/m5stickcplus2/firmware.elf
Checking size .pio/build/m5stickcplus2/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [== ] 19.1% (used 62556 bytes from 327680 bytes)
Flash: [======= ] 74.4% (used 975065 bytes from 1310720 bytes)
Configuring upload protocol...
AVAILABLE: cmsis-dap, esp-bridge, 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...
Using manually specified: /dev/cu.usbmodem575C0307011
Uploading .pio/build/m5stickcplus2/firmware.bin
esptool.py v4.5.1
Serial port /dev/cu.usbmodem575C0307011
Connecting.....
Chip is ESP32-PICO-V3-02 (revision v3.1)
Features: WiFi, BT, Dual Core, 240MHz, Embedded Flash, Embedded PSRAM, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 10:06:1c:17:06:c8
Uploading stub...
A fatal error occurred: Failed to write to target RAM (result was 01070000: Operation timed out)
*** [upload] Error 2
======================================================= [FAILED] Took 9.38 seconds =======================================================
Environment Status Duration
------------- -------- ------------
m5stickcplus2 FAILED 00:00:09.383
================================================== 1 failed, 0 succeeded in 00:00:09.383 ==================================================
* The terminal process "platformio 'run', '--target', 'upload', '--environment', 'm5stickcplus2', '--upload-port', '/dev/cu.usbmodem575C0307011'" terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.
Also did the following:
checked
not needed, as it was already 115200
doesn't have reset button, but disconnected/ connected before flashing
Yes, you eventually chose the right environment. You have a small button on the side normally, let it press 7 sec to start the esp and upload again.
Yes, you eventually chose the right environment. You have a small button on the side normally, let it press 7 sec to start the esp and upload again.
Thanks for the suggestion. Tried it and same outcome:
Executing task: platformio run --target upload --environment m5stickcplus2 --upload-port /dev/cu.usbmodem575C0307011
Processing m5stickcplus2 (platform: espressif32; board: m5stick-c; framework: arduino)
-------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/m5stick-c.html
PLATFORM: Espressif 32 (6.5.0) > M5Stick-C
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, 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.20014.231204 (2.0.14)
- tool-esptoolpy @ 1.40501.0 (4.5.1)
- tool-mkfatfs @ 2.0.1
- tool-mklittlefs @ 1.203.210628 (2.3)
- tool-mkspiffs @ 2.230.0 (2.30)
- toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 39 compatible libraries
Scanning dependencies...
Dependency Graph
|-- M5StickCPlus2 @ 1.0.2
|-- PubSubClient @ 2.8.0
|-- ArduinoOTA @ 2.0.0
|-- WiFi @ 2.0.0
|-- EEPROM @ 2.0.0
|-- WiFiClientSecure @ 2.0.0
Building in release mode
Retrieving maximum program size .pio/build/m5stickcplus2/firmware.elf
Checking size .pio/build/m5stickcplus2/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [== ] 19.1% (used 62556 bytes from 327680 bytes)
Flash: [======= ] 74.4% (used 975065 bytes from 1310720 bytes)
Configuring upload protocol...
AVAILABLE: cmsis-dap, esp-bridge, 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...
Using manually specified: /dev/cu.usbmodem575C0307011
Uploading .pio/build/m5stickcplus2/firmware.bin
esptool.py v4.5.1
Serial port /dev/cu.usbmodem575C0307011
Connecting.....
Chip is ESP32-PICO-V3-02 (revision v3.1)
Features: WiFi, BT, Dual Core, 240MHz, Embedded Flash, Embedded PSRAM, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 10:06:1c:17:06:c8
Uploading stub...
A fatal error occurred: Failed to write to target RAM (result was 01070000: Operation timed out)
*** [upload] Error 2
======================================================= [FAILED] Took 26.47 seconds =======================================================
Environment Status Duration
------------- -------- ------------
m5stickcplus2 FAILED 00:00:26.470
================================================== 1 failed, 0 succeeded in 00:00:26.470 ==================================================
* The terminal process "platformio 'run', '--target', 'upload', '--environment', 'm5stickcplus2', '--upload-port', '/dev/cu.usbmodem575C0307011'" terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.
I have re-downloaded the git and started from scratch, and now cannot compile the code:
Processing m5stickcplus2 (platform: espressif32; board: m5stick-c; framework: arduino)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/m5stick-c.html
PLATFORM: Espressif 32 (6.5.0) > M5Stick-C
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, 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.20014.231204 (2.0.14)
- tool-esptoolpy @ 1.40501.0 (4.5.1)
- toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 39 compatible libraries
Scanning dependencies...
Dependency Graph
|-- M5StickCPlus2 @ 1.0.2
|-- PubSubClient @ 2.8.0
|-- ArduinoOTA @ 2.0.0
|-- WiFi @ 2.0.0
|-- EEPROM @ 2.0.0
|-- WiFiClientSecure @ 2.0.0
Building in release mode
Compiling .pio/build/m5stickcplus2/src/main.cpp.o
Archiving .pio/build/m5stickcplus2/lib02f/libSPI.a
Indexing .pio/build/m5stickcplus2/lib02f/libSPI.a
Archiving .pio/build/m5stickcplus2/liba37/libWire.a
Indexing .pio/build/m5stickcplus2/liba37/libWire.a
Compiling .pio/build/m5stickcplus2/lib2fe/M5GFX/lgfx/Fonts/IPA/lgfx_font_japan.c.o
Compiling .pio/build/m5stickcplus2/lib2fe/M5GFX/lgfx/Fonts/efont/lgfx_efont_cn.c.o
Compiling .pio/build/m5stickcplus2/lib2fe/M5GFX/lgfx/Fonts/efont/lgfx_efont_ja.c.o
Compiling .pio/build/m5stickcplus2/lib2fe/M5GFX/lgfx/Fonts/efont/lgfx_efont_kr.c.o
Compiling .pio/build/m5stickcplus2/lib2fe/M5GFX/lgfx/Fonts/efont/lgfx_efont_tw.c.o
Compiling .pio/build/m5stickcplus2/lib2fe/M5GFX/lgfx/utility/lgfx_pngle.c.o
Compiling .pio/build/m5stickcplus2/lib2fe/M5GFX/lgfx/utility/lgfx_qoi.c.o
In file included from src/main.cpp:31:
include/mqtt.h: In function 'void readEEPROM()':
include/mqtt.h:64:84: error: 'PIN_THERM_ACTIVE_STATE' was not declared in this scope
mqttSerial.printf("Restoring previous state: %s",(EEPROM.read(EEPROM_STATE) == PIN_THERM_ACTIVE_STATE)? "On":"Off" );
^~~~~~~~~~~~~~~~~~~~~~
include/mqtt.h:64:84: note: suggested alternative: 'SG_RELAY_ACTIVE_STATE'
mqttSerial.printf("Restoring previous state: %s",(EEPROM.read(EEPROM_STATE) == PIN_THERM_ACTIVE_STATE)? "On":"Off" );
^~~~~~~~~~~~~~~~~~~~~~
SG_RELAY_ACTIVE_STATE
include/mqtt.h:69:32: error: 'PIN_THERM_ACTIVE_STATE' was not declared in this scope
EEPROM.write(EEPROM_STATE,!PIN_THERM_ACTIVE_STATE);
^~~~~~~~~~~~~~~~~~~~~~
include/mqtt.h:69:32: note: suggested alternative: 'SG_RELAY_ACTIVE_STATE'
EEPROM.write(EEPROM_STATE,!PIN_THERM_ACTIVE_STATE);
^~~~~~~~~~~~~~~~~~~~~~
SG_RELAY_ACTIVE_STATE
In file included from src/main.cpp:31:
include/mqtt.h: In function 'void callbackTherm(byte*, unsigned int)':
include/mqtt.h:135:30: error: 'PIN_THERM_ACTIVE_STATE' was not declared in this scope
digitalWrite(PIN_THERM, !PIN_THERM_ACTIVE_STATE);
^~~~~~~~~~~~~~~~~~~~~~
include/mqtt.h:135:30: note: suggested alternative: 'SG_RELAY_ACTIVE_STATE'
digitalWrite(PIN_THERM, !PIN_THERM_ACTIVE_STATE);
^~~~~~~~~~~~~~~~~~~~~~
SG_RELAY_ACTIVE_STATE
include/mqtt.h:142:29: error: 'PIN_THERM_ACTIVE_STATE' was not declared in this scope
digitalWrite(PIN_THERM, PIN_THERM_ACTIVE_STATE);
^~~~~~~~~~~~~~~~~~~~~~
include/mqtt.h:142:29: note: suggested alternative: 'SG_RELAY_ACTIVE_STATE'
digitalWrite(PIN_THERM, PIN_THERM_ACTIVE_STATE);
^~~~~~~~~~~~~~~~~~~~~~
SG_RELAY_ACTIVE_STATE
include/mqtt.h: In function 'void callbackSafety(byte*, unsigned int)':
include/mqtt.h:212:37: error: 'SAFETY_RELAY_ACTIVE_STATE' was not declared in this scope
digitalWrite(SAFETY_RELAY_PIN, !SAFETY_RELAY_ACTIVE_STATE);
^~~~~~~~~~~~~~~~~~~~~~~~~
include/mqtt.h:212:37: note: suggested alternative: 'SG_RELAY_ACTIVE_STATE'
digitalWrite(SAFETY_RELAY_PIN, !SAFETY_RELAY_ACTIVE_STATE);
^~~~~~~~~~~~~~~~~~~~~~~~~
SG_RELAY_ACTIVE_STATE
include/mqtt.h:218:36: error: 'SAFETY_RELAY_ACTIVE_STATE' was not declared in this scope
digitalWrite(SAFETY_RELAY_PIN, SAFETY_RELAY_ACTIVE_STATE);
^~~~~~~~~~~~~~~~~~~~~~~~~
include/mqtt.h:218:36: note: suggested alternative: 'SG_RELAY_ACTIVE_STATE'
digitalWrite(SAFETY_RELAY_PIN, SAFETY_RELAY_ACTIVE_STATE);
^~~~~~~~~~~~~~~~~~~~~~~~~
SG_RELAY_ACTIVE_STATE
src/main.cpp: In function 'void setup()':
src/main.cpp:314:35: error: 'SAFETY_RELAY_ACTIVE_STATE' was not declared in this scope
digitalWrite(SAFETY_RELAY_PIN, !SAFETY_RELAY_ACTIVE_STATE);
^~~~~~~~~~~~~~~~~~~~~~~~~
src/main.cpp:314:35: note: suggested alternative: 'SG_RELAY_ACTIVE_STATE'
digitalWrite(SAFETY_RELAY_PIN, !SAFETY_RELAY_ACTIVE_STATE);
^~~~~~~~~~~~~~~~~~~~~~~~~
SG_RELAY_ACTIVE_STATE
Compiling .pio/build/m5stickcplus2/lib2fe/M5GFX/lgfx/utility/lgfx_qrcode.c.o
Compiling .pio/build/m5stickcplus2/lib2fe/M5GFX/lgfx/utility/lgfx_tjpgd.c.o
Compiling .pio/build/m5stickcplus2/lib2fe/M5GFX/lgfx/utility/miniz.c.o
Compiling .pio/build/m5stickcplus2/lib2fe/M5GFX/lgfx/v1/LGFXBase.cpp.o
Compiling .pio/build/m5stickcplus2/lib2fe/M5GFX/lgfx/v1/LGFX_Button.cpp.o
*** [.pio/build/m5stickcplus2/src/main.cpp.o] Error 1
========================================================================== [FAILED] Took 31.68 seconds ==========================================================================
Environment Status Duration
------------- -------- ------------
m5stickcplus2 FAILED 00:00:31.677
===================================================================== 1 failed, 0 succeeded in 00:00:31.677 =====================================================================
* The terminal process "platformio 'run', '--environment', 'm5stickcplus2'" terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.
Reverted to the first version of the code (can compile) and tried flashing on a regular ES32 and get same error Operation timed out
:
Processing esp32 (platform: espressif32; board: esp32doit-devkit-v1; framework: arduino)
-------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32doit-devkit-v1.html
PLATFORM: Espressif 32 (6.5.0) > DOIT ESP32 DEVKIT V1
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, 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.20014.231204 (2.0.14)
- tool-esptoolpy @ 1.40501.0 (4.5.1)
- tool-mkfatfs @ 2.0.1
- tool-mklittlefs @ 1.203.210628 (2.3)
- tool-mkspiffs @ 2.230.0 (2.30)
- toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 34 compatible libraries
Scanning dependencies...
Dependency Graph
|-- PubSubClient @ 2.8.0
|-- ArduinoOTA @ 2.0.0
|-- WiFi @ 2.0.0
|-- EEPROM @ 2.0.0
|-- WiFiClientSecure @ 2.0.0
Building in release mode
Retrieving maximum program size .pio/build/esp32/firmware.elf
Checking size .pio/build/esp32/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [== ] 18.0% (used 59092 bytes from 327680 bytes)
Flash: [====== ] 61.4% (used 804929 bytes from 1310720 bytes)
Configuring upload protocol...
AVAILABLE: cmsis-dap, esp-bridge, 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...
Using manually specified: /dev/cu.usbmodem57160279681
Uploading .pio/build/esp32/firmware.bin
esptool.py v4.5.1
Serial port /dev/cu.usbmodem57160279681
Connecting....
Chip is ESP32-D0WD-V3 (revision v3.1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: fc:b4:67:f5:6e:bc
Uploading stub...
A fatal error occurred: Failed to write to target RAM (result was 01070000: Operation timed out)
*** [upload] Error 2
======================================================= [FAILED] Took 4.88 seconds =======================================================
Environment Status Duration
------------- -------- ------------
esp32 FAILED 00:00:04.882
================================================== 1 failed, 0 succeeded in 00:00:04.882 ==================================================
* The terminal process "platformio 'run', '--target', 'upload', '--environment', 'esp32', '--upload-port', '/dev/cu.usbmodem57160279681'" terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.
I created a build from a forked environment and managed to compile and upload the build. Snag is that I had to select the M5stickc Plus
environment as the M5stickc Plus 2
was not available to select.
I'll wait for the new code to be available as per https://github.com/raomin/ESPAltherma/issues/410#issuecomment-1999015789 and try again
I fixed the issue with PIN_THERM_ACTIVE_STATE
not being available, just committed it.
Did you manage to get your upload working, do you know what it was?
I fixed the issue with
PIN_THERM_ACTIVE_STATE
not being available, just committed it. Did you manage to get your upload working, do you know what it was?
I managed to upload the code from the Git fork (no errors thrown) but nothing appears in the lcd (stays black) and no mqtt report (ps: still not connected to the heat pump)
Still getting errors with new code:
Processing m5stickcplus2 (platform: espressif32; board: m5stick-c; framework: arduino)
-------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/m5stick-c.html
PLATFORM: Espressif 32 (6.5.0) > M5Stick-C
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, 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.20014.231204 (2.0.14)
- tool-esptoolpy @ 1.40501.0 (4.5.1)
- toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 39 compatible libraries
Scanning dependencies...
Dependency Graph
|-- M5StickCPlus2 @ 1.0.2
|-- PubSubClient @ 2.8.0
|-- ArduinoOTA @ 2.0.0
|-- WiFi @ 2.0.0
|-- EEPROM @ 2.0.0
|-- WiFiClientSecure @ 2.0.0
Building in release mode
Compiling .pio/build/m5stickcplus2/src/main.cpp.o
Building .pio/build/m5stickcplus2/bootloader.bin
Generating partitions .pio/build/m5stickcplus2/partitions.bin
esptool.py v4.5.1
Creating esp32 image...
Merged 1 ELF section
Successfully created esp32 image.
Compiling .pio/build/m5stickcplus2/lib03e/SPI/SPI.cpp.o
Compiling .pio/build/m5stickcplus2/lib329/Wire/Wire.cpp.o
Compiling .pio/build/m5stickcplus2/libbeb/M5GFX/M5GFX.cpp.o
Compiling .pio/build/m5stickcplus2/libbeb/M5GFX/lgfx/Fonts/IPA/lgfx_font_japan.c.o
Compiling .pio/build/m5stickcplus2/libbeb/M5GFX/lgfx/Fonts/efont/lgfx_efont_cn.c.o
Compiling .pio/build/m5stickcplus2/libbeb/M5GFX/lgfx/Fonts/efont/lgfx_efont_ja.c.o
Compiling .pio/build/m5stickcplus2/libbeb/M5GFX/lgfx/Fonts/efont/lgfx_efont_kr.c.o
In file included from src/main.cpp:31:
include/mqtt.h: In function 'void callbackSafety(byte*, unsigned int)':
include/mqtt.h:212:37: error: 'SAFETY_RELAY_ACTIVE_STATE' was not declared in this scope
digitalWrite(SAFETY_RELAY_PIN, !SAFETY_RELAY_ACTIVE_STATE);
^~~~~~~~~~~~~~~~~~~~~~~~~
include/mqtt.h:212:37: note: suggested alternative: 'SG_RELAY_ACTIVE_STATE'
digitalWrite(SAFETY_RELAY_PIN, !SAFETY_RELAY_ACTIVE_STATE);
^~~~~~~~~~~~~~~~~~~~~~~~~
SG_RELAY_ACTIVE_STATE
include/mqtt.h:218:36: error: 'SAFETY_RELAY_ACTIVE_STATE' was not declared in this scope
digitalWrite(SAFETY_RELAY_PIN, SAFETY_RELAY_ACTIVE_STATE);
^~~~~~~~~~~~~~~~~~~~~~~~~
include/mqtt.h:218:36: note: suggested alternative: 'SG_RELAY_ACTIVE_STATE'
digitalWrite(SAFETY_RELAY_PIN, SAFETY_RELAY_ACTIVE_STATE);
^~~~~~~~~~~~~~~~~~~~~~~~~
SG_RELAY_ACTIVE_STATE
src/main.cpp: In function 'void setup()':
src/main.cpp:314:35: error: 'SAFETY_RELAY_ACTIVE_STATE' was not declared in this scope
digitalWrite(SAFETY_RELAY_PIN, !SAFETY_RELAY_ACTIVE_STATE);
^~~~~~~~~~~~~~~~~~~~~~~~~
src/main.cpp:314:35: note: suggested alternative: 'SG_RELAY_ACTIVE_STATE'
digitalWrite(SAFETY_RELAY_PIN, !SAFETY_RELAY_ACTIVE_STATE);
^~~~~~~~~~~~~~~~~~~~~~~~~
SG_RELAY_ACTIVE_STATE
Archiving .pio/build/m5stickcplus2/lib03e/libSPI.a
Archiving .pio/build/m5stickcplus2/lib329/libWire.a
*** [.pio/build/m5stickcplus2/src/main.cpp.o] Error 1
Indexing .pio/build/m5stickcplus2/lib03e/libSPI.a
Indexing .pio/build/m5stickcplus2/lib329/libWire.a
======================================================= [FAILED] Took 7.19 seconds =======================================================
Environment Status Duration
------------- -------- ------------
m5stickcplus2 FAILED 00:00:07.194
================================================== 1 failed, 0 succeeded in 00:00:07.194 ==================================================
* The terminal process "platformio 'run', '--environment', 'm5stickcplus2'" terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.
Same issue here, I'm also running VSC with platform on a Mac and unable to flash/upload the M5stickC. Getting the same error code.
Verbose mode can be enabled via -v, --verbose
option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/m5stick-c.html
PLATFORM: Espressif 32 (6.1.0) > M5Stick-C
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, 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:
Environment Status Duration
m5stickc FAILED 00:00:04.545 ================================================= 1 failed, 0 succeeded in 00:00:04.545 =================================================
Thnxs for all the updates, today I was able to flash the device. :)
Great, sorry for these glitches. Enjoy!
Great, sorry for these glitches. Enjoy!
@raomin this issue still stands. See my last update I don't think you should close this ticket
@vdiogo I fixed the missing SAFETY_RELAY_ACTIVE_STATE
and cross checked it's properly building.
If you still have an issue once the build is working, can you open a dedicated one please?
@vdiogo I fixed the missing
SAFETY_RELAY_ACTIVE_STATE
and cross checked it's properly building. If you still have an issue once the build is working, can you open a dedicated one please?
Apologies, all good! I used the build version from yesterday and was still getting the errors. Just downloaded, build an upload :) Screen shows the "Setting up wifi..." message and now time to connect the stick to the pump
@vdiogo Do you have your M5stickc Plus 2 device connected to a Windows machine through an USB port? If yes, have you changed anything in "upload_port" property or just left it as auto?
I was able to build the project successfully, but I'm not able to upload it to my device.
I'm getting below error:
Configuring upload protocol...
AVAILABLE: cmsis-dap, esp-bridge, 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...
Error: Please specify upload_port
for environment or use global --upload-port
option.
For some development platforms it can be a USB flash drive (i.e. /media/
Environment Status Duration
m5stickcplus2 FAILED 00:01:23.799 ================================ 1 failed, 0 succeeded in 00:01:23.799 ================================
Any help will be much appreciated!
@vdiogo Do you have your M5stickc Plus 2 device connected to a Windows machine through an USB port? If yes, have you changed anything in "upload_port" property or just left it as auto?
I'm using a Mac and the serial port was found properly
Thanks @vdiogo for quick reply! Have you installed any driver to make M5stickc Plus 2 device being recognized?
I found the reason for my M5stickc Plus 2 device not being recognized in Windows 11. It's because my USB cable is for charge only and it doesn't do for data as well.....After I connected another USB cable, just refreshed the list of devices in Visual Studio, and here it is :)
I have followed the instructions on the Git (first time I have used Visual Studio Code or M5stack products) and after downloading the entire code to my local disk and opening it with VSC, adjusted:
Tried with environment m5stickcplus2 (later changed to m5stickcplus) , connected the M5StickC Plus2 to macOs and pressed PlatforIO:Upload, and the process failed.
Afterwards, I tried compiling the code (PlatforIO:Build) and it also fails.
I can't determine if this is related with the ESP32 used, or some other issue with the compiled code. Happy to further troubleshoot if someone can guide me here.
I did found some errors: