This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ARM-CGT: How to make linker to gen image a multiple of ...

Expert 2095 points

Part Number: ARM-CGT

Is there way to specify in linker that _entire_  target flash image shall be a multiple of N ?

Similar to how you do for a specific section inside a section block with palign,   but  I want to add fill or padding at the end if it's not a multiple of N bytes I want ..

I do this with external tool just add 0s, but this is awkward I think if linker can do this (or ti's obj2bin, but i see no such flags).

  • There is no feature of the linker which directly provides a solution this exact problem.  But I suspect it can be solved.  It may take a few turns back and forth.

    Here is an idea to consider.  Fill the memory range that corresponds to the highest address in flash.  I presume this memory range has no holes between sections.  Therefore, the linker will auto-generate one more section to fill the last part of this memory range.  To learn more about filling memory ranges, please search the TI ARM assembly tools manual for the sub-chapter titled The MEMORY Directive.

    Please let me know if this suggestion resolves the problem.

    Thanks and regards,

    -George