基于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

Debug配置

OpenOCD
OpenOCD
OpenOCD
Config options:

-f "board/st_nucleo_f4.cfg"
-c "gdb_breakpoint_override hard"

Download配置

download

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

Ddebug测试

debug

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值