File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed
Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,20 @@ project(app LANGUAGES C CXX)
1616
1717add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /blobs)
1818
19+ # Memory region relocation based on Kconfig
20+ # Relocate LLEXT heap if region specified
21+ if (NOT "${CONFIG_LLEXT_HEAP_REGION} " STREQUAL "" )
22+ zephyr_code_relocate(FILES ${ZEPHYR_BASE} /subsys/llext/llext_mem.c
23+ LOCATION ${CONFIG_LLEXT_HEAP_REGION} _BSS_NOINIT)
24+ endif ()
25+
26+ # Relocate main stack if region specified
27+ if (NOT "${CONFIG_MAIN_STACK_REGION} " STREQUAL "" )
28+ zephyr_code_relocate(FILES ${ZEPHYR_BASE} /kernel/init.c
29+ LOCATION ${CONFIG_MAIN_STACK_REGION} _BSS_NOINIT)
30+ endif ()
31+
32+
1933# for USB device stack NEXT
2034target_sources_ifdef(CONFIG_USB_DEVICE_STACK_NEXT app PRIVATE
2135 ${CMAKE_CURRENT_LIST_DIR} /../cores/arduino/usb_device_descriptor.c
Original file line number Diff line number Diff line change 1+ #
2+ # Copyright (c) 2025 Arduino
3+ #
4+ # SPDX-License-Identifier: Apache-2.0
5+ #
6+
7+ source "Kconfig.zephyr"
8+
9+ config LLEXT_HEAP_REGION
10+ string "LLEXT heap memory region"
11+ depends on CODE_DATA_RELOCATION
12+ help
13+ Specify the memory region for LLEXT heap.
14+
15+ config MAIN_STACK_REGION
16+ string "Main stack memory region"
17+ depends on CODE_DATA_RELOCATION
18+ help
19+ Specify the memory region for main stack.
You can’t perform that action at this time.
0 commit comments