Page 5 of 5

Re: Arduino IDE 2 & Debug feature

Posted: Sun Apr 02, 2023 11:05 am
by fpiSTM
Fine.

Re: Arduino IDE 2 & Debug feature

Posted: Wed Jun 21, 2023 11:05 am
by jooos
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.

Re: Arduino IDE 2 & Debug feature

Posted: Mon Jul 17, 2023 4:45 pm
by luca_stm32
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

Re: Arduino IDE 2 & Debug feature

Posted: Thu Jul 20, 2023 6:38 am
by gector
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.

Re: Arduino IDE 2 & Debug feature

Posted: Wed Mar 20, 2024 2:17 pm
by STM32_Newbbe
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

Re: Arduino IDE 2 & Debug feature

Posted: Wed Mar 20, 2024 2:57 pm
by fpiSTM
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