-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathsysbuild.cmake
More file actions
55 lines (45 loc) · 1.87 KB
/
sysbuild.cmake
File metadata and controls
55 lines (45 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#
# Copyright (c) 2025 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#
if("matter" IN_LIST SNIPPET)
# Set the matter-application-core snippet for the application core.
if(NOT "matter-application-core" IN_LIST ${DEFAULT_IMAGE}_SNIPPET)
set(${DEFAULT_IMAGE}_SNIPPET ${${DEFAULT_IMAGE}_SNIPPET} matter-application-core CACHE STRING "" FORCE)
endif()
# Set the matter-network-core snippet for devices that support network core.
if(SB_CONFIG_NRF_DEFAULT_IPC_RADIO)
if(NOT "matter-network-core" IN_LIST ipc_radio_SNIPPET)
set(ipc_radio_SNIPPET ${ipc_radio_SNIPPET} matter-network-core CACHE STRING "" FORCE)
endif()
endif()
endif()
if("uwb_qm35_dfu" IN_LIST SNIPPET)
set(PM_STATIC_YML_FILE ${CMAKE_CURRENT_LIST_DIR}/pm_static_${NORMALIZED_BOARD_TARGET}_uwb_dfu.yml CACHE INTERNAL "")
# Set the uwb_qm35_dfu_app for app image
if(NOT "uwb_qm35_dfu_app" IN_LIST ${DEFAULT_IMAGE}_SNIPPET)
set(${DEFAULT_IMAGE}_SNIPPET ${${DEFAULT_IMAGE}_SNIPPET} uwb_qm35_dfu_app CACHE STRING "" FORCE)
endif()
if(DEFINED QM35_IMAGE_PATH)
set(ext_fw "${QM35_IMAGE_PATH}")
else()
set(ext_fw "${ZEPHYR_NRFCONNECT_SDK_QORVO_MODULE_DIR}/firmware/qm35825.bin")
endif()
if(DEFINED QM35_IMAGE_VERSION)
set(ext_fw_version "${QM35_IMAGE_VERSION}")
else()
find_package(Python3 REQUIRED COMPONENTS Interpreter)
set(version_mapping_script
${CMAKE_CURRENT_LIST_DIR}/src/aliro/platform/uwb_impl/uwb_qm35_impl/scripts/map_qm35_version.py)
execute_process(COMMAND python3 ${version_mapping_script} ${ext_fw} OUTPUT_VARIABLE ext_fw_version OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
include(${ZEPHYR_NRF_MODULE_DIR}/cmake/dfu_extra.cmake)
add_custom_target(ext_fw_target DEPENDS ${ext_fw})
dfu_extra_add_binary(
BINARY_PATH ${ext_fw}
NAME "qm35_fw"
VERSION ${ext_fw_version}
DEPENDS ext_fw_target
)
endif()