Arduino IDE 2 & Debug feature
Re: Arduino IDE 2 & Debug feature
Hi All.
I install last Arduino IDE (2.1) and last STM32 core (2.5.0) on a Windows 10 64 bit.
Install the Arduino SAMD Boards (32-bits ARM Cortex-M0+) from Board Manager.
I used ST-Link v2 and tried to debug Blink on BluePill board. I am getting an error:
Error: timed out while waiting for target halted
Error: timed out while waiting for target halted
Error executing event gdb-flash-erase-start on target stm32f1x.cpu:
TARGET: stm32f1x.cpu - Not halted
Error: Target not halted
Error: failed erasing sectors 0 to 8
Error: flash_erase returned -304
Error: timed out while waiting for target halted
Luca got the same error.
nrst pin is connected and work.
"reset_config srst_nogate" not apply !
Instead of the "reset_config srst_nogate" option, the "reset_config srst_only" option is substituted.
I install last Arduino IDE (2.1) and last STM32 core (2.5.0) on a Windows 10 64 bit.
Install the Arduino SAMD Boards (32-bits ARM Cortex-M0+) from Board Manager.
I used ST-Link v2 and tried to debug Blink on BluePill board. I am getting an error:
Error: timed out while waiting for target halted
Error: timed out while waiting for target halted
Error executing event gdb-flash-erase-start on target stm32f1x.cpu:
TARGET: stm32f1x.cpu - Not halted
Error: Target not halted
Error: failed erasing sectors 0 to 8
Error: flash_erase returned -304
Error: timed out while waiting for target halted
Luca got the same error.
nrst pin is connected and work.
"reset_config srst_nogate" not apply !
Instead of the "reset_config srst_nogate" option, the "reset_config srst_only" option is substituted.
-
- Posts: 23
- Joined: Tue Feb 18, 2020 3:37 pm
Re: Arduino IDE 2 & Debug feature
Hi all.
Following this link https://github.com/vsergeev/arm-bmw-sw/issues/1 I found that using reset_config none separate instead reset_config srst_only in file openocd.cfg (under variants directory), you can debug without connect reset pin to ST-Link programmer.
I tried using a Bluepill and it works.
Can anybody else confirm?
If it really works, can openocd.cfg file be updated with new reset_config setting?
Maybe you doesn't need to connect reset pin to ST-Link probe also if you cancel reset_config line from openocd.cfg file (in this way openocd will use default reset configuration).
Regards.
Luca
Following this link https://github.com/vsergeev/arm-bmw-sw/issues/1 I found that using reset_config none separate instead reset_config srst_only in file openocd.cfg (under variants directory), you can debug without connect reset pin to ST-Link programmer.
I tried using a Bluepill and it works.
Can anybody else confirm?
If it really works, can openocd.cfg file be updated with new reset_config setting?
Maybe you doesn't need to connect reset pin to ST-Link probe also if you cancel reset_config line from openocd.cfg file (in this way openocd will use default reset configuration).
Regards.
Luca
Re: Arduino IDE 2 & Debug feature
Hi Luca,
Having the same issue with an STM32F030C8 chip. Only way I can get debugging to connect at all is to hit the reset button while connecting. After it's connected though, nothing works unless I've disabled srst_only.
Having the same issue with an STM32F030C8 chip. Only way I can get debugging to connect at all is to hit the reset button while connecting. After it's connected though, nothing works unless I've disabled srst_only.
-
- Posts: 51
- Joined: Thu Nov 05, 2020 10:26 am
Re: Arduino IDE 2 & Debug feature
I tried getting this to work with IDE 2.3.2 ans STM32core 2.7.1 but no success loading the .svd so far
debugging itself works
I added debug_custom.json to the sketch folder and had it pointing to the SVD folder of STM32CubeProgrammer
As that did not work, I copied the svd to the sketch folder as well (and changed the json), but that did not help either
I also tried downgrade to 2.0.3, no luck with that as well
debugging itself works
I added debug_custom.json to the sketch folder and had it pointing to the SVD folder of STM32CubeProgrammer
As that did not work, I copied the svd to the sketch folder as well (and changed the json), but that did not help either

I also tried downgrade to 2.0.3, no luck with that as well
Re: Arduino IDE 2 & Debug feature
In fact since IDE 2.3.x, the debug has been reworked by Arduino.
I'm currently working to support the new way to support debug svd files.
Ref: https://github.com/arduino/arduino-ide/issues/1920
I'm currently working to support the new way to support debug svd files.
Ref: https://github.com/arduino/arduino-ide/issues/1920