eclipse+gcc compiler and debugging micropython
eclipse+gcc compiler and debugging micropython
i want add the micropython to my exist project.my project develop by MDK,i must change to gcc,buf i want have a human debug environment. eclipse + gcc can develop STM32,but i have no idea add micropython to eclipse.
Re: eclipse+gcc compiler and debugging micropython
Assuming you are running eclipse-cdt, you need just a few steps for this.
1) Import the code as "existing makefile project" (Im using the sthal build to run on a STM32F429DISC board)
2) define a new build variable "BOARD" = "STM32F429DISC" in the project properties.
3) Build the project
4) Create an external tool config to run "st-util". Im running linux, so mine is in /usr/local/bin/st-util. Set the working directory to ${workspace_loc:/stmhal/build-STM32F429DISC}
5) Run the tool. In the console it should say : "src/gdbserver/gdb-server.c: Listening at *:4242..."
6) Setup a debug configuration and change the "startup" tab to this:
- use file : ${workspace_loc:/stmhal/build-STM32F429DISC/firmware.elf}
- load file : ${workspace_loc:/stmhal/build-STM32F429DISC/firmware.elf}
- enable "set breakpoint at : main" + "Resume"
And run the debug
Let me know if you get stuck - most problems here are easy, once you know the solution.
1) Import the code as "existing makefile project" (Im using the sthal build to run on a STM32F429DISC board)
2) define a new build variable "BOARD" = "STM32F429DISC" in the project properties.
3) Build the project
4) Create an external tool config to run "st-util". Im running linux, so mine is in /usr/local/bin/st-util. Set the working directory to ${workspace_loc:/stmhal/build-STM32F429DISC}
5) Run the tool. In the console it should say : "src/gdbserver/gdb-server.c: Listening at *:4242..."
6) Setup a debug configuration and change the "startup" tab to this:
- use file : ${workspace_loc:/stmhal/build-STM32F429DISC/firmware.elf}
- load file : ${workspace_loc:/stmhal/build-STM32F429DISC/firmware.elf}
- enable "set breakpoint at : main" + "Resume"
And run the debug
Let me know if you get stuck - most problems here are easy, once you know the solution.
-
- Posts: 81
- Joined: Fri Sep 02, 2016 9:26 am
Re: eclipse+gcc compiler and debugging micropython
I've done all, except after flashing the firmware, it detect 6 HW breakpoint, raised error can't set hardware breakpoint and then stop debug process. why is this?flindt wrote:Assuming you are running eclipse-cdt, you need just a few steps for this.
1) Import the code as "existing makefile project" (Im using the sthal build to run on a STM32F429DISC board)
2) define a new build variable "BOARD" = "STM32F429DISC" in the project properties.
3) Build the project
4) Create an external tool config to run "st-util". Im running linux, so mine is in /usr/local/bin/st-util. Set the working directory to ${workspace_loc:/stmhal/build-STM32F429DISC}
5) Run the tool. In the console it should say : "src/gdbserver/gdb-server.c: Listening at *:4242..."
6) Setup a debug configuration and change the "startup" tab to this:
- use file : ${workspace_loc:/stmhal/build-STM32F429DISC/firmware.elf}
- load file : ${workspace_loc:/stmhal/build-STM32F429DISC/firmware.elf}
- enable "set breakpoint at : main" + "Resume"
And run the debug
Let me know if you get stuck - most problems here are easy, once you know the solution.
Re: eclipse+gcc compiler and debugging micropython
First check the output of the st-util. The easiest way to do this is to run it in a separate terminal.
Then try the same thing "manually" by using gdb directly - this will let you know whether it is an eclipse problem or not.
The gdb commands you need are:
Post the output here.
Then try the same thing "manually" by using gdb directly - this will let you know whether it is an eclipse problem or not.
The gdb commands you need are:
Code: Select all
arm-none-eabi-gdb
target remote localhost:4242
load yourBinaryFile.elf
break main.c
continue