基于Ubuntu+Eclipse+GDB+OpenOCD+STlink+STM32开发环境搭建

Eclipse下载安装

下载

gnu-mcu-eclipse下载链接

安装(解压)

tar zxvf 20200127-1311-gnumcueclipse-4.7.2-2019-12-R-linux.gtk.x86_64.tar.gz

Java jdk下载安装

Java SE Development Kit 8 Downloads

tar zxvf jdk-8u251-linux-x64.tar.gz

Eclipse运行

拷贝jdk目录下的jre文件夹到eclipse目录下

cp -r jdk1.8.0_251/jre eclipse

执行

eclipse

eclipse

编译测试

File->New->Project
创建工程
创建工程
创建工程
一路Next到配置交叉编译工具链路径
选择工具链位置
编译
编译

OpenOCD下载安装配置

下载

https://github.com/ilg-archived/openocd/releases

安装(解压)

tar zxvf gnu-mcu-eclipse-openocd-0.10.0-12-20190422-2015-centos64.tgz

配置

OpenOCD
OpenOCD
OpenOCD
Config options:

-f "board/st_nucleo_f4.cfg"
-c init -c "reset halt"
-c "flash write_image erase Debug/stm32f4.elf"
-c "verify_image Debug/stm32f4.elf"
-c "reset halt"

DEBUG测试

debug

原创文章 43 获赞 6 访问量 3万+

猜你喜欢

转载自blog.csdn.net/u010018991/article/details/106125756