{
// 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": "RISC-V Debug",
"type": "cortex-debug",
"cwd": "${workspaceRoot}",
"executable": "${workspaceRoot}/build/firmware.elf",
"request": "launch",
"servertype": "openocd",
"serverpath": "openocd",
"toolchainPrefix": "riscv64-unknown-elf",
"configFiles": [
"${workspaceRoot}/debug/bearlyml.cfg"
],
"searchDir": [],
"runToEntryPoint": "main",
"showDevDebugOutput": "none""svdFile": "${workspaceRoot}/debug/bearlyml.svd",
"numberOfProcessors": 5,
"currentProcessor": 1
}
]
}
openocd -f .\debug\bearlyml.cfg
PS C:\Users\TK\Desktop\HAL> openocd -f .\debug\bearlyml.cfg
Open On-Chip Debugger 0.11.0-rc1+dev (SiFive OpenOCD 0.10.0-2020.12.1)
Licensed under GNU GPL v2
For bug reports:
https://github.com/sifive/freedom-tools/issues
Info : clock speed 4000 kHz
Info : JTAG tap: riscv.cpu tap/device found: 0x00000001 (mfg: 0x000 (<invalid>), part: 0x0000, ver: 0x0)
Info : datacount=2 progbufsize=16
Info : Disabling abstract command reads from CSRs.
Info : Examined RISC-V core; found 5 harts
Info : hart 0: XLEN=64, misa=0x800000000094112d
Info : starting gdb server for riscv.cpu0 on 3333
Info : Listening on port 3333 for gdb connections
Ready for Remote Connections
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
cd firmware
riscv64-unknown-elf-gdb.exe .\build\firmware.elf
PS C:\Users\TK\Desktop\HAL\firmware> riscv64-unknown-elf-gdb.exe .\build\firmware.elf
D:\Documents\RISCV\riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-w64-mingw32\bin\riscv64-unknown-elf-gdb.exe: warning: Couldn't determine a path for the index cache directory.
GNU gdb (SiFive GDB-Metal 10.1.0-2020.12.7) 10.1
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "--host=x86_64-w64-mingw32 --target=riscv64-unknown-elf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://github.com/sifive/freedom-tools/issues>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from .\build\firmware.elf...
(gdb)