|ARM Technical Support Knowledge Articles|
Applies to: BL51 Code-banking Linker/Locator
Information in this article applies to:
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?
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:
The command line argument appears in the box at the bottom of the window. Click on the OK button.
Article last edited on: 2005-07-15 10:37:01
Did you find this article helpful? Yes No
How can we improve this article?