~ubuntu-branches/ubuntu/wily/openocd/wily

« back to all changes in this revision

Viewing changes to tcl/target/omap3530.cfg

  • Committer: Bazaar Package Importer
  • Author(s): Uwe Hermann
  • Date: 2009-11-25 12:20:04 UTC
  • mfrom: (1.2.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20091125122004-4cnrzqw7v9qu064n
Tags: 0.3.1-1
* New upstream release (Closes: #554598, #537740).
* Add sh4 (instead of sh) to the list of architectures (Closes: #555553).
* Standards-Version: 3.8.3 (no changes required).
* debian/watch: Add file.
* debian/docs: Updates, some files were removed, some added.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
#  http://focus.ti.com/docs/prod/folders/print/omap3530.html
3
3
# Other OMAP3 chips remove DSP and/or the OpenGL support
4
4
 
5
 
if { [info exists CHIPNAME] } { 
6
 
   set  _CHIPNAME $CHIPNAME    
7
 
} else {         
 
5
if { [info exists CHIPNAME] } {
 
6
   set  _CHIPNAME $CHIPNAME
 
7
} else {
8
8
   set  _CHIPNAME omap3530
9
9
}
10
10
 
35
35
        -expected-id $_JRC_TAPID
36
36
 
37
37
# GDB target:  Cortex-A8, using DAP
38
 
 
39
 
# FIXME when we have A8 support, use it.  A8 != M3 ...
40
 
target create omap3.cpu cortex_m3 -chain-position $_CHIPNAME.dap
41
 
 
42
 
# FIXME much of this should be in reset event handlers
43
 
proc omap3_dbginit { } {
44
 
     reset
45
 
     sleep 500
46
 
 
47
 
     jtag tapenable omap3530.dap
48
 
     targets
49
 
     # sleep 1000
50
 
     # dap apsel 1
51
 
     # sleep 1000
52
 
     # dap apsel 1
53
 
     # dap info 1
54
 
 
55
 
     # 0xd401.0000 - ETM
56
 
     # 0xd401.1000 - Cortex-A8
57
 
     # 0xd401.9000 - TPIU (traceport)
58
 
     # 0xd401.b000 - ETB
59
 
     # 0xd401.d000 - DAPCTL
60
 
 
61
 
     omap3.cpu mww 0x54011FB0 0xC5ACCE55
62
 
 
63
 
     omap3.cpu mdw 0x54011314
64
 
     omap3.cpu mdw 0x54011314
65
 
     # omap3.cpu mdw 0x54011080
66
 
 
67
 
     omap3.cpu mww 0x5401d030 0x00002000
 
38
set _TARGETNAME $_CHIPNAME.cpu
 
39
target create $_TARGETNAME cortex_a8 -chain-position $_CHIPNAME.dap
 
40
 
 
41
###################
 
42
 
 
43
# the reset sequence is event-driven
 
44
# and kind of finicky...
 
45
 
 
46
# some TCK tycles are required to activate the DEBUG power domain
 
47
jtag configure $_CHIPNAME.jrc -event post-reset "runtest 100"
 
48
 
 
49
# have the DAP "always" be active
 
50
jtag configure $_CHIPNAME.jrc -event setup "jtag tapenable $_CHIPNAME.dap"
 
51
 
 
52
proc omap3_dbginit {target} {
 
53
     # General Cortex A8 debug initialisation
 
54
     cortex_a8 dbginit
 
55
     # Enable DBGU signal for OMAP353x
 
56
     $target mww 0x5401d030 0x00002000
68
57
}
 
58
 
 
59
# be absolutely certain the JTAG clock will work with the worst-case
 
60
# 16.8MHz/2 = 8.4MHz core clock, even before a bootloader kicks in.
 
61
# OK to speed up *after* PLL and clock tree setup.
 
62
jtag_rclk 1000
 
63
$_TARGETNAME configure -event "reset-start" { jtag_rclk 1000 }
 
64
 
 
65
# REVISIT This assumes that SRST is unavailable, so we must assert reset
 
66
# ourselves using PRM_RSTCTRL.  RST_GS (2) is a warm reset, like ICEpick
 
67
# would issue.  RST_DPLL3 (4) is a cold reset.
 
68
set PRM_RSTCTRL 0x48307250
 
69
$_TARGETNAME configure -event reset-assert-pre "$_TARGETNAME mww $PRM_RSTCTRL 2"
 
70
 
 
71
$_TARGETNAME configure -event reset-assert-post "omap3_dbginit $_TARGETNAME"