|ARM Technical Support Knowledge Articles|
Applies to: General Topics
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.
Article last edited on: 2004-05-01 20:46:52
Did you find this article helpful? Yes No
How can we improve this article?