Updated platform to pioarduino, since default platform is old and deprecated.

This solved the compile issues and enabled use of VScode for development. Hint from this post on github: https://github.com/espressif/arduino-esp32/issues/10721
This commit is contained in:
2025-06-20 16:54:57 +02:00
parent 1a92672603
commit 8087774c89
9 changed files with 29 additions and 17 deletions

18
.vscode/launch.json vendored
View File

@@ -12,9 +12,9 @@
"type": "platformio-debug",
"request": "launch",
"name": "PIO Debug",
"executable": "d:/Emanuele/Documenti/VScode/ETcontroller_PRO/.pio/build/esp32-s3-devkitm-1/firmware.elf",
"projectEnvName": "esp32-s3-devkitm-1",
"toolchainBinDir": "C:/Users/Emanuele Trabattoni/.platformio/packages/toolchain-xtensa-esp32s3/bin",
"executable": "C:/Users/ematr/Documents/VScode/ETcontroller_PRO/.pio/build/esp32-s3-waveshare8/firmware.elf",
"projectEnvName": "esp32-s3-waveshare8",
"toolchainBinDir": "C:/Users/ematr/.platformio/packages/toolchain-xtensa-esp-elf/bin",
"internalConsoleOptions": "openOnSessionStart",
"preLaunchTask": {
"type": "PlatformIO",
@@ -25,18 +25,18 @@
"type": "platformio-debug",
"request": "launch",
"name": "PIO Debug (skip Pre-Debug)",
"executable": "d:/Emanuele/Documenti/VScode/ETcontroller_PRO/.pio/build/esp32-s3-devkitm-1/firmware.elf",
"projectEnvName": "esp32-s3-devkitm-1",
"toolchainBinDir": "C:/Users/Emanuele Trabattoni/.platformio/packages/toolchain-xtensa-esp32s3/bin",
"executable": "C:/Users/ematr/Documents/VScode/ETcontroller_PRO/.pio/build/esp32-s3-waveshare8/firmware.elf",
"projectEnvName": "esp32-s3-waveshare8",
"toolchainBinDir": "C:/Users/ematr/.platformio/packages/toolchain-xtensa-esp-elf/bin",
"internalConsoleOptions": "openOnSessionStart"
},
{
"type": "platformio-debug",
"request": "launch",
"name": "PIO Debug (without uploading)",
"executable": "d:/Emanuele/Documenti/VScode/ETcontroller_PRO/.pio/build/esp32-s3-devkitm-1/firmware.elf",
"projectEnvName": "esp32-s3-devkitm-1",
"toolchainBinDir": "C:/Users/Emanuele Trabattoni/.platformio/packages/toolchain-xtensa-esp32s3/bin",
"executable": "C:/Users/ematr/Documents/VScode/ETcontroller_PRO/.pio/build/esp32-s3-waveshare8/firmware.elf",
"projectEnvName": "esp32-s3-waveshare8",
"toolchainBinDir": "C:/Users/ematr/.platformio/packages/toolchain-xtensa-esp-elf/bin",
"internalConsoleOptions": "openOnSessionStart",
"loadMode": "manual"
}

5
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,5 @@
{
"files.associations": {
"esp32-hal.h": "c"
}
}

3
CMakeLists.txt Normal file
View File

@@ -0,0 +1,3 @@
cmake_minimum_required(VERSION 3.16.0)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(ETcontroller_PRO)

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
cda0d1d4f19a5b63f560f45fa5bf4bc81f42e811

View File

@@ -8,9 +8,9 @@
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
[env:esp32-s3-devkitm-1]
platform = espressif32
board = esp32-s3-devkitm-1
[env:esp32-s3-waveshare8]
platform = https://github.com/pioarduino/platform-espressif32/releases/download/54.03.20/platform-espressif32.zip
board = esp32-s3-waveshare8
framework = arduino
lib_deps =
bblanchon/ArduinoJson@^7.4.2

6
src/CMakeLists.txt Normal file
View File

@@ -0,0 +1,6 @@
# This file was automatically generated for projects
# without default 'CMakeLists.txt' file.
FILE(GLOB_RECURSE app_sources ${CMAKE_SOURCE_DIR}/src/*.*)
idf_component_register(SRCS ${app_sources})

View File

@@ -31,7 +31,7 @@ void GPIO_Init() {
/************************************************************* RGB *************************************************************/
void RGB_Light(uint8_t red_val, uint8_t green_val, uint8_t blue_val) {
neopixelWrite(GPIO_PIN_RGB, green_val, red_val, blue_val); // RGB color adjustment
rgbLedWrite(GPIO_PIN_RGB, green_val, red_val, blue_val); // RGB color adjustment
}
RGB_Indicate RGB_indicate[RGB_Indicate_Number];
static uint8_t RGB_indicate_Num = 0;

View File

@@ -14,8 +14,8 @@ char sub[] = MQTT_Sub; // MQTT subscribe to topics
WiFiClient espClient; //MQTT initializes the contents
PubSubClient client(espClient);
StaticJsonDocument<400> sendJson;
StaticJsonDocument<400> readJson;
JsonDocument sendJson;
JsonDocument readJson;
unsigned long lastUpdateTime = 0;
char msg[MSG_BUFFER_SIZE];
bool WIFI_Connection = 0;