|
From: Matthew B. <m.b...@sa...> - 2014-02-13 14:12:32
|
Some debugging of this problem has revealed that this was a bug OpenOCD 0.7.0 that has been fixed in 0.8.0. Probably by https://gitorious.org/openocd/openocd/commit/d3c6a071e60bae1336de35a327f8963 b5435c3b0 Matthew Bentham -----Original Message----- From: Matthew Bentham [mailto:m.b...@sa...] Sent: 22 January 2014 17:01 To: ope...@li... Subject: [OpenOCD-user] mem2array and array2mem problems Hi, I'm experiencing problems using mem2array and array2mem. Hopefully I'm just doing something silly due to my inexperience with tcl, so I hope someone can help. My problems can be summarised as: 1) mem2array and array2mem do not behave symmetrically (my comments in brackets): Open On-Chip Debugger > mdw 0x40000000 0x40000000: 00000000 > array set foo2 { 0 0 1 1 2 2 3 3 4 4 5 5 6 6 } echo $foo2 0 0 1 1 2 2 3 3 4 4 5 5 6 6 > array get foo2 0 0 1 1 2 2 3 3 4 4 5 5 6 6 > array2mem foo2 16 0x40000000 7 > mem2array foo3 16 0x40000000 7 (at this point I would expect foo2 and foo3 to be the same, but) > echo $foo3 0 0 1 1 2 1 3 2 4 2 5 3 6 3 (and mdh agrees with mem2array, which makes me believe array2mem isn't working the way I expect) > mdh 0x40000000 7 0x40000000: 0000 0001 0001 0002 0002 0003 0003 md{b,w,h} and mw{b,w,h} are working as expected, so at least single-word writes are working on my hardware. Is my problem likely to be in my board or cpu configuration or am I just misusing the tcl? 2) When using "$target_name mem2array" I can't retrieve the output: > unset foobar > echo $foobar can't read "foobar": no such variable > (my target name) mem2array foobar 16 0x40000000 1 echo $foobar can't read "foobar": no such variable > mem2array foobar 16 0x40000000 1 > echo $foobar 0 57005 How do I retrieve the array set by "(my target name) mem2array <var> <width> <address> <nelems>"? In case it makes a difference, I'm using: > version Open On-Chip Debugger 0.7.0 (2013-05-05-10:44) Installed on Windows, connected via a USB->JTAG Olimex device to an emulator of a custom chip using an ARM core. I'm issuing these commands via a telnet session to the default server port 4444. Thanks in advance, Matthew Bentham ---------------------------------------------------------------------------- -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments & Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk _______________________________________________ OpenOCD-user mailing list Ope...@li... https://lists.sourceforge.net/lists/listinfo/openocd-user |