@ -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/file1.c LOCATION SRAM2)
zephyr_code_relocate(FILES src/file2.c LOCATION SRAM)
zephyr_code_relocate(FILES src/file2.c LOCATION SRAM)
* If the memory type is appended with `` _DATA `` , `` _TEXT `` , `` _RODATA `` or
* If the memory type is appended with `` _DATA `` , `` _TEXT `` , `` _RODATA `` ,
`` _BSS `` , only the selected memory is placed in the required memory region.
`` _BSS `` or `` _NOINIT `` , only the selected memory is placed in the required
For example:
memory region. For example:
.. code-block :: none
.. code-block :: none
zephyr_code_relocate(FILES src/file1.c LOCATION SRAM2_DATA)
zephyr_code_relocate(FILES src/file1.c LOCATION SRAM2_DATA)
zephyr_code_relocate(FILES src/file2.c LOCATION SRAM2_TEXT)
zephyr_code_relocate(FILES src/file2.c LOCATION SRAM2_TEXT)
* Multiple regions can also be appended together such as: `` SRAM2_DATA_BSS `` .
* Multiple regions can also be appended together such as:
This will place data and bss inside `` SRAM2 `` .
`` 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
* Multiple files can be passed to the `` FILES `` argument, or CMake generator
expressions can be used to relocate a comma-separated list of files.
expressions can be used to relocate a comma-separated list of files.