Commit graph

7 commits

Author SHA1 Message Date
Peter Mitsis 62db185d5b linker: tests: Use Z_LINK_ITERABLE_SUBALIGN
Updates the linker script fragments under 'tests' to use
Z_LINK_ITERABLE_SUBALIGN for the subalignment instead of
a hardcoded value of 4.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-04-20 13:45:25 -04:00
Christopher Friedt 28dccf236b tests: misc: iterable_sections: add named alternate tests
Add tests for the newly added
STRUCT_SECTION_ITERABLE_NAMED_ALTERNATE(). This type of
section should be iterated with
STRUCT_SECTION_FOREACH_ALTERNATE().

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-11-28 15:35:39 +01:00
Gerard Marull-Paretas dacb3dbfeb iterable_sections: move to specific header
Until now iterable sections APIs have been part of the toolchain
(common) headers. They are not strictly related to a toolchain, they
just rely on linker providing support for sections. Most files relied on
indirect includes to access the API, now, it is included as needed.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-22 10:42:30 +02:00
Gerard Marull-Paretas b8efac92e0 linker: add ITERABLE_SECTION_RA|OM_NUMERIC
In some cases, like devices, it is necessary to sort numerically, that
is, sort 10 before 2. Add a new helper function to do that, up to 2
numeric digits.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-12 12:01:10 +02:00
Gerard Marull-Paretas aae0fe8dab toolchain: add STRUCT_SECTION_ITERABLE_NAMED
Add a new API that allows to customize the name of an iterable section.
This allows to influence how section elements are sorted.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-12 12:01:10 +02:00
Chris Friedt 6841d96a59 tests: misc: iterable_sections: test alternate foreach
Add tests for `STRUCT_SECTION_FOREACH_ALTERNATE()`.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2023-03-06 13:52:29 +01:00
Fabio Baltieri 29585ee864 tests: iterable_sections: add a tests for iterable_sections
Add a test for iterable sections macro, covering read write and read
only sections.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2021-08-12 17:47:04 -04:00