Added tip in documentation on how to translate quirky syntax
authorØyvind Harboe <oyvind.harboe@zylin.com>
Fri, 9 Oct 2009 07:03:53 +0000 (09:03 +0200)
committerØyvind Harboe <oyvind.harboe@zylin.com>
Fri, 9 Oct 2009 07:03:53 +0000 (09:03 +0200)
doc/openocd.texi
tcl/board/imx35pdk.cfg

index 11bd7e0aa80cbb7005f7e48fec8655f003d51526..daa946098720b417d026d4ca3689ed857d3143ce 100644 (file)
@@ -66,6 +66,7 @@ Free Documentation License''.
 * Running::                          Running OpenOCD
 * OpenOCD Project Setup::            OpenOCD Project Setup
 * Config File Guidelines::           Config File Guidelines
+* Translating Configuration Files::  Translating Configuration Files
 * Daemon Configuration::             Daemon Configuration
 * Interface - Dongle Configuration:: Interface - Dongle Configuration
 * Reset Configuration::              Reset Configuration
@@ -911,7 +912,6 @@ It provides guidelines for creating those files.
 You should find the following directories under @t{$(INSTALLDIR)/scripts},
 with files including the ones listed here.
 Use them as-is where you can; or as models for new files.
-
 @itemize @bullet
 @item @file{interface} ...
 think JTAG Dongle. Files that configure JTAG adapters go here.
@@ -1464,6 +1464,46 @@ Examples:
 @item pxa270 - again - CS0 flash - it goes in the board file.
 @end itemize
 
+@node Translating Configuration Files
+@chapter Translating Configuration Files
+@cindex translation
+If you have a configuration file for another hardware debugger(Abatron,
+BDI2000, BDI3000, Lauterbach, Segger, MacRaigor, etc.), translating
+it into OpenOCD syntax is often quite straightforward. The most tricky
+part of creating a configuration script is oftentimes the reset init
+sequence where e.g. PLLs, DRAM and the like is set up.
+
+One trick that you can use when translating is to write small
+Tcl proc's to translate the syntax into OpenOCD syntax. This
+can avoid manual translation errors and make it easier to
+convert other scripts later on.
+
+Example of transforming quirky arguments to a simple search and
+replace job:
+
+@example
+# rewrite commands of the form below to arm11 mcr...
+#
+#   Lauterbach syntax(?)
+#
+#      Data.Set c15:0x042f %long 0x40000015
+#
+#   OpenOCD syntax when using procedure below.
+#
+#   setc15 0x01 0x00050078
+#
+#
+proc setc15 @{regs value@} @{
+       global TARGETNAME 
+
+       echo [format "set p15 0x%04x, 0x%08x" $regs $value] 
+
+       arm11 mcr $TARGETNAME 15 [expr ($regs>>12)&0x7] [expr ($regs>>0)&0xf] [expr ($regs>>4)&0xf] [expr ($regs>>8)&0x7] $value 
+@}
+@end example
+
+
+
 @node Daemon Configuration
 @chapter Daemon Configuration
 @cindex initialization
index 3e0bf6b33ee67122fdf6f27a7dfa720159574737..05d83ee593bad11cced8a14da8221663857c6086 100644 (file)
@@ -21,6 +21,9 @@ proc setc15 {regs value} {
 
 proc imx35pdk_init { } {
        
+       # this reset script comes from the Freescale PDK
+       #
+       # http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=IMX35PDK
        
        echo "Target Setup: initialize DRAM controller and peripherals"
        

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)