cancel
Showing results for 
Search instead for 
Did you mean: 

JTAG Debug Auto-Starts

jvavra
Associate III
Posted on August 02, 2017 at 13:06

I'm using the ST-Link with IAR, trying to do on-chip debugging via JTAG on a STM32F432. However, when I click 'Download and Debug', my application seems to randomly start running, instead of sitting in man at the reset vector, waiting for me to click 'Go'. If I stop, it's executing real code, but inserting  breakpoint in the beginning of main shows it's not starting at the entry vector for my application.  The strange thing is this behavior seems intermittent. Some sort of clock issue?

#iar #jtag
4 REPLIES 4
howard n2wx
Senior
Posted on August 02, 2017 at 13:57

Sounds like the 'IAR project options->Debugger->Run to' box isn't checked.

Check it off and put 'main' in the edit box

jvavra
Associate III
Posted on August 02, 2017 at 14:06

howard,

Thanks for the reply, but it is indeed already checked off. I should have mentioned that in my original post.

Posted on August 02, 2017 at 14:10

Is 'connect to running target' checked?  It's not on my setup.

If you're using ST-Link the connect pulldown should probably be on Connect during reset.

Posted on August 02, 2017 at 16:31

Not much to work with, where is it executing?

Custom board?

External clock?

Full JTAG? or SWD?

If it is executing code in ROM make sure the BOOT0 pin is pulled LOW.

If 'run to main()' type option is checked, it might still be running SystemInit() to configure clocks and memories, if that is locking up in HSE or PLL code it won't get to main(). Check the HSE if you are using that.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..