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

相关推荐
qetfw1 天前
Debian 使用 FTP 镜像源配置 APT 软件源
linux·debian·apt·ftp
XiangrongZ2 天前
debian中配置stm32的交叉编译环境
运维·stm32·debian
qetfw2 天前
Debian Apache2 执行 Shell CGI:动态时间页面配置与验证
linux·运维·debian
qetfw4 天前
Debian Apache2 实战:自定义站点目录、运行用户与 Basic Auth 认证
linux·运维·debian
qetfw5 天前
Debian 配置 AIDE 文件完整性检测:基线初始化、变更检查与数据库更新
linux·网络·数据库·debian
谜之锋17 天前
银河麒麟 Debian 系统离线deb包安装Mariadb 数据库指南
数据库·debian·mariadb
美丽的欣情22 天前
RK3588 Debian 交叉编译环境搭建(Windows + VMware Debian + CMake)
运维·windows·debian
是店小二呀1 个月前
画架构图不想依赖在线平台?把Excalidraw装进自己的NAS
人工智能·debian
七歌杜金房1 个月前
我终于又有了自己的 Linux 电脑
linux·debian·mac
2601_961875242 个月前
决战申论100题2026|最新|范文
linux·容器·centos·debian·ssh·fabric·vagrant