|ARM Technical Support Knowledge Articles|
Applies to: BL51 Code-banking Linker/Locator
Information in this article applies to:
My CODE memory starts at 100H, however, I have a collection of USB functions that I wish to locate starting at 8000H. Is there any way to do this without specifying a starting address for every single function?
Yes. The following is an example which locates the USB functions usb_func1(), usb_func2() and usb_func3(), defined in the source file locate.c starting at 8000H:
CODE(?PR?USB_FUNC1?LOCATE(8000H), ?PR?USB_FUNC2?LOCATE, ?PR?USB_FUNC3?LOCATE, 100H)
The linker processes the arguments one at a time. It locates the first segment at address 8000H and from then on locates every specified segment sequentially in memory. It finally reaches the 100H and from that point onwards locates every other segment in the project sequentially in memory starting at that address.
The same technique can be used for multiple groups of segments. For example:
locates functions func1() and func2() starting at 4000H, functions func3() and func4() starting at 8000H, and the rest of the code segments starting at 100H.
Article last edited on: 2005-07-15 12:53:59
Did you find this article helpful? Yes No
How can we improve this article?