运行环境:
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调试烧录