diff --git a/.vscode/launch.json b/.vscode/launch.json index cab004d..e421dd2 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -30,9 +30,10 @@ "type": "cortex-debug", "showDevDebugOutput": "raw", "servertype": "jlink", - "serverpath": "D:/RT-ThreadStudio/repo/Extract/Debugger_Support_Packages/SEGGER/J-Link/v7.50a/JLinkGDBServerCL.exe", + "serverpath": "tools/v7.50a/JLinkGDBServerCL.exe", "device": "stm32f429ig", "interface": "swd", + "loadFiles": [], "svdFile": "Project/STM32F429.svd", "armToolchainPath": "D:/Program Files/arm-gnu-toolchain/bin", "breakAfterReset": true, diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 9f8f690..179ffb4 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -16,12 +16,12 @@ }, }, { - "label": "download", + "label": "download stlink", "type": "shell", "command": "openocd", "args": [ "-f", - "interface/stlink-v2.cfg", + "interface/stlink.cfg", "-f", "target/stm32f4x.cfg", "-c", @@ -31,6 +31,22 @@ "options": { "cwd": "${workspaceFolder}/Project" }, + }, + { + "label": "download jlink", + "type": "shell", + "command": "tools/v7.50a/JLink.exe", + "args": [ + "-autoconnect", "1", + "-device", "stm32f429ig", + "-if", "swd", + "-speed", "4000", + "-commandfile", "download.jlink" + ], + "group": "build", + "options": { + "cwd": "${workspaceFolder}/Project", + }, } ] } \ No newline at end of file diff --git a/Project/.gitignore b/Project/.gitignore index 9b1960e..b3454f6 100644 --- a/Project/.gitignore +++ b/Project/.gitignore @@ -1 +1,2 @@ -output/ \ No newline at end of file +output/ +tools/ \ No newline at end of file diff --git a/Project/download.jlink b/Project/download.jlink new file mode 100644 index 0000000..334e63b --- /dev/null +++ b/Project/download.jlink @@ -0,0 +1,5 @@ +reset +erase +loadfile output/stm32.hex +r +qc \ No newline at end of file