cancel
Showing results for 
Search instead for 
Did you mean: 

Looking for a useful debugger, such as GDB

matt2399
Associate II
Posted on December 02, 2014 at 01:32

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 #debug
4 REPLIES 4
Posted on December 02, 2014 at 01:44

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
stm322399
Senior
Posted on December 02, 2014 at 08:27

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''.

matt2399
Associate II
Posted on December 02, 2014 at 23:57

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.

ffred
Associate II
Posted on December 11, 2014 at 09:45

maybe you could have a look at EmBlocks.