How to determine the actual memory addresses of SPI Flash memory used in device running the eCos operating system? For example, show flash
command returns the following info:
Flash Device Information:
CFI Compliant: no
Command Set: Generic SPI Flash
Device/Bus Width: x16
Little Word Endian: no
Fast Bulk Erase: no
Multibyte Write: 256 bytes max
Phys base address: 0xbadf1a5
Uncached Virt addr: 0x1badf1a5
Cached Virt addr: 0x2badf1a5
Number of blocks: 129
Total size: 8388608 bytes, 8 Mbytes
Current mode: Read Array
Device Size: 8388608, Write buffer: 256, Busy bit:
Size Device Device Region
Block kB Address Offset Offset Region Allocation
----- ---- ---------- ----------- --------- -----------------
0 32 0x1badf1a5 0 0 Bootloader (32768 bytes)
1 32 0x1bae71a5 32768 ??? {unassigned}
2 64 0x1baef1a5 65536 0 Permanent NonVol (65536 bytes)
3 64 0x1baff1a5 131072 0 Image1
4 64 0x1bb0f1a5 196608 65536 Image1
5 64 0x1bb1f1a5 262144 131072 Image1
6 64 0x1bb2f1a5 327680 196608 Image1
7 64 0x1bb3f1a5 393216 262144 Image1
.. .. ........
127 64 0x1c2bf1a5 8257536 4063232 Image2 (4128768 bytes)
128 64 0x1c2cf1a5 8323072 0 Dynamic NonVol (65536 bytes)
But these addresses seems is not an actual addresses of memory locations.
Because when I try readmem
command, it always returns errors.
For example, there is an example of readmem
command:
readmem -s 4 -n 64 0x80001234 -- Reads 64 bytes as 32-bit values
.
When I tried readmem -s 4 -n 16384 0x1baef1a5
it always returns error: ERROR - Address
. For any addresses from above table. So I assume these addresses is not an actual Flash Memory map addresses. As far I understand this is because processor’s memory controller maps the flash address space to the system address space. Then, how to find the actual memory addresses?