Øyvind Harboe wrote:
> Take #2 of the patch.
>
Confused - I did a svn checkout - of the latest about 8am (NYC time
frame) and tried it.
Something did not work as expected.
I was going to write a simple Tcl script that would read the atmel
AT91SAM7x256 registers and display them.
(Sort of like IAR's debugger lets you examine the on-chip memory map
registers)
(ie: How is UART0 configured... or maybe the power, clocks, etc)
Anyway... See below.
-Duane.
(a) What exactly do I do with the above patch.
(b) Something does not work... the ECHO command in TCL does not work as
expected.
My configuration:
Noisy Linux Box - physically in the basement
Windows box - cygwin & usb & openocd
Windows box uses remote-X11 for access to Linux
In GDB I use 'target remote 192.168.0.14:3333' instead of local host.
I see you have TCL directory - with an example 'peek' command.
I tried adding a command.
==
I start OpenOCD this way
==
[EMAIL PROTECTED] ~/cortex/olimex
$ cat a.sh
#! /bin/sh
PATH=`cd .. && pwd`/install/bin:$PATH
export PATH
exec openocd.exe "$@"
==
My OpenOCD Configuration file is:
(BTW - you should add a "JTAG TINY" example - you do not have one)
==
[EMAIL PROTECTED] ~/cortex/olimex
$ cat openocd.cfg
interface ft2232
ft2232_device_desc "Olimex OpenOCD JTAG TINY A"
ft2232_layout "olimex-jtag"
ft2232_vid_pid 0x15BA 0x0004
telnet_port 4444
gdb_port 3333
gdb_memory_map enable
gdb_flash_program enable
script target/sam7x256.cfg
===
I created a "duane" command - (modifying 'commands.tcl') and it does not
work as expected.
====
# implements Tcl procedures/functions
proc peek {address} {
return [openocd mdw $address]
}
proc duane { } {
echo "DUANE COMMAND"
}
====
On my desktop - I run OpenOCD like this (via my 'a.sh' script)
====
[EMAIL PROTECTED] ~/cortex/olimex
$ ./a.sh
Open On-Chip Debugger 1.0 (2008-07-04-08:26) svn:
$URL: http://svn.berlios.de/svnroot/repos/openocd/trunk/src/openocd.c $
Info: jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x3f0f0f0f
(Manufa
cturer: 0x787, Part: 0xf0f0, Version: 0x3)
Info: server.c:78 add_connection(): accepting 'telnet' connection from 0
===
From my linux box - I do this via TELNET
===
[EMAIL PROTECTED] ~]$ telnet 192.168.0.14 4444
Trying 192.168.0.14...
Connected to 192.168.0.14.
Escape character is '^]'.
Open On-Chip Debugger
> duane
> peek 1234
> duane
> foo [peek 0x1234]
Runtime error, file "?", line 1:
invalid command name "foo"
> set foo [peek 0x1234]
> echo $foo
Runtime error, file "?", line 1:
invalid command name "echo"
> puts $foo
> set foo 'DuaneIsHere'
'DuaneIsHere'
> puts $foo
>
===
I see the following in the CYGWIN terminal on my Windows box.
===
[EMAIL PROTECTED] ~/cortex/olimex
$ ./a.sh
Open On-Chip Debugger 1.0 (2008-07-04-08:26) svn:
$URL: http://svn.berlios.de/svnroot/repos/openocd/trunk/src/openocd.c $
Info: jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x3f0f0f0f
(Manufa
cturer: 0x787, Part: 0xf0f0, Version: 0x3)
Info: server.c:78 add_connection(): accepting 'telnet' connection from 0
DUANE COMMAND
DUANE COMMAND
User: openocd.c:198 jim_command(): Runtime error, file "?", line 1:
User: openocd.c:200 jim_command(): invalid command name "foo"
User: openocd.c:198 jim_command(): Runtime error, file "?", line 1:
User: openocd.c:200 jim_command(): invalid command name "echo"
User: openocd.c:234 jim_command():
'DuaneIsHere'
===
I would have expected:
(A) the peek command to display something on the TELNET window.
(B) The tcl "puts" command result to appear on my TELNET window
(C) the example 'peek' implies that it should return a string.
However - it does not seem to do that.
ie: set foo [peek 0x1234]
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development