cancel
Showing results for 
Search instead for 
Did you mean: 

NSRT asserted multiple times when initiating debug session

Jeroen3
Senior

In STMCubeIDE 1.5.1

When starting a debug session NRST is issues multiple times causing a bit of undefined behavior depending on the target and code.

First it resets and has the old program run a bit.

Then it loads the new program.

Which is lets run a bit.

Before initiating a debug session.

Is there a way that I can improved this behavior to have only one reset for download, keep it halted, and then starting a debug session without running the program first?

0693W000006He2PQAS.png

5 REPLIES 5

I don't use CubeIDE but surely there's a comprehensive and concise manual for it somehwere. Or not.

Normally, debuggers/programmers have a selection of hard reset/soft reset/no reset (hot plug) startup (each having different behaviour with regard to reset, success of connection under adverse circumstances, program download, etc.).

JW

I looked into it, and it seems like downloading and debugging are two separate process launches.

I suspect this is just a limitation of Eclipse with GDB over a TCP/IP connection compared to Keil.

LaurentL
ST Employee

If you select connect under reset, it should halt the core and not run any instructions.

Did you try with STlink Openocd ?

Is it the same behavior ?

Sure there are several resets but appli should not run.

With Openocd, downloading and debugging are done with the same tool (STLink gdb server uses STM32CubeProgrammer for downloading).

Rgds,

Laurent

I've tried with OpenOCD. This looks better!

OpenOCD:

0693W000006HmPHQA0.pngST Link GDB:

0693W000006HmPqQAK.pngI think it first checks the chip type before actually doing anything, and because it launches the debugger twice for that it can't hold reset.

It can be annoying locking up i2c devices and such because it gets resets again so quickly.

OpenOCD has also several reset settings, see manual.

JW