2.12 Scatter file with link to bit-band objects

In devices that are based on the ARM® Cortex®‑M3 processor or ARM Cortex‑M4 processor, 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 0x22000054.

The following table shows the bit-band regions and aliases within the SRAM and Peripheral memory regions.

Table 2-1 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 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
  {
  }
}
Non-ConfidentialPDF file icon PDF versionARM DUI0471M
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.