PlatformIO Community

ESP32 fail to start debug jlink

Dear sirs
I am using jlink for debug in ESP32 ; until now is working ok ; but in a new project is giving the next error and I can not start debug

COMPILATION OK
Linking .pio/build/esp32dev/firmware.elf
Retrieving maximum program size .pio/build/esp32dev/firmware.elf
Checking size .pio/build/esp32dev/firmware.elf
Advanced Memory Usage is available via “PlatformIO Home > Project Inspect”
RAM: [== ] 21.6% (used 70720 bytes from 327680 bytes)
Flash: [========= ] 91.5% (used 2878214 bytes from 3145728 bytes)
Building .pio/build/esp32dev/firmware.bin
esptool.py v3.1
Merged 1 ELF section
======================== [SUCCESS] Took 122.03 seconds ========================

Reading symbols from /home/manuel/Documents/PlatformIO/Projects/esp32Marçalv8_vmlp/.pio/build/esp32dev/firmware.elf…
done.
PlatformIO Unified Debugger → http://bit.ly/pio-debug
PlatformIO: debug_tool = jlink
PlatformIO: Initializing remote target…
Open On-Chip Debugger v0.10.0-esp32-20210721 (2021-07-21-13:33)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
WARNING: boards/esp-wroom-32.cfg is deprecated, and may be removed in a future release.
adapter speed: 5000 kHz

Info : tcl server disabled
Info : telnet server disabled
Info : J-Link ARM V8 compiled Nov 28 2014 13:44:46
Info : Hardware version: 8.00
Info : VTarget = 3.351 V
Info : clock speed 5000 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 : esp32.cpu0: Detected debug stubs @ 3ffcd318
Info : esp32.cpu1: Debug controller was reset.
Info : esp32.cpu1: Core was reset.
Info : accepting ‘gdb’ connection from pipe
Warn : No symbols for FreeRTOS!
Info : esp32.cpu0: Target halted, PC=0x40135156, debug_reason=00000000
Info : Set GDB target to ‘esp32.cpu0’
Info : esp32.cpu1: Target halted, PC=0x40135156, debug_reason=00000000
Warn : Not full dbg stub table 1 of 2
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Info : Flash mapping 0: 0x10020 → 0x3f400020, 2306 KB
Info : Flash mapping 1: 0x260018 → 0x400d0018, 412 KB
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
Info : Flash mapping 0: 0x10020 → 0x3f400020, 2306 KB
Info : Flash mapping 1: 0x260018 → 0x400d0018, 412 KB
Info : Using flash bank ‘esp32.cpu0.irom’ size 416 KB
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Info : Flash mapping 0: 0x10020 → 0x3f400020, 2306 KB
Info : Flash mapping 1: 0x260018 → 0x400d0018, 412 KB
Info : Using flash bank ‘esp32.cpu0.drom’ size 2308 KB
Info : New GDB Connection: 1, Target esp32.cpu0, state: halted
0x40135156 in _svfwprintf_r (data=, fp=, fmt0=, ap=…) at …/…/…/…/./newlib/libc/stdio/vfwprintf.c:924
924 …/…/…/…/./newlib/libc/stdio/vfwprintf.c: No existe el archivo o el directorio.
Loading section .flash.rodata, size 0x242070 lma 0x3f400020
Warn : address 0x3f641000 not writable
Warn : address 0x3f642000 not writable
.pioinit:12: Error in sourced command file:
Load failed
.pioinit:12: Error in sourced command file:
Load failed

FINALLY DO NOT START

Any one can help

Many thanls

Well it’s trying to write into flash but unsucessfully so. The address is pretty much the start of flash.

grafik

Either there is a problem with PlatformIO starting JLink / giving it information, the JLink software has a problem or the flash is somehow write-protected. I’d suggest you open an issue at https://github.com/platformio/platform-espressif32/issues to get further help from the developers.

thanks i will follow your recomendation

Dear Maxgerhardt

Another details about the issue . I can download the code in platformio using download using jlink