2014-12-01 04:32 PM
Hello,
Recently my team and I have run into a lot of issues in our code that require a good debugging solution. Unfortunately, however, we haven't found a good way of setting breakpoints and stepping through our code to find out where our issues lie.
I was attracted to GDB, since I've used it in the past for general-purpose machines (i.e. i86 architecture), but I'm fairly new to the embedded world, so I'm not sure how to use a debugger for ARM embedded processors. I installed the GNU ARM bare metal toolchain (arm-none-eabi) which includes a version of GDB specific to ARM processors, but I have no idea how to set it up properly so that I can see what's going on with my external device (i.e. a NUCLEO-F401RE board).
Could somebody please shed some light on the issue? Also, do I need external hardware like a JTAG interface in order to access information on the device (like register info or memory status), or can I do that using USB? Thanks in advance.
#basic-debugging #debugger #debug2014-12-01 04:44 PM
Wouldn't OpenOCD be able to use the ST-LINK (SWD) debugger on the Nucleo and Discovery boards directly?
Personally I've used Keil to debug code in the fashion you describe, including code compiled with the GNU/GCC chains, like Yagarto. I also test a lot of the more generic code, or abstract appropriately, to allow code to be debugged on PCs with PC compilers/debuggers. And understand the flow of my code, where required, in real time systems by outputting sufficient telemetry and diagnostic information via DCC, SWV, or USART channels.2014-12-01 11:27 PM
Matt,
if you are used to gdb, and run your development on *nix platform, you can use https://github.com/texane/stlink to create a remote target server. Then start GBD as usual ''arm-none-eabi-gdb prog.elf'', connect to the target with ''target remote extended-remote :4242'', load to SRAM or flash using ''load'', possibly set a breakpoint ''b main'', and go ahead with ''continue''.2014-12-02 02:57 PM
Thank you for your responses. I think I'll look into texane's stlink software, since I don't know too much about OpenOCD and I'm avoiding expensive tools such as Keil.
2014-12-11 12:45 AM
maybe you could have a look at EmBlocks.