Recent updates Win 10, It's all over again GCC + Eclipse + OpenOCD Development environment of , Write this article and record the process , For future reference .
Hardware platform
STM32F405 Development board + ST LINK
step 1
- GCC ARM toolchain Indispensable , Portal .
- Build tools Can't forget , Portal .
- OpenOCD cannot run away , Portal .
above , You need to set the environment variable PATH.
step 2
- Engineering documents for testing , Portal .
- take OpenOCD Install under directory stm32f4discovery.cfg Copy to the folder where the downloaded project file is located .
Open the command window in the folder where the project file is located , type openocd -f stm32f4discovery.cfg And then go back , At this time, the command window should look like the following figure :
step 3
- stay Eclipse Create project , In turn, click File -> New -> Makefile Project with Existing Code Import the file into ,Toolchain for Indexer Settings Choose from Cross GCC, Finally, click Finish.
above , If I haven't forgotten anything , In turn, click Project -> Built All Ready to compile , Attention Console Window output information , As shown in the figure below :
step 4
- stay Eclipse Click... In turn Help -> Install New Software, install CDT plug-in unit .
-
In turn, click Run -> Debug Configurations, Double click... On the left GDB Hardware Debugging Create a new configuration ,Main The tab settings are shown in the following figure :
-
Debugger The tab settings are shown in the following figure :
-
Startup The tab settings are shown in the following figure :
-
Startup On the tab Runtime Options The settings are shown in the figure below :
-
stay Common Check... In the tab Display in favorites menu Under the Debug Check box .
- In turn, click Select other -> Change Workspace Settings, Choose GDB Hardware Debugging Under the Debug, Select on the right Legacy GDB Hardware Debugging Launcher, Click on Apply Save settings .
step 5
- according to step 2 Open command window .
- Click on the toolbar debug The inverted triangle next to the icon , choice STM32F4 OpenOCD Debug, The results are shown in the following figure :
At the end
Hurried writing , A lot of places have been written in one stroke , And the information I refer to is very detailed , Share below :
Part 1 - Setting up the GCC ARM Toolchain
Part 2 - Setting up the Eclipse IDE
Part 3 - Setting up Debugging with the Eclipse IDE