ARM Technical Support Knowledge Articles

COMMUNICATION BETWEEN BOOTLOADER AND APPLICATION

Applies to: General Topics

Answer


Information in this article applies to:


SYMPTOM

How can I pass information from my bootloader to my main program?

CAUSE

Since a bootloader and an application program have access to the same data memory, passing values from one to the other is quite simple.

RESOLUTION

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

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential