Browse Source

docs: kernel: iterable_section: add #include to linker example

if you do not include #include <zephyr/linker/iterable_sections.h>
you will get a build error

Signed-off-by: Brandon Allen <bwallen1997@outlook.com>
pull/81535/head
Brandon Allen 8 months ago committed by Benjamin Cabé
parent
commit
4f46b38843
  1. 1
      doc/kernel/iterable_sections/index.rst

1
doc/kernel/iterable_sections/index.rst

@ -47,6 +47,7 @@ identifier, ``DATA_SECTIONS`` for RAM structures and ``SECTIONS`` for ROM ones. @@ -47,6 +47,7 @@ identifier, ``DATA_SECTIONS`` for RAM structures and ``SECTIONS`` for ROM ones.
.. code-block:: c
# iterables.ld
#include <zephyr/linker/iterable_sections.h>
ITERABLE_SECTION_RAM(my_data, 4)
The data can then be accessed using :c:macro:`STRUCT_SECTION_FOREACH`.

Loading…
Cancel
Save