Scatter-loading file with link to bit-band objects

In devices with the ARMv7-M architecture, the SRAM and Peripheral regions each have a bit-band feature. You can access each bit in the bit-band region individually at a different address, called the bit-band alias. For example, to access bit[13] of the word at 0x20000001, you can use the address 0x2200002D.

Table 2.2 shows the bit-band regions and aliases within the SRAM and Peripheral memory regions.

Table 11. ARMv7-M bit-band regions and aliases

Memory region

Description

Address range

SRAM

Bit-band region

0x20000000-0x200FFFFF

 

Bit-band alias

0x22000000-0x23FFFFFF

Peripheral

Bit-band region

0x40000000-0x400FFFFF

 

Bit-band alias

0x42000000-0x43FFFFFF


The following is an example scatter-loading file that links bit-band objects.

FLASH_LOAD 0x20000000
{
    RW 0x20000000  ; RW data at the start of bit band region
  {
    * (+RW-DATA)
  }
  RO +0 FIXED        ; Followed by the RO Data
  {
     * (+RO-DATA)
  }

  CODEDATA +0   ; Followed by everything else
  { 
    * (+RO-CODE)
    * (+ZI)             ; ZI follows straight after
  }

  ARM_LIB_HEAP  +0 EMPTY 0x10000  ; heap starts after that
  {
  }

  ARM_LIB_STACK 0x20100000 EMPTY -0x10000    ; stack starts at the 
                                             ; top of bit band region
  {
  }

}

Show/hideSee also

Copyright © 2010-2012 ARM. All rights reserved.ARM DUI 0471G
Non-ConfidentialID021412