Keil Logo

BL51: LOCATING INDIVIDUAL SEGMENTS WHILE USING START ADDRESS

Information in this article applies to:

  • BL51 Version 3.70

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 µVision, 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

Last Reviewed: Friday, July 15, 2005


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.