Byte-order problems with GDB and BDM driver
cjohns at cybertec.com.au
Sat Jun 24 06:51:20 UTC 2000
Dario Alcocer wrote:
> However, it now appears that there's something *definitely* wrong with
> how bdmReadMemory() works, at least with my Coldfire setup using the
> P&E Coldfire pod.
> Any ideas why the order of short and byte reads would be significant?
I have modified the chk program to write bytes, then verify (read bytes,
words, and longs), then write words (16bits), verify, write longs,
verify, and write a buffer then verify.
I will upload a snapshot of this code and the driver tomorrow (Sydney
time) to :
This test passes on the 5206e and 5307. I then went back to gdb and did
not get the problem you showed (see the trace below).
Are you accessing DRAM ?
If so are you sure you have the DRAM controller is setup correctly ?
Could try this test where only the internal SRAM is being accessed not
any DRAM or hardware which requires a setup parameter :
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
welcome to change it and/or distribute copies of it under certain
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
This GDB was configured as "--host=i686-pc-linux-gnu
(gdb) target bdm kea:/dev/bdmcf1
Remote bdm connected to kea:/dev/bdmcf1
(gdb) bdm_setdebug 1
(gdb) set $rambar=0x20000001
BDM: Read system register RPC: 0xffe01cb8
BDM: Read system register RAMBAR: 0x20000000
BDM: Write system register RAMBAR: 0x20000001
(gdb) set *(0x20000000)=0x11223344
BDM: Read 0x822a0000 @ 0x20000000
BDM: Write 0x11223344 @ 0x20000000
(gdb) x /10b 0x20000000
BDM: Read 0x11 @ 0x20000000
BDM: Read 0x22 @ 0x20000001
BDM: Read 0x33 @ 0x20000002
BDM: Read 0x44 @ 0x20000003
BDM: Read 00 @ 0x20000004
BDM: Read 00 @ 0x20000005
BDM: Read 0x14 @ 0x20000006
BDM: Read 0x04 @ 0x20000007
0x20000000: 0x11 0x22 0x33 0x44 0x00 0x00 0x14
BDM: Read 00 @ 0x20000008
BDM: Read 0x7c @ 0x20000009
0x20000008: 0x00 0x7c
BDM: Status 0x2
Chris Johns, mailto:cjohns at cybertec.com.au mailto:ccj at acm.org
More information about the users