第一次提交
This commit is contained in:
Vendored
+21
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Win32",
|
||||
"includePath": [
|
||||
"${workspaceFolder}/**"
|
||||
],
|
||||
"defines": [
|
||||
"_DEBUG",
|
||||
"UNICODE",
|
||||
"_UNICODE"
|
||||
],
|
||||
"cStandard": "c17",
|
||||
"cppStandard": "gnu++14",
|
||||
"intelliSenseMode": "windows-gcc-x86",
|
||||
"configurationProvider": "ms-vscode.makefile-tools",
|
||||
"compileCommands": "${workspaceFolder}/build/Debug/compile_commands.json"
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
||||
Vendored
+81
@@ -0,0 +1,81 @@
|
||||
{
|
||||
// 启动调试的快捷键是F5
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
// 使用dap-link(如无线调试器时的参考配置)
|
||||
{
|
||||
"name": "DAPlink",
|
||||
"cwd": "${workspaceRoot}",
|
||||
"executable": "${workspaceRoot}\\build\\JNU_Infantry_Omni.elf", // 要下载到调试器的文件,花括号中的是vscode两个预定义的参数
|
||||
"request": "launch",
|
||||
"type": "cortex-debug",
|
||||
//使用J-link GDB Server时必须;其他GBD Server时可选(有可能帮助自动选择SVD文件)
|
||||
//支持的设备见 https://www.segger.com/downloads/supported-devices.php
|
||||
"device": "STM32F407IG",
|
||||
//svd文件,有这个文件才能查看寄存器的值,每个单片机都不同。可以在以下地址找到 https://github.com/posborne/cmsis-svd
|
||||
//该项目的根目录已经提供了C型开发板使用的外设svd文件
|
||||
"svdFile": "STM32F407.svd",
|
||||
"servertype": "openocd", //使用的GDB Server
|
||||
"configFiles": [
|
||||
"openocd_dap.cfg", // 配置文件已经在根目录提供,若要修改以此类推,openocd的路径下的share/scripts中有各种写好的配置文件
|
||||
],
|
||||
"runToEntryPoint": "main", // 调试时在main函数入口停下
|
||||
"rtos": "FreeRTOS",
|
||||
"preLaunchTask": "build task",//先运行Build任务编译项目,取消注释即可使用
|
||||
"liveWatch": {
|
||||
"enabled": true,
|
||||
"samplesPerSecond": 3
|
||||
}
|
||||
// dap若要使用log,请使用Jlink调试任务启动,之后再打开log任务
|
||||
// 若想要在调试前编译并且打开log,可只使用log的prelaunch task并为log任务添加depends on依赖
|
||||
},
|
||||
// 使用j-link进行调试时的参考配置
|
||||
{
|
||||
"name": "Jlink",
|
||||
"cwd": "${workspaceFolder}",
|
||||
"executable": "${workspaceRoot}\\build\\Basic_Framework_MC02.elf",
|
||||
"request": "launch",
|
||||
"type": "cortex-debug",
|
||||
"device": "STM32H723VG",
|
||||
"runToEntryPoint": "main",
|
||||
"showDevDebugOutput": "none",
|
||||
"servertype": "jlink",
|
||||
"interface": "swd",
|
||||
"svdFile": "STM32H723.svd",
|
||||
"rtos": "FreeRTOS",
|
||||
"preLaunchTask": "build task",//先运行Build任务,取消注释即可使用
|
||||
"liveWatch": {
|
||||
"enabled": true,
|
||||
"samplesPerSecond": 4
|
||||
}
|
||||
//"preLaunchTask": "log", // 调试时同时开启RTT viewer窗口,若daplink使用jlinkGDBserver启动,需要先开始调试再打开log
|
||||
// 若想要在调试前编译并且打开log,可只使用log的prelaunch task并为log任务添加depends on依赖
|
||||
},
|
||||
{
|
||||
"name": "DAP-attach",
|
||||
"cwd": "${workspaceRoot}",
|
||||
"executable": "${workspaceRoot}\\build\\JNU_Infantry_Omni.elf", // 要下载到调试器的文件,花括号中的是vscode两个预定义的参数
|
||||
"request": "attach",
|
||||
"type": "cortex-debug",
|
||||
"device": "STM32F407IG",
|
||||
"svdFile": "STM32F407.svd",
|
||||
"servertype": "openocd",
|
||||
"configFiles": [
|
||||
"openocd_dap.cfg",
|
||||
],
|
||||
},
|
||||
{
|
||||
"name": "Jlink-attach",
|
||||
"cwd": "${workspaceFolder}",
|
||||
"executable": "${workspaceRoot}\\build\\JNU_Infantry_Omni.elf",
|
||||
"request": "attach",
|
||||
"type": "cortex-debug",
|
||||
"device": "STM32F407IG",
|
||||
"showDevDebugOutput": "none",
|
||||
"servertype": "jlink",
|
||||
"interface": "swd",
|
||||
"svdFile": "STM32F407.svd",
|
||||
"rtos": "FreeRTOS",
|
||||
},
|
||||
],
|
||||
}
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"files.associations": {
|
||||
"stm32f4xx_hal_def.h": "c",
|
||||
"bsp_usb.h": "c",
|
||||
"usb_device.h": "c",
|
||||
"usbd_cdc.h": "c",
|
||||
"usbd_conf.h": "c",
|
||||
"usbd_desc.h": "c",
|
||||
"usbd_cdc_if.h": "c"
|
||||
}
|
||||
}
|
||||
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"cortex-debug.openocdPath": "C:\\OPENOCD\\OPENOCD-20231002-0.12.0\\BIN\\OPENOCD.EXE",
|
||||
"cortex-debug.armToolchainPath": "C:\\PROGRAM FILES (X86)\\ARM GNU TOOLCHAIN ARM-NONE-EABI\\13.3 REL1\\BIN",
|
||||
"cmake.cmakePath": "cube-cmake",
|
||||
"cmake.configureArgs": [
|
||||
"-DCMAKE_COMMAND=cube-cmake"
|
||||
],
|
||||
"cmake.preferredGenerators": [
|
||||
"Ninja"
|
||||
],
|
||||
"stm32cube-ide-clangd.path": "cube",
|
||||
"stm32cube-ide-clangd.arguments": [
|
||||
"starm-clangd",
|
||||
"--query-driver=${env:CUBE_BUNDLE_PATH}/gnu-tools-for-stm32/14.3.1+st.2/bin/arm-none-eabi-gcc*",
|
||||
"--query-driver=${env:CUBE_BUNDLE_PATH}/gnu-tools-for-stm32/14.3.1+st.2/bin/arm-none-eabi-g++*",
|
||||
"--header-insertion=never"
|
||||
]
|
||||
}
|
||||
Vendored
+63
@@ -0,0 +1,63 @@
|
||||
{
|
||||
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "build task", // 任务标签
|
||||
"type": "shell", // 任务类型,因为要调用mingw32-make,是在终端(CMD)里运行的,所以是shell任务
|
||||
"command": "mingw32-make -j16",// 任务命令,线程数可以根据自己的电脑修改,建议与cpu核数相同
|
||||
"problemMatcher": [],
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "download dap",
|
||||
"type": "shell", // 如果希望在下载前编译,可以把command换成下面的命令
|
||||
"command":"mingw32-make -j16 ; mingw32-make download_dap", // "mingw32-make -j24 ; mingw32-make download_dap",
|
||||
"group": { // 如果没有修改代码,编译任务不会消耗时间,因此推荐使用上面的替换.
|
||||
"kind": "build",
|
||||
"isDefault": false,
|
||||
},
|
||||
},
|
||||
{
|
||||
"label": "download jlink", // 要使用此任务,需添加jlink的环境变量
|
||||
"type": "shell",
|
||||
"command":"mingw32-make -j16 ; mingw32-make download_jlink", // "mingw32-make -j24 ; mingw32-make download_jlink"
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": false,
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "clean build",
|
||||
"type": "shell",
|
||||
"command": "mingw32-make clean",
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": false
|
||||
},
|
||||
"problemMatcher": [],
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "always",
|
||||
"focus": false,
|
||||
"panel": "shared",
|
||||
"showReuseMessage": true,
|
||||
"clear": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "log",
|
||||
"type": "shell",
|
||||
"command":"JlinkRTTClient",
|
||||
"args": [],
|
||||
"problemMatcher": [],
|
||||
"dependsOn":[
|
||||
"jlink launch", // 可以添加多个.
|
||||
]
|
||||
// 若使用daplink,则将log任务设置为依赖于jlink launch任务,保证jlink launch任务先于log任务执行
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user