Hi,
Toolset 4.7.1, CCS 5.0.1.201012231000
In my Linker.cmd, I would like to locate one of my named sections at the very end of the image. I have to now done this by defining a memory region at the end of the image, and then locating my section within it. However, this is too restrictive, I would like to keep the final image size as small as possible for programming reasons, and would like this final section to be placed at the end of used image space, so that it will move up or down as my image size changes.
Current Implementation:
MEMORY
{
HEADER (RX) : origin=0x00080000 length=0x00000008 fill=0xFFFFFFFF
APP (RX) : origin=0x00080008 length=0x0003FEF8 fill=0xFFFFFFFF
FOOTER (RX) : origin=0x000BFF00 length=0x00000100 fill=0xFFFFFFFF
}
SECTIONS
{
.header : {} > HEADER
.text : {} > APP
.const : {} > APP
.cinit : {} > APP
.footer : {} > FOOTER
}
MEMORY
{
HEADER (RX) : origin=0x00080000 length=0x00000008 fill=0xFFFFFFFF
APP (RX) : origin=0x00080008 length=0x0003FFF8 fill=0xFFFFFFFF
}
SECTIONS
{
.header : {} > HEADER
.text : {} > APP
.const : {} > APP
.cinit : {} > APP
.footer : {} > APP
}
My named section .footer should be located after the .cinit section. However, looking at my output map file, I can see that .cinit is the last section in my image:
Does anybody have any suggestions about how to get my .footer section located at the very end of the image without defining a new MEMORY region?
As an aside, I'm getting the following warnings from the linker which are very annoying when trying to get a warning free build:
So, the linker has created fill section $fill001 between .const and .footer to get the alignment for .footer, and then complains that .const and $fill001 overlap!
Regards, Tony.