linux上搭建stm32开发环境 vscode+gcc+stm32cubeMX 和 vscode+platformIO,stm32vscode
分享于 点击 8945 次 点评:80
linux上搭建stm32开发环境 vscode+gcc+stm32cubeMX 和 vscode+platformIO,stm32vscode
一、软件清单:
- VSCode:应用商店安装 或
sudo add-apt-repository ppa:ubuntu-desktop/ubuntu-make sudo apt-get update sudo apt-get install ubuntu-make sudo umake web visual-studio-code
- arm-none-eabi-gcc:
sudo apt-get install gcc-arm-none-eabi
sudo apt-get install gdb-arm-none-eabi
或 手动下载安装:https://launchpad.net/gcc-arm-embedded/+download
( 补充:VSCode的PlatformIO IDE插件里Platform选项安装“ST STM32”家目录下会自动安装相应工具,看下面:
嗯。不用另外装arm-none-eabi工具集了,如果你用PlatformIO插件的话。 )~/.platformio/packages/toolchain-gccarmnoneeabi/bin/arm-none-eabi-gcc -v
- stm32flash(串口下载,选装):
查看串口信息:sudo apt-get install stm32flash stm32flash -h
dmesg | grep tty
- OpenOCD:(现在是0.10.0)
sudo apt install openocd
( http://openocd.org)
- Stm32CubeMX: 官网下载,解压后进入文件夹
sudo apt-get install default-jre sudo ./SetupSTM32CubeMX-x.xx.x.linux
二、配置vscode(待续)
- cortex-debug插件(感觉不错~):
launch.json例子:
{
"version": "0.2.0",
"configurations": [
{
"name": "Cortex Debug",
"cwd": "${workspaceRoot}",
"executable": "build/L496ZGTx_LPUASRT.elf",
"request": "launch",
"type": "cortex-debug",
"servertype": "openocd",
"BMPGDBSerialPort": "/dev/ttyACM0",
"runToMain": true,
"device": "STM32L496ZG",
//"preLaunchTask": "build-elf",
"configFiles": [
"board/st_nucleo_l4.cfg"
]
}
]
}
- PlatformIO IDE插件(感觉支持的东西比较新):请戳http://docs.platformio.org/en/latest/ide/vscode.html#quick-start
(有空再更新。)
相关文章
- 暂无相关文章
用户点评