modules: hal_infineon: Added support of BT controller fw blobs
- Added Cmakefiles for modules\hal_infineon\btstack-integration\, where handle generation of Bluetooth include blob from HCD binary. - Supported following device/modules: -- CYW43012/MURATA-1LV module -- CYW4343W/MURATA-1DX module -- CYW43439/MURATA-1YN module -- CYW4373/STERLING-LWB5plus module - Added possibility to use user provided BT Firmware HCD file via kconfig (path must be defined in CONFIG_CYW43XX_CUSTOM_FIRMWARE_HCD_BLOB) - Updated top makefile Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
This commit is contained in:
parent
b6c6de386c
commit
a89b86a99e
4 changed files with 72 additions and 4 deletions
|
@ -19,8 +19,6 @@ if (CONFIG_SOC_FAMILY_INFINEON_CAT1A OR CONFIG_SOC_FAMILY_PSOC6)
|
|||
add_subdirectory(mtb-pdl-cat1)
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
if (CONFIG_SOC_FAMILY_INFINEON_CAT1A)
|
||||
## Add mtb-hal-cat1 sources for CAT1 devices
|
||||
add_subdirectory(mtb-hal-cat1)
|
||||
|
@ -29,5 +27,9 @@ if (CONFIG_SOC_FAMILY_INFINEON_CAT1A)
|
|||
if(CONFIG_SOC_PSOC6_CM0P_IMAGE_SLEEP)
|
||||
add_subdirectory(cat1cm0p)
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
## Add btstack-integration for CYW43xx BT devices
|
||||
if (CONFIG_BT_CYW43XXX)
|
||||
add_subdirectory(btstack-integration)
|
||||
endif()
|
||||
|
|
49
modules/hal_infineon/btstack-integration/CMakeLists.txt
Normal file
49
modules/hal_infineon/btstack-integration/CMakeLists.txt
Normal file
|
@ -0,0 +1,49 @@
|
|||
# Copyright (c) 2022 Cypress Semiconductor Corporation.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set(hal_dir ${ZEPHYR_HAL_INFINEON_MODULE_DIR})
|
||||
set(hal_ble_dir ${hal_dir}/bluetooth-freertos)
|
||||
set(hal_blobs_dir ${hal_dir}/zephyr/blobs/img/bluetooth/firmware)
|
||||
set(blob_gen_inc_file ${ZEPHYR_BINARY_DIR}/include/generated/bt_firmware.hcd.inc)
|
||||
|
||||
#########################################################################################
|
||||
# BT firmware
|
||||
#########################################################################################
|
||||
# CYW43012 modules
|
||||
if(CONFIG_CYW43012_MURATA_1LV)
|
||||
set(blob_hcd_file ${hal_blobs_dir}/COMPONENT_43012/COMPONENT_MURATA-1LV/bt_firmware.hcd)
|
||||
endif()
|
||||
|
||||
# CYW4343W modules
|
||||
if(CONFIG_CYW4343W_MURATA_1DX)
|
||||
set(blob_hcd_file ${hal_blobs_dir}/COMPONENT_4343W/COMPONENT_MURATA-1DX/bt_firmware.hcd)
|
||||
endif()
|
||||
|
||||
# CYW43439 modules
|
||||
if(CONFIG_CYW43439_MURATA_1YN)
|
||||
set(blob_hcd_file ${hal_blobs_dir}/COMPONENT_43439/COMPONENT_MURATA-1YN/bt_firmware.hcd)
|
||||
endif()
|
||||
|
||||
# CYW4373 modules
|
||||
if(CONFIG_CYW4373_STERLING_LWB5PLUS)
|
||||
set(blob_hcd_file ${hal_blobs_dir}/COMPONENT_4373/COMPONENT_STERLING-LWB5plus/bt_firmware.hcd)
|
||||
endif()
|
||||
|
||||
# use user provided FIRMWARE HCD file (path must be defined in CONFIG_CYW43XX_CUSTOM_FIRMWARE_HCD_BLOB)
|
||||
if(CONFIG_CYW43XX_CUSTOM_FIRMWARE_HCD_BLOB)
|
||||
# Allowed to pass absolute path to HCD blob file, or relative path from Application folder.
|
||||
if(IS_ABSOLUTE ${CONFIG_CYW43XX_CUSTOM_FIRMWARE_HCD_BLOB})
|
||||
set(blob_hcd_file ${CONFIG_CYW43XX_CUSTOM_FIRMWARE_HCD_BLOB})
|
||||
else()
|
||||
set(blob_hcd_file ${APPLICATION_SOURCE_DIR}/${CONFIG_CYW43XX_CUSTOM_FIRMWARE_HCD_BLOB})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# generate Bluetooth include blob from HCD binary
|
||||
if(EXISTS ${blob_hcd_file})
|
||||
message(INFO " generate include of blob Bluetooth file: ${blob_hcd_file}")
|
||||
|
||||
generate_inc_file_for_target(app ${blob_hcd_file} ${blob_gen_inc_file})
|
||||
zephyr_library_sources(${CMAKE_CURRENT_SOURCE_DIR}/w_bt_firmware_controller.c)
|
||||
endif()
|
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
* Copyright (c) 2023 Cypress Semiconductor Corporation.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
const uint8_t brcm_patchram_format = 0x01;
|
||||
/* Configuration Data Records (Write_RAM) */
|
||||
#ifndef FW_DATBLOCK_SEPARATE_FROM_APPLICATION
|
||||
const uint8_t brcm_patchram_buf[] = {
|
||||
#include <bt_firmware.hcd.inc>
|
||||
};
|
||||
|
||||
const int brcm_patch_ram_length = sizeof(brcm_patchram_buf);
|
||||
#endif /* FW_DATBLOCK_SEPARATE_FROM_APPLICATION */
|
2
west.yml
2
west.yml
|
@ -73,7 +73,7 @@ manifest:
|
|||
groups:
|
||||
- hal
|
||||
- name: hal_infineon
|
||||
revision: 8485083ad91d3e2cc5d706da3464716718a6a42e
|
||||
revision: 15d8a4278611fb2dc6ca52108c36ec1f4caab14e
|
||||
path: modules/hal/infineon
|
||||
groups:
|
||||
- hal
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue