Øyvind Harboe wrote:
Ok. Maybe I missed something: Is it possible to use TCL commands like
'run_test' *before* jtag_init_inner() is executed? I'm not sure about
in what order what (commands in scripts vs. initialization functions
in jtag.c) is executed, yet ;)

Your target configuration script can copy and paste ocd_process_reset from
startup.tcl and implement it's own version. jtag_init_inner is invoked from
jtag arp_init-reset.

This would effectively allow you a great level of detail of how to perform
the reset.

To allow targets to reimplement ocd_process_reset was done in order to
allow for targets having needs that could never be covered by events
and options. Events and options is an inferior programming paradigm
compared to good old procedural programming :-)

Maybe you like to have a look to the instructions I sent in mail some minutes ago and think about what is possible with OpenOCD already and what not?

Then it would be really nice if you could help with

a) extend/correct script in attachment with what is already possible

b) identify what isn't possible at the moment and what has to be changed/fixed/extended in OpenOCD itself.

Many thanks

Dirk
#TI OMAP3530 processor - http://www.ti.com 

if { [info exists CHIPNAME] } { 
   set  _CHIPNAME $CHIPNAME    
} else {         
   set  _CHIPNAME omap3530
}

if { [info exists ENDIAN] } {   
   set  _ENDIAN $ENDIAN    
} else {         
  # this defaults to a little endianness
   set  _ENDIAN little
}

if { [info exists CPUTAPID ] } {
   set _CPUTAPID $CPUTAPID
} else {
  # force an error till we get a good number
  set _CPUTAPID 0xffffffff
}

#jtag scan chain
jtag newtap $_CHIPNAME jrc -irlen 6 -ircapture 0x4 -irmask 0x0 -expected-id 
0x0b7ae02f
jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0x0 -expected-id 
$_CPUTAPID -disable

jtag configure $_CHIPNAME.cpu -event tap-enable {
        puts "a Enabling Cortex-A8 @ OMAP3"
        irscan omap3530.jrc 7
        drscan omap3530.jrc 8 0x89
        irscan omap3530.jrc 2
        drscan omap3530.jrc 32 0xa3002108
        runtest 10
        puts "a Cortex-A8 @ OMAP3 enabled"
}


_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to