Note: This document provides a simple description, the details about flashloader can be found at Getting Started with LPC540xx Flashloader User's Guide.pdf which is located in SDK_2.5.0_LPCXpresso54S018\middleware\mcu-boot\doc
- Download LPC54S0xx SDK.
- Compile the flashloader project to generate flashloader.bin
- The project is located in sdk\boards \lpcxpresso54s018\bootloader_examples\flashloader
- Use dfu-util.exe or IDE to load flashloader.bin into RAM.
- dfu-util can be downloaded from http://dfu-util.sourceforge.net/releases/
- Configure the ISP pins and then reset the chip to make the chip to enter USB0 DFU boot mode.
USB0 DFU boot
USB DFU class is used to download image over the USB0 full-speed port into SRAM.
Connect the LPC54S0xx device USB0 full-speed port and PC with USB. The following is the command line to load the flashloader.bin:
$ dfu-util.exe –D flashloader.bin
- Use blhost to program/erase LPC540xxM/LPC54S0xxM flash
Once the flashloader binary is downloaded and starts its execution on the LPC54S0xx platform and there remains a physical USB connection between the LPC54S0xx platform USB1(High-Speed) and host, the flashloader will be ready to receive the commands.
- blhost -u 0x1fc9,0x01a2 -- get-property 12
- blhost -u 0x1fc9,0x01a2 -- fill-memory 0x2000d000 4 0xc0000004
- blhost -u 0x1fc9,0x01a2 -- configure-memory 0xa 0x2000d000
- blhost -u 0x1fc9,0x01a2 -- get-property 25 0xa
- blhost -u 0x1fc9,0x01a2 -t 100000 -- flash-erase-region 0x10000000 0x100000
- blhost -u 0x1fc9,0x01a2 -t 100000 -- write-memory 0x10000000 xxx.bin
Note: xxx.bin is the target file which needs to be downloaded to the flash.
Author: Hao Liu
Thanks for Hao Liu.