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

what is scatter file? what is its advantage?
Kindly tell, i do not anything about these.

Thanks
Sukhdeep Singh

Parents
  • A much simpler version of the scatter file, auto-generated by uVision by just adding addresses from RAM and flash in the project dialogs:

    ; *************************************************************
    ; *** Scatter-Loading Description File generated by uVision ***
    ; *************************************************************
    
    LR_IROM1 0x00000000 0x00001000  {    ; load region size_region
      ER_IROM1 0x00000000 0x00001000  {  ; load address = execution address
       *.o (RESET, +First)
       *(InRoot$$Sections)
       .ANY (+RO)
      }
      RW_IRAM1 0x40000000 0x00008000  {  ; RW data
       .ANY (+RW +ZI)
      }
      RW_IRAM2 0x7FE00000 0x00004000  {
       .ANY (+RW +ZI)
      }
    }
    
    LR_IROM2 0x00003000 0x0003D000  {
      ER_IROM2 0x00003000 0x0003D000  {  ; load address = execution address
       .ANY (+RO)
      }
    }
    


    This is an example for a chip that has two RAM areas. The flash has been intentionally splitted into two, just to allow some configuration data to be stored in one of the early - and small - flash sectors of the specific processor.

    You can quite often get away with the auto-generated scatter file, unless your chip has very many memory areas (easy to add these sections to the scatter file) or you need to create holes or force some of the code to a specific region. The complexity of the scatter file will start to escalate when you need fancier boot-loader solutions.

Reply
  • A much simpler version of the scatter file, auto-generated by uVision by just adding addresses from RAM and flash in the project dialogs:

    ; *************************************************************
    ; *** Scatter-Loading Description File generated by uVision ***
    ; *************************************************************
    
    LR_IROM1 0x00000000 0x00001000  {    ; load region size_region
      ER_IROM1 0x00000000 0x00001000  {  ; load address = execution address
       *.o (RESET, +First)
       *(InRoot$$Sections)
       .ANY (+RO)
      }
      RW_IRAM1 0x40000000 0x00008000  {  ; RW data
       .ANY (+RW +ZI)
      }
      RW_IRAM2 0x7FE00000 0x00004000  {
       .ANY (+RW +ZI)
      }
    }
    
    LR_IROM2 0x00003000 0x0003D000  {
      ER_IROM2 0x00003000 0x0003D000  {  ; load address = execution address
       .ANY (+RO)
      }
    }
    


    This is an example for a chip that has two RAM areas. The flash has been intentionally splitted into two, just to allow some configuration data to be stored in one of the early - and small - flash sectors of the specific processor.

    You can quite often get away with the auto-generated scatter file, unless your chip has very many memory areas (easy to add these sections to the scatter file) or you need to create holes or force some of the code to a specific region. The complexity of the scatter file will start to escalate when you need fancier boot-loader solutions.

Children
No data