if(CONFIG_NXP_MONOLITHIC_WIFI OR CONFIG_NXP_MONOLITHIC_BT OR CONFIG_NXP_MONOLITHIC_IEEE802154) set(hal_blobs_dir ${ZEPHYR_HAL_NXP_MODULE_DIR}/zephyr/blobs/rw61x) set(signed_binary_blobs_list) set(binary_blobs_list) set(output_includes_list) if(CONFIG_NXP_MONOLITHIC_WIFI) list(APPEND output_includes_list ${ZEPHYR_BINARY_DIR}/include/generated/rw61x_wifi_fw.bin.inc) set(signed_binary_blob_name rw61x_sb_wifi_a2.bin) list(APPEND signed_binary_blobs_list ${hal_blobs_dir}/${signed_binary_blob_name}) zephyr_library_sources(${CMAKE_CURRENT_LIST_DIR}/rw61x_cpu1.c) endif() if(CONFIG_NXP_MONOLITHIC_IEEE802154) list(APPEND output_includes_list ${ZEPHYR_BINARY_DIR}/include/generated/rw61x_combo_fw.bin.inc) set(signed_binary_blob_name rw61x_sb_combo_a2.bin) list(APPEND signed_binary_blobs_list ${hal_blobs_dir}/${signed_binary_blob_name}) zephyr_library_sources(${CMAKE_CURRENT_LIST_DIR}/rw61x_cpu2.c) elseif(CONFIG_NXP_MONOLITHIC_BT) list(APPEND output_includes_list ${ZEPHYR_BINARY_DIR}/include/generated/rw61x_ble_fw.bin.inc) set(signed_binary_blob_name rw61x_sb_ble_a2.bin) list(APPEND signed_binary_blobs_list ${hal_blobs_dir}/${signed_binary_blob_name}) zephyr_library_sources(${CMAKE_CURRENT_LIST_DIR}/rw61x_cpu2.c) endif() list(LENGTH signed_binary_blobs_list count) math(EXPR count "${count}-1") foreach(i RANGE ${count}) list(GET signed_binary_blobs_list ${i} signed_binary_blob) if(EXISTS ${signed_binary_blob}) list(APPEND binary_blobs_list ${signed_binary_blob}) elseif(CONFIG_NXP_WIFI_BUILD_ONLY_MODE) message(WARNING "Couldn't find signed firmware ! ${signed_binary_blob}") list(APPEND binary_blobs_list "NOTFOUND") else() message(FATAL_ERROR "Couldn't find signed firmware ! ${signed_binary_blob}") endif() endforeach() list(LENGTH binary_blobs_list count) math(EXPR count "${count}-1") foreach(i RANGE ${count}) list(GET binary_blobs_list ${i} binary_blob) list(GET output_includes_list ${i} output_include) message(STATUS " generate include of binary blob: ${binary_blob}") if(${binary_blob} STREQUAL "NOTFOUND") file(TOUCH ${output_include}) else() generate_inc_file_for_target(${ZEPHYR_CURRENT_LIBRARY} ${binary_blob} ${output_include}) endif() endforeach() endif()