Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
Application memory domain APIs

Application memory domain APIs. More...

Macros

#define K_APP_DMEM_SECTION(id)   data_smem_##id##_data
 Name of the data section for a particular partition.
 
#define K_APP_BMEM_SECTION(id)   data_smem_##id##_bss
 Name of the bss section for a particular partition.
 
#define K_APP_DMEM(id)   Z_GENERIC_SECTION(K_APP_DMEM_SECTION(id))
 Place data in a partition's data section.
 
#define K_APP_BMEM(id)   Z_GENERIC_SECTION(K_APP_BMEM_SECTION(id))
 Place data in a partition's bss section.
 
#define K_APPMEM_PARTITION_DEFINE(name)
 Define an application memory partition with linker support.
 

Detailed Description

Application memory domain APIs.

Macro Definition Documentation

◆ K_APP_BMEM

#define K_APP_BMEM (   id)    Z_GENERIC_SECTION(K_APP_BMEM_SECTION(id))

#include <zephyr/app_memory/app_memdomain.h>

Place data in a partition's bss section.

Globals tagged with this will end up in the bss section for the specified memory partition. This data will be zeroed at boot.

Parameters
idName of the memory partition to associate this data

◆ K_APP_BMEM_SECTION

#define K_APP_BMEM_SECTION (   id)    data_smem_##id##_bss

#include <zephyr/app_memory/app_memdomain.h>

Name of the bss section for a particular partition.

Useful for defining memory pools, or any other macro that takes a section name as a parameter.

Parameters
idPartition name

◆ K_APP_DMEM

#define K_APP_DMEM (   id)    Z_GENERIC_SECTION(K_APP_DMEM_SECTION(id))

#include <zephyr/app_memory/app_memdomain.h>

Place data in a partition's data section.

Globals tagged with this will end up in the data section for the specified memory partition. This data should be initialized to some desired value.

Parameters
idName of the memory partition to associate this data

◆ K_APP_DMEM_SECTION

#define K_APP_DMEM_SECTION (   id)    data_smem_##id##_data

#include <zephyr/app_memory/app_memdomain.h>

Name of the data section for a particular partition.

Useful for defining memory pools, or any other macro that takes a section name as a parameter.

Parameters
idPartition name

◆ K_APPMEM_PARTITION_DEFINE

#define K_APPMEM_PARTITION_DEFINE (   name)

#include <zephyr/app_memory/app_memdomain.h>

Value:
extern char Z_APP_START(name)[]; \
extern char Z_APP_SIZE(name)[]; \
struct k_mem_partition name = { \
.start = (uintptr_t) &Z_APP_START(name), \
.size = (size_t) &Z_APP_SIZE(name), \
}; \
extern char Z_APP_BSS_START(name)[]; \
extern char Z_APP_BSS_SIZE(name)[]; \
Z_GENERIC_SECTION(.app_regions.name) \
const struct z_app_region name##_region = { \
.bss_start = &Z_APP_BSS_START(name), \
.bss_size = (size_t) &Z_APP_BSS_SIZE(name) \
}; \
Z_APPMEM_PLACEHOLDER(name)
#define K_MEM_PARTITION_P_RW_U_RW
Definition: arm_mpu_v7m.h:190
Size of off_t must be equal or less than size of size_t
Definition: retained_mem.h:28
__UINTPTR_TYPE__ uintptr_t
Definition: stdint.h:105
Memory Partition.
Definition: mem_domain.h:55
uintptr_t start
start address of memory partition
Definition: mem_domain.h:57

Define an application memory partition with linker support.

Defines a k_mem_paritition with the provided name. This name may be used with the K_APP_DMEM and K_APP_BMEM macros to place globals automatically in this partition.

NOTE: placeholder char variable is defined here to prevent build errors if a partition is defined but nothing ever placed in it.

Parameters
nameName of the k_mem_partition to declare