5.4.1. Example of a scatter-loading description file

To create a scatter-loading description file:

  1. Use an existing project or create a new project. See Chapter 3 Working with Projects for more information.

  2. Create a new project and add a new empty text file with the extension .scat. for example scatter.scat. See Creating a new RealView project and Adding a file to your project for more information.

  3. Using the Outline view, click on the toolbar icon or right-click and select Add load region from the context menu.

    The Add load region dialog box is displayed. Figure 5.7 shows and example:

    Figure 5.7. Add load region name

    Add load region name

  4. Enter a load region name, for example, LR1.

  5. Click OK.

  6. Modify the load region as shown in Example 5.6:

    Example 5.6. Simple scatter-loading description file

    LR1 0x0000 0x8000
    {
        LR1_er1 0x0000 0x8000
        {
            * (+RO)
        }
    
        LR1_er2 0x10000 0x6000
        {
            * (+RW,+ZI)
        }
    }
    

    This example shows a simple scatter-loading description file

  7. Save your changes.

  8. To set up a more complex scatter-loading file:

    1. Repeat steps 3 to 5 to add a second load region LR2.

    2. Modify the LR1 and LR2 load regions as shown in Example 5.7.

      Example 5.7. Complex scatter-loading description file

      LR1 0x0
      {
          LR1_er1 0x0
          {
              program.o (+RO)
          }
      
          LR1_er2 0x18000 0x8000
          {
              program1.o (+RW,+ZI)
          }
      }
      
      LR2 0x4000
      {
          LR2_er1 0x4000
          {
              program2.o (+RO)
          }
      
          LR2_er2 0x8000 0x8000
          {
              program2.0 (+RW,+ZI)
          }
      }
      

    3. Save your changes.

Copyright © 2006-2008, 2010 ARM Limited. All rights reserved.ARM DUI 0330G
Non-ConfidentialID102410