Author Topic: STM32CubeIDE lets board run with old code a first time before uploading new code  (Read 700 times)

0 Members and 1 Guest are viewing this topic.

Offline ArteTopic starter

  • Contributor
  • Posts: 21
  • Country: fr
Dear people of EEVblog, I stand before you as a man quite mad at STM32CubeIDE.

For the last few hours, I've been struggling to debug stuff by using an oscilloscope in trigger mode connected to a custom STM32 board I'd connect via a STLinkV2 (clone). It eventually became clear that every time I'd press run, what would appear on the oscilloscope would be the result of the old code, before the changes prior to my pressing run.
After a great moment of confusion I've realized that when you press run, the IDE/programmer resets the board... lets it run, THEN resets it again to upload the new code, and run that.
It is on the code after the first reset of the board, but before the upload of the new code, that my oscillo would trigger on.

What can I do about this, if anything ? I can Debug the board instead and only turn on the oscillo trigger once the initial breakpoint is reached, but that is quite annoying, I wish this extra step wasn't there (and I might not be able to do that with Release code). Is there a IDE side workaround (to hold the board in reset until the code is uploaded.. as it should) ?

Thank you.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf