elf="build/firmware.elf"
gdb -ex "target extended-remote localhost:3333" \
-ex "monitor reset init" \
-ex "load ${elf}" \
-ex "continue" \
"${elf}"
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Debug",
"type": "gdb",
"cwd": "${workspaceRoot}",
"request": "attach",
"executable": "${workspaceRoot}/firmware/build/firmware.elf",
"target": "localhost:3333",
"valuesFormatting": "parseText",
"gdbpath": "riscv64-unknown-elf-gdb",
"remote": true,
"autorun": [
"load firmware/build/firmware.elf",
// "break main",
"monitor reset"
]
}
]
}
target extended-remote | \
openocd -c "gdb_port pipe; log_output openocd.log"
sudo chmod a+rw /dev/ttyUSB3