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

相关推荐
jiecy2 天前
在 ARM 的 UOS 系统里布署 WebDav
arm开发·docker·debian
小雉系统5 天前
BcoreOS实战:用一个升级包,让Rocky Linux跑进Debian服务器
linux·运维·服务器·debian
谙弆悕博士5 天前
debian快速换源
linux·运维·windows·debian·下载·换源·网络问题
木子欢儿9 天前
Debian 13 + vsftpd 搭建FTP服务
linux·服务器·前端·网络·debian
hqzing14 天前
在鸿蒙 PC 上使用 apt 安装 Debian 软件包(非虚拟机、非容器)
华为·debian·harmonyos
Strugglingler15 天前
debian打包干货
debian·deb
皓月盈江18 天前
Linux Debian下STM32CubeProgrammer串口连接失败解决方案
linux·stm32·debian·串口下载·stm32f103c8t6·usb转ttl·stm32cubepro
qetfw25 天前
Debian iptables 防火墙:默认拒绝、SNAT 与 DNAT 验证
linux·服务器·debian·php
qetfw1 个月前
Debian SSH 安全配置:端口、来源限制与免密登录
linux·安全·debian·ssh
quweiie1 个月前
debian13安装meson和libvips
debian·meson·libvips