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

相关推荐
Flying_Fish_roe5 小时前
linux-软件包管理-包管理工具(Debian 系)
linux·运维·debian
送南阳马生序4 天前
Cubieboard2(一) 官方镜像使用与配置
linux·debian·arm
读书,代码与猫5 天前
【裸机装机系列】3.kali(ubuntu)-更新sources.list并重启
linux·经验分享·后端·ubuntu·debian
白总Server5 天前
rust解说
linux·开发语言·后端·golang·rust·debian·php
telllong5 天前
Debian 包管理工具apt使用
运维·debian
不想秃头的烟花7 天前
Linux安装软件的方法
linux·debian·redhat·软件仓库
地球空间-技术小鱼7 天前
在 Debian 12 上安装中文五笔输入法
运维·debian
fareast_mzh12 天前
Setting up fail2ban on Debian
运维·debian
我的世界没光14 天前
PVE开启核显直通
linux·debian·pve·核显直通
入秋的大橘16 天前
VirtualBox Debian 自动安装脚本
运维·chrome·debian