How to find the memory addresses?

Status
Not open for further replies.

vesta

Newbie level 1
Joined
Jul 26, 2014
Messages
0
Helped
0
Reputation
0
Reaction score
0
Trophy points
0
Visit site
Activity points
9
How to find an exact address in memory to upload the file to?
Memory SPANSION S25FL064P datasheet.

I want replace binary data ("nvram") in Flash memory with new data. For this, I have to download binary data to flash memory, then erase memory in specific location, then copy the above downoaded file into specified memory address. All this operations from U-Boot. The U-Boot commands:

loadb [ offset ] --> what is this address?

erase [start] [end] - erase FLASH from addr 'start' to addr 'end

cp.b [source] [target] [count(number of bytes)]

What should be adresses in this commands?

Code:
loadb 0x00000000

erase 0x007b0000 0x00800000
cp.b 0x00000000 0x007b0000 0x00050000

Flash memory details, from U-Boot => printenv:
Code:
Serial Flash [Bus:0 CS:0] : s25fl064a 8192KB, 128 sectors each  64KB
7 cmdlinepart partitions found on MTD device spansion
partitions[0] = {.name = U-Boot, .offset = 0x00000000,.size = 0x00020000 (128K) }
partitions[1] = {.name = env1, .offset = 0x00020000,.size = 0x00010000 (64K) }
partitions[2] = {.name = env2, .offset = 0x00030000,.size = 0x00010000 (64K) }
partitions[3] = {.name = firmware_KS, .offset = 0x004a0000,.size = 0x002d0000 (2880K) }
partitions[4] = {.name = nvram, .offset = 0x007b0000,.size = 0x00050000 (320K) }
partitions[5] = {.name = UBFI1, .offset = 0x00040000,.size = 0x003b0000 (3776K) }
partitions[6] = {.name = UBFI2, .offset = 0x003f0000,.size = 0x003b0000 (3776K) }
Creating 7 MTD partitions on "spansion":
0x00000000-0x00020000 : "U-Boot"
0x00020000-0x00030000 : "env1"
0x00030000-0x00040000 : "env2"
0x004a0000-0x00770000 : "firmware_KS"
0x007b0000-0x00800000 : "nvram"
0x00040000-0x003f0000 : "UBFI1"
0x003f0000-0x007a0000 : "UBFI2"

FLASH memory information => flinfo
Code:
Bank # 1: Spansion Serial Flash FLASH_S25FL064A
  Size: 8 MB in 128 Sectors
  Sector Start Addresses:
    48000000 (RO) 48010000 (RO) 48020000 (RO) 48030000 (RO) 48040000
    48050000      48060000      48070000      48080000      48090000
    480A0000      480B0000      480C0000      480D0000      480E0000
    480F0000      48100000      48110000      48120000      48130000
    48140000      48150000      48160000      48170000      48180000
    48190000      481A0000      481B0000      481C0000      481D0000
    481E0000      481F0000      48200000      48210000      48220000
    48230000      48240000      48250000      48260000      48270000
    48280000      48290000      482A0000      482B0000      482C0000
    482D0000      482E0000      482F0000      48300000      48310000
    48320000      48330000      48340000      48350000      48360000
    48370000      48380000      48390000      483A0000      483B0000
    483C0000      483D0000      483E0000      483F0000      48400000
    48410000      48420000      48430000      48440000      48450000
    48460000      48470000      48480000      48490000      484A0000
    484B0000      484C0000      484D0000      484E0000      484F0000
    48500000      48510000      48520000      48530000      48540000
    48550000      48560000      48570000      48580000      48590000
    485A0000      485B0000      485C0000      485D0000      485E0000
    485F0000      48600000      48610000      48620000      48630000
    48640000      48650000      48660000      48670000      48680000
    48690000      486A0000      486B0000      486C0000      486D0000
    486E0000      486F0000      48700000      48710000      48720000
    48730000      48740000      48750000      48760000      48770000
    48780000      48790000      487A0000      487B0000      487C0000
    487D0000      487E0000      487F0000
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…