tcl/board: add SPDX tag
[fw/openocd] / tcl / board / telo.cfg
1 # SPDX-License-Identifier: GPL-2.0-or-later
2
3 source [find target/c100.cfg]
4 # basic register definition for C100
5 source [find target/c100regs.tcl]
6 # board-config info
7 source [find target/c100config.tcl]
8 # C100 helper functions
9 source [find target/c100helper.tcl]
10
11
12 # Telo board & C100 support trst and srst
13 # make the reset asserted to
14 # allow RC circuit to discharge for: [ms]
15 adapter srst pulse_width 100
16 jtag_ntrst_assert_width 100
17 # don't talk to JTAG after reset for: [ms]
18 adapter srst delay 100
19 jtag_ntrst_delay 100
20 reset_config trst_and_srst separate
21
22
23
24
25 # issue telnet: reset init
26 # issue gdb: monitor reset init
27 $_TARGETNAME configure -event reset-init {
28         adapter speed 100
29         # this will setup Telo board
30         setupTelo
31         #turn up the JTAG speed
32         adapter speed 3000
33         echo "JTAG speek now 3MHz"
34         echo "type helpC100 to get help on C100"
35 }
36
37 $_TARGETNAME configure -event reset-deassert-post {
38         # Force target into ARM state.
39 #       soft_reset_halt ;# not implemented on ARM11
40         echo "Detected SRSRT asserted on C100.CPU"
41
42 }
43
44 $_TARGETNAME configure -event reset-assert-post {
45   echo "Assering reset"
46   #sleep 10
47 }
48
49 proc power_restore {} { echo "Sensed power restore. No action." }
50 proc srst_deasserted {} { echo "Sensed nSRST deasserted. No action." }
51
52
53 # boots from NOR on CS0:  8 MBytes CFI flash, 16-bit bus
54 # it's really 16MB but the upper 8mb is controller via gpio
55 # openocd does not support 'complex reads/writes' to NOR
56 set _FLASHNAME $_CHIPNAME.flash
57 flash bank $_FLASHNAME cfi 0x20000000 0x01000000 2 2 $_TARGETNAME
58
59 # writing data to memory does not work without this
60 arm11 memwrite burst disable