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

scatter file / linker script help

Hi,

I was hoping for some help and clarification to make an effective and useful scatter file.

my goal is to put all my bootloader files into region 0x0000 - 0x3FFF and then all of my application files in 0x4000 - 0x800000. I have my bootloader and a small demo of blinking an led as my application. I am having issues linking the application to the correct place. I have looked into alot of the ARM guides but still am having issues.

I am getting this error:
.\Objects\shitty_scatterfile.sct(24): warning: L6329W: Pattern BlinkyDemo.o(RO) only matches removed unused sections.

here is my crappy scatter file


LR_IROM1        0x0000 0x3FFF ; bootloader objects go here
{
        ER_IROM1 0x0000 0x3FFF; bootloader executable region
        {
        *.o (RESET, +First)
    *(InRoot$$Sections)
    .ANY (+RO)
        }
        RW_IRAM1 0x20000000 0x00010000
        {  ; RW data
        .ANY (+RW +ZI) ; store this data anywhere
        }
}

LR_IROM2 0x00004000 0x00080000  ; Application objects go here
{
  ER_IROM2 0x00004000 0x80000
  {  ; load address = execution address
   BlinkyDemo.o (+RO)
  }
}

the section:
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)

is straight from the generated scatter file so if someone could also explain the *(InRoot$$Sections) to me that would be great. I think my issue is that I am linking "BlinkyDemo.o to both Rom1 and Rom2.

Thanks,

Eric Micallef

Parents
  • Hi Clive ya, after reading through some posts I see that everyone was doing seperate projects so I started doing that. in my startup assembly file I have the INCBIN

    AREA AppDemo, CODE, READONLY, PREINIT_ARRAY
    INCBIN C:\SWARM BOOTLOADER\NRF52_BOOTLOAD_ADV-master\NRF52_BOOTLOAD_ADV-master\Objects\AppDemo.bin
    END
    <\pre>
    
    is there anyway I can specify in the scatterfile or in this INCBIN to start placing the binary file at 0x4000?
    
    I am referencing this post.
    http://www.keil.com/forum/18585/
    
    
    

Reply
  • Hi Clive ya, after reading through some posts I see that everyone was doing seperate projects so I started doing that. in my startup assembly file I have the INCBIN

    AREA AppDemo, CODE, READONLY, PREINIT_ARRAY
    INCBIN C:\SWARM BOOTLOADER\NRF52_BOOTLOAD_ADV-master\NRF52_BOOTLOAD_ADV-master\Objects\AppDemo.bin
    END
    <\pre>
    
    is there anyway I can specify in the scatterfile or in this INCBIN to start placing the binary file at 0x4000?
    
    I am referencing this post.
    http://www.keil.com/forum/18585/
    
    
    

Children