mirror of
https://github.com/pine64/bl_iot_sdk.git
synced 2024-11-19 14:13:48 +00:00
44 lines
838 B
INI
44 lines
838 B
INI
#target chip
|
|
|
|
set _CHIPNAME riscv
|
|
jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x0
|
|
|
|
set _TARGETNAME $_CHIPNAME.cpu
|
|
target create $_TARGETNAME.0 riscv -chain-position $_TARGETNAME
|
|
$_TARGETNAME.0 configure -work-area-phys 0x22020000 -work-area-size 0x10000 -work-area-backup 1
|
|
|
|
echo "Ready for Remote Connections"
|
|
|
|
$_TARGETNAME.0 configure -event reset-assert-pre {
|
|
echo "reset-assert-pre"
|
|
adapter_khz 100
|
|
}
|
|
|
|
$_TARGETNAME.0 configure -event reset-deassert-post {
|
|
echo "reset-deassert-post"
|
|
adapter_khz 4000
|
|
reg mstatus 0x80000000
|
|
reg pc 0x21000000
|
|
}
|
|
|
|
$_TARGETNAME.0 configure -event reset-init {
|
|
echo "reset-init"
|
|
# 4MHz for FPGA
|
|
adapter_khz 4000
|
|
}
|
|
|
|
gdb_memory_map enable
|
|
gdb_flash_program disable
|
|
|
|
riscv set_prefer_sba on
|
|
riscv set_command_timeout_sec 1
|
|
|
|
init
|
|
reset init
|
|
|
|
#jtag arp_init
|
|
|
|
#resume
|
|
#exit
|
|
|