Rewriting flash
Last updated: September 30, 2007
Under construction
The on-board flash contains 3 images:
0xffc00000 - 0xffefffff : File system (3MB) for 4MB flash or
0xff800000 - 0xffefffff : File system (7MB) for 8MB flash
0xfff00000 - 0xfff3ffff : U-BOOT & environment variables (256 KB)
0xfff40000 - 0xffffffff : Compressed kernel image (768 KB)
The current U-BOOT (version 1.2.0) size is below the size of 1 flash sector
(128KB). Check ALL settings in your cc1000.h configuration file if U-BOOT
grows beyond 128KB.
Writing a new U-BOOT image to flash
After building a new U-BOOT image, copy this image to your tftpboot directory.
If your flash already contains an U-BOOT image use the following commands to
rewrite the U-BOOT image:
tftpboot 0x100000 /tftpboot/cc1000/u-boot.bin
protect off 0xfff00000 0xfff3ffff
erase 0xfff00000 0xfff3ffff
cp.b 0x100000 0xfff00000 {length-reported-by-tftpboot}
protect on 0xfff00000 0xfff3ffff
Round-up the length reported by the tftpboot command (in bytes).
If your flash contains the original firmware,
the BDM-interface has to be used to write the U-BOOT image to flash.
Writing a new kernel image to flash
After building your new kernel copy the new uImage to your tftpboot directory.
Use the following U-BOOT commands to write it to flash:
tftpboot 0x100000 /tftpboot/cc1000/uImage
protect off 0xfff40000 0xffffffff
erase 0xfff40000 0xffffffff
cp.b 0x100000 0xfff40000 {length-reported-by-tftpboot}
protect on 0xfff40000 0xffffffff
Round-up the length reported by the tftpboot command (in bytes).
Writing a new filesystem to flash
After building your new uRamdisk copy the new filesystem image to your
tftpboot directory.
Use the following U-BOOT commands to write it to flash:
For a CC1000 with 4MB flash:
tftpboot 0x100000 /tftpboot/cc1000/uRamdisk
protect off 0xffc00000 +0x200000
erase 0xffc00000 +0x200000
cp.b 0x100000 0xffc00000 {length-reported-by-tftpboot}
protect on 0xffc00000 +0x200000
For a CC1000 with 8MB flash:
tftpboot 0x100000 /tftpboot/cc1000/uRamdisk
protect off 0xff800000 +0x200000
erase 0xff800000 +0x200000
cp.b 0x100000 0xff800000 {length-reported-by-tftpboot}
protect on 0xff800000 +0x200000
(The above examples are for a uRamdisk of 1.6 MB)
Round-up the length reported by the tftpboot command (in bytes).