Skip to content

Commit a89b86a

Browse files
npal-cycarlescufi
authored andcommitted
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 <[email protected]>
1 parent b6c6de3 commit a89b86a

File tree

4 files changed

+71
-3
lines changed

4 files changed

+71
-3
lines changed

modules/hal_infineon/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ if (CONFIG_SOC_FAMILY_INFINEON_CAT1A OR CONFIG_SOC_FAMILY_PSOC6)
1919
add_subdirectory(mtb-pdl-cat1)
2020
endif()
2121

22-
23-
2422
if (CONFIG_SOC_FAMILY_INFINEON_CAT1A)
2523
## Add mtb-hal-cat1 sources for CAT1 devices
2624
add_subdirectory(mtb-hal-cat1)
@@ -29,5 +27,9 @@ if (CONFIG_SOC_FAMILY_INFINEON_CAT1A)
2927
if(CONFIG_SOC_PSOC6_CM0P_IMAGE_SLEEP)
3028
add_subdirectory(cat1cm0p)
3129
endif()
30+
endif()
3231

32+
## Add btstack-integration for CYW43xx BT devices
33+
if (CONFIG_BT_CYW43XXX)
34+
add_subdirectory(btstack-integration)
3335
endif()
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Copyright (c) 2022 Cypress Semiconductor Corporation.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
set(hal_dir ${ZEPHYR_HAL_INFINEON_MODULE_DIR})
6+
set(hal_ble_dir ${hal_dir}/bluetooth-freertos)
7+
set(hal_blobs_dir ${hal_dir}/zephyr/blobs/img/bluetooth/firmware)
8+
set(blob_gen_inc_file ${ZEPHYR_BINARY_DIR}/include/generated/bt_firmware.hcd.inc)
9+
10+
#########################################################################################
11+
# BT firmware
12+
#########################################################################################
13+
# CYW43012 modules
14+
if(CONFIG_CYW43012_MURATA_1LV)
15+
set(blob_hcd_file ${hal_blobs_dir}/COMPONENT_43012/COMPONENT_MURATA-1LV/bt_firmware.hcd)
16+
endif()
17+
18+
# CYW4343W modules
19+
if(CONFIG_CYW4343W_MURATA_1DX)
20+
set(blob_hcd_file ${hal_blobs_dir}/COMPONENT_4343W/COMPONENT_MURATA-1DX/bt_firmware.hcd)
21+
endif()
22+
23+
# CYW43439 modules
24+
if(CONFIG_CYW43439_MURATA_1YN)
25+
set(blob_hcd_file ${hal_blobs_dir}/COMPONENT_43439/COMPONENT_MURATA-1YN/bt_firmware.hcd)
26+
endif()
27+
28+
# CYW4373 modules
29+
if(CONFIG_CYW4373_STERLING_LWB5PLUS)
30+
set(blob_hcd_file ${hal_blobs_dir}/COMPONENT_4373/COMPONENT_STERLING-LWB5plus/bt_firmware.hcd)
31+
endif()
32+
33+
# use user provided FIRMWARE HCD file (path must be defined in CONFIG_CYW43XX_CUSTOM_FIRMWARE_HCD_BLOB)
34+
if(CONFIG_CYW43XX_CUSTOM_FIRMWARE_HCD_BLOB)
35+
# Allowed to pass absolute path to HCD blob file, or relative path from Application folder.
36+
if(IS_ABSOLUTE ${CONFIG_CYW43XX_CUSTOM_FIRMWARE_HCD_BLOB})
37+
set(blob_hcd_file ${CONFIG_CYW43XX_CUSTOM_FIRMWARE_HCD_BLOB})
38+
else()
39+
set(blob_hcd_file ${APPLICATION_SOURCE_DIR}/${CONFIG_CYW43XX_CUSTOM_FIRMWARE_HCD_BLOB})
40+
endif()
41+
endif()
42+
43+
# generate Bluetooth include blob from HCD binary
44+
if(EXISTS ${blob_hcd_file})
45+
message(INFO " generate include of blob Bluetooth file: ${blob_hcd_file}")
46+
47+
generate_inc_file_for_target(app ${blob_hcd_file} ${blob_gen_inc_file})
48+
zephyr_library_sources(${CMAKE_CURRENT_SOURCE_DIR}/w_bt_firmware_controller.c)
49+
endif()
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/*
2+
* Copyright (c) 2023 Cypress Semiconductor Corporation.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <stdint.h>
8+
9+
const uint8_t brcm_patchram_format = 0x01;
10+
/* Configuration Data Records (Write_RAM) */
11+
#ifndef FW_DATBLOCK_SEPARATE_FROM_APPLICATION
12+
const uint8_t brcm_patchram_buf[] = {
13+
#include <bt_firmware.hcd.inc>
14+
};
15+
16+
const int brcm_patch_ram_length = sizeof(brcm_patchram_buf);
17+
#endif /* FW_DATBLOCK_SEPARATE_FROM_APPLICATION */

west.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ manifest:
7373
groups:
7474
- hal
7575
- name: hal_infineon
76-
revision: 8485083ad91d3e2cc5d706da3464716718a6a42e
76+
revision: 15d8a4278611fb2dc6ca52108c36ec1f4caab14e
7777
path: modules/hal/infineon
7878
groups:
7979
- hal

0 commit comments

Comments
 (0)