Debian环境下搭建STM32开发环境

  1. 安装交叉编译工具,解压gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2,并且把交叉编译环境添加到path路径。

2.安装下载工具驱动和下载工具

bash 复制代码
# 安装下载工具openocd
sudo apt -y install openocd

3.下载测试

bash 复制代码
 sudo openocd -f cmsis-dap.cfg -f stm32f4x.cfg   -c "program build/MM.hex" -c "reset"   -c "shutdown"
  • cmsis-dap.cfg :daplink配置文件
  • stm32f4x.cfg:目标配置文件
  • -c "program xxxx.hex" : 烧录固件
  • -c "reset" :烧录完成后复位mcu
  • -c "shutdown" : 烧录完成后退出openocd

注意点:

1.openocd 配置文件默认路径在:/usr/share/openocd/scripts

2.linux下openocd下载需要用到usb接口,需要sudo权限操作。

相关推荐
南林yan1 天前
Debian系统的多内核共存
linux·debian·linux内核
闪耀星星1 天前
debian elctron-builder
运维·debian
会飞的土拨鼠呀1 天前
Debian 12 笔记本合盖不休眠设置指南
运维·debian
John Song5 天前
用zookpeer搭建Hadoop的HA集群,组件启动的启动顺序是什么?
大数据·hadoop·debian
huazeci5 天前
deepin Ubuntu/Debian系统 环境下安装nginx,php,mysql,手动安装,配置自己的项目
nginx·ubuntu·debian
宁雨桥6 天前
基于 Debian 服务器的前端项目部署完整教程
服务器·前端·debian
宁雨桥6 天前
Debian 服务器环境搭建全指南:从工具选型到项目部署实战
运维·服务器·debian
sunshine-sm9 天前
Debian 安装 Domain Admin
运维·debian
Garc9 天前
linux Debian 12 安装 Docker(手动)
linux·docker·debian
林九生9 天前
【Debian】离线 Debian 系统如何正确设置东八区(Asia/Shanghai)时间
运维·debian