Hello,
I inherited a project based on ESP32 developed with VScode IDE, Platformio with Arduino libraries. This platform is new for me.
My predecessors used the console for debugging. I am trying to exploit the Jtag ESP-Prog.
After a long fight I was able to debug a very basic led-blinking application, but when I switch to the project I have to work to, I get the errors below.
I understand the problem involves the flash structure but I have no idea about how to solve this.
The firmware is flashed in this way:
boot_app0.bin @0xe000
bootloader_dio_80m.bin @0x1000
application.partitions.bin @0x8000
application.bin @0x10000
application_web.bin @0x290000
the project uses a default.csv file as follow:
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x140000,
app1, app, ota_1, 0x150000,0x140000,
spiffs, data, spiffs, 0x290000,0x170000,
When I try to debug the app I get the following error:
Reading symbols from C:\Workspace\ESP32\App\.pio\build\esp32doit-devkit-v1\firmware.elf...
done.
PlatformIO Unified Debugger -> https://bit.ly/pio-debug
PlatformIO: debug_tool = esp-prog
PlatformIO: Initializing remote target...
Open On-Chip Debugger v0.10.0-esp32-20210721 (2021-07-21-13:35)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
adapter speed: 20000 kHz
WARNING: boards/esp-wroom-32.cfg is deprecated, and may be removed in a future release.
Info : tcl server disabled
Info : telnet server disabled
Info : ftdi: if you experience problems at higher adapter clocks, try the command "ftdi_tdo_sample_edge falling"
Info : clock speed 20000 kHz
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
Info : accepting 'gdb' connection from pipe
Warn : No symbols for FreeRTOS!
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Target halted, PC=0x40007BA1, debug_reason=00000000
Info : Set GDB target to 'esp32.cpu0'
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Error: Failed to get flash maps (4294967290)!
Warn : Failed to get flash mappings (-4)!
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Info : Auto-detected flash bank 'esp32.cpu0.flash' size 4096 KB
Info : Using flash bank 'esp32.cpu0.flash' size 4096 KB
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Error: Failed to get flash maps (4294967290)!
Warn : Failed to get flash mappings (-4)!
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Info : Using flash bank 'esp32.cpu0.irom' size 0 KB
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Error: Failed to get flash maps (4294967290)!
Warn : Failed to get flash mappings (-4)!
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Info : Using flash bank 'esp32.cpu0.drom' size 0 KB
Info : New GDB Connection: 1, Target esp32.cpu0, state: halted
0x40007ba1 in ?? ()
Loading section .flash.rodata, size 0x46cf4 lma 0x3f400020
Error: Too large number of threads 952509207!
Warn : address 0x3f400020 not writable
Warn : address 0x3f401020 not writable
.pioinit:12: Error in sourced command file:
Load failed