forked from sipeed/bl602-rust-guide
-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathlaunch.json
More file actions
36 lines (31 loc) · 1.44 KB
/
launch.json
File metadata and controls
36 lines (31 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{
// VSCode Debugger Config for PineCone BL602
"version": "0.2.0",
"configurations": [
{
"name": "BL602",
"type": "gdb",
"request": "launch",
// Application Executable to be flashed before debugging
"target": "${workspaceRoot}/target/riscv32imac-unknown-none-elf/debug/bl602-rust-guide",
"cwd": "${workspaceRoot}",
"gdbpath": "${workspaceRoot}/xpack-riscv-none-embed-gcc/bin/riscv-none-embed-gdb",
"valuesFormatting": "parseText",
"autorun": [
// Before loading the Application, run these gdb commands.
// Set timeout for executing openocd commands.
"set remotetimeout 600",
// This indicates that an unrecognized breakpoint location should automatically result in a pending breakpoint being created.
"set breakpoint pending on",
// Set breakpoints
"break main", // Break at main()
// Launch OpenOCD. Based on https://www.justinmklam.com/posts/2017/10/vscode-debugger-setup/
"target remote | xpack-openocd/bin/openocd -c \"gdb_port pipe; log_output openocd.log\" -f openocd.cfg ",
// Load the program into cache memory
"load",
// Run the program until we hit the main() breakpoint
"continue",
]
}
]
}