|

楼主 |
发表于 2024-9-1 15:48:14
|
显示全部楼层
1、安装Chocolatey
在powershell中执行:
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
2、使用Chocolatey 安装package
choco install make
choco install openocd
3、下载交叉编译器arm-none-eabi
下载地址:Arm GNU Toolchain Downloads | 13.2.Rel1 – Arm Developer
添加环境变量
4、生成工程
略
5、创建launch文件,修改如下:
STM32配置如下:
{
// 使用 IntelliSense 了解相关属性。
// 悬停以查看现有属性的描述。
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Cortex Debug",
"cwd": "${workspaceFolder}",
"executable": "./build/TEST.elf",
"request": "launch",
"type": "cortex-debug",
"runToEntryPoint": "main",
"servertype": "jlink",
"device": "STM32H743II",
"gdbPath": "C:/Program Files/arm-none-eabi/bin/arm-none-eabi-gdb.exe",
"svdFile": "C:/Users/zhqian/AppData/Local/Arm/Packs/Keil/STM32H7xx_DFP/2.7.0/CMSIS/SVD/STM32H743.svd"
}
]
}
NXP配置如下
{
"version": "0.2.0",
"configurations": [
{
"cwd": "${workspaceFolder}",
"executable": "./flexspi_nor_sdram_debug/hello_world.elf",
"name": "Debug with JLink",
"request": "launch",
"type": "cortex-debug",
"device": "MIMXRT1052xxxxB?BankAddr=0x60000000&Loader=QSPI",
"runToEntryPoint": "main",
"showDevDebugOutput": "raw",
"interface": "swd",
"servertype": "jlink",
// "jlinkscript": "evkbimxrt1050_sdram_init.jlinkscript",
"gdbPath": "D:/Program Files (x86)/arm-gnu-toolchain-12.2.rel1-mingw-w64-i686-arm-none-eabi/bin/arm-none-eabi-gdb.exe",
"svdFile": "D:/Program Files/IAR Systems/Embedded Workbench 9.2/arm/config/debugger/NXP/MIMXRT1052.svd"
}
]
}
|
|