Just need to get confirmation if the two issues I have with the PIO/VSCode is my setup or if it is something I should report in a PR.
My PIO / VSCode setup:
PlatformIO Core, version 5.2.2
Version: 1.61.2 (user setup)
OS: Windows_NT x64 10.0.19043
default_envs = nodemcu-32s
platform = espressif32
framework = espidf
board = nodemcu-32s
board_upload.flash_size = 4MB
board_upload.maximum_size = 4194304
board_build.partitions = ESP32_OTA_4M.csv
board_build.embed_files = src/cert/ca_cert.pem
monitor_speed = 115200
debug_tool = olimex-arm-usb-ocd-h
debug_speed = 8000
build_flags = -DCORE_DEBUG_LEVEL=5
As described in,
Cannot start debugger
I need to Erase the Flash manually when I change from release to debug mode or I will get the mentioned ‘Failed to launch GDB’ error.
I have also realized that the first time the debugger starts (after erasing the flash) it will halt with the error:
PlatformIO: Initialization completed
PlatformIO: Resume the execution to
debug_init_break = thb app_main
PlatformIO: More configuration options → Redirecting...
Warn : address 0x4010ef04 not writable
Error: esp32.cpu0: Failed to write breakpoint instruction (-4)!
Error: esp32.cpu0: Failed to add SW breakpoint!
Error: can’t add breakpoint: unknown reason
Cannot insert breakpoint 2.
Cannot access memory at address 0x4010ef04
The workaround is to just stop the debugger and make a new ‘Start Debugging’ and the debugger will work as expected.
So, is this worth a PR or is it just to be expected with my setup?