Secondary bootloader

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Secondary bootloader

Jump to solution
2,315 Views
Manwan
Contributor I

For LPC845, it mentioned secondary bootloader in the application note, but not for LPC824, so what is the difference of the primary and secondary bootloader, when should the secondary bootloader be used?

0 Kudos
Reply
1 Solution
2,303 Views
frank_m
Senior Contributor III

An internal bootloader is usually implemented in ROM, and started when certain startup conditions (levels in ISP/BOOT pins) are met. This BL application is fixed, which has it pros and cons.

A secondary bootloader is basically a normal application located in Flash.

What makes it a "bootloader" is your functionality - loading updated firmware, flash it, erase old version, and execute the firmware.

Such a secondary BL needs to avoid erasing itself (sometimes less trivial as it seems), and the applications need to linked for this BL specifically - i.e. application linkage requires modification.

View solution in original post

4 Replies
2,304 Views
frank_m
Senior Contributor III

An internal bootloader is usually implemented in ROM, and started when certain startup conditions (levels in ISP/BOOT pins) are met. This BL application is fixed, which has it pros and cons.

A secondary bootloader is basically a normal application located in Flash.

What makes it a "bootloader" is your functionality - loading updated firmware, flash it, erase old version, and execute the firmware.

Such a secondary BL needs to avoid erasing itself (sometimes less trivial as it seems), and the applications need to linked for this BL specifically - i.e. application linkage requires modification.

2,298 Views
Manwan
Contributor I

Hi Frank, thanks for your reply and kind reminder, and what confuses me is they didn't call these(functionality - loading updated firmware, flash it, erase old version, and execute the firmware) as secondary bootloader on the other chips, like LPC824, to me it seems they are the same kind of "bootloader" we made on other chips, programmed in the beginning of flash to update firmware.

I guess they are the same thing, it is just on LPC845, I2C and SPI is supported as well, but on LPC824, only UART0.

0 Kudos
Reply
2,292 Views
frank_m
Senior Contributor III

> I guess they are the same thing, it is just on LPC845, I2C and SPI is supported as well, but on LPC824, only UART0.

That depends on your application. Often, you do not get along with the interfaces and protocols the internal/ROM bootloader supports, and need to use a "secondary" one.

Having to deal with ECUs in my dayjob, hardly any MCU we use supports CAN via bootloader. Thus we have to maintain our own bootloaders.

0 Kudos
Reply
2,286 Views
Manwan
Contributor I

Really appreciate your reply, Frank, got it.

0 Kudos
Reply