Keil™, An ARM® Company

Discussion Forum

Relocating library program segments

Next Thread | Thread List | Previous Thread Start a Thread | Settings

DetailsMessage
Read-Only
Author
David Fussell
Posted
11-Apr-2003 07:49
Toolset
C51
New! Relocating library program segments
In an attempt to free some code space, I'm considering the wisdom of relocating some library program segments from the common code area into one of my two banks. I'm a bit reluctant to do this for library functions (PRINTF, etc), but I'm assuming that any directive relocating these program segments is detected at link time, so the appropriate bank switch code will be inserted around calls to these functions as necessary.

I appreciate the slight performance 'hit' resulting from this action, but needs must etc...

Is this a wise thing to consider?
Read-Only
Author
Ric Watson
Posted
9-Feb-2004 07:41
Toolset
C51
New! RE: Relocating library program segments
I don't see why you shouldn't. As a matter of interest, do you mean Keil library program segments? If so, how do you go about relocating them?
Read-Only
Author
Andrew Neil
Posted
9-Feb-2004 07:48
Toolset
C51
New! RE: Relocating library program segments
Have you considered other options, like moving constants into XDATA?
(assuming you have spare XDATA space...)
Read-Only
Author
Tech Dept
Posted
9-Feb-2004 07:51
Toolset
C51
New! RE: Relocating library program segments
Hi Andrew,
I want to locate Keil library functions in a place in ROM other than the lowest 1kB, which is where they seem to reside by default.
Ric.
Read-Only
Author
David Fussell
Posted
9-Feb-2004 08:12
Toolset
C51
New! RE: Relocating library program segments
I'd look at the map file to obtain segment names etc, and use either the CODE directive to move them around in the 'common area', or alternatively, for banking, via the approprite 'BANK' directive.

Next Thread | Thread List | Previous Thread Start a Thread | Settings