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

相关推荐
belldeep16 小时前
WSL 安装 Debian 12 后,Linux 如何安装 vim ?
linux·debian·vim
Christal_pyy5 天前
树莓派4基于Debian GNU/Linux 12 (Bookworm)开启VNC,使用MobaXterm连接VNC出现黑屏/灰屏问题
linux·运维·debian
belldeep5 天前
WSL 安装 Debian 12 后,Linux 如何安装 redis ?
linux·redis·debian
翻滚吧键盘7 天前
debian中笔记本的省电选择auto-cpufreq
运维·debian
辰尘_星启7 天前
【Debian】关于LubanCat-RK3588s开发板安装Debian的一些事
运维·ubuntu·debian
Sahas10198 天前
debian安装docker
docker·eureka·debian
东南门吹雪9 天前
Debian系统上PostgreSQL15版本安装调试插件及DBeaver相应配置
linux·运维·postgresql·debian
belldeep12 天前
WSL 安装 Debian 后,apt get 如何更改到国内镜像网址?
linux·debian·wsl
计算机毕设定制辅导-无忧学长13 天前
ActiveMQ 集群搭建与高可用方案设计(二)
运维·debian·activemq
雨声不在19 天前
debian切换用户
linux·服务器·debian