When I first started writing the software for Fox-1 (which turned out to be AO-85) I was using the Eclipse IDE along with the gdb debugger and other hacked-together pieces. This worked great with debugging--single step, breakpoints, watchpoints, etc all worked fine.
As we got to the end of development and I switched to compiling for release rather than debug, I stopped using the debugger. When I wanted to use it agan for Golf, having switched to the Atollic TrueStudio (a 'supported' bundle of Eclipse, gdb etc) I could never get debugging to work again.
Today, I finally found the magic:
1) If I have the umbilical plugged in, the of course power-on stops in the USB loader. For some reason when it is in the USB loader, gdb can't connect over the ST-link SWD connection.
2) If I do NOT have the umbilical plugged in I can upload some code but it hangs. Why? Because without the umbilical, the code, as expected, does a checksum of itself and since the code has changed a bit every time (it incorporated the build time) the checksum fails, and it attempts to fire off the watchdog to power cycle.
I've finally worked around these by putting "ifndef UNDEFINE_BEFORE_FLIGHT" around the test so it will only execute as we are preparing for flight.
I'm just recording this for posterity in both the golf software list and the ltm list.
73,
Burns Fisher, WB1FJ *AMSAT(R) Flight Software*