cancel
Showing results for 
Search instead for 
Did you mean: 

Why debug still works with Truestudio even when Cubemx generated code with SWO disabled ?

Jason Dough
Associate
Posted on March 24, 2018 at 07:43

I used to use Cubemx to generate peripheral code not realizing that it got SYS > Debug ? Disabled the whole time. According to sources on the internet this means, no JTAG, no SWO as those pins were not initialized. Yet, I use Truestudio IDE and was able to debug all along. Could you please share some info on how this mechanism worked ?

I looked into project startup scripts, startup.s and there didn't seem to have any special instructions that could enabled SWO debug.

Thanks!

Jason.

#truestudio9 #swo-debugging
1 REPLY 1
Posted on March 24, 2018 at 15:34

The debugger controls and configures the micro-controller as it needs (clocks, pins, itm, dwt, dbgmcu, code/instruction injection, etc), it wrestles control of the system out of reset. You can break connectivity by fiddling with the pins later.

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