Section variables.
More...
Section variables.
#define NRF_SECTION_DEF |
( |
|
section_name, |
|
|
|
data_type |
|
) |
| |
Macro for creating a section.
- Parameters
-
[in] | section_name | Name of the section. |
[in] | data_type | Data type of the variables to be registered in the section. |
- Warning
- Data type must be word aligned to prevent padding.
#define NRF_SECTION_END_ADDR |
( |
|
section_name | ) |
|
Macro for obtaining the address of the end of a section.
- Parameters
-
[in] | section_name | Name of the section. |
#define NRF_SECTION_ITEM_COUNT |
( |
|
section_name, |
|
|
|
data_type |
|
) |
| |
Macro for getting the number of variables in a section.
- Parameters
-
[in] | section_name | Name of the section. |
[in] | data_type | Data type of the variables in the section. |
#define NRF_SECTION_ITEM_GET |
( |
|
section_name, |
|
|
|
data_type, |
|
|
|
i |
|
) |
| |
Macro for retrieving a variable from a section.
- Warning
- The stored symbol can only be resolved using this macro if the type of the data is word aligned. The operation of acquiring the stored symbol relies on the size of the stored type. No padding can exist in the named section in between individual stored items or this macro will fail.
- Parameters
-
[in] | section_name | Name of the section. |
[in] | data_type | Data type of the variable. |
[in] | i | Index of the variable in section. |
#define NRF_SECTION_ITEM_REGISTER |
( |
|
section_name, |
|
|
|
section_var |
|
) |
| |
Macro for declaring a variable and registering it in a section.
Declares a variable and registers it in a named section. This macro ensures that the variable is not stripped away when using optimizations.
- Note
- The order in which variables are placed in a section is dependent on the order in which the linker script encounters the variables during linking.
- Parameters
-
[in] | section_name | Name of the section. |
[in] | section_var | Variable to register in the given section. |
#define NRF_SECTION_LENGTH |
( |
|
section_name | ) |
|
Macro for retrieving the length of a given section, in bytes.
- Parameters
-
[in] | section_name | Name of the section. |
#define NRF_SECTION_START_ADDR |
( |
|
section_name | ) |
|
Macro for obtaining the address of the beginning of a section.
param[in] section_name Name of the section.