U-Boot memory commands do not work on ls1043ardb

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

U-Boot memory commands do not work on ls1043ardb

2,002 Views
brandensherrell
Contributor III

U-Boot 2015.01QorIQ-SDK-V1.7+gc297f5b (Dec 20 2015 - 13:08:26)


I am able to successfully unprotect and copy (cp) to arbitrary memory spaces, but other commands like memory modify (mm) and memory write (mw) do not work. For example:

=> protect off 0x60300000 0x6031FFFF

Un-Protected 1 sectors

Sector Start Addresses:

  ...

  601E0000 E RO   60200000   RO   60220000 E RO   60240000 E RO   60260000 E RO

  60280000 E RO   602A0000 E RO   602C0000 E RO   602E0000 E RO  60300000 E   

  60320000 E RO   60340000 E RO   60360000 E RO   60380000 E RO   603A0000 E RO

  ...

=> md.b 0x60300000 10

60300000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................

=> mm 0x60300000

60300000: ffffffff ? aa

60300004: ffffffff ? bb

60300008: ffffffff ? cc

6030000c: ffffffff ? dd

60300010: ffffffff ? ee

60300014: ffffffff ? .

=> md.b 0x60300000 10              

60300000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................

However, if I copy from another memory location it seems to work as expected:

=> cp.b 0 0x60300000 10

Copy to Flash... done

=> md.b 0x60300000 10

60300000: 00 00 01 10 00 c0 1e d5 01 10 3e d5 82 00 80 d2    ..........>.....

After erasing the sector and removing write permissions (e.g. protect on all) I get the following error when trying to copy, so it does not appear to be a problem with protections.

=> protect on all

Protect Flash Bank # 1

=> flinfo

  Sector Start Addresses:

  ...

  601E0000 E RO   60200000   RO   60220000 E RO   60240000 E RO   60260000 E RO

  60280000 E RO   602A0000 E RO   602C0000 E RO   602E0000 E RO  60300000 E RO

  60320000 E RO   60340000 E RO   60360000 E RO   60380000 E RO   603A0000 E RO

   ...

=> cp.b 0 0x60300000 10

Copy to Flash... Can't write to protected Flash sectors

Even an external JTAG programmer fails to write to memory with a halted CPU (verification failure).

Labels (1)
Tags (3)
0 Kudos
Reply
3 Replies

1,309 Views
marius_grigoras
NXP Employee
NXP Employee

Hi,

This is normal behavior, because mm command is used only to modify a volatile memory as RAM. For modifying the flash content memory you need to use the cp command.

The same is for using the tools - cannot write/modify the flash content using memory view, but instead you need to use Flash Programmer.

pastedImage_0.png

Thank you,

Marius

0 Kudos
Reply

1,309 Views
ufedor
NXP Employee
NXP Employee

Described behaviour is by design.

Only "cp" is capable to write to flash - refer to the U-Boot Quick Reference, 4.10 CP:

http://cache.freescale.com/files/32bit/doc/quick_ref_guide/MEDIA5200UBPG/MEDIA5200UBPG.pdf

0 Kudos
Reply

1,309 Views
brandensherrell
Contributor III

I see. I was able to contrive a workaround to solve my problem. Thank you for the swift responses!

0 Kudos
Reply