Partition Layout
Overview
Zephyr provides a flexible scheme to define non-volatile memory partitions for application and subsystem use. The partitions define image and data storage. Partitions defined in a board’s final device tree use Atmosic-provided DTSI files, overlays and headers. Some partitions are configurable through DTS flags passed during the application build process. When dealing with multiple images to run on a given board, all images must have the same partition layout view. The DTS flags must be passed to each build to ensure that the layout is consistent for all images.
The following DTS flags can resize pre-defined partitions
DTS Flag |
Description |
---|---|
ATM_SPE_SIZE |
Set Secure Application partition size |
ATM_FACTORY_SIZE |
Set Factory Data partition size |
ATM_STORAGE_SIZE |
Set Settings database partition size |
FLASH_SIZE |
Total flash size (stacked or external) |
ATM_MCUBOOT_SIZE |
MCUboot partition size |
ATM_MCUBOOT_SCRATCH_SIZE |
MCUboot scratch partition size |
Example of passing DTS flags to west commmand
west build ... -DDTS_EXTRA_CPPFLAGS="-DFLASH_SIZE=0x100000;-DATM_MCUBOOT_SCRATCH_SIZE=0" ...
During the application build process a non-volatile storage layout summary is auto generated in the build folder. This file layout_info file graphically shows memory partitioning in RRAM and Flash regions and is generated based on the partition_info.map file.
Following layout example is generated during application build using ATM34/e SOC + MCUboot + staging partition and MCUboot scratch partition in external flash
TOTAL_RRAM EXT_FLASH
*────────────────────* 0x90000 *────────────────────* 0x276000
│░░░░░░░░░░░░░░░░░░░░│ │░░░░░░░░░░░░░░░░░░░░│
│░░░░SEC SIDELOAD░░░░│(0x00100 0K) │░░░EXT FLASH OTA░░░░│(0x72000 456K)
│░░░░░░░░KEYS░░░░░░░░│ │░░░░░░STAGING░░░░░░░│
│░░░░░░░░░░░░░░░░░░░░│ │░░░░░░░░░░░░░░░░░░░░│
├────────────────────┤ 0x8ff00 ├────────────────────┤ 0x204000
│░░░░░░░░░░░░░░░░░░░░│ │░░░░░░░░░░░░░░░░░░░░│
│░░░░░SEC CNTRS░░░░░░│(0x00010 0K) │░░░░░EXT FLASH░░░░░░│(0x04000 16K)
│░░░░░░░░░░░░░░░░░░░░│ │░░MCUBOOT SCRATCH░░░│
├────────────────────┤ 0x8fef0 │░░░░░░░░░░░░░░░░░░░░│
│░░░░░░░░░░░░░░░░░░░░│ *────────────────────* 0x200000
│░░░░░░SEC JRNL░░░░░░│(0x006f0 1K)
│░░░░░░░░░░░░░░░░░░░░│
├────────────────────┤ 0x8f800
│░░░░░░░░░░░░░░░░░░░░│
│░░░░STORAGE DATA░░░░│(0x00800 2K)
│░░░░░░░░░░░░░░░░░░░░│
├--------------------┤ 0x8e800
│░░░░░░░░░░░░░░░░░░░░│
│░░░░FACTORY DATA░░░░│(0x00800 2K)
│░░░░░░░░░░░░░░░░░░░░│
├--------------------┤ 0x8e000
│░░░░░░░░░░░░░░░░░░░░│
│░░░SLOT0 TRAILER░░░░│(0x01000 4K)
│░░░░░░░░░░░░░░░░░░░░│
├--------------------┤ 0x8d000
│░░░░░░░░░░░░░░░░░░░░│
│░░░░░░░NS APP░░░░░░░│(0x6b000 428K)
│░░░░░░░░░░░░░░░░░░░░│
├--------------------┤ 0x22000
│░░░░░░░░░░░░░░░░░░░░│
│░░░░░░░░SPE░░░░░░░░░│(0x06000 24K)
│░░░░░░░░░░░░░░░░░░░░│
├--------------------┤ 0x1c000
│░░░░░░░░░░░░░░░░░░░░│
│░░░░░░MCUBOOT░░░░░░░│(0x0c000 48K)
│░░░░░░░░░░░░░░░░░░░░│
*────────────────────* 0x10000
GLOSSARY
ATMWSTK: Atmosic Bluetooth Stack (only for certain platform)
EXT_FLASH: External/Stack flash memory
FACTORY DATA: Application specific data partition using NVS. This data partition in read-only and write protected
MCUBOOT: MCUboot bootloader
MCUBOOT SCRATCH: Scratch partition storage used by MCUboot. Can be located in RRAM (ATM33 only) or in external Flash (all products)
NS APP: Non Secure Application code space (TrustZone)
OTA STAGING: Storage for downloaded image (merged/signed SPE and NS APP binary) Staging area can be located in RRAM (ATM33 only) or in external flash (all products)
SEC JRNL: Secure journal.
SEC CNTRS: Secure counters.
SEC SIDELOAD KEYS: Area to store unique device specific side loaded keys
SPE:Secure Application code space (TrustZone)
SLOT0 TRAILER: Image trailer reservation used by MCUBOOT. Trailer covers Secure as well as non Secure application code space
STORAGE DATA: Partition used to hold Zephyr settings read/write database
Storage and Factory Data
Subpages: