From 79f063e81bd810ff824e6dadfce3bd3110251e03 Mon Sep 17 00:00:00 2001 From: Pieter De Gendt Date: Wed, 2 Oct 2024 08:41:23 +0200 Subject: [PATCH] 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 --- doc/connectivity/networking/api/coap_server.rst | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/connectivity/networking/api/coap_server.rst b/doc/connectivity/networking/api/coap_server.rst index 1666880f2fc..04498098818 100644 --- a/doc/connectivity/networking/api/coap_server.rst +++ b/doc/connectivity/networking/api/coap_server.rst @@ -34,15 +34,21 @@ prefixed with ``coap_resource_`` and added to a linker file: #include - ITERABLE_SECTION_RAM(coap_resource_my_service, 4) + ITERABLE_SECTION_RAM(coap_resource_my_service, Z_LINK_ITERABLE_SUBALIGN) Add this linker file to your application using CMake: .. code-block:: cmake :caption: ``CMakeLists.txt`` + # Support LD linker template zephyr_linker_sources(DATA_SECTIONS sections-ram.ld) + # Support CMake linker generator + zephyr_iterable_section(NAME coap_resource_my_service + GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} + SUBALIGN ${CONFIG_LINKER_ITERABLE_SUBALIGN}) + You can now define your service as part of the application: .. code-block:: c