zephyr/modules/hal_nxp/bt_controller/CMakeLists.txt
Lyle Zhu 6c01c0c13a module: hal_nxp: bt_controller: Verify if Blob is valid
Use zephyr_blobs_verify to check the blob file is valid
or not.

The function zephyr_blobs_verify will check if the file
exists. And it checks if the file is valid.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-06-13 05:45:36 -04:00

21 lines
624 B
CMake

#
# Copyright 2024 NXP
#
# SPDX-License-Identifier: Apache-2.0
#
set(hal_nxp_dir ${ZEPHYR_HAL_NXP_MODULE_DIR})
set(hal_nxp_blobs_dir ${hal_nxp_dir}/zephyr/blobs)
set(blob_gen_file ${ZEPHYR_BINARY_DIR}/include/generated/bt_nxp_ctlr_fw.h)
if(CONFIG_BT_NXP_NW612)
set(blob_file ${hal_nxp_blobs_dir}/iw612/uart_nw61x_se.h)
endif()
if (NOT DEFINED blob_file)
message(FATAL_ERROR "Unsupported controller. Please select a BT conntroller, refer to ./driver/bluetooth/hci/Kconfig.nxp")
endif()
zephyr_blobs_verify(FILES ${blob_file} REQUIRED)
configure_file(${blob_file} ${blob_gen_file} COPYONLY)