Remote firmware update question

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

Remote firmware update question

696 Views
jonathansmith
Contributor III

Hi. I am using an LPC1768 with a working routine for updating firmware. From a master device, I currently download the firmware to an external EEPROM, check it, and then copy it to the LPC1768’s flash and perform a reset. This works well.

I now have a library of standard routines that run on the LPC1768 including the comms code to/from the master device and the firmware update code. This base code is then added to with application specific code for different projects.

I would like to be able to keep the base code, and only update the application specific code. The thinking being that if there is a bug in the application specific code I won’t brick the device because the comms/firmware code is still working, and I can still download new application specific firmware.

I don’t know if this is possible on the LPC1768 and if it is, where to start?

0 Kudos
1 Reply

465 Views
lpcxpresso_supp
NXP Employee
NXP Employee

This really all comes down to managing your flash. Application code often leverages the library (base code) through function pointers (like some ROM resident services), or, a supervisor call (SVC handler) scheme. The library is allocated to one or more flash sectors and it's rarely updated. Of course, you're responsible for keeping everything in sync should either the library or application code need update.

The main consideration when you're updating flash is the flash is not accessible during program/erase. This means your flash update code has to be copied to, and run from RAM. There are various forum discussions on nxp.com (and the internet) about LPC secondary bootloaders, which is a good place for you to start.

Thanks and regards,

MCUXpresso Support

0 Kudos