Add jlink config.
This commit is contained in:
parent
68653daa2c
commit
cdd2f57902
|
@ -77,6 +77,9 @@ program.hex: $(TEST).o $(LINK)
|
||||||
openocd:
|
openocd:
|
||||||
openocd -f swerv.cfg
|
openocd -f swerv.cfg
|
||||||
|
|
||||||
|
jlink:
|
||||||
|
openocd -f jlink.cfg
|
||||||
|
|
||||||
gdb:
|
gdb:
|
||||||
$(GDB_PREFIX) -x gdbinit ./build/jtag.bin
|
$(GDB_PREFIX) -x gdbinit ./build/jtag.bin
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,45 @@
|
||||||
|
#
|
||||||
|
# SEGGER J-Link
|
||||||
|
#
|
||||||
|
# http://www.segger.com/jlink.html
|
||||||
|
#
|
||||||
|
|
||||||
|
adapter driver jlink
|
||||||
|
transport select jtag
|
||||||
|
adapter speed 200
|
||||||
|
|
||||||
|
|
||||||
|
# Target configuration for the riscv chip
|
||||||
|
|
||||||
|
set _CHIPNAME riscv
|
||||||
|
set _TARGETNAME $_CHIPNAME.cpu
|
||||||
|
|
||||||
|
jtag newtap $_CHIPNAME tap -irlen 5 -expected-id 0x1000008b
|
||||||
|
set _TARGETNAME $_CHIPNAME.tap
|
||||||
|
target create $_TARGETNAME riscv -chain-position $_TARGETNAME
|
||||||
|
|
||||||
|
# Configure work area in on-chip SRAM
|
||||||
|
# $_TARGETNAME configure -work-area-phys 0x1000e000 -work-area-size 1000 -work-area-backup 0
|
||||||
|
|
||||||
|
riscv expose_csrs 1988
|
||||||
|
|
||||||
|
# Be verbose about GDB errors
|
||||||
|
gdb_report_data_abort enable
|
||||||
|
gdb_report_register_access_error enable
|
||||||
|
|
||||||
|
# Increase timeouts in simulation
|
||||||
|
riscv set_command_timeout_sec 1200
|
||||||
|
|
||||||
|
# Conclude OpenOCD configuration
|
||||||
|
init
|
||||||
|
|
||||||
|
# Halt the target
|
||||||
|
halt
|
||||||
|
|
||||||
|
|
||||||
|
# The serial number can be used to select a specific device in case more than
|
||||||
|
# one is connected to the host.
|
||||||
|
#
|
||||||
|
# Example: Select J-Link with serial number 123456789
|
||||||
|
#
|
||||||
|
# adapter serial 123456789
|
Loading…
Reference in New Issue