Skip to content

Commit 77718d1

Browse files
committed
Cleaned up TCL scripts.
1 parent 28f2ae8 commit 77718d1

File tree

11 files changed

+187
-134
lines changed

11 files changed

+187
-134
lines changed

tcl/dbg_api3_tpi.cfg

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
2+
# Copyright (c) 2017 embed-dsp
3+
# All Rights Reserved
4+
5+
# $Author: Gudmundur Bogason <gb@embed-dsp.com> $
6+
# $Date: $
7+
# $Revision: $
8+
9+
# Use Pi3B Interface to debug Pi0W Target
10+
11+
#source [find tcl/interface/pix_sysfsgpio.cfg]
12+
source [find tcl/interface/pi3_bcm2835.cfg]
13+
14+
transport select jtag
15+
16+
adapter_khz 1000
17+
18+
#adapter_nsrst_assert_width 100
19+
adapter_nsrst_delay 500
20+
21+
#jtag_ntrst_assert_width 100
22+
#jtag_ntrst_delay 500
23+
24+
#reset_config none
25+
#reset_config trst_only
26+
#reset_config srst_only srst_push_pull
27+
reset_config trst_and_srst srst_push_pull
28+
29+
source [find tcl/target/pi_target.cfg]

tcl/dbg_api_tpi3.cfg

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
2+
# Copyright (c) 2017 embed-dsp
3+
# All Rights Reserved
4+
5+
# $Author: Gudmundur Bogason <gb@embed-dsp.com> $
6+
# $Date: $
7+
# $Revision: $
8+
9+
# Use Pi0W Interface to debug Pi3B Target
10+
11+
#source [find tcl/interface/pix_sysfsgpio.cfg]
12+
source [find tcl/interface/pi_bcm2835.cfg]
13+
14+
transport select jtag
15+
16+
adapter_khz 1000
17+
18+
#adapter_nsrst_assert_width 100
19+
adapter_nsrst_delay 500
20+
21+
#jtag_ntrst_assert_width 100
22+
#jtag_ntrst_delay 500
23+
24+
#reset_config none
25+
#reset_config trst_only
26+
#reset_config srst_only srst_push_pull
27+
reset_config trst_and_srst srst_push_pull
28+
29+
source [find tcl/target/pi3_target.cfg]

tcl/interface/pi3_bcm2835.cfg

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
2+
# Copyright (c) 2017 embed-dsp
3+
# All Rights Reserved
4+
5+
# $Author: Gudmundur Bogason <gb@embed-dsp.com> $
6+
# $Date: $
7+
# $Revision: $
8+
9+
interface bcm2835gpio
10+
11+
bcm2835gpio_peripheral_base 0x3f000000
12+
13+
# Transition delay calculation: SPEED_COEFF/khz - SPEED_OFFSET
14+
# NOTE: 600MHz CPU Clock
15+
#bcm2835gpio_speed_coeffs 150000 21
16+
# NOTE: 1200MHz CPU Clock
17+
bcm2835gpio_speed_coeffs 306000 26
18+
19+
# GPIO numbers for: TCK TMS TDI TDO
20+
bcm2835gpio_jtag_nums 11 25 10 9
21+
22+
# GPIO number for: TRST
23+
bcm2835gpio_trst_num 7
24+
25+
# GPIO number for: SRST
26+
bcm2835gpio_srst_num 24
27+
28+
# GPIO numbers for: SWCLK SWDIO
29+
#bcm2835gpio_swd_nums 25 24

tcl/interface/pi3_bcm2835.tcl

Lines changed: 0 additions & 41 deletions
This file was deleted.

tcl/interface/pi_bcm2835.cfg

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
# Copyright (c) 2017 embed-dsp
3+
# All Rights Reserved
4+
5+
# $Author: Gudmundur Bogason <gb@embed-dsp.com> $
6+
# $Date: $
7+
# $Revision: $
8+
9+
interface bcm2835gpio
10+
11+
bcm2835gpio_peripheral_base 0x20000000
12+
13+
# Transition delay calculation: SPEED_COEFF/khz - SPEED_OFFSET
14+
# These depend on system clock, calibrated for stock 700MHz
15+
# bcm2835gpio_speed SPEED_COEFF SPEED_OFFSET
16+
bcm2835gpio_speed_coeffs 113714 28
17+
18+
# GPIO numbers for: TCK TMS TDI TDO
19+
bcm2835gpio_jtag_nums 11 25 10 9
20+
21+
# GPIO number for: TRST
22+
bcm2835gpio_trst_num 7
23+
24+
# GPIO number for: SRST
25+
bcm2835gpio_srst_num 24
26+
27+
# GPIO numbers for: SWCLK SWDIO
28+
#bcm2835gpio_swd_nums 25 24

tcl/interface/pi_bcm2835.tcl

Lines changed: 0 additions & 34 deletions
This file was deleted.

tcl/interface/pix_sysfsgpio.cfg

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
# Copyright (c) 2017 embed-dsp
3+
# All Rights Reserved
4+
5+
# $Author: Gudmundur Bogason <gb@embed-dsp.com> $
6+
# $Date: $
7+
# $Revision: $
8+
9+
interface sysfsgpio
10+
11+
12+
13+
14+
15+
16+
17+
18+
# GPIO numbers for: TCK TMS TDI TDO
19+
sysfsgpio_jtag_nums 11 25 10 9
20+
21+
# GPIO number for: TRST
22+
sysfsgpio_trst_num 7
23+
24+
# GPIO number for: SRST
25+
sysfsgpio_srst_num 24

tcl/interface/pix_sysfsgpio.tcl

Lines changed: 0 additions & 20 deletions
This file was deleted.

tcl/target/pi3_target.tcl renamed to tcl/target/pi3_target.cfg

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
1-
# ref: http://www.raspberrypi.org/forums/viewtopic.php?f=72&t=100268
2-
# : http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0464f/ch10s06s01.html
31

4-
adapter_khz 1000
5-
adapter_nsrst_delay 400
6-
reset_config none
2+
# Copyright (c) 2017 embed-dsp
3+
# All Rights Reserved
4+
5+
# $Author: Gudmundur Bogason <gb@embed-dsp.com> $
6+
# $Date: $
7+
# $Revision: $
78

89
if { [info exists CHIPNAME] } {
910
set _CHIPNAME $CHIPNAME
1011
} else {
11-
set _CHIPNAME rpi3
12+
set _CHIPNAME bcm2837
1213
}
1314

14-
#
15-
# Main DAP
16-
#
15+
16+
17+
1718
if { [info exists DAP_TAPID] } {
1819
set _DAP_TAPID $DAP_TAPID
1920
} else {

tcl/target/pi_target.cfg

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
2+
# Copyright (c) 2017 embed-dsp
3+
# All Rights Reserved
4+
5+
# $Author: Gudmundur Bogason <gb@embed-dsp.com> $
6+
# $Date: $
7+
# $Revision: $
8+
9+
if { [info exists CHIPNAME] } {
10+
set _CHIPNAME $CHIPNAME
11+
} else {
12+
set _CHIPNAME bcm2835
13+
}
14+
15+
16+
17+
18+
if { [info exists CPU_TAPID] } {
19+
set _CPU_TAPID $CPU_TAPID
20+
} else {
21+
set _CPU_TAPID 0x07b7617F
22+
}
23+
24+
jtag newtap $_CHIPNAME tap -irlen 5 -expected-id $_CPU_TAPID
25+
26+
set _TARGETNAME_0 $_CHIPNAME.cpu.0
27+
28+
29+
30+
31+
target create $_TARGETNAME_0 arm11 -chain-position $_CHIPNAME.tap
32+
33+
34+
35+
36+
37+
$_TARGETNAME_0 configure -event gdb-attach { halt }

0 commit comments

Comments
 (0)