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