Debugging with GDB/Eclipse?

Discussion and questions about boards that can run MicroPython but don't have a dedicated forum.
Target audience: Everyone interested in running MicroPython on other hardware.
Post Reply
hjf
Posts: 12
Joined: Sat Feb 27, 2016 3:47 am

Debugging with GDB/Eclipse?

Post by hjf » Tue Mar 08, 2016 11:11 am

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?

SpotlightKid
Posts: 463
Joined: Wed Apr 08, 2015 5:19 am

Re: Debugging with GDB/Eclipse?

Post by SpotlightKid » Tue Mar 08, 2016 10:01 pm

hjf wrote:[...] declared DEBUG=1, BOARD=STM32F4DISCOVERY and V=1.
There is no board definition called STM32F4DISCOVERY, you probably mean STM32F4DISC.

hjf
Posts: 12
Joined: Sat Feb 27, 2016 3:47 am

Re: Debugging with GDB/Eclipse?

Post by hjf » Tue Mar 08, 2016 11:12 pm

Yes, that's correct. Anyway, the problem was that I was using "gdb", not "arm-none-eabi-gdb"... :roll:

Post Reply