EmbeddedLocoNet | Bootloader |
---|
This page explains how you add support for the IPL protocol to your application. It is assumed that you already followed the steps to create the bootloader. It also is assumed that your application already has code to receive any LocoNet messages. The added code just examines a received packet to find out if it is the start packet of a software update.
- You need to #define MANUFACTURER_ID, DEVELOPER_ID, PRODUCT_ID in the makefile, sysdef.h or project configuration.
- Link the file apps/BootLoader/BootloaderUser.c to your project
- Add this code to your LocoNet packet handler:
if (BootloaderParseMessage(pstLnMsg) == 1) // pstLnMsg holds a pointer to the last { // message received printf("updating...\n"); // or whatever output is appropriate for your application BootloaderEnter(); // jump to the bootloader with a software generated reset }
...TBC...description about makefile magics...
EmbeddedLocoNet | Bootloader |
---|
Author of this website: Stefan Bormann. |