Page 1 of 1

How can I setup a software breakpoint?

Posted: Thu Jul 26, 2018 8:22 pm
by dzRBRglobal
From this link : https://github.com/espressif/openocd-esp32/issues/45
It seems the latest openocd ESP32 supports software breakpoint. Anybody has tried it?

Re: How can setup a software breakpoint?

Posted: Thu Jul 26, 2018 8:41 pm
by ESP_igrr
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.

Re: How can setup a software breakpoint?

Posted: Thu Jul 26, 2018 9:26 pm
by dzRBRglobal
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

Re: How can I setup a software breakpoint?

Posted: Thu Jul 26, 2018 9:40 pm
by dzRBRglobal
Image
here is a screen shot of the error message

Re: How can I setup a software breakpoint?

Posted: Fri Jul 27, 2018 7:11 am
by ESP_igrr
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.

Re: How can I setup a software breakpoint?

Posted: Fri Jul 27, 2018 6:13 pm
by dzRBRglobal
Hi igrr,
Thank you very for your immediate reply. I will follow the instruction and upload the log.

Re: How can I setup a software breakpoint?

Posted: Fri Jul 27, 2018 7:00 pm
by dzRBRglobal
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

Re: How can I setup a software breakpoint?

Posted: Mon Jul 30, 2018 1:37 pm
by dzRBRglobal
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. :)