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 <pieter.degendt@basalte.be>
This commit is contained in:
parent
cbe0abfd00
commit
79f063e81b
|
@ -34,15 +34,21 @@ prefixed with ``coap_resource_`` and added to a linker file:
|
||||||
|
|
||||||
#include <zephyr/linker/iterable_sections.h>
|
#include <zephyr/linker/iterable_sections.h>
|
||||||
|
|
||||||
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:
|
Add this linker file to your application using CMake:
|
||||||
|
|
||||||
.. code-block:: cmake
|
.. code-block:: cmake
|
||||||
:caption: ``CMakeLists.txt``
|
:caption: ``CMakeLists.txt``
|
||||||
|
|
||||||
|
# Support LD linker template
|
||||||
zephyr_linker_sources(DATA_SECTIONS sections-ram.ld)
|
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:
|
You can now define your service as part of the application:
|
||||||
|
|
||||||
.. code-block:: c
|
.. code-block:: c
|
||||||
|
|
Loading…
Reference in New Issue