Magnus Lundin wrote:
> Hi
> Rev 1547,  Added two commands that just returns values in hex, good for 
> scripting.
> 
>  >dap baseaddr
>  >dap apid
> 
> Next I started playing with Tcl scripts that scans the ROM table and 
> installed components. This is my first shot at JimTcl in OpenOCD but it  
> works quite ok.

I'm new to TCL, I'm using r1602, and I'm slightly confused ;) See below:

> < dapinfo.tcl > ============================================
> # Implement dap info in Tcl
> 
> # get ap id and debugbase
> puts "Debug interface ROM table examination"
> set debugbase [lindex [split [ocd_dap_baseaddr]] 0]
> set apid [lindex [split [ocd_dap_apid]] 0]

In 1602 there are the commands "dap baseaddr" and "dap apid" available 
at command line (telnet prompt). But not in TCL? Using this in script 
results in

Invalid command name "dap_baseaddr" ...

Searching complete trunk for "ocd_dap*" is empty.

> puts "AP debugbase $debugbase"
> puts "AP id        $apid"
> 
> # everything can now be done with memory reads
> # Examine ROM table id and memtype
> ocd_mem2array romtable_cid 32 [expr ($debugbase&0xFFFFF000) + 0xFF0] 4
> ocd_mem2array memtype 32 [expr ($debugbase&0xFFFFF000) + 0xFCC] 1

And this results in

invalid command name "mem2array_romtable_cid"

Looking into the code: ocd_mem2array is registered in 
tclapi_register_commands() in tclapi.c. But: It seems to me that 
tclapi_register_commands()  isn't called anywhere, and even worse, 
tclapi.c isn't compiled. I even can't find it in any Makefile.

Any idea what I miss here?

Many thanks

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

Reply via email to