Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years ago.
Has anyone had success with GDB?
Hello all,
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.
1 Answer
10 years ago.
Hello,
look at pyOCD https://github.com/mbedmicro/pyOCD, although there's no support for Nucleo targets yet.
There's openOCD which you can use. Or jlink for example has own gdb server, which you can use.
Regards, 0xc0170
Thanks for the quick response! I posted to ST's forum as well (link below) and found that I can set up a GDB server using this repository: https://github.com/texane/stlink.
posted by 02 Dec 2014
Hi, I am a total ARM noob, only started with ARM processors a couple of months ago. Always used PIC before, which is much simpler when it comes to programming/debugging! I exported my program (ST Nucleo and Freescale platform), and used offline CooCox CoIDE and emBlocks IDEs. Both of them support debugging, and without any setup I could single step and debug my program! Didn't have to install anything else.
posted by modtronix H 03 Dec 2014