Use blhost to program/erase LPC54(S)0xx flash

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Use blhost to program/erase LPC54(S)0xx flash

Use blhost to program/erase LPC54(S)0xx flash

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 USB1 DFU boot mode.
    • Boot mode

      ISP2

      PIO0_6 pin

      ISP1

      PIO0_5 pin

      ISP0

      PIO0_4 pin

      Description

      USB1 DFU boot

      LOW LOW HIGH

      USB DFU class is used to download image over the USB1 high-speed port into SRAM.

    • Connect the LPC54S0xx device USB1 high-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.

标记 (1)
评论

Dear Alice-san,

$ dfu-util.exe –D flashloader.bin

I think I need a driver before doing the above, where can I get the driver?

Best Regards,

Yasushi Hasegawa

%3CLINGO-SUB%20id%3D%22lingo-sub-1105629%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E4%BD%BF%E7%94%A8%20blhost%20%E7%BC%96%E7%A8%8B%2F%E6%93%A6%E9%99%A4%20LPC54(S)0xx%20%E9%97%AA%E5%AD%98%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1105629%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CBLOCKQUOTE%20class%3D%22jive_macro_quote%20jive-quote%20jive_text_macro%22%3E%0A%3CP%3E%E6%B3%A8%E6%84%8F%EF%BC%9A%E6%9C%AC%E6%96%87%E6%A1%A3%E6%8F%90%E4%BE%9B%E4%BA%86%E7%AE%80%E5%8D%95%E7%9A%84%E6%8F%8F%E8%BF%B0%EF%BC%8C%E6%9C%89%E5%85%B3%20flashloader%20%E7%9A%84%E8%AF%A6%E7%BB%86%E4%BF%A1%E6%81%AF%E5%8F%AF%E4%BB%A5%E5%9C%A8%3CEM%3E%20SDK_2.5.0_LPCXpresso54S018%5Cmiddleware%5Cmcu-boot%5Cdoc%3C%2FEM%3E%20%E4%B8%AD%E7%9A%84%3CEM%3E%3CSTRONG%3E%20LPC540xx%20Flashloader%20%E7%94%A8%E6%88%B7%E6%8C%87%E5%8D%97%E5%85%A5%E9%97%A8.pdf%20%E4%B8%AD%E6%89%BE%E5%88%B0%3C%2FSTRONG%3E%3C%2FEM%3E%3C%2FP%3E%0A%3C%2FBLOCKQUOTE%3E%0A%3CBR%20%2F%3E%0A%3CUL%20style%3D%22list-style-type%3A%20disc%3B%22%3E%0A%3CLI%3E%3CSPAN%3E%3CSTRONG%3E%E4%B8%8B%E8%BD%BDLPC54S0xx%20SDK%E3%80%82%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CBR%20%2F%3E%0A%3CUL%20style%3D%22list-style-type%3A%20disc%3B%22%3E%0A%3CLI%3E%3CSPAN%3E%3CSTRONG%3E%E7%BC%96%E8%AF%91flashloader%E5%B7%A5%E7%A8%8B%EF%BC%8C%E7%94%9F%E6%88%90flashloader.bin%3C%2FSTRONG%3E%3C%2FSPAN%3E%0A%3CUL%3E%0A%3CLI%3E%3CSPAN%3E%E8%AF%A5%E9%A1%B9%E7%9B%AE%E4%BD%8D%E4%BA%8E%3CEM%3E%3CSTRONG%3Esdk%5Cboards%20%5Clpcxpresso54s018%5Cbootloader_examples%5Cflashloader%3C%2FSTRONG%3E%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CBR%20%2F%3E%0A%3CUL%20style%3D%22list-style-type%3A%20disc%3B%22%3E%0A%3CLI%3E%3CSPAN%3E%3CSTRONG%3E%E4%BD%BF%E7%94%A8%20dfu-util.exe%20%E6%88%96%20IDE%20%E5%B0%86%20flashloader.bin%20%E5%8A%A0%E8%BD%BD%E5%88%B0%20RAM%20%E4%B8%AD%E3%80%82%3C%2FSTRONG%3E%3C%2FSPAN%3E%0A%3CUL%3E%0A%3CLI%3E%3CSPAN%3Edfu-util%20%E5%8F%AF%E4%BB%A5%E4%BB%8E%3CA%20href%3D%22http%3A%2F%2Fdfu-util.sourceforge.net%2Freleases%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttp%3A%2F%2Fdfu-util.sourceforge.net%2Freleases%2F%3C%2FA%3E%E4%B8%8B%E8%BD%BD%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%3E%E9%85%8D%E7%BD%AEISP%E5%BC%95%E8%84%9A%EF%BC%8C%E7%84%B6%E5%90%8E%E5%A4%8D%E4%BD%8D%E8%8A%AF%E7%89%87%EF%BC%8C%E4%BD%BF%E8%8A%AF%E7%89%87%E8%BF%9B%E5%85%A5USB1%20DFU%E5%90%AF%E5%8A%A8%E6%A8%A1%E5%BC%8F%E3%80%82%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%0A%3CTABLE%20style%3D%22border%3A%20none%3B%22%20width%3D%22576%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22122.879px%22%20style%3D%22border%3A%20solid%20black%201.0pt%3B%20background%3A%20%23D9D9D9%3B%20padding%3A%200cm%205.4pt%200cm%205.4pt%3B%22%3E%0A%3CP%3E%3CSTRONG%3EBoot%20mode%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2284.9621px%22%20style%3D%22border%3A%20solid%20black%201.0pt%3B%20border-left%3A%20none%3B%20background%3A%20%23D9D9D9%3B%20padding%3A%200cm%205.4pt%200cm%205.4pt%3B%22%3E%0A%3CP%3E%3CSTRONG%3EISP2%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EPIO0_6%E5%BC%95%E8%84%9A%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2284.9621px%22%20style%3D%22border%3A%20solid%20black%201.0pt%3B%20border-left%3A%20none%3B%20background%3A%20%23D9D9D9%3B%20padding%3A%200cm%205.4pt%200cm%205.4pt%3B%22%3E%0A%3CP%3E%3CSTRONG%3EISP1%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EPIO0_5%E5%BC%95%E8%84%9A%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2284.9621px%22%20style%3D%22border%3A%20solid%20black%201.0pt%3B%20border-left%3A%20none%3B%20background%3A%20%23D9D9D9%3B%20padding%3A%200cm%205.4pt%200cm%205.4pt%3B%22%3E%0A%3CP%3E%3CSTRONG%3EISP0%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EPIO0_4%E5%BC%95%E8%84%9A%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22196.894px%22%20style%3D%22border%3A%20solid%20black%201.0pt%3B%20border-left%3A%20none%3B%20background%3A%20%23D9D9D9%3B%20padding%3A%200cm%205.4pt%200cm%205.4pt%3B%22%3E%0A%3CP%3E%3CSTRONG%3E%E6%8F%8F%E8%BF%B0%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22122.879px%22%20style%3D%22border%3A%20solid%20black%201.0pt%3B%20border-top%3A%20none%3B%20padding%3A%200cm%205.4pt%200cm%205.4pt%3B%22%3E%0A%3CP%3E%3CSTRONG%3EUSB1%20DFU%E5%90%AF%E5%8A%A8%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2284.9621px%22%20style%3D%22border-top%3A%20none%3B%20border-left%3A%20none%3B%20border-bottom%3A%20solid%20black%201.0pt%3B%20border-right%3A%20solid%20black%201.0pt%3B%20padding%3A%200cm%205.4pt%200cm%205.4pt%3B%22%3E%E4%BD%8E%3C%2FTD%3E%0A%3CTD%20width%3D%2284.9621px%22%20style%3D%22border-top%3A%20none%3B%20border-left%3A%20none%3B%20border-bottom%3A%20solid%20black%201.0pt%3B%20border-right%3A%20solid%20black%201.0pt%3B%20padding%3A%200cm%205.4pt%200cm%205.4pt%3B%22%3E%E4%BD%8E%3C%2FTD%3E%0A%3CTD%20width%3D%2284.9621px%22%20style%3D%22border-top%3A%20none%3B%20border-left%3A%20none%3B%20border-bottom%3A%20solid%20black%201.0pt%3B%20border-right%3A%20solid%20black%201.0pt%3B%20padding%3A%200cm%205.4pt%200cm%205.4pt%3B%22%3E%E9%AB%98%3C%2FTD%3E%0A%3CTD%20width%3D%22196.894px%22%20style%3D%22border-top%3A%20none%3B%20border-left%3A%20none%3B%20border-bottom%3A%20solid%20black%201.0pt%3B%20border-right%3A%20solid%20black%201.0pt%3B%20padding%3A%200cm%205.4pt%200cm%205.4pt%3B%22%3E%0A%3CP%3EUSB%20DFU%20%E7%B1%BB%E7%94%A8%E4%BA%8E%E9%80%9A%E8%BF%87%20USB1%20%E9%AB%98%E9%80%9F%E7%AB%AF%E5%8F%A3%E5%B0%86%E5%9B%BE%E5%83%8F%E4%B8%8B%E8%BD%BD%E5%88%B0%20SRAM%20%E4%B8%AD%E3%80%82%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3C%2FLI%3E%0A%3CLI%3E%0A%3CP%3E%E5%B0%86LPC54S0xx%E8%AE%BE%E5%A4%87USB1%E9%AB%98%E9%80%9F%E5%8F%A3%E4%B8%8EPC%E9%80%9A%E8%BF%87USB%E8%BF%9E%E6%8E%A5%E3%80%82%E4%BB%A5%E4%B8%8B%E6%98%AF%E5%8A%A0%E8%BD%BDflashloader.bin%E7%9A%84%E5%91%BD%E4%BB%A4%E8%A1%8C%EF%BC%9A%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%20style%3D%22padding-left%3A%2060px%3B%22%3E%3CSPAN%3E%3CSTRONG%3E%24%20dfu-util.exe%20%E2%80%93D%20flashloader.bin%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22padding-left%3A%2060px%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%20style%3D%22list-style-type%3A%20disc%3B%22%3E%0A%3CLI%3E%3CSPAN%3E%3CSTRONG%3E%E4%BD%BF%E7%94%A8%20blhost%20%E7%BC%96%E7%A8%8B%2F%E6%93%A6%E9%99%A4%20LPC540xxM%2FLPC54S0xxM%20%E9%97%AA%E5%AD%98%3C%2FSTRONG%3E%3C%2FSPAN%3E%0A%3CUL%3E%0A%3CLI%3E%0A%3CP%3E%E4%B8%80%E6%97%A6%E4%B8%8B%E8%BD%BD%E4%BA%86%E9%97%AA%E5%AD%98%E5%8A%A0%E8%BD%BD%E7%A8%8B%E5%BA%8F%E4%BA%8C%E8%BF%9B%E5%88%B6%E6%96%87%E4%BB%B6%E5%B9%B6%E5%9C%A8%20LPC54S0xx%20%E5%B9%B3%E5%8F%B0%E4%B8%8A%E5%BC%80%E5%A7%8B%E6%89%A7%E8%A1%8C%EF%BC%8C%E5%B9%B6%E4%B8%94%20LPC54S0xx%20%E5%B9%B3%E5%8F%B0%3CSTRONG%3EUSB1%EF%BC%88%E9%AB%98%E9%80%9F%EF%BC%89%3C%2FSTRONG%3E%E5%92%8C%E4%B8%BB%E6%9C%BA%E4%B9%8B%E9%97%B4%E4%BB%8D%E7%84%B6%E4%BF%9D%E6%8C%81%E7%89%A9%E7%90%86%20USB%20%E8%BF%9E%E6%8E%A5%EF%BC%8C%E9%97%AA%E5%AD%98%E5%8A%A0%E8%BD%BD%E7%A8%8B%E5%BA%8F%E5%B0%86%E5%87%86%E5%A4%87%E5%A5%BD%E6%8E%A5%E6%94%B6%E5%91%BD%E4%BB%A4%E3%80%82%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3Eblhost%20-u%200x1fc9%2C0x01a2%20--%E8%8E%B7%E5%8F%96%E5%B1%9E%E6%80%A7%2012%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3Eblhost%20-u%200x1fc9%2C0x01a2%20--%E5%A1%AB%E5%85%85%E5%86%85%E5%AD%98%3CEM%3E0x2000d000%3C%2FEM%3E%204%200xc0000004%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3Eblhost%20-u%200x1fc9%2C0x01a2%20--%E9%85%8D%E7%BD%AE%E5%86%85%E5%AD%98%200xa%20%3CEM%3E0x2000d000%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3Eblhost%20-u%200x1fc9%2C0x01a2%20--%E8%8E%B7%E5%8F%96%E5%B1%9E%E6%80%A7%2025%200xa%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3Eblhost%20-u%200x1fc9%2C0x01a2%20-t%20100000%20--%E9%97%AA%E5%AD%98%E6%93%A6%E9%99%A4%E5%8C%BA%E5%9F%9F%200x10000000%200x100000%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3Eblhost%20-u%200x1fc9%2C0x01a2%20-t%20100000%20--%E5%86%99%E5%85%A5%E5%86%85%E5%AD%98%200x10000000%20xxx.bin%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CBLOCKQUOTE%20class%3D%22jive_macro_quote%20jive-quote%20jive_text_macro%22%3E%0A%3CP%3E%E6%B3%A8%EF%BC%9A%20%3CSTRONG%3Exxx.bin%3C%2FSTRONG%3E%E4%B8%BA%E9%9C%80%E8%A6%81%E4%B8%8B%E8%BD%BD%E5%88%B0flash%E4%B8%AD%E7%9A%84%E7%9B%AE%E6%A0%87%E6%96%87%E4%BB%B6%E3%80%82%3C%2FP%3E%0A%3C%2FBLOCKQUOTE%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%E4%BD%9C%E8%80%85%EF%BC%9A%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Fpeople%2Fnxf47345%22%20target%3D%22_blank%22%20data-content-finding%3D%22Community%22%20data-userid%3D%22321104%22%20data-username%3D%22nxf47345%22%3E%E5%88%98%E6%B5%A9%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%E6%84%9F%E8%B0%A2%3CA%20class%3D%22%22%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Fpeople%2Fnxf47345%22%20target%3D%22_blank%22%20data-content-finding%3D%22Community%22%20data-userid%3D%22321104%22%20data-username%3D%22nxf47345%22%3E%E5%88%98%E6%B5%A9%3C%2FA%3E%E3%80%82%3C%2FP%3E%3C%2FLINGO-BODY%3E
无评分
版本历史
最后更新:
‎07-15-2022 12:16 AM
更新人: