Arduino IDE 2 & Debug feature

Development environment specific, Arduino, Eclipse, VS2013, Em::Blocks etc
User avatar
fpiSTM
Posts: 1723
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: Arduino IDE 2 & Debug feature

Post by fpiSTM »

Fine.
jooos
Posts: 1
Joined: Wed Jun 21, 2023 10:26 am

Re: Arduino IDE 2 & Debug feature

Post 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.
luca_stm32
Posts: 19
Joined: Tue Feb 18, 2020 3:37 pm

Re: Arduino IDE 2 & Debug feature

Post 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
gector
Posts: 1
Joined: Thu Jul 20, 2023 6:34 am

Re: Arduino IDE 2 & Debug feature

Post 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.
Post Reply

Return to “IDE's”