Skip to main content
Jason Dough
Associate
March 24, 2018
Question

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

  • March 24, 2018
  • 1 reply
  • 699 views
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
This topic has been closed for replies.

1 reply

Tesla DeLorean
Guru
March 24, 2018
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 VenmoUp vote any posts that you find helpful, it shows what's working..