Has your issue been resolved or is it still a problem?
1 of 1 people found this helpful
Sorry, I should have posted an update.
Well, I figured out why I couldn't debug. ST has an errata with those parts, where you cannot use JTAG as the debug interface and use PB4 as any function other than TRST. Even if you aren't using TRST, you cannot use it for any other function. The workaround is to use SWD debugging. Unfortunately, I need PB4 pin for SPI1_MISO. So, when the OS tries to change that pin to SPI1_MISO, and I'm connected with the debugger, it resets the processor.
Unfortunately WICED is really tailored for full JTAG debugging, not SWD. I have modified the OpenOCD scripts for the Olimex ARM-USB-TINY-H, Segger J-Link, and even the ST-Link. I can get close to getting them to work, but haven't been successful in getting them to debug over SWD.
At this point I've given up on SWD, and have designed a new board that uses a larger package where I don't need PB4. Therefore I'll be able to use JTAG.