I was previously using a complex build setup using esp-idf with arduino as a component, spefically esp-idf 3.3.5 and arduino-esp32 v1.06 with menuconfig tweaks required to get things working.
I just refactored the code to work with Visual Studio Code + PlatformIO + Espressif esp32dev platform + Arduino framework using the platformio.ini dependencies noted in this thread.
Code: Select all
[env:esp32dev]
;platform = espressif32
platform = https://github.com/platformio/platform-espressif32.git#feature/idf-master
platform_packages = framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32#2.0.0-rc1
board = esp32dev
framework = arduino
board_build.f_cpu = 80000000L
; 4MB flash, spiffs partition = 0x30000 bytes, app partition = 0x1E0000 bytes x 2 (OTA firmware update support)
board_build.partitions = min_spiffs.csv
upload_port = /dev/ttyUSB*
upload_speed = 921600
monitor_port = /dev/ttyUSB*
monitor_speed = 115200
monitor_filters = esp32_exception_decoder
build_flags =
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
-DCONFIG_FREERTOS_HZ=1000
-DCONFIG_MAIN_TASK_STACK_SIZE=16384
lib_deps =
https://github.com/me-no-dev/AsyncTCP.git
https://github.com/me-no-dev/ESPAsyncWebServer.git
https://github.com/har-in-air/ESP32_IMU_BARO_GPS_VARIO
And it works ... the VSC IDE with PlatformIO is so much easier to work with including git integration. The only problem I am facing is a SPIFFS related issue. I am using ESP32AsyncWebServer. When I try to upload a file to the SPIFFS partition and it already exists, deleting the existing file and opening a new file to write does not work. The upload completes without error, but the resulting file listing shows a 0bytes file.
However, if I execute two separate webserver transactions, one to delete the file and the second to upload the replacement file, it works. If you are aware of SPIFFS file replacement issues or tips, please let me know ...
Thanks again