Nexus Embedded Platform 0.1.0
Statically assembled reusable embedded mechanisms
Loading...
Searching...
No Matches
memory.h File Reference

Variable-only placement in explicitly selected data regions. More...

#include "nexus_config.h"

Go to the source code of this file.

Macros

#define NX_CORE_MEMORY_STRING_DETAIL(value)
 Place static storage in an authored optional memory region.
#define NX_CORE_MEMORY_STRING(value)
#define NX_CORE_MEMORY_ATTRIBUTE(name)
#define NX_MEMORY_ADDSRAM_DATA    _Pragma("GCC error \"ADDSRAM memory region is not selected\"")
#define NX_MEMORY_ADDSRAM_BSS   NX_MEMORY_ADDSRAM_DATA
#define NX_MEMORY_ADDSRAM_NOINIT   NX_MEMORY_ADDSRAM_DATA
#define NX_MEMORY_TCM_DATA    _Pragma("GCC error \"TCM memory region is not selected\"")
#define NX_MEMORY_TCM_BSS   NX_MEMORY_TCM_DATA
#define NX_MEMORY_TCM_NOINIT   NX_MEMORY_TCM_DATA
#define NX_MEMORY_CCM_DATA    _Pragma("GCC error \"CCM memory region is not selected\"")
#define NX_MEMORY_CCM_BSS   NX_MEMORY_CCM_DATA
#define NX_MEMORY_CCM_NOINIT   NX_MEMORY_CCM_DATA

Detailed Description

Variable-only placement in explicitly selected data regions.

Author
Nexus Team

Definition in file memory.h.

Macro Definition Documentation

◆ NX_CORE_MEMORY_ATTRIBUTE

#define NX_CORE_MEMORY_ATTRIBUTE ( name)
Value:
__attribute__((section(name "." NX_CORE_MEMORY_STRING(__COUNTER__)), \
aligned(4), nocommon))
#define NX_CORE_MEMORY_STRING(value)
Definition memory.h:34

Definition at line 35 of file memory.h.

◆ NX_CORE_MEMORY_STRING

#define NX_CORE_MEMORY_STRING ( value)
Value:
#define NX_CORE_MEMORY_STRING_DETAIL(value)
Place static storage in an authored optional memory region.
Definition memory.h:33

Definition at line 34 of file memory.h.

◆ NX_CORE_MEMORY_STRING_DETAIL

#define NX_CORE_MEMORY_STRING_DETAIL ( value)
Value:
#value

Place static storage in an authored optional memory region.

Note
Use these attributes on variable definitions, before the type, one variable per declaration. They are not function or instruction attributes. Each use has an independent input section for garbage collection of unused storage. DATA copies its initializer from Flash at reset. BSS is zeroed at reset. NOINIT is neither copied nor cleared; initialize it before reading. Power-loss retention is not promised. BSS/NOINIT reject nonzero initializers. Storage is word aligned and subject to explicit ELF budgets. Unselected use is a compile error. TCM is CPU-only data: never DMA or executable storage. CCM is also CPU-only data; placement never grants bus-master access. ADDSRAM DMA requires provider address, alignment and ownership validation. Ordinary storage, the main MSP and unselected images keep their existing layout.

Definition at line 33 of file memory.h.

◆ NX_MEMORY_ADDSRAM_BSS

#define NX_MEMORY_ADDSRAM_BSS   NX_MEMORY_ADDSRAM_DATA

Definition at line 47 of file memory.h.

◆ NX_MEMORY_ADDSRAM_DATA

#define NX_MEMORY_ADDSRAM_DATA    _Pragma("GCC error \"ADDSRAM memory region is not selected\"")

Definition at line 45 of file memory.h.

◆ NX_MEMORY_ADDSRAM_NOINIT

#define NX_MEMORY_ADDSRAM_NOINIT   NX_MEMORY_ADDSRAM_DATA

Definition at line 48 of file memory.h.

◆ NX_MEMORY_CCM_BSS

#define NX_MEMORY_CCM_BSS   NX_MEMORY_CCM_DATA

Definition at line 69 of file memory.h.

◆ NX_MEMORY_CCM_DATA

#define NX_MEMORY_CCM_DATA    _Pragma("GCC error \"CCM memory region is not selected\"")

Definition at line 67 of file memory.h.

◆ NX_MEMORY_CCM_NOINIT

#define NX_MEMORY_CCM_NOINIT   NX_MEMORY_CCM_DATA

Definition at line 70 of file memory.h.

◆ NX_MEMORY_TCM_BSS

#define NX_MEMORY_TCM_BSS   NX_MEMORY_TCM_DATA

Definition at line 58 of file memory.h.

◆ NX_MEMORY_TCM_DATA

#define NX_MEMORY_TCM_DATA    _Pragma("GCC error \"TCM memory region is not selected\"")

Definition at line 56 of file memory.h.

◆ NX_MEMORY_TCM_NOINIT

#define NX_MEMORY_TCM_NOINIT   NX_MEMORY_TCM_DATA

Definition at line 59 of file memory.h.