Page 1 of 1

Debugging with GDB/Eclipse?

Posted: Tue Mar 08, 2016 11:11 am
by hjf
I set everything up for debugging STM32 targets with Eclipse (Onboard ST-LINK/V2 on a F4DISCOVERY, st-util GDB target, gdb for ARM, and Eclipse plugins). A simple blinking led works and lets me set breakpoints and step through functions.
Then I proceeded to configure an Eclipse project for MicroPython: I added the source tree to a Makefile project, changed the build directory to ./stmhal and declared DEBUG=1, BOARD=STM32F4DISCOVERY and V=1. It compiles successfully, launches debug, programs the chip and it seems to "hang". If I pause the execution I can see that it's stuck at Reset_Handler, more specifically at a line that says ldr sp, =_estack.
Is it possible to debug MicroPython like this? Am I missing something?

Re: Debugging with GDB/Eclipse?

Posted: Tue Mar 08, 2016 10:01 pm
by SpotlightKid
hjf wrote:[...] declared DEBUG=1, BOARD=STM32F4DISCOVERY and V=1.
There is no board definition called STM32F4DISCOVERY, you probably mean STM32F4DISC.

Re: Debugging with GDB/Eclipse?

Posted: Tue Mar 08, 2016 11:12 pm
by hjf
Yes, that's correct. Anyway, the problem was that I was using "gdb", not "arm-none-eabi-gdb"... :roll: