blhost 烧录 RT600 EVK Flash

RT600 要求在 0x08000400 处为 512Bytes 的 FCB (flash config block),0x08001000 处为 image 。

图 1.

FCB 在 RT600 User Manual 的 41.5 章节有详细描述 (Table 1001.FlexSPI flash configuration block)

  • FCB 包含在代码中

代码设置 BOOT_HEADER_ENABLE = 1,FCB 在 flash_config.c/h 中配置,代码编译的 bin 文件中会包含 FCB

  • FCB 不包含在代码中

代码设置 BOOT_HEADER_ENABLE = 0,代码编译的 bin 中不含 FCB;此时 FCB 可由 blhost 配置寄存器 Option0 & Option1 来生成,Option0 & Option1 在 RT600 User Manual 的 41.5 章节有详细描述 (Table 1008.Option0 definitionTable 1009.Option1 definition)

RT600 EVK 在 FlexSPI PortB 接了一颗 Octal Flash,型号 MX25UM51345GXDI00,以下是使用 blhost 分别通过 USB 和 UART 烧录介绍。 


1. USB 烧录

BOOT_HEADER_ENABLE=0

ROM generates FCB through option0/option1

cd F:\MCU_tools\blhost_2.6.7\bin\win

blhost -u 0x1fc9,0x0020 -- get-property 0x01
blhost -u 0x1fc9,0x0020 -- fill-memory 0x1c000 0x04 0xC1503051
blhost -u 0x1fc9,0x0020 -- fill-memory 0x1c004 0x04 0x20000014
blhost -u 0x1fc9,0x0020 -- configure-memory 0x09 0x1c000
blhost -u 0x1FC9,0x0020 -- flash-erase-region 0x08000000 0x80000
blhost -u 0x1FC9,0x0020 -- fill-memory 0x1d000 0x04 0xf000000f
blhost -u 0x1FC9,0x0020 -- configure-memory 0x09 0x1d000
blhost -u 0x1FC9,0x0020 -- write-memory 0x08001000 evkmimxrt685_gpio_led_output.bin

 

图 2.

BOOT_HEADER_ENABLE=1

MCUXpresso IDE generates FCB through flash_config.c/.h

cd F:\MCU_tools\blhost_2.6.7\bin\win


blhost -u 0x1fc9,0x0020 -- get-property 0x01
blhost -u 0x1fc9,0x0020 -- fill-memory 0x1c000 0x04 0xC1503051
blhost -u 0x1fc9,0x0020 -- fill-memory 0x1c004 0x04 0x20000014
blhost -u 0x1fc9,0x0020 -- configure-memory 0x09 0x1c000
blhost -u 0x1fc9,0x0020 -- flash-erase-region 0x08000000 0x80000
blhost -u 0x1fc9,0x0020 -- write-memory 0x08000000 evkmimxrt685_gpio_led_output.bin

 


图 3. 


2. UART 烧录

BOOT_HEADER_ENABLE=0

ROM generates FCB through option0/option1

cd F:\MCU_tools\blhost_2.6.7\bin\win

blhost -p com48 -- get-property 0x01
blhost -p com48 -- fill-memory 0x1c000 0x04 0xC1503051
blhost -p com48 -- fill-memory 0x1c004 0x04 0x20000014
blhost -p com48 -- configure-memory 0x09 0x1c000
blhost -p com48 -- flash-erase-region 0x08000000 0x80000
blhost -p com48 -- fill-memory 0x1d000 0x04 0xf000000f
blhost -p com48 -- configure-memory 0x09 0x1d000
blhost -p com48 -- write-memory 0x08001000 evkmimxrt685_gpio_led_output.bin

 

图 4.

BOOT_HEADER_ENABLE=1

MCUXpresso IDE generates FCB through flash_config.c/.h

cd F:\MCU_tools\blhost_2.6.7\bin\win

blhost -p com48 -- get-property 0x01
blhost -p com48 -- fill-memory 0x1c000 0x04 0xC1503051
blhost -p com48 -- fill-memory 0x1c004 0x04 0x20000014
blhost -p com48 -- configure-memory 0x09 0x1c000
blhost -p com48 -- flash-erase-region 0x08000000 0x80000
blhost -p com48 -- write-memory 0x08000000 evkmimxrt685_gpio_led_output.bin

 


图 5.

★博文内容均由个人提供,与平台无关,如有违法或侵权,请与网站管理员联系。

★博文作者未开放评论功能

参考来源