运行环境:
ubuntu18.04.melodic
宏基暗影骑士笔记本
stm32f427IIH6
stlink
9-24v可调电源
robomaster A 板
1.1 点亮led
1)led引脚
PE11、PF14
![]()
设置引脚为输出模式,输出高低电平控制灯的暗灭

时钟配置

选择makefile

2)setting设置


修改成以下内容:
"editor.formatOnType": true
},### 1)led引脚
"cortex-debug.gdbPath": "/home/duduzai/Documents/RM/stmpack/gcc-arm-none-eabi-10.3-2021.10/bin/arm-none-eabi-gdb",
"cortex-debug.openocdPath.linux": "/usr/local/bin/openocd",
"cortex-debug.armToolchainPath": "",
"terminal.integrated.enableMultiLinePasteWarning": false,
}
3)launch设置

修改成以下内容
{
"configurations": [
{
"showDevDebugOutput": "parsed",
"cwd": "${workspaceRoot}",
"executable": "./build/LED11.elf",
"name": "Debug STM32",
"request": "launch",
"type": "cortex-debug",
"servertype": "openocd",
"device": "stm32f427",
"configFiles": [
"interface/stlink-v2-1.cfg",
"target/stm32f4x.cfg"
]
}
]
}
修改.elf文件名

4)编译运行

修改代码,保存,ctrl+shift+~ 调出终端make, F5调试烧录

该文章详细介绍了在Ubuntu18.04(Melodic)系统上,使用STM32F427IIH6开发板进行LED(PE11、PF14)点亮的步骤,包括设置LED引脚为输出模式,配置时钟,修改编辑器和调试器设置,如GDB和OpenOCD路径,以及使用Makefile进行编译和通过Cortex-Debug进行调试烧录。
6074

被折叠的 条评论
为什么被折叠?



