Page 1 of 1

[N9H30] How to load app to RAM address 0x0 from SPI flash?

Posted: 07 Jan 2021, 17:11
by 9chuckyoung
Symptom: cannot utilize uboot to load app to RAM address 0x0 from SPI flash.

Code: Select all

sf read 0x0 0x100000 0x700000
It's uboot limitation, and workaround approached are shown below:

Workaround 1: change app execution address from 0x0 to 0x8000.

Code: Select all

sf read 0x8000 0x100000 0x700000
*If you don't want to change app execution address*
Workaround 2: utilize uboot CPU memory command.

Code: Select all

First read 0x1000 to DRAM

Code: Select all

Next read (0x700000 - 0x1000) to DRAM

Code: Select all

sf read 0x800000 0x100000 0x1000

Code: Select all

cp.b 0x800000 0x0 0x1000

Code: Select all

sf read 0x1000 0x101000 0x700000
Note that uboot basic command set https://www.denx.de/wiki/view/U-Bootdoc/BasicCommandSet