GENERAL: COMMUNICATION BETWEEN BOOTLOADER AND APPLICATION
Information in this article applies to:
How can I pass information from my bootloader to my main program?
Since a bootloader and an application program have access to the same data memory, passing values from one to the other is quite simple.
Define an identical, explicitly placed, variable in both projects. Such as:
int xdata bootStatus _at_ 0x0100;
If you write to bootStatus in the bootloader, you can read that data in the main program.
Beware however, if the main program initializes the area of memory in which the data variable is located, you will not be able to retreive the information. To avoid this possibility, disable data initialization in your main program, and enable it in the bootloader only.
Last Reviewed: Wednesday, January 11, 2017
of your data.