diff --git a/doc/kernel/code-relocation.rst b/doc/kernel/code-relocation.rst index 599cdedccbd..73633c2f40e 100644 --- a/doc/kernel/code-relocation.rst +++ b/doc/kernel/code-relocation.rst @@ -135,13 +135,21 @@ Relocating libraries Libraries can be relocated using the LIBRARY argument to ``zephyr_code_relocation()`` with the library name. For example, the following -snippet will relocate kernel code to ITCM and serial drivers to SRAM2: +snippet will relocate serial drivers to SRAM2: .. code-block:: none - zephyr_code_relocate(LIBRARY kernel LOCATION ITCM_TEXT) zephyr_code_relocate(LIBRARY drivers__serial LOCATION SRAM2) +Tips +==== + +Take care if relocating kernel/arch files, some contain early initialization +code that executes before code relocation takes place. + +Additional MPU/MMU configuration may be required to ensure that the +destination memory region is configured to allow code execution. + Samples/ Tests ==============