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权限操作。

相关推荐
爱的si念5 天前
嵌入式ARM64 基于RK3588原生SDK添加用户配置选项./build lunch & debian
linux·debian·嵌入式
蚂蚁舞5 天前
在arm架构的Debian系统手动安装和卸载Mysql8的操作
arm开发·debian·安装mysql·mysql8·卸载mysql
圆山猫5 天前
[VF2] Boot Ubuntu和Debian发行版
ubuntu·postgresql·debian
etcix5 天前
for my debian 12 mxlinux install the podman
运维·debian·podman
Jtti7 天前
在 Debian 系统上清理缓存的方式和具体操作方法
运维·缓存·debian
Molesidy9 天前
【随笔】【Debian】【ArchLinux】基于Debian和ArchLinux的ISO镜像和虚拟机VM的系统镜像获取安装
运维·debian·archlinux
程序员 _孜然19 天前
Ubuntu/Debian修改网卡名字enP3p49s0为eth0
linux·运维·驱动开发·嵌入式硬件·ubuntu·debian
Gavin_91522 天前
从零开始部署经典开源项目管理系统最新版redmine6-Linux Debian12
linux·ruby on rails·开源·debian·ruby·redmine
天朝八阿哥22 天前
Debian从12升到13的翻车记
debian
闻道且行之25 天前
嵌入式|VNC实现开发板远程Debian桌面
运维·debian·嵌入式