Doorgaan naar hoofdcontent

Posts

Posts uit september, 2013 tonen

Lock-ups and freezes w/ an STM32F4Discovery board with ST-Link v2, OpenOCD and GDB

This post is especially an outing of my joy now that I have finally resolved my issue debugging the STM32F4xx using OpenOcd. There exist many blogpost, tutorials, manuals about setting up an STM32F4Discovery + OpenOcd + gdb combo. I won't explain how to do it here, but it is an awesome, powerful and very cheap set-up. I chose the STM32F4Discovery board as the demo board for my course on embedded C, because it's cheap, full of features and has on-board debugging hardware. Writing a custom crt0, I ran into problems however. Stepping through the early init code, assembly instruction per assembly instruction, gdb would just lock-up, freeze, at random moments. Not always on the same instruction, not always at the same moment. I could also set a breakpoint on a certain line, then type 'c' to continue, and the debugger would never break, or even respond to a Ctrl+C. Furthermore, using st-util, from the texane github ( https://github.com/texane/stlink ) would work.It&#