blob: c10ad8fdde7ff6d92c13ba9e81beb9dfa3e7dad6 (
plain)
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
37
38
39
40
|
# Connect to a mult-icore RISC-V target, exposing each hart as a thread.
adapter speed 10000
adapter driver remote_bitbang
remote_bitbang host $::env(REMOTE_BITBANG_HOST)
remote_bitbang port $::env(REMOTE_BITBANG_PORT)
set _CHIPNAME riscv
jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x10e31913
set _TARGETNAME_0 $_CHIPNAME.cpu0
set _TARGETNAME_1 $_CHIPNAME.cpu1
target create $_TARGETNAME_0 riscv -chain-position $_CHIPNAME.cpu -rtos hwthread
target create $_TARGETNAME_1 riscv -chain-position $_CHIPNAME.cpu -coreid 1
target smp $_TARGETNAME_0 $_TARGETNAME_1
gdb_report_data_abort enable
gdb_report_register_access_error enable
# Expose an unimplemented CSR so we can test non-existent register access
# behavior.
foreach t [target names] {
targets $t
riscv expose_csrs 2288
riscv expose_custom 1,12345-12348
}
riscv resume_order reversed
init
set challenge [riscv authdata_read]
riscv authdata_write [expr {$challenge + 1}]
halt
foreach t [target names] {
targets $t
arm semihosting enable
}
|