This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM2634: If a bootloader and application exist in flash, how to boot to the application?

Part Number: AM2634
Other Parts Discussed in Thread: UNIFLASH

Tool/software:

I have the UART-based bootloader fully working (booting into UART-boot-mode, and loading my application to external flash), but I need the CAN-based bootloader for field upgrades. When I execute the SBL CAN uniflash example:

1. In UART-boot-mode, load the sbl_can_uniflash.release.tiimage into flash

2. Switch to QSPI-boot-mode, and load the application into flash

This succeeds, and the application runs, but a power-cycle puts the target back into CAN-boot-mode. I need the target to boot to the application here.

I saw this sentence in one of your cfg files, "When sending bootloader make sur to flash at offset 0x0. ROM expects bootloader at offset 0x0". Does this mean that the QSPI-ROM-bootloader will first look at flash address 0 to load it first, and if there is nothing there, the QSPI-ROM-bootloader looks at address 0x80000 for the application to load? If so, how do I boot to the application after a power-cycle? 

Do you recommend that I:

1. Combine the sbl_can_uniflash.release.tiimage and my application into one image? If so, is it still required that the application start at 0x80000, or if it one image, the entire thing can start at 0x0?

2. Keep the sbl_can_uniflash.release.tiimage and my application separate, and modify sbl_can_uniflash.release.tiimage to jump to 0x80000 if it thinks there is a valid image loaded?

Thanks,

Jim

  • Hi Jim,

    if I am understanding the requirement correctly you need to receive the application via can and once app is received you need it to be store in flash and upon reset boot from flash right?

  • Yes, and a CAN-based bootloader needs to be available for field upgrades as part of this. I figured I would use another GPIO, and based on this GPIO, boot into a CAN-boot-mode, or boot directly to the application. 

    Thanks,

    Jim

  • Hi Jim,

    I saw this sentence in one of your cfg files, "When sending bootloader make sur to flash at offset 0x0. ROM expects bootloader at offset 0x0". Does this mean that the QSPI-ROM-bootloader will first look at flash address 0 to load it first, and if there is nothing there, the QSPI-ROM-bootloader looks at address 0x80000 for the application to load? If so, how do I boot to the application after a power-cycle? 

    0xF0000

    ROM looks for SBL at 0x0, and if it doesnot find a valid image, and you have redundant boot enabled then it will look at location: 0xF0000, But it looks for SBL not for application image. Unless SBL boots up application cannot be booted. As the offset of application is known to SBL not to ROM.

    You can read more about it in TRM section 5.4.1.1.1