How can I setup a software breakpoint?

dzRBRglobal
Posts: 11
Joined: Thu Jul 26, 2018 3:20 pm

How can I setup a software breakpoint?

Postby dzRBRglobal » Thu Jul 26, 2018 8:22 pm

From this link : https://github.com/espressif/openocd-esp32/issues/45
It seems the latest openocd ESP32 supports software breakpoint. Anybody has tried it?
Last edited by dzRBRglobal on Thu Jul 26, 2018 9:11 pm, edited 1 time in total.

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

Re: How can setup a software breakpoint?

Postby ESP_igrr » Thu Jul 26, 2018 8:41 pm

An update to JTAG debugging guide in IDF is in progress, but for now you can keep using OpenOCD as you used it in the past, and it will allow you to set more breakpoints. Previously the limit was 2 hardware breakpoints, and now the limit is 2 hardware + 32 software breakpoints in Flash + 32 software breakpoints in IRAM.

dzRBRglobal
Posts: 11
Joined: Thu Jul 26, 2018 3:20 pm

Re: How can setup a software breakpoint?

Postby dzRBRglobal » Thu Jul 26, 2018 9:26 pm

ESP_igrr wrote:An update to JTAG debugging guide in IDF is in progress, but for now you can keep using OpenOCD as you used it in the past, and it will allow you to set more breakpoints. Previously the limit was 2 hardware breakpoints, and now the limit is 2 hardware + 32 software breakpoints in Flash + 32 software breakpoints in IRAM.
Thank you very much for the clarification. I just setup the esp development environment on a ubuntu virtual machine. I am very new to openocd and gdb. I installed the eclipse as my coding front end. And use the GNU MCU ECLIPSE plugin to call openocd and gdb. Now code complies and debug properly on my setup. The only problem is if I add more than two breakpoints, openocd will complain

Code: Select all

Warn : xtensa_add_breakpoint: max slot reached, slot=2
Error: can't add breakpoint: resource not available
I havent tried to directly use commend line with openocd yet. I ll try tomorrow see if commend line allows me to add more breakpoints

dzRBRglobal
Posts: 11
Joined: Thu Jul 26, 2018 3:20 pm

Re: How can I setup a software breakpoint?

Postby dzRBRglobal » Thu Jul 26, 2018 9:40 pm

Image
here is a screen shot of the error message

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

Re: How can I setup a software breakpoint?

Postby ESP_igrr » Fri Jul 27, 2018 7:11 am

Please follow instructions listed here to generate OpenOCD log file: https://docs.espressif.com/projects/esp ... ing-issues

Then upload the log file here or to GitHub issue tracker https://github.com/espressif/openocd-esp32/issues/. Thanks.

dzRBRglobal
Posts: 11
Joined: Thu Jul 26, 2018 3:20 pm

Re: How can I setup a software breakpoint?

Postby dzRBRglobal » Fri Jul 27, 2018 6:13 pm

Hi igrr,
Thank you very for your immediate reply. I will follow the instruction and upload the log.

dzRBRglobal
Posts: 11
Joined: Thu Jul 26, 2018 3:20 pm

Re: How can I setup a software breakpoint?

Postby dzRBRglobal » Fri Jul 27, 2018 7:00 pm

ESP_igrr wrote:Please follow instructions listed here to generate OpenOCD log file: https://docs.espressif.com/projects/esp ... ing-issues

Then upload the log file here or to GitHub issue tracker https://github.com/espressif/openocd-esp32/issues/. Thanks.
here is a link to GitHub issue: https://github.com/espressif/openocd-esp32/issues/51
I also attached the logs
Attachments
openocd_log.txt
(1.27 MiB) Downloaded 825 times
gdb_log.txt
(31.53 KiB) Downloaded 833 times

dzRBRglobal
Posts: 11
Joined: Thu Jul 26, 2018 3:20 pm

Re: How can I setup a software breakpoint?

Postby dzRBRglobal » Mon Jul 30, 2018 1:37 pm

as gerekon metioned in this link:
https://github.com/espressif/openocd-esp32/issues/51

After I update my openocd to 2018-07-24 the problem is fixed. :)

Who is online

Users browsing this forum: Google [Bot] and 185 guests