ESP32-S3-WROOM-1 ESP PROG flash/debug issues

Svetoslav
Posts: 1
Joined: Tue Apr 29, 2025 12:27 pm

ESP32-S3-WROOM-1 ESP PROG flash/debug issues

Postby Svetoslav » Tue Apr 29, 2025 1:19 pm

Hello,
I have an ESP32-S3-WROOM-1-N8R2 on a custom board with a JTAG connector.
The JTAG connection is the following to the chip:
jtag1.png
jtag1.png (36.15 KiB) Viewed 470 times
jlink2.png
jlink2.png (10.95 KiB) Viewed 470 times
I am trying to flash and debug code with an ESP-Prog.
In the ESP-IDF configurations, I am creating the basic "hello world" project, where in "Choose ESP-IDF Board" I select ESP32-S3 (via ESP-PROG). I have done no extra configurations in the SDK Configuration editor, and all settings are the default ones. The pin header for selecting the power supply on the ESP-Prog is set to 3.3V.

When I flash the code, I have the following output:

Code: Select all

[Build]
Project build complete. To flash, run:
ESP-IDF: Flash your project in the ESP-IDF Visual Studio Code Extension
or in a ESP-IDF Terminal:
idf.py flash
or
idf.py -p PORT flash
or
python -m esptool --chip esp32 -b 460800 --before default_reset --after hard_reset  --port /dev/ttyUSB1 write_flash --flash_mode dio --flash_size 2MB --flash_freq 40m 0x1000 bootloader/bootloader.bin 0x10000 project-name.bin 0x8000 partition_table/partition-table.bin 
or from the "/home/svetoslav/project-name/build" directory
python -m esptool --chip esp32 -b 460800 --before default_reset --after hard_reset write_flash "@flash_args"
/home/svetoslav/.espressif/tools/openocd-esp32/v0.12.0-esp32-20250226/openocd-esp32/bin/openocd

Open On-Chip Debugger v0.12.0-esp32-20250226 (2025-02-26-13:16)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html

/home/svetoslav/.espressif/tools/openocd-esp32/v0.12.0-esp32-20250226/openocd-esp32/bin/openocd

[/Build]
[OpenOCD]
Open On-Chip Debugger v0.12.0-esp32-20250226 (2025-02-26-13:16)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
debug_level: 2

adapter speed: 20000 kHz

Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections

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: esp32s3.tap0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32s3.tap1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : [esp32s3.cpu0] Examination succeed

❌ Warn : [esp32s3.cpu1] Unexpected OCD_ID = 00000000
Error: [esp32s3.cpu1] Examination failed
Warn : target esp32s3.cpu1 examination failed
Info : [esp32s3.cpu0] starting gdb server on 3333
Info : Listening on port 3333 for gdb connections

Info : [esp32s3.cpu0] Debug controller was reset.
Info : [esp32s3.cpu0] Core was reset.

Info : [esp32s3.cpu0] Target halted, PC=0x400454D5, debug_reason=00000000

❌ Info : [esp32s3.cpu0] Reset cause (16) - (RTC WDT core and rtc reset)
Warn : [esp32s3.cpu1] Unexpected OCD_ID = 00000000
Error: [esp32s3.cpu1] Examination failed

❌ Warn : [esp32s3.cpu1] Unexpected OCD_ID = 00000000
Error: [esp32s3.cpu1] Examination failed

❌ Warn : [esp32s3.cpu1] Unexpected OCD_ID = 00000000
Error: [esp32s3.cpu1] Examination failed

❌ Warn : [esp32s3.cpu1] Unexpected OCD_ID = 00000000
Error: [esp32s3.cpu1] Examination failed

❌ Warn : [esp32s3.cpu1] Unexpected OCD_ID = 00000000
Error: [esp32s3.cpu1] Examination failed

Info : accepting 'tcl' connection on tcp/6666
Info : dropped 'tcl' connection

Info : accepting 'tcl' connection on tcp/6666
ready

Flashing "/home/svetoslav/project-name/build/bootloader/bootloader.bin" at 0x1000
** program_esp input args <0x1000 verify> **

Info : JTAG tap: esp32s3.tap0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32s3.tap1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)

Warn : [esp32s3.cpu1] Unexpected OCD_ID = 00000000
Info : [esp32s3.cpu0] requesting target halt and executing a soft reset

Info : [esp32s3.cpu0] Target halted, PC=0x400454D5, debug_reason=00000000
Info : Set GDB target to 'esp32s3.cpu0'

Info : [esp32s3.cpu0] Debug controller was reset.
Info : [esp32s3.cpu0] Core was reset.

Info : [esp32s3.cpu0] Target halted, PC=0x500000EF, debug_reason=00000000

Info : [esp32s3.cpu0] Reset cause (3) - (Software core reset)

Info : [esp32s3.cpu0] Core was reset.

Info : [esp32s3.cpu0] Target halted, PC=0x40000400, debug_reason=00000000

Info : [esp32s3.cpu1] Debug controller was reset.
Info : [esp32s3.cpu1] Core was reset.

Info : [esp32s3.cpu1] Target halted, PC=0x40000400, debug_reason=00000000

Info : [esp32s3.cpu1] Reset cause (3) - (Software core reset)

Info : [esp32s3.cpu0] Reset cause (3) - (Software core reset)

** Programming Started **

Info : [esp32s3.cpu0] Target halted, PC=0x4038CCA2, debug_reason=00000001

Warn : Empty flash mapping!
Warn : Failed to get flash mappings (0)!
Info : Auto-detected flash bank 'esp32s3.cpu0.flash' size 8192 KB
Info : Using flash bank 'esp32s3.cpu0.flash' size 8192 KB

Info : [esp32s3.cpu0] Target halted, PC=0x4038D3FE, debug_reason=00000001

You can enable `skip_loaded` to increase download speed.

Info : [esp32s3.cpu0] Target halted, PC=0x4038C87E, debug_reason=00000001

Info : PROF: Erased 28672 bytes in 141.55 ms

Info : PROF: Data transferred in 86.205 ms @ 324.807 KB/s

Info : [esp32s3.cpu0] Target halted, PC=0x4038D3EE, debug_reason=00000001

Info : PROF: Wrote 28672 bytes in 239.422 ms (data transfer time included)

** Programming Finished in 565 ms **
** Verify Started **

Info : [esp32s3.cpu0] Target halted, PC=0x4038CC52, debug_reason=00000001

Info : PROF: Flash verified in 30.487 ms 
** Verify OK **
** Flashing done for bootloader/bootloader.bin in 597 ms **
Flashing "/home/svetoslav/project-name/build/project-name.bin" at 0x10000
** program_esp input args <0x10000 verify> **

Info : JTAG tap: esp32s3.tap0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32s3.tap1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)

Info : [esp32s3.cpu0] requesting target halt and executing a soft reset

Info : [esp32s3.cpu0] Debug controller was reset.
Info : [esp32s3.cpu0] Core was reset.

Info : [esp32s3.cpu0] Target halted, PC=0x500000EF, debug_reason=00000000

Info : [esp32s3.cpu0] Reset cause (3) - (Software core reset)

Info : [esp32s3.cpu0] Core was reset.

Info : [esp32s3.cpu0] Target halted, PC=0x40000400, debug_reason=00000000

Info : [esp32s3.cpu1] Debug controller was reset.
Info : [esp32s3.cpu1] Core was reset.

Info : [esp32s3.cpu1] Target halted, PC=0x40000400, debug_reason=00000000

Info : [esp32s3.cpu1] Reset cause (3) - (Software core reset)

Info : [esp32s3.cpu0] Reset cause (3) - (Software core reset)

** Programming Started **

Info : [esp32s3.cpu0] Target halted, PC=0x4038D3FE, debug_reason=00000001

You can enable `skip_loaded` to increase download speed.

Info : [esp32s3.cpu0] Target halted, PC=0x4038C87E, debug_reason=00000001

Info : PROF: Erased 155648 bytes in 512.73 ms

Info : PROF: Data transferred in 444.843 ms @ 341.694 KB/s

Info : [esp32s3.cpu0] Target halted, PC=0x4038D3EE, debug_reason=00000001

Info : PROF: Wrote 155648 bytes in 612.33 ms (data transfer time included)

** Programming Finished in 1280 ms **
** Verify Started **

Info : [esp32s3.cpu0] Target halted, PC=0x4038CC52, debug_reason=00000001

Info : PROF: Flash verified in 100.619 ms 

** Verify OK **
** Flashing done for project-name.bin in 1386 ms **
Flashing "/home/svetoslav/project-name/build/partition_table/partition-table.bin" at 0x8000
** program_esp input args <0x8000 verify> **

Info : JTAG tap: esp32s3.tap0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32s3.tap1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)

Info : [esp32s3.cpu0] requesting target halt and executing a soft reset

Info : [esp32s3.cpu0] Debug controller was reset.
Info : [esp32s3.cpu0] Core was reset.

Info : [esp32s3.cpu0] Target halted, PC=0x500000EF, debug_reason=00000000

Info : [esp32s3.cpu0] Reset cause (3) - (Software core reset)

Info : [esp32s3.cpu0] Core was reset.

Info : [esp32s3.cpu0] Target halted, PC=0x40000400, debug_reason=00000000

Info : [esp32s3.cpu1] Debug controller was reset.
Info : [esp32s3.cpu1] Core was reset.

Info : [esp32s3.cpu1] Target halted, PC=0x40000400, debug_reason=00000000
Info : [esp32s3.cpu1] Reset cause (3) - (Software core reset)

Info : [esp32s3.cpu0] Reset cause (3) - (Software core reset)

** Programming Started **

Info : [esp32s3.cpu0] Target halted, PC=0x4038D3FE, debug_reason=00000001

You can enable `skip_loaded` to increase download speed.

Info : [esp32s3.cpu0] Target halted, PC=0x4038C87E, debug_reason=00000001

Info : PROF: Erased 4096 bytes in 34.164 ms

Info : [esp32s3.cpu0] Target halted, PC=0x4038D3EE, debug_reason=00000001

Info : PROF: Data transferred in 24.676 ms @ 162.101 KB/s

Info : PROF: Wrote 4096 bytes in 143.253 ms (data transfer time included)

** Programming Finished in 335 ms **
** Verify Started **

Info : [esp32s3.cpu0] Target halted, PC=0x4038CC52, debug_reason=00000001

Info : PROF: Flash verified in 18.549 ms 
** Verify OK **
** Flashing done for partition_table/partition-table.bin in 354 ms **
** Total programming time 2337 ms **
** Resetting Target **

Info : JTAG tap: esp32s3.tap0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32s3.tap1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)

Info : [esp32s3.cpu0] requesting target halt and executing a soft reset

Info : [esp32s3.cpu0] Debug controller was reset.
Info : [esp32s3.cpu0] Core was reset.

Info : [esp32s3.cpu0] Target halted, PC=0x500000EF, debug_reason=00000000

Info : [esp32s3.cpu0] Reset cause (3) - (Software core reset)

Info : [esp32s3.cpu0] Core was reset.
Info : [esp32s3.cpu1] Debug controller was reset.
Info : [esp32s3.cpu1] Core was reset.
0

[/OpenOCD]
Flash
⚡️ Flashed Successfully (JTag)
Flash has finished. You can monitor your device with 'ESP-IDF: Monitor command'
[/Flash]
[OpenOCD]
Info : [esp32s3.cpu0] Target halted, PC=0x400454D5, debug_reason=00000000

Info : [esp32s3.cpu0] Reset cause (3) - (Software core reset)

Info : [esp32s3.cpu1] Target halted, PC=0x40043A40, debug_reason=00000000

Info : [esp32s3.cpu1] Reset cause (3) - (Software core reset)


Also when I start debugging with a breakpoint I get the following output:

Code: Select all

Info : accepting 'gdb' connection on tcp/3333

Info : [esp32s3.cpu0] Target halted, PC=0x400454D5, debug_reason=00000000

Info : [esp32s3.cpu1] Target halted, PC=0x40043A40, debug_reason=00000000

Warn : No symbols for FreeRTOS!

Info : [esp32s3.cpu0] Target halted, PC=0x4038CCA2, debug_reason=00000001

Warn : Empty flash mapping!
Warn : Failed to get flash mappings (0)!
Info : Using flash bank 'esp32s3.cpu0.irom' size 0 KB

Info : [esp32s3.cpu0] Target halted, PC=0x4038CCA2, debug_reason=00000001

Warn : Empty flash mapping!
Warn : Failed to get flash mappings (0)!
Info : Using flash bank 'esp32s3.cpu0.drom' size 0 KB
Info : New GDB Connection: 1, Target esp32s3.cpu0, state: halted

Info : JTAG tap: esp32s3.tap0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32s3.tap1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)

Info : [esp32s3.cpu0] requesting target halt and executing a soft reset

Info : [esp32s3.cpu0] Debug controller was reset.

Info : [esp32s3.cpu0] Core was reset.

Info : [esp32s3.cpu0] Target halted, PC=0x500000EF, debug_reason=00000000

❌ Info : [esp32s3.cpu0] Reset cause (3) - (Software core reset)
Warn : address 0x3ffb244c not writable
Error: Failed to clear uxCurrentNumberOfTasks!
Warn : Failed to do rtos-specific cleanup (-4)

Info : [esp32s3.cpu0] Target halted, PC=0x500000EF, debug_reason=00000000

Info : [esp32s3.cpu1] Debug controller was reset.
Info : [esp32s3.cpu1] Core was reset.

Info : [esp32s3.cpu1] Target halted, PC=0x500000EF, debug_reason=00000000

Info : [esp32s3.cpu1] Reset cause (3) - (Software core reset)

❌ Error: [esp32s3.cpu0] Failed to read original instruction (-4)!
Error: [esp32s3.cpu0] Failed to add SW breakpoint!
Error: [esp32s3.cpu0] can't add breakpoint: unknown reason

[/OpenOCD]
[SDK Configuration Editor]
Executing action: confserver
Running cmake in directory /home/svetoslav/project-name/build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DPYTHON=/home/svetoslav/.espressif/python_env/idf5.5_py3.10_env/bin/python -DESP_PLATFORM=1 -DSDKCONFIG=/home/svetoslav/project-name/sdkconfig -DCCACHE_ENABLE=0 /home/svetoslav/project-name"...
-- Minimal build - ON

-- git rev-parse returned 'fatal: not a git repository (or any of the parent directories): .git'
-- Could not use 'git describe' to determine PROJECT_VER.
-- Building ESP-IDF components for target esp32
The debugging starts, but if a breakpoint is put, it doesn't work. If I try to pause or restart the code through VS Code, I get the following:

Code: Select all

[OpenOCD]
Info : The target is not running when halt was requested, stopping GDB.

Info : The target is not running when halt was requested, stopping GDB.

Info : The target is not running when halt was requested, stopping GDB.

Info : The target is not running when halt was requested, stopping GDB.

Info : The target is not running when halt was requested, stopping GDB.

Info : The target is not running when halt was requested, stopping GDB.
Info : The target is not running when halt was requested, stopping GDB.

Info : dropped 'gdb' connection

[Stopped] : OpenOCD Server
A lot of the time, after flashing one or two times, OpenOCD starts giving me errors that the device is not detected, and I cannot flash, debug or anything until I restart VS Code, disconnect the board and the device.
Also, after flashing the code and trying to open the serial monitor to see the "Hello World", nothing shows up. Even after a reset of the device, I get nothing on the serial monitor.

I am not sure why I am getting the warnings and errors in the beginning when flashing as well. Does anyone have an idea what could be causing this?

Does anyone know what the issue could be with this? Is there something extra that I need to put as configurations for this board? Or something hardware related to the JTAG interface?

Sprite
Espressif staff
Espressif staff
Posts: 10650
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32-S3-WROOM-1 ESP PROG flash/debug issues

Postby Sprite » Wed Apr 30, 2025 1:45 am

JTAG fails to connect; the rest of the messages are just a result of that. The reason is that by default, the ESP32S3 uses JTAG over the built-in USB-serial-JTAG converter. You will need to connect over that or UART to blow an e-fuse if you want to use 'classic' 4-pin JTAG.

Who is online

Users browsing this forum: DuckDuckGo [Bot], Google [Bot] and 1 guest