AnsweredAssumed Answered

Debugging problem on different targets with the same firmware

Question asked by kipp.michael on Jan 21, 2016
Latest reply on Jan 24, 2016 by kipp.michael
Hello guys,

I'm trying to port a firmware that was originally written for a STM32L151 onto a STM32F103. Unfortunately that didn't work although no special hardware peripherals are being used.

So I decided to create a template based on the CustomHID examples from the according HAL USB device libraries as a starting point. I threw out all ADC, DMA and special GPIO stuff (except that for USB dis/connect on F103) so that only necessary things remain.

The resulting application works like a charm on the L151. Flashing, running, debugging - all without any problem. Unfortunately it's not so easy on the F103. There I can flash it and debug it, but it is not being detected as USB HID as long as I don't disconnect the debugger and cycle the power supply. After doing that it's also detected as HID and behaves exactly as expected. But later I'm still not able to debug it, or better: it's still not being detected as HID when I try to debug it.

I'm running GNU ARM embedded 4.8-2014q3 on Win 7 Pro and connect the target via openOCD, STlink v2 (on STM32F4discovery) and SWD. Using a BlackmagicProbe without openOCD leads to the same result.

Does anyone have a hint what could be wrong or where I could search for the problem?

Outcomes