Memorymapping of ICnova SAM9G45 OEM
Equipped memories and mappings
The ICnova SAM9G45 OEM consists of Atmel AT91SAM9G45 together with 128MiB of DDR2-SDRAM, 1MiB of NOR-Flash and 256MiB of NAND-Flash. The SDRAM is mapped into the virtual memorymap at address 0x70000000, the norflash at address 0x10000000. The NAND-Flash can be accessed only via the AT91SAM9G45s NAND-Controllogic. The address used to boot images from, should always be in RAM; 0x70400000 is a good choice.
The NOR-Flash has 8 Erase-Sectors of 128kiB each. Different programs should use different eraseblocks, to ease the possible updating of these programs.
After Production, the NOR-Flash consists of a 1st stage Bootloader AT91Bootstrap at offset 0. This is needed to set up the MCU and start the 2nd stage Bootloader U-boot. U-Boot is saved at offset 0x20000 within the norflash. The last eraseblock at offset 0xE0000 is used to save the environment-variables of U-Boot.
As most users never wan't to change these parts of the system, the NOR-flash isn't accessible via Linux.
OpenOCD Commands for flashing bootloaders
To use OpenOCD to flash the bootloaders, the following commands have to be passed to that software:
flash erase_sector 0 0 2 flash write_image norflash_icnova_arm9.bin 0x10000000 flash write_image u-boot.bin 0x10020000
This will first erase the flash and the write the first- and second-stage bootloader as generated by Buildroot.