Placement of code and data in special sections.
More...
Placement of code and data in special sections.
SoCs that need code to run while flash is unavailable select CONFIG_RAMFUNC, which adds a .ramfunc section loaded from flash and copied to RAM at boot. Without it these markers are no-ops and everything stays in flash.
}
#define PBL_SECTION_RAM_RODATA
Place the constant in RAM, for tables used by PBL_SECTION_RAM functions.
Definition section.h:42
#define PBL_SECTION_RAM
Run the function from RAM; also prevents inlining it into flash code.
Definition section.h:41
◆ PBL_ITERABLE_SECTION
| #define PBL_ITERABLE_SECTION |
( |
|
type, |
|
|
|
tag, |
|
|
|
key |
|
) |
| PBL_USED PBL_ALIGNED(alignof(type)) PBL_SECTION_IMPL(".i_" #tag "." key) |
Add the object to an iterable section, a table gathered at link time from any file.
Where the firmware linker script gathers the section, the entries are sorted by key, or kept in link order if the section is registered as unsorted; elsewhere they come in no particular order. The section is registered with pbl_iterable_section() in CMake, and may be empty. Objects must be constant.
...
}
#define PBL_ITERABLE_SECTION(type, tag, key)
Add the object to an iterable section, a table gathered at link time from any file.
Definition section.h:124
#define PBL_ITERABLE_SECTION_FOREACH(type, tag, var)
Loop over the entries of an iterable section.
Definition section.h:104
#define PBL_ITERABLE_SECTION_DECLARE(type, tag)
Declare the bounds of an iterable section.
Definition section.h:126
- Parameters
-
| type | Type of the entries. |
| tag | Table name, a C identifier of at most 14 characters. Its section is named after it with an i_ prefix, which fits the 16 characters Mach-O allows. |
| key | Sort key, a string. |
◆ PBL_ITERABLE_SECTION_DECLARE
| #define PBL_ITERABLE_SECTION_DECLARE |
( |
|
type, |
|
|
|
tag |
|
) |
| |
Value:
#define PBL_ITERABLE_SECTION_END(tag)
End of an iterable section declared with PBL_ITERABLE_SECTION_DECLARE.
Definition section.h:94
#define PBL_ITERABLE_SECTION_START(tag)
First entry of an iterable section declared with PBL_ITERABLE_SECTION_DECLARE.
Definition section.h:86
Declare the bounds of an iterable section.
- Parameters
-
| type | Type of the entries. |
| tag | Section name. |
◆ PBL_ITERABLE_SECTION_END
| #define PBL_ITERABLE_SECTION_END |
( |
|
tag | ) |
__stop_i_##tag |
◆ PBL_ITERABLE_SECTION_FOREACH
Loop over the entries of an iterable section.
- Parameters
-
| type | Type of the entries. |
| tag | Section name. |
| var | Name of the loop variable, a pointer to the entry. |
◆ PBL_ITERABLE_SECTION_START
| #define PBL_ITERABLE_SECTION_START |
( |
|
tag | ) |
__start_i_##tag |
◆ PBL_SECTION_RAM
Run the function from RAM; also prevents inlining it into flash code.
◆ PBL_SECTION_RAM_RODATA
| #define PBL_SECTION_RAM_RODATA |