This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

RVCT Linker

Note: This was originally posted on 12th June 2012 at http://forums.arm.com

Hi,
I have a doubt regarding the scatter loading in RVCT linker.
My concept is that the linker will generate code for copying the image executable code from Load region in ROM to execution region in RAM.
Can anyone tell me if this is correct?
Also where can i find details about this.
  • Note: This was originally posted on 13th June 2012 at http://forums.arm.com

    Thanks Sam for the reply:)
    But my doubt is still not cleared.
    In scatter load file we will specify only the regions.Putting the code in ROM will be done by the Flashing tool.But for copying the code from ROM to RAM..some one has to do that rite?
    My doubt is whether the linker will insert any piece of code in final binary to do that?


    Yes, moving code and data from load region to execution region, for example ROM to RAM, is a typical use for scatter loading. You can find more information about scatter loading in the ARM Linker documentation. Here is a link for the scatter file documentation for the 5.01 version of the linker:

    http://infocenter.ar...g/BABDDHBF.html
  • Note: This was originally posted on 14th June 2012 at http://forums.arm.com

    Thanks a lot for the info.
    Is there any document from ARM which explains this?


    Yes; the linker embeds the scatter loading code into the binary which will perform the necessary copy. It can also do clever things like decompressing data sections (so ROM storage is small, but the RAM image is correct) and unpacking sections (so they are stored in a compact form, but stored out at the right page offsets as needed in the scatter file).
  • Note: This was originally posted on 15th June 2012 at http://forums.arm.com

    Thanks Sam :)


    Try this section in the Using ARM C and C++ Libraries and Floating-Point Support book:

    Initialization of the execution environment and execution of the application
    http://infocenter.ar...g/Chddbihb.html

    There are links on this page to further information.
  • Note: This was originally posted on 14th June 2012 at http://forums.arm.com

    Yes; the linker embeds the scatter loading code into the binary which will perform the necessary copy. It can also do clever things like decompressing data sections (so ROM storage is small, but the RAM image is correct) and unpacking sections (so they are stored in a compact form, but stored out at the right page offsets as needed in the scatter file).