|
| 1 | +{ |
| 2 | + /* |
| 3 | + * Requires the Rust Language Server (rust-analyzer) and Cortex-Debug extensions |
| 4 | + * https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer |
| 5 | + * https://marketplace.visualstudio.com/items?itemName=marus25.cortex-debug |
| 6 | + * This configuration is exclusively for the STM32L4R5 I annotated the things you have to change for other L4's. |
| 7 | + */ |
| 8 | + "version": "0.2.0", |
| 9 | + "configurations": [ |
| 10 | + { |
| 11 | + "type": "cortex-debug", |
| 12 | + "request": "launch", |
| 13 | + "name": "Debug (QEMU)", |
| 14 | + "servertype": "qemu", |
| 15 | + "cwd": "${workspaceRoot}", |
| 16 | + "preLaunchTask": "Cargo Build (debug)", |
| 17 | + "runToEntryPoint": "main", |
| 18 | + "executable": "./bootloader/target/thumbv7em-none-eabi/debug/stm-bootloader", |
| 19 | + "cpu": "cortex-m4", |
| 20 | + "machine": "lm3s6965evb", |
| 21 | + }, |
| 22 | + { |
| 23 | + /* Configuration for the STM32L4R5 */ |
| 24 | + "type": "cortex-debug", |
| 25 | + "request": "launch", |
| 26 | + "name": "Debug (OpenOCD)", |
| 27 | + "servertype": "openocd", |
| 28 | + "cwd": "${workspaceRoot}", |
| 29 | + "preLaunchTask": "Build and Flash onto Chip (debug)", |
| 30 | + "postLaunchCommands": ["source .vscode/openocd.gdb"], |
| 31 | + "runToEntryPoint": "main", |
| 32 | + "executable": "./bootloader/target/thumbv7em-none-eabi/debug/stm-bootloader", |
| 33 | + "configFiles": [ |
| 34 | + "interface/stlink.cfg", |
| 35 | + "target/stm32l4x.cfg" |
| 36 | + ] |
| 37 | + }, |
| 38 | + { |
| 39 | + /* Configuration for the STM32L4R5 */ |
| 40 | + "type": "cortex-debug", |
| 41 | + "request": "launch", |
| 42 | + "name": "Release (OpenOCD)", |
| 43 | + "servertype": "openocd", |
| 44 | + "cwd": "${workspaceRoot}", |
| 45 | + "preLaunchTask": "Build and Flash onto Chip (release)", |
| 46 | + "postLaunchCommands": [ |
| 47 | + "source .vscode/openocd.gdb" |
| 48 | + ], |
| 49 | + // Yes, this wrong executable is intentional |
| 50 | + "executable": "./bootloader/target/thumbv7em-none-eabi/debug/stm-bootloader", |
| 51 | + "configFiles": [ |
| 52 | + "interface/stlink.cfg", |
| 53 | + "target/stm32l4x.cfg" |
| 54 | + ] |
| 55 | + }, |
| 56 | + { |
| 57 | + /* Configuration for the STM32L4R5 */ |
| 58 | + "type": "cortex-debug", |
| 59 | + "request": "launch", |
| 60 | + "name": "Release broken md1 (OpenOCD)", |
| 61 | + "servertype": "openocd", |
| 62 | + "cwd": "${workspaceRoot}", |
| 63 | + "preLaunchTask": "Build and Flash onto Chip (release, broken md1)", |
| 64 | + "postLaunchCommands": [ |
| 65 | + "source .vscode/openocd.gdb" |
| 66 | + ], |
| 67 | + // Yes, this wrong executable is intentional |
| 68 | + "executable": "./bootloader/target/thumbv7em-none-eabi/debug/stm-bootloader", |
| 69 | + "configFiles": [ |
| 70 | + "interface/stlink.cfg", |
| 71 | + "target/stm32l4x.cfg" |
| 72 | + ] |
| 73 | + }, |
| 74 | + { |
| 75 | + /* Configuration for the STM32L4R5 */ |
| 76 | + "type": "cortex-debug", |
| 77 | + "request": "launch", |
| 78 | + "name": "Release all metadata broken (OpenOCD)", |
| 79 | + "servertype": "openocd", |
| 80 | + "cwd": "${workspaceRoot}", |
| 81 | + "preLaunchTask": "Build and Flash onto Chip (release, all metadata broken)", |
| 82 | + "postLaunchCommands": [ |
| 83 | + "source .vscode/openocd.gdb" |
| 84 | + ], |
| 85 | + // Yes, this wrong executable is intentional |
| 86 | + "executable": "./bootloader/target/thumbv7em-none-eabi/debug/stm-bootloader", |
| 87 | + "configFiles": [ |
| 88 | + "interface/stlink.cfg", |
| 89 | + "target/stm32l4x.cfg" |
| 90 | + ] |
| 91 | + } |
| 92 | + ] |
| 93 | +} |
0 commit comments