Sysprogs forums › Forums › VisualGDB › OpenOCD + Segger JLink + ESP32
Tagged: esp32 openocd jlink jtag segger
- This topic has 3 replies, 3 voices, and was last updated 7 years, 7 months ago by gojimmypi.
-
AuthorPosts
-
March 16, 2017 at 11:53 #10682kfeksa@gmail.comParticipant
Hi,
I want to use new Segger JLink with VisualGDB to debug ESP32. The drivers were installed, I can see the device in Device manager. VisualGDB even installed the WinUSB driver for the JLink, but I keep geting this output:
C:\SysGCC\esp32\esp32-bsp\OpenOCD\bin\openocd.exe -f interface/jlink.cfg -f target/esp32.cfg -c “adapter_khz 1000”
Open On-Chip Debugger 0.9.0 (2016-11-21)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport “jtag”. To override use ‘transport select <transport>’.
adapter speed: 1000 kHz
Info : No device selected, using first device.
Info : J-Link ARM V8 compiled Nov 28 2014 13:44:46
Info : Hardware version: 8.00
Info : VTarget = 0.000 V
jaylink: JTAG I/O operation failed: 05.
Error: jaylink_jtag_io() failed: JAYLINK_ERR_DEV.
Info : clock speed 1000 kHz
jaylink: JTAG I/O operation failed: 05.
Error: jaylink_jtag_io() failed: JAYLINK_ERR_DEV.
jaylink: JTAG I/O operation failed: 05.
Error: jaylink_jtag_io() failed: JAYLINK_ERR_DEV.
embedded:startup.tcl:21: Error:
in procedure ‘init’
in procedure ‘ocd_bouncer’
in procedure ‘jtag_init’ called at file “E:\projects\sysprogs-github\openocd-esp32\src\jtag\core.c”, line 1585
in procedure ‘init_reset’ called at file “embedded:startup.tcl”, line 74
in procedure ‘jtag’ called at file “embedded:startup.tcl”, line 91
in procedure ‘ocd_bouncer’
at file “embedded:startup.tcl”, line 21
embedded:startup.tcl:21: Error:
in procedure ‘jtag_init’ called at file “E:\projects\sysprogs-github\openocd-esp32\src\jtag\core.c”, line 1585
in procedure ‘init_reset’ called at file “embedded:startup.tcl”, line 74
in procedure ‘jtag’ called at file “embedded:startup.tcl”, line 91
in procedure ‘ocd_bouncer’
at file “embedded:startup.tcl”, line 21I use the latest version of SW, and tried multiple times to delete the OpenOCD and JLink packages, but it won’t run.. any help appreciated here
March 16, 2017 at 19:21 #10686supportKeymasterHi,
JAYLINK_ERR_DEV might indicate a driver issue. Are you able to use J-Link with OpenOCD (not Segger gdb stub) to debug normal ARM devices? If yes, it could be wiring problem instead.
March 18, 2017 at 00:45 #10704gojimmypiParticipantIf not a wiring problem – I wonder if perhaps the problem may be old firmware on the J-Link. See the line:
Info : J-Link ARM V8 compiled Nov 28 2014
When I first installed my J-Link, I ran the Segger STM32 ST-Link Utility and it wanted to update my firmware before even trying to use it. Here’s the result of my selftest:
C:\SysGCC\esp32\esp32-bsp\OpenOCD\bin\openocd.exe -f interface/jlink.cfg -f target/esp32.cfg -c “adapter_khz 3000”
Open On-Chip Debugger 0.9.0 (2016-11-21)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport “jtag”. To override use ‘transport select <transport>’.
adapter speed: 3000 kHz
Info : No device selected, using first device.
Info : J-Link V10 compiled Jan 9 2017 17:48:51
Info : Hardware version: 10.10
Info : VTarget = 3.348 V
Info : clock speed 3000 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: Target halted, pc=0x400D4492
Error: The ‘mww’ command must be used after ‘init’.
in procedure ‘init’
in procedure ‘ocd_bouncer’
in procedure ‘flash’
in procedure ‘ocd_bouncer’Info : esp32.cpu1: Target halted, pc=0x400D0BB0
Info : accepting ‘telnet’ connection on tcp/4444
shutdown command invoked
Info : dropped ‘telnet’ connectionbtw – coincidentally I’ve been working on the ESP32 today. It is shockingly easier to JTAG than the ESP8266. I created my own pinout diagram and posted all my notes (including ESP32 hookup) here:
http://gojimmypi.blogspot.com/2017/03/jtag-debugging-for-esp32.html
Let’s see if this tweet shows up as a hookup pic:
https://twitter.com/gojimmypi/status/842882252866441216
Hope this helps…
March 18, 2017 at 02:24 #10705gojimmypiParticipantoops, not the STM32 ST-Link Utility (that’s of course for the ST-Link/V2 debugger). The tool I meant to say is the Segger J-Link Configuration tool for updating firmware on the J-Link
(this pesky forum – sometimes I can edit prior posts and sometimes not)
-
AuthorPosts
- You must be logged in to reply to this topic.