ESP32 debugging with Segger Jlink

ningappa BS
Posts: 51
Joined: Sat Mar 17, 2018 4:49 am

ESP32 debugging with Segger Jlink

Postby ningappa BS » Fri Sep 07, 2018 7:04 am

Hello All,
I am using Segger Jlink for debugging in ESP32. But not able to succeed as I got "exec format error" on launching debugger

Environment
------------
Ubuntu 14.04 32 bit Eclipse
Steps followed
--------------
1. Installed Segger Jlink plugin for eclipse
2. Provided the ESP32 config files to Jlink
3. Set the path of application to elf file
I suspect Jlink misses the knowledge on elf/bin format of ESP32.
Correct me if I am wrong and any suggestions on where I am going wrong is welcome.
let me know how to solve this.

thanks!

ESP_igrr
Posts: 2067
Joined: Tue Dec 01, 2015 8:37 am

Re: ESP32 debugging with Segger Jlink

Postby ESP_igrr » Tue Sep 18, 2018 12:24 pm

It is possible to use JLink debugger (hardware part of it) for ESP32. Please follow this guide: https://docs.espressif.com/projects/esp ... index.html. Note that JLink software is not compatible with ESP32, so you will need to follow the steps described in that guide to set up OpenOCD.

ningappa BS
Posts: 51
Joined: Sat Mar 17, 2018 4:49 am

Re: ESP32 debugging with Segger Jlink

Postby ningappa BS » Mon Oct 15, 2018 11:21 am

Hi,

--> we have downloaded OpenOCD from the
Github(https://github.com/gnu-mcu-eclipse/openocd/releases)--success
--> In Configuring ESP32 Target step
--> Configure and connect JTAG interface------success
--> Run OpenOCD with command( bin/openocd -s scripts/ -f
scripts/interface/jlink.cfg -f scripts/board/esp-wroom-32.cfg)--Failed

In above step we are getting an error like

"embedded:startup.tcl:21: Error: Unknown target type esp32, try one of
arm7tdmi, arm9tdmi, arm920t, arm720t, arm966e, arm946e, arm926ejs,
fa526, feroceon, dragonite, xscale, cortex_m, cortex_a, cortex_r4,
arm11, ls1_sap, mips_m4k, avr, dsp563xx, dsp5680xx, testee,
avr32_ap7k, hla_target, nds32_v2, nds32_v3, nds32_v3m, or1k,
quark_x10xx, quark_d20xx, stm8, riscv, or aarch64
in procedure 'script'
at file "embedded:startup.tcl", line 60
at file "scripts/board/esp-wroom-32.cfg", line 58
in procedure 'target' called at file "scripts//target/esp32.cfg", line 90
in procedure 'ocd_bouncer'
at file "embedded:startup.tcl", line 21".

Need your suggestion to solve this error.

thanks,
ningappa

ESP_Sprite
Posts: 8921
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 debugging with Segger Jlink

Postby ESP_Sprite » Tue Oct 16, 2018 2:51 am

The vanilla OpenOCD you downloaded does not support the ESP32. Please download the ESP32 version from https://github.com/espressif/openocd-esp32 instead.

ningappa BS
Posts: 51
Joined: Sat Mar 17, 2018 4:49 am

Re: ESP32 debugging with Segger Jlink

Postby ningappa BS » Thu Oct 25, 2018 5:54 am

Hi,

To build OpenOCD, use the following sequence of commands:
./bootstrap (when building from the git repository)
./configure
make

Above following step we are getting an "configure: error: jimtcl not found, run git submodule init and git submodule update."

i have attached the config.log file for your reference.

thanks
Attachments
config.log
(46.6 KiB) Downloaded 1015 times

ESP_Sprite
Posts: 8921
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 debugging with Segger Jlink

Postby ESP_Sprite » Thu Oct 25, 2018 9:04 am

Configure: error: jimtcl not found, run git submodule init and git submodule update.
I know this is somewhat of a cryptic error message and it may not immediately be clear what to do, but have you tried running git submodule init and git submodule update?

ningappa BS
Posts: 51
Joined: Sat Mar 17, 2018 4:49 am

Re: ESP32 debugging with Segger Jlink

Postby ningappa BS » Thu Oct 25, 2018 12:43 pm

I know this is somewhat of a cryptic error message and it may not immediately be clear what to do, but have you tried running git submodule init and git submodule update?
Yes,we have tried but again we got same error.

ESP_igrr
Posts: 2067
Joined: Tue Dec 01, 2015 8:37 am

Re: ESP32 debugging with Segger Jlink

Postby ESP_igrr » Tue Oct 30, 2018 7:37 am

If you have trouble building openocd, please try downloading the binaries from the releases page: https://github.com/espressif/openocd-esp32/releases.

ningappa BS
Posts: 51
Joined: Sat Mar 17, 2018 4:49 am

Re: ESP32 debugging with Segger Jlink

Postby ningappa BS » Wed Oct 31, 2018 6:19 am

Hello All,
I am using Segger Jlink for debugging in ESP32. But not able to succeed as I got "exec format error" on launching debugger

Environment
------------
Ubuntu 14.04 32 bit Eclipse
Steps followed
--------------
1. Installed Segger Jlink plugin for eclipse
2. Provided the ESP32 config files to Jlink
3. Set the path of application to elf file
I suspect Jlink misses the knowledge on elf/bin format of ESP32.
Correct me if I am wrong and any suggestions on where I am going wrong is welcome.
let me know how to solve this.

thanks
we are getting same error "exec format error" as we were got in the beginning of this conversation.

ESP_igrr
Posts: 2067
Joined: Tue Dec 01, 2015 8:37 am

Re: ESP32 debugging with Segger Jlink

Postby ESP_igrr » Wed Oct 31, 2018 10:01 am

Could you please first verify if you are able to debug from the command line, before using Eclipse? Please follow these instructions: https://docs.espressif.com/projects/esp ... index.html

Who is online

Users browsing this forum: Majestic-12 [Bot] and 104 guests