world leader in high performance signal processing
Trace: » parallel-flash

Flash Programming

We will now program U-Boot into the parallel flash on the board so that you can reboot the board and have U-Boot automatically run. For more details on utilizing parallel flash in U-Boot in general, consult the U-Boot parallel flash documentation.

First make sure parallel flash is connected to the processor by configuring the switches on the board as follows: @SWITCH_SETUP@

Now you should be able to query the flash and see output like so:

bfin> flinfo
@EXAMPLE_FLINFO@

To program the flash, you'll first want to unprotect all the relevant sectors:

bfin> protect off 0x20000000 +@UBOOT_SIZE@
@UBOOT_LINE_SECTORS@ done
Un-Protected @UBOOT_NUM_SECTORS@ sectors

Then erase them:

bfin> erase off 0x20000000 +@UBOOT_SIZE@
@UBOOT_LINE_SECTORS@ done
Erased @UBOOT_NUM_SECTORS@ sectors

Write the U-Boot image to the flash:

bfin> cp.b 0x1000 0x20000000 $(filesize)
Copy to Flash... done

Verify everything was written correctly (the exact byte count might not match your output):

bfin> cmp.b 0x1000 0x20000000 $(filesize)
Total of 212528 bytes were the same

Now your board should be all set to go! Change the boot mode switch so that the board will boot out of parallel flash: @BMODE_SWITCH_SETUP@

Hit the reset button (@RESET_SWITCH@) and hopefully you should see U-Boot output on your console.