TrueStudio appeared to stop working via ST-LINK - Solved

Discuss how to use the features of Atollic TrueSTUDIO, including the editor, assembler, C/C++ compiler, linker, debugger, static code analysis and team collaboration tools.

Moderators: Markus Girdland, Mattias Norlander

Magicbean
Posts: 1
Joined: Tue Feb 25, 2020 1:03 pm

TrueStudio appeared to stop working via ST-LINK - Solved

Postby Magicbean » Tue Feb 25, 2020 3:07 pm

I had been going to post a question asking for help but, I found the solution and thought it might help someone else. It turns out it wasn't a TrueStudio issue at all but I really thought it was for a few days. I don't suppose a search engine will mind where it finds the answer.

Original problem: I made change to working code and then lost the ability to connect to the chip (STM32G071) through the ST-LINK debugger. First the target stopped responding to the debugger although the code was clearly running and subsequently, ST-LINK claimed there was no target connected and I had assumed a hardware fault (as I had been re-soldering stuff). Also, during this period I got dragged off onto other projects and forgot what I was tinkering with.

The solution was that I had accidentally changed the wrong pin to output for a test and used GPIO A pin 13, which on an STM32G071 is the SWDIO pin. Once the code was in flash, every time it powered up, the SWD connection was crippled by my startup function and it looked like the debugging hardware was faulty.

I had noticed that ST-LINK Utility appeared to connect fine to the device but that ST-LINK_gdbserver said there was no target - weird...

Fix: Use ST-LINK Utility to completely erase the device. This removed my code and set it back to a state where the ST-LINK_gdbserver could connect; I was able to fix my code and use TrueStudio to debug it once more.

Moral: Don't mess about with the debugger pins unless you can make sure you don't lock yourself out.

Maybe this will help someone - I did a lot of searching online before I realised what I had done.

Return to “Atollic TrueSTUDIO tool discussions”

Who is online

Users browsing this forum: No registered users and 5 guests