scripts: support compile_commands.json in gen_app_partitions.py
Fixes: #40590 This commit updates gen_app_partitions.py to include only files present in the current build by extracting the information from the CMake generated `compile_commands.json` file. This ensures that object files in sub-projects, such as `empty_cpu0`, will not be considered by the script. Using the compile_commands.json instead of walking the whole build tree for finding object files also improves performance: Time of executing `gen_app_partitions.py` (Old): __________________________ Executed in 480.06 millis usr time 425.83 millis sys time 49.55 millis Time of executing `gen_app_partitions.py` (New): ________________________________________________________ Executed in 76.22 millis usr time 49.00 millis sys time 24.59 millis Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit is contained in:
parent
5ec3cd68ff
commit
f643b8b369
3 changed files with 34 additions and 1 deletions
|
@ -880,7 +880,7 @@ if(CONFIG_USERSPACE)
|
|||
OUTPUT ${APP_SMEM_UNALIGNED_LD} ${APP_SMEM_PINNED_UNALIGNED_LD}
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
${ZEPHYR_BASE}/scripts/gen_app_partitions.py
|
||||
-d ${OBJ_FILE_DIR}
|
||||
-f ${CMAKE_BINARY_DIR}/compile_commands.json
|
||||
-o ${APP_SMEM_UNALIGNED_LD}
|
||||
$<$<BOOL:${APP_SMEM_PINNED_UNALIGNED_LD}>:--pinoutput=${APP_SMEM_PINNED_UNALIGNED_LD}>
|
||||
${APP_SMEM_PINNED_PARTITION_LIST_ARG}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue