ARM Technical Support Knowledge Articles

LOCATING INDIVIDUAL SEGMENTS WHILE USING START ADDRESS

Applies to: BL51 Code-banking Linker/Locator

Answer

Information in this article applies to:


PROBLEM

I wish to locate all my functions at 8000H upwards in code memory except for the main function, which I wish to locate at 100H. How do I do this?

RESOLUTION

This may be achieved using the CODE directive for the BL51 Code Banking Linker/Locator. Details of the directive may be found on page 30 of the 8051 Utilities Manual (04.95). The following is an example of calling BL51 using the command line to solve the problem:

BL51 MYPROG.OBJ CODE(8000h, ?PR?MAIN?MYPROG(100h))

This will locate the main function at 100H, and all the other functions and segments from 8000H upwards in code memory.

To set the CODE directive in uVision, first choose BL51 Code Banking Linker... from the Options menu. Click on the Segments tab. In the Code box enter the parameters of the CODE directive. For example:

8000h, ?PR?MAIN?MYPROG(100h)

The command line argument appears in the box at the bottom of the window. Click on the OK button.

MORE INFORMATION

SEE ALSO

Article last edited on: 2005-07-15 10:37:01

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