From 4cebced2536b9b33b90d1e515d05c31ec1365556 Mon Sep 17 00:00:00 2001 From: Joel Holdsworth Date: Mon, 2 Jun 2025 14:53:34 -0700 Subject: [PATCH] doc: kernel: code-relocation: Document NOINIT memory type The `zephyr_code_relocate` now supports the NOINIT memory type in addition to DATA, TEXT and BSS. This patch documents its usage. Signed-off-by: Joel Holdsworth --- doc/kernel/code-relocation.rst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/doc/kernel/code-relocation.rst b/doc/kernel/code-relocation.rst index aa876797f4b..82f08d19a33 100644 --- a/doc/kernel/code-relocation.rst +++ b/doc/kernel/code-relocation.rst @@ -84,17 +84,18 @@ This section shows additional configuration options that can be set in zephyr_code_relocate(FILES src/file1.c LOCATION SRAM2) zephyr_code_relocate(FILES src/file2.c LOCATION SRAM) -* If the memory type is appended with ``_DATA``, ``_TEXT``, ``_RODATA`` or - ``_BSS``, only the selected memory is placed in the required memory region. - For example: +* If the memory type is appended with ``_DATA``, ``_TEXT``, ``_RODATA``, + ``_BSS`` or ``_NOINIT``, only the selected memory is placed in the required + memory region. For example: .. code-block:: none zephyr_code_relocate(FILES src/file1.c LOCATION SRAM2_DATA) zephyr_code_relocate(FILES src/file2.c LOCATION SRAM2_TEXT) -* Multiple regions can also be appended together such as: ``SRAM2_DATA_BSS``. - This will place data and bss inside ``SRAM2``. +* Multiple regions can also be appended together such as: + ``SRAM2_DATA_BSS_NOINIT``. This will place all data: value-initialized, + zero-initialized and uninitialized inside ``SRAM2``. * Multiple files can be passed to the ``FILES`` argument, or CMake generator expressions can be used to relocate a comma-separated list of files.