Can't disable initial break

I’m trying to debug an Arduino framework sketch on a SAMD21E18. If I set debug_init_break = in platformio.ini, the debugger still tbreaks on the first line of reset_handler(). If I set debug_init_break = tbreak loop, that is at least a little more useful/simple in arduino land, but I can’t seem to simply disable the initial breakpoint entirely as I’d like.

1 Like

This is a default entry point where MCU stops. Where would you like to stop?

In a perfect world, I’d simply disable the initial break.

I’d rather break where I place breakpoints, or not at all.


Hi Ivan,

I am using Atmel-ICE to debug with target arduino due. It does not seem to stop where I wanted it to. For a normal debugger one can set break point for example at “x++;” When I set my debugger to that line and then run. The program does not stop. But if I were to stop the using the pause button on the debugger control panel. I was able to pause the program, also it returns the value of x at the watch window. Debugger seem to stop at a function extern caddr_t _sbrk ( int incr ) in file syscalls_sam3.c.

Do you have some idea for proper setup of debugger? Thanks.


What is your platformio.ini?

I have same issue. I do not want to break unless I put a breakpoint. If i put
debug_init_break =
it seems to even break randomly anywhere.
debug_init_break = tbreak loop seems also not working correctly.

Problem is that initial break-point mess up the USB init from windows for the CDC ad it will not be recognised then…

Is this a bug? or is there any solution?

here my latformio.ini:

platform = ststm32
board = bluepill_f103c8
framework = arduino
build_flags =
; enable USB serial
debug_init_break =
debug_tool = stlink

As at Aug 2023, this line worked for me:

debug_init_break = tbreak