Skip to content

Commit 79f063e

Browse files
pdgendtfabiobaltieri
authored andcommitted
doc: connectivity: networking: Update CMake linker info to CoAP server
Add missing entry to the documentation to also support CMake linker generator with CoAP services. Update hard coded value with linker script defined value. Signed-off-by: Pieter De Gendt <[email protected]>
1 parent cbe0abf commit 79f063e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

doc/connectivity/networking/api/coap_server.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,21 @@ prefixed with ``coap_resource_`` and added to a linker file:
3434
3535
#include <zephyr/linker/iterable_sections.h>
3636
37-
ITERABLE_SECTION_RAM(coap_resource_my_service, 4)
37+
ITERABLE_SECTION_RAM(coap_resource_my_service, Z_LINK_ITERABLE_SUBALIGN)
3838
3939
Add this linker file to your application using CMake:
4040

4141
.. code-block:: cmake
4242
:caption: ``CMakeLists.txt``
4343
44+
# Support LD linker template
4445
zephyr_linker_sources(DATA_SECTIONS sections-ram.ld)
4546
47+
# Support CMake linker generator
48+
zephyr_iterable_section(NAME coap_resource_my_service
49+
GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT}
50+
SUBALIGN ${CONFIG_LINKER_ITERABLE_SUBALIGN})
51+
4652
You can now define your service as part of the application:
4753

4854
.. code-block:: c

0 commit comments

Comments
 (0)