Esp-prog debugging on a Mac - no device found

I can’t verify whether the connections from that custom JTAG mini to dupont male cable is correct due to the custom cable and the miniature size of the picture.

For the ESP32-WROVER-IE chip, the IO pins for JTAG are still the same however, so that shouldn’t be an error - (MTMS = 14, MTDI = 12, MTCK = 13, MTDO=15 datasheet).

Can you use direct female-to-female dupon wires between the larger, standard pitch connector of the esp-prog, without a breadboard in between?

Also a drop to 250kHz speed would be good.

If the error still persists at low speeds, correct GPIO wireup, shared GND, powered target ESP and programmer… there must be something else wrong. Like, somehow selecting the wrong channel of the FTDI chip for JTAG/UART? Dunno.

Its getting a bit late to rewire tonight but will try over the next few days …ill repost then … many many thanks for all your suggestions … its v much appreciated …

Instead of rewiring, use a multimeter to check continuity between the bigger unused JTAG connector and the corresponding pins on the ESP32 module.

hi … Thats exactly what I tried earlier … the connections seem fine …

hi … Ive rewired to the larger jtag connector and think im getting a bit further. Still not debugging though… Would be grateful if any ideas ?

Thanks

Open On-Chip Debugger v0.10.0-esp32-20190708 (2019-07-08-11:04)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
none separate
adapter speed: 1000 kHz
Info : Configured 2 cores
esp32 interrupt mask on
Info : tcl server disabled
Info : telnet server disabled
Info : clock speed 1000 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 : Target halted. PRO_CPU: PC=0x40090064 (active) APP_CPU: PC=0x00000000
Info : accepting 'gdb' connection from pipe
Error: No symbols for FreeRTOS
Ignoring packet error, continuing...
warning: unrecognized item "timeout" in "qSupported" response
Error: timed out while waiting for target halted / 4 - 2
Info : Target halted. PRO_CPU: PC=0x40090069 (active) APP_CPU: PC=0x00000000
Error: xtensa_wait_algorithm: not halted 0, pc 0x40090069, ps 0x60025
Error: Failed to wait algorithm (-302)!
Error: Algorithm run failed (-302)!
Error: Failed to run flasher stub (-302)!
Warn : Failed to get flash mappings (-302)!
Error: Target is already running an algorithm
Error: Failed to start algorithm (-4)!
Error: Algorithm run failed (-4)!
Error: Failed to run flasher stub (-4)!
Error: Target is already running an algorithm
Error: Failed to start algorithm (-4)!
Error: Algorithm run failed (-4)!
Error: Failed to run flasher stub (-4)!
Error: Failed to probe flash, size 0 KB
Error: auto_probe failed
Error: Connect failed. Consider setting up a gdb-attach event for the target to prepare target for GDB connect, or use 'gdb_memory_map disable'.
Error: attempted 'gdb' connection rejected
Ignoring packet error, continuing...
.pioinit:11: Error in sourced command file:
Remote replied unexpectedly to 'vMustReplyEmpty': timeout

This exact same error appears also in topic Debugger only works for some programs - #5 by manuelbl. It was claimed that a better power supply helped. (I’d add to that that also generally lower debugging speeds might help)

thanks for coming back … I lowered it to 500 after this and got a little bit further … but still not debugging … will post later … im beginning to wonder if there’s a hardware fault on my particular prog or esp32 …

hi, Now getting this:

Open On-Chip Debugger v0.10.0-esp32-20190708 (2019-07-08-11:04)

Licensed under GNU GPL v2

For bug reports, read

http://openocd.org/doc/doxygen/bugs.html

none separate

adapter speed: 100 kHz

Info : Configured 2 cores

esp32 interrupt mask on

Info : tcl server disabled

Info : telnet server disabled

Info : clock speed 100 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 : Target halted. PRO_CPU: PC=0x4000921A (active) APP_CPU: PC=0x00000000

Info : accepting ‘gdb’ connection from pipe

Error: No symbols for FreeRTOS

Info : Target halted. PRO_CPU: PC=0x400916EE (active) APP_CPU: PC=0x00000000

Info : Flash mapping 0: 0x10020 → 0x3f400020, 23 KB

Info : Flash mapping 1: 0x20018 → 0x400d0018, 74 KB

Info : Target halted. PRO_CPU: PC=0x400916EE (active) APP_CPU: PC=0x00000000

Info : Auto-detected flash size 8192 KB

Info : Using flash size 8192 KB

Info : Target halted. PRO_CPU: PC=0x400916EE (active) APP_CPU: PC=0x00000000

Info : Flash mapping 0: 0x10020 → 0x3f400020, 23 KB

Info : Flash mapping 1: 0x20018 → 0x400d0018, 74 KB

Info : Using flash size 76 KB

Ignoring packet error, continuing…

warning: unrecognized item “timeout” in “qSupported” response

Info : Target halted. PRO_CPU: PC=0x400916EE (active) APP_CPU: PC=0x00000000

Info : Flash mapping 0: 0x10020 → 0x3f400020, 23 KB

Info : Flash mapping 1: 0x20018 → 0x400d0018, 74 KB

Info : Using flash size 24 KB

Warn : negative reply, retrying

Warn : negative reply, retrying

Warn : negative reply, retrying

.pioinit:11: Error in sourced command file:

Remote replied unexpectedly to ‘vMustReplyEmpty’: PacketSize=3fff;qXfer:memory-map:read+;qXfer:features:read-;qXfer:threads:read+;QStartNoAckMode+;vContSupported+

The first part looks like a good debug connection (as e.g. here, up until the Ignoring packet error, continuing…

Related error messages / topics I could find were debugging problem: unrecognized item "timeout" in "qSupported" response - ESP32 Forum and Linux/OpenOCD debugging with ESP-PROG - problem - ESP32 Forum, the latter one again talking about USB power problems.

Problem - can't debug ESP32 wrover under linux - ESP PROG, Jtag · Issue #103 · espressif/openocd-esp32 · GitHub also talks about flash voltage.

…oh. I think I found something?

Go into your C:\Users\<user>\.platformio\packages\tool-openocd-esp32\share\openocd\scripts\board\esp32-wrover.cfg. See the lines

# Tell OpenOCD which SPI flash voltage is used by the board (3.3 or 1.8)
# The TDI pin of ESP32 is also a bootstrap pin that selects the voltage the SPI flash
# chip runs at. When a hard reset happens (e.g. because someone switches the board off
# and on) the ESP32 will use the current TDI value as the bootstrap value because the
# JTAG adapter overrides the pull-up or pull-down resistor that is supposed to do the
# bootstrapping. These lines basically set the idle value of the TDI line to a
# specified value, therefore reducing the chance of a bad bootup due to a bad flash
# voltage greatly.
# This option defaults to 3.3, if not set. To override the default, uncomment
# the following line:
set ESP32_FLASH_VOLTAGE 1.8

now 1.8V for a wrover module seems to be WRONG in the case of your used ESP32-WROVER-IE (datasheet).

I don’t know whether I made the changes for ESP32_FLASH_VOLTAGE locally but, you should maybe check with both options here. Commenting the line use 3.3V flash voltage seems to be the right thing here.

thanks for coming back again … Ive tried commenting and uncommenting the voltage setting several times… Im getting the same failure for both … latest is below:

Open On-Chip Debugger v0.10.0-esp32-20190708 (2019-07-08-11:04)

Licensed under GNU GPL v2

For bug reports, read

http://openocd.org/doc/doxygen/bugs.html

none separate

adapter speed: 100 kHz

Info : Configured 2 cores

esp32 interrupt mask on

Info : tcl server disabled

Info : telnet server disabled

Info : clock speed 100 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 : Target halted. PRO_CPU: PC=0x400E29FA (active) APP_CPU: PC=0x400E29FA

Info : accepting ‘gdb’ connection from pipe

Error: No symbols for FreeRTOS

Info : Target halted. PRO_CPU: PC=0x400916EE (active) APP_CPU: PC=0x400E29FA

Info : Flash mapping 0: 0x10020 → 0x3f400020, 23 KB

Info : Flash mapping 1: 0x20018 → 0x400d0018, 74 KB

Info : Target halted. PRO_CPU: PC=0x400916EE (active) APP_CPU: PC=0x400E29FA

Info : Auto-detected flash size 8192 KB

Info : Using flash size 8192 KB

Info : Target halted. PRO_CPU: PC=0x400916EE (active) APP_CPU: PC=0x400E29FA

Info : Flash mapping 0: 0x10020 → 0x3f400020, 23 KB

Info : Flash mapping 1: 0x20018 → 0x400d0018, 74 KB

Info : Using flash size 76 KB

Ignoring packet error, continuing…

warning: unrecognized item “timeout” in “qSupported” response

Info : Target halted. PRO_CPU: PC=0x400916EE (active) APP_CPU: PC=0x400E29FA

Info : Flash mapping 0: 0x10020 → 0x3f400020, 23 KB

Info : Flash mapping 1: 0x20018 → 0x400d0018, 74 KB

Info : Using flash size 24 KB

Warn : negative reply, retrying

Warn : negative reply, retrying

Warn : negative reply, retrying

.pioinit:11: Error in sourced command file:

Remote replied unexpectedly to ‘vMustReplyEmpty’: PacketSize=3fff;qXfer:memory-map:read+;qXfer:features:read-;qXfer:threads:read+;QStartNoAckMode+;vContSupported+

Hm I’m slightly out of ideas why it’s giving you so much problems. You might get better support at Issues · espressif/openocd-esp32 · GitHub for openocd related errors.

Hi.

Im trying to use ESP-PROG to debug on Platform io and the sesult is the next:

Info : tcl server disabled
Info : telnet server disabled
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 : TAP auto0.tap has invalid IDCODE (0x0)
Info : TAP auto1.tap has invalid IDCODE (0x0)
Info : TAP auto2.tap has invalid IDCODE (0x0)
Info : TAP auto3.tap has invalid IDCODE (0x0)
Info : TAP auto4.tap has invalid IDCODE (0x0)
Info : TAP auto5.tap has invalid IDCODE (0x0)
Info : TAP auto6.tap has invalid IDCODE (0x0)
Info : TAP auto7.tap has invalid IDCODE (0x0)
Info : TAP auto8.tap has invalid IDCODE (0x0)
Info : TAP auto9.tap has invalid IDCODE (0x0)
Info : TAP auto10.tap has invalid IDCODE (0x0)
Info : TAP auto11.tap has invalid IDCODE (0x0)
Info : TAP auto12.tap has invalid IDCODE (0x0)
Info : TAP auto13.tap has invalid IDCODE (0x0)
Info : TAP auto14.tap has invalid IDCODE (0x0)
Info : TAP auto15.tap has invalid IDCODE (0x0)
Info : TAP auto16.tap has invalid IDCODE (0x0)
Info : TAP auto17.tap has invalid IDCODE (0x0)
Info : TAP auto18.tap has invalid IDCODE (0x0)
Warn : Unexpected idcode after end of chain: 83 0x00000000
Warn : Unexpected idcode after end of chain: 115 0x00000000
Warn : Unexpected idcode after end of chain: 147 0x00000000
Warn : Unexpected idcode after end of chain: 179 0x00000000
Warn : Unexpected idcode after end of chain: 211 0x00000000
Warn : Unexpected idcode after end of chain: 243 0x00000000
Warn : Unexpected idcode after end of chain: 275 0x00000000
Warn : Unexpected idcode after end of chain: 307 0x00000000
Warn : Unexpected idcode after end of chain: 339 0x00000000
Warn : Unexpected idcode after end of chain: 371 0x00000000
Warn : Unexpected idcode after end of chain: 403 0x00000000
Warn : Unexpected idcode after end of chain: 435 0x00000000
Warn : Unexpected idcode after end of chain: 467 0x00000000
Warn : Unexpected idcode after end of chain: 499 0x00000000
Warn : Unexpected idcode after end of chain: 531 0x00000000
Warn : Unexpected idcode after end of chain: 563 0x00000000
Warn : Unexpected idcode after end of chain: 595 0x00000000
Warn : Unexpected idcode after end of chain: 627 0x00000000
Error: double-check your JTAG setup (interface, speed, …)
Error: Trying to use configured scan chain anyway…
Warn : AUTO auto0.tap - use “jtag newtap auto0 tap -irlen 2 -expected-id 0x00000000”
Error: auto0.tap: IR capture error; saw 0x0000 not 0x0001
Warn : Bypassing JTAG setup events due to errors
Info : accepting ‘gdb’ connection from pipe
Warn : No symbols for FreeRTOS!
Error: Target not examined yet
Error executing event gdb-attach on target esp32.cpu0:

Error: Target not halted
Error: auto_probe failed
Error: Connect failed. Consider setting up a gdb-attach event for the target to prepare target for GDB connect, or use ‘gdb_memory_map disable’.
Error: attempted ‘gdb’ connection rejected
Error: error during select: Unknown error
.pioinit:11: Error in sourced command file:
Remote communication error. Target disconnected.: No error.

Can anyone help me?

It found your device so the topic of ‘Mac - no device found’ doesn’t really apply.

Well something is still wrong there. You’ve checked all the wires?

If you are using the latest Espressif32 platform in PlatformIO, you can also add

debug_speed = 500

in the platformio.ini to lower the debugging clock speed.

thanks, there is my platfomio.ini :slight_smile: [env:esp wrover kit]

platform = espressif32
framework = arduino
board = esp-wrover-kit
monitor_speed = 115200
build_flags =
    ; https://docs.espressif.com/projects/esp-idf/en/latest/get-started/get-started-wrover-kit.html#rgb-led
    -D LED_BUILTIN=2
upload_port = COM5
debug_speed = 500
debug_tool = esp-prog
debug_init_break = tbreak setup 

The result is the same:

Info : TAP auto3.tap has invalid IDCODE (0x0)

Info : TAP auto4.tap has invalid IDCODE (0x0)

Info : TAP auto5.tap has invalid IDCODE (0x0)

Info : TAP auto6.tap has invalid IDCODE (0x0)

Info : TAP auto7.tap has invalid IDCODE (0x0)

Info : TAP auto8.tap has invalid IDCODE (0x0)

Info : TAP auto9.tap has invalid IDCODE (0x0)

Info : TAP auto10.tap has invalid IDCODE (0x0)

Info : TAP auto11.tap has invalid IDCODE (0x0)

Info : TAP auto12.tap has invalid IDCODE (0x0)

Info : TAP auto13.tap has invalid IDCODE (0x0)

Info : TAP auto14.tap has invalid IDCODE (0x0)

Info : TAP auto15.tap has invalid IDCODE (0x0)

Info : TAP auto16.tap has invalid IDCODE (0x0)

Info : TAP auto17.tap has invalid IDCODE (0x0)

Info : TAP auto18.tap has invalid IDCODE (0x0)

Warn : Unexpected idcode after end of chain: 83 0x00000000

Warn : Unexpected idcode after end of chain: 115 0x00000000

Warn : Unexpected idcode after end of chain: 147 0x00000000

Warn : Unexpected idcode after end of chain: 179 0x00000000

Warn : Unexpected idcode after end of chain: 211 0x00000000

Warn : Unexpected idcode after end of chain: 243 0x00000000

Warn : Unexpected idcode after end of chain: 275 0x00000000

Warn : Unexpected idcode after end of chain: 307 0x00000000

Warn : Unexpected idcode after end of chain: 339 0x00000000

Warn : Unexpected idcode after end of chain: 371 0x00000000

Warn : Unexpected idcode after end of chain: 403 0x00000000

Warn : Unexpected idcode after end of chain: 435 0x00000000

Warn : Unexpected idcode after end of chain: 467 0x00000000

Warn : Unexpected idcode after end of chain: 499 0x00000000

Warn : Unexpected idcode after end of chain: 531 0x00000000

Warn : Unexpected idcode after end of chain: 563 0x00000000

Warn : Unexpected idcode after end of chain: 595 0x00000000

Warn : Unexpected idcode after end of chain: 627 0x00000000

Error: double-check your JTAG setup (interface, speed, ...)

Error: Trying to use configured scan chain anyway...

Warn : AUTO auto0.tap - use "jtag newtap auto0 tap -irlen 2 -expected-id 0x00000000"

Error: auto0.tap: IR capture error; saw 0x0000 not 0x0001

Warn : Bypassing JTAG setup events due to errors

Info : accepting 'gdb' connection from pipe

Warn : No symbols for FreeRTOS!

Error: Target not examined yet

Error executing event gdb-attach on target esp32.cpu0:

Error: Target not halted

Error: auto_probe failed

Error: Connect failed. Consider setting up a gdb-attach event for the target to prepare target for GDB connect, or use 'gdb_memory_map disable'.

Error: attempted 'gdb' connection rejected

Error: error during select: Unknown error

.pioinit:11: Error in sourced command file:

Remote communication error. Target disconnected.: No error.Info : TAP auto3.tap has invalid IDCODE (0x0)

adapter speed: 500 kHz

Info : tcl server disabled

Info : telnet server disabled

Info : clock speed 500 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 : TAP auto0.tap has invalid IDCODE (0x0
Info : TAP auto1.tap has invalid IDCODE (0x0)
Info : TAP auto2.tap has invalid IDCODE (0x0)
Info : TAP auto4.tap has invalid IDCODE (0x0)
Info : TAP auto5.tap has invalid IDCODE (0x0)
Info : TAP auto6.tap has invalid IDCODE (0x0)
Info : TAP auto7.tap has invalid IDCODE (0x0)
Info : TAP auto8.tap has invalid IDCODE (0x0)
Info : TAP auto9.tap has invalid IDCODE (0x0)
Info : TAP auto10.tap has invalid IDCODE (0x0)
Info : TAP auto11.tap has invalid IDCODE (0x0)
Info : TAP auto12.tap has invalid IDCODE (0x0)
Info : TAP auto13.tap has invalid IDCODE (0x0)
Info : TAP auto14.tap has invalid IDCODE (0x0)
Info : TAP auto15.tap has invalid IDCODE (0x0)
Info : TAP auto16.tap has invalid IDCODE (0x0)
Info : TAP auto17.tap has invalid IDCODE (0x0)
Info : TAP auto18.tap has invalid IDCODE (0x0)
Warn : Unexpected idcode after end of chain: 83 0x00000000
Warn : Unexpected idcode after end of chain: 115 0x00000000
Warn : Unexpected idcode after end of chain: 147 0x00000000
Warn : Unexpected idcode after end of chain: 179 0x00000000
Warn : Unexpected idcode after end of chain: 211 0x00000000
Warn : Unexpected idcode after end of chain: 243 0x00000000
Warn : Unexpected idcode after end of chain: 275 0x00000000
Warn : Unexpected idcode after end of chain: 307 0x00000000
Warn : Unexpected idcode after end of chain: 339 0x00000000
Warn : Unexpected idcode after end of chain: 371 0x00000000
Warn : Unexpected idcode after end of chain: 403 0x00000000
Warn : Unexpected idcode after end of chain: 435 0x00000000
Warn : Unexpected idcode after end of chain: 467 0x00000000
Warn : Unexpected idcode after end of chain: 499 0x00000000
Warn : Unexpected idcode after end of chain: 531 0x00000000
Warn : Unexpected idcode after end of chain: 563 0x00000000
Warn : Unexpected idcode after end of chain: 595 0x00000000
Warn : Unexpected idcode after end of chain: 627 0x00000000
Error: double-check your JTAG setup (interface, speed, ...)
Error: Trying to use configured scan chain anyway...
Warn : AUTO auto0.tap - use "jtag newtap auto0 tap -irlen 2 -expected-id 0x00000000"
Error: auto0.tap: IR capture error; saw 0x0000 not 0x0001
Warn : Bypassing JTAG setup events due to errors
Info : accepting 'gdb' connection from pipe
Warn : No symbols for FreeRTOS!
Error: Target not examined yet
Error executing event gdb-attach on target esp32.cpu0:

Error: Target not halted
Error: auto_probe failed
Error: Connect failed. Consider setting up a gdb-attach event for the target to prepare target for GDB connect, or use 'gdb_memory_map disable'.
Error: attempted 'gdb' connection rejected
Error: error during select: Unknown error
.pioinit:11: Error in sourced command file:
Remote communication error.  Target disconnected.: No error.

I check the wires to and there are ok. I check this with a multimeter and also use an digital oscilloscop, so I can see that there arent data on the TDI line but Idont know why, the other´s lines are okey.

The only place where I’ve seen this is at Failed to launch GDB - WROVER, ESP-Prog.

FYI, I’ve deleted your duplicate post in Failed to launch GDB - WROVER, ESP-Prog, otherwise we’re opening up two topics where this is discussed…

Can you show a picture of your setup and what cables you connected to where? The platformio.ini shows a esp-wrover-kit is being debugged which has the onboard debugging tool debug_tool = ftdi but you redefine it to debug_tool = esp-prog so I guess you have custom board that is not actually a ESP Wrover Kit?

I am using the ESP lyrat board

Blue:MTMS
WHITE: MTDI
PURPLE: MTCK
GREY: MTDO

Have you configured the JTAG switches? https://dl.espressif.com/dl/schematics/esp32-lyrat-v4.3-schematic.pdf and https://docs.espressif.com/projects/esp-adf/en/latest/design-guide/board-esp32-lyrat-v4.3.html#enable-jtag

I don’t see the DIP switch positins behind the JTAG header completely.

What is the red wire? VCC? I don’t think the ESP-PROG’s VCC should be connected to the board’s VCC, the target board should be self-powered via USB.