.. _sec-memory-map:

Memory Map
==========

The devices supported by the |SDK| each contain several memory 
regions, including RAM and Flash. This section aims to show how these
memory regions are utilized by the stack and user application.

The stack library configuration memory map can be seen below. See
:ref:`sec-architecture-single-project-config` for more information on the
configuration.

The following table contains the Memory Map for the |DEVICE|.

.. table::

    +------------------+------------------+---------------+--------------------------------------------------------+
    | Memory Section   | Starting Address | Size (bytes)  | Description                                            |
    +==================+==================+===============+========================================================+
    |     Flash        | 0x00000000       | 60            | Cortex Interrupt Vecs                                  |
    |                  +------------------+---------------+--------------------------------------------------------+
    |                  |                                                                                           |
    |                  |                 Application / Stack Code                                                  |
    |                  |                                                                                           |
    |                  +------------------+---------------+--------------------------------------------------------+
    |                  | SNV              | 1-2 pages     | Simple Non-Volatile Storage                            |
    |                  +------------------+---------------+--------------------------------------------------------+
    |                  | Last Flash Page  | 88            | :term:`Customer Configuration`                         |
    +------------------+------------------+---------------+--------------------------------------------------------+
    |      RAM         | 0x20000000       | RAMVEC_SIZE   | Interrupt Vector Table in RAM for dynamic Hwi creation |
    |                  +------------------+---------------+--------------------------------------------------------+
    |                  |                 .bss and .data                                                            |
    |                  +-------------------------------------------------------------------------------------------+
    |                  |                 ICall heap                                                                |
    |                  +-------------------------------------------------------------------------------------------+
    |                  |                 RTOS kernel system stack                                                  |
    +------------------+------------------+---------------+--------------------------------------------------------+

.. note::

    At the table above, the following variables are platform dependent. 

    - **Flash Size**:

        - |DEVICE_LOW| : |FLASH_SIZE_LOW|
        - |DEVICE_LOW_PLUS| : |FLASH_SIZE_LOW_PLUS|

    - **RAM Size**:

        - |DEVICE_LOW| : |RAM_SIZE_LOW|
        - |DEVICE_LOW_PLUS| : |RAM_SIZE_LOW_PLUS|

    - **RAMVEC_SIZE** : |RAMVEC_SIZE|
