Quantcast
Channel: Tools
Viewing all articles
Browse latest Browse all 91752

Forum Post: RE: .bin file blows up to size of heap defined in linker command file

$
0
0

[quote user="Chester Gillon"]I haven't yet worked a robust way of writing the linker command file to get the initialized sections adjacent in memory to reduce the .bin file size.[/quote]

I have a suggestion.  Normally, when I post a suggestion, I have a very high degree of confidence that it will work.  Not just for the exact case at hand, but for lots of cases which might be similar.  I know lots of folks find these threads with search, and act on what they find.  I feel a debt of responsibility to all of them.  I lack that confidence this time around.  I'm going ahead anyway for two reasons.  One, this thread has been going on a while.  Two, I highly doubt a better suggestion is coming any time soon.

The idea is to apply the HIGH location specifier to all the uninitialized sections.  Read about it in the section titled Controlling Allocation Using The HIGH Location Specifier in the ARM assembly manual.  It might look like this ...

    /* These lines inside the SECTIONS directive */     .bss    > MEM (HIGH)     .sysmem > MEM (HIGH)     .stack  > MEM (HIGH)     .data   > MEM (HIGH)   /* EABI ONLY! */ 

The .data section is uninitialized in EABI builds.  The .data section is not used by the compiler in COFF ABI builds.  If it is used at all, it is an initialized section.  

I know this works in straightforward command files.  However, these StarterWare command files are a bit more complicated.  That's why my confidence is reduced.  I will try to get a StarterWare expert to comment on this thread.

Thanks and regards,

-George


Viewing all articles
Browse latest Browse all 91752

Trending Articles