Skip to content

Commit 25dbf7c

Browse files
author
Jamie Smith
authored
Refactor CYW43xxx wi-fi driver to better work with CMake and move code out of the Portenta target folder (#292)
* Refactor Cypress WHD wifi & bluetooth drivers to work better with CMake and be vendor agnostic * Fix some missed changes that belong in the other branch * Fix build of Cypress targets that use the RTOS adapter. Make it possible to build Cypress targets in baremetal mode via CMake. * Try and fix check failures * Fix a couple unintentional changes
1 parent de882e6 commit 25dbf7c

File tree

107 files changed

+854
-3071
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+854
-3071
lines changed

cmsis/device/rtos/mbed_lib.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,6 @@
8686
"NUVOTON": {
8787
"idle-thread-stack-size-debug-extra": 512
8888
},
89-
"MCU_PSOC6_M4": {
90-
"target.macros_add": ["CY_RTOS_AWARE"]
91-
},
9289
"ARM_MUSCA_B1": {
9390
"mutex-num": 4
9491
},

connectivity/drivers/ble/FEATURE_BLE/COMPONENT_CYW43XXX/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ if("PSOC6" IN_LIST MBED_TARGET_LABELS)
55
add_subdirectory(TARGET_PSOC6)
66
endif()
77

8+
if("STM32H747_ARDUINO" IN_LIST MBED_TARGET_LABELS)
9+
add_subdirectory(TARGET_STM32H747_ARDUINO)
10+
endif()
11+
812
add_subdirectory(firmware)
913

1014
target_include_directories(mbed-ble
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# Copyright (c) 2020 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
add_subdirectory(firmware)
4+
target_sources(mbed-ble
5+
PRIVATE
6+
cy_bt_cordio_cfg.cpp
7+
)

connectivity/drivers/ble/FEATURE_BLE/COMPONENT_CYW43XXX/firmware/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ if("4343W" IN_LIST MBED_TARGET_LABELS)
1313
add_subdirectory(COMPONENT_4343W)
1414
endif()
1515

16+
if("4343W_FS" IN_LIST MBED_TARGET_LABELS)
17+
add_subdirectory(COMPONENT_4343W_FS)
18+
endif()
19+
1620
if("CYW9P62S1_43012EVB_01" IN_LIST MBED_TARGET_LABELS)
1721
add_subdirectory(TARGET_CYW9P62S1_43012EVB_01)
1822
endif()

connectivity/drivers/emac/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ elseif("Silicon_Labs" IN_LIST MBED_TARGET_LABELS)
3131
add_subdirectory(TARGET_Silicon_Labs)
3232
endif()
3333

34-
if("WHD" IN_LIST MBED_TARGET_LABELS)
35-
add_subdirectory(COMPONENT_WHD)
36-
endif()
37-
3834
target_link_libraries(mbed-emac
3935
PUBLIC
4036
mbed-netsocket-api
Lines changed: 8 additions & 141 deletions
Original file line numberDiff line numberDiff line change
@@ -1,144 +1,11 @@
11
# Copyright (c) 2020-2021 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
add_subdirectory(whd-bsp-integration EXCLUDE_FROM_ALL)
5-
6-
add_library(mbed-cy-psoc6-whd-43012 STATIC EXCLUDE_FROM_ALL)
7-
target_include_directories(mbed-cy-psoc6-whd-43012
8-
PUBLIC
9-
wifi-host-driver/resources/firmware/COMPONENT_43012
10-
)
11-
target_sources(mbed-cy-psoc6-whd-43012
12-
PRIVATE
13-
wifi-host-driver/resources/firmware/COMPONENT_43012/43012C0-mfgtest_bin.c
14-
wifi-host-driver/resources/firmware/COMPONENT_43012/43012C0-mfgtest_clm_blob.c
15-
wifi-host-driver/resources/firmware/COMPONENT_43012/43012C0_bin.c
16-
wifi-host-driver/resources/firmware/COMPONENT_43012/43012C0_clm_blob.c
17-
)
18-
19-
add_library(mbed-cy-psoc6-whd-43438 STATIC EXCLUDE_FROM_ALL)
20-
target_include_directories(mbed-cy-psoc6-whd-43438
21-
PUBLIC
22-
wifi-host-driver/resources/firmware/COMPONENT_43438
23-
)
24-
target_sources(mbed-cy-psoc6-whd-43438
25-
PRIVATE
26-
wifi-host-driver/resources/firmware/COMPONENT_43438/43438A1-mfgtest_bin.c
27-
wifi-host-driver/resources/firmware/COMPONENT_43438/43438A1-mfgtest_clm_blob.c
28-
wifi-host-driver/resources/firmware/COMPONENT_43438/43438A1_bin.c
29-
wifi-host-driver/resources/firmware/COMPONENT_43438/43438A1_clm_blob.c
30-
)
31-
32-
add_library(mbed-cy-psoc6-whd-4343w STATIC EXCLUDE_FROM_ALL)
33-
target_include_directories(mbed-cy-psoc6-whd-4343w
34-
PUBLIC
35-
wifi-host-driver/resources/firmware/COMPONENT_4343W
36-
)
37-
target_sources(mbed-cy-psoc6-whd-4343w
38-
PRIVATE
39-
wifi-host-driver/resources/firmware/COMPONENT_4343W/4343WA1-mfgtest_bin.c
40-
wifi-host-driver/resources/firmware/COMPONENT_4343W/4343WA1-mfgtest_clm_blob.c
41-
wifi-host-driver/resources/firmware/COMPONENT_4343W/4343WA1_bin.c
42-
wifi-host-driver/resources/firmware/COMPONENT_4343W/4343WA1_clm_blob.c
43-
)
44-
45-
add_library(mbed-cy8ckit-062s2-43012-whd INTERFACE)
46-
target_include_directories(mbed-cy8ckit-062s2-43012-whd INTERFACE wifi-host-driver/resources/nvram/TARGET_CY8CKIT_062S2_43012)
47-
48-
add_library(mbed-cy8ckit-062s2-4343w-whd INTERFACE)
49-
target_include_directories(mbed-cy8ckit-062s2-4343w-whd INTERFACE wifi-host-driver/resources/nvram/TARGET_CY8CKIT_062S2_4343W)
50-
51-
add_library(mbed-cy8ckit-062-4343w-whd INTERFACE)
52-
target_include_directories(mbed-cy8ckit-062-4343w-whd INTERFACE wifi-host-driver/resources/nvram/TARGET_CY8CKIT_062_4343W)
53-
54-
add_library(mbed-cy8ckit-062-wifi-bt-whd INTERFACE)
55-
target_include_directories(mbed-cy8ckit-062-wifi-bt-whd INTERFACE wifi-host-driver/resources/nvram/TARGET_CY8CKIT_062_WIFI_BT)
56-
57-
add_library(mbed-cy8ckit-064s1-4343w-whd INTERFACE)
58-
target_include_directories(mbed-cy8ckit-064s1-4343w-whd INTERFACE wifi-host-driver/resources/nvram/TARGET_CY8CKIT_064S1_4343W)
59-
60-
add_library(mbed-cy8ckit-064s2-4343w-whd INTERFACE)
61-
target_include_directories(mbed-cy8ckit-064s2-4343w-whd INTERFACE wifi-host-driver/resources/nvram/TARGET_CY8CKIT_064S2_4343W)
62-
63-
add_library(mbed-cy8cmod-062s2-43012-whd INTERFACE)
64-
target_include_directories(mbed-cy8cmod-062s2-43012-whd INTERFACE wifi-host-driver/resources/nvram/TARGET_CY8CMOD_062S2_43012)
65-
66-
add_library(mbed-cy8cmod-062s3-4343w-whd INTERFACE)
67-
target_include_directories(mbed-cy8cmod-062s3-4343w-whd INTERFACE wifi-host-driver/resources/nvram/TARGET_CY8CMOD_062S3_4343W)
68-
69-
add_library(mbed-cy8cmod-062-4343w-whd INTERFACE)
70-
target_include_directories(mbed-cy8cmod-062-4343w-whd INTERFACE wifi-host-driver/resources/nvram/TARGET_CY8CMOD_062_4343W)
71-
72-
add_library(mbed-cy8cproto-062s3-4343w-whd INTERFACE)
73-
target_include_directories(mbed-cy8cproto-062s3-4343w-whd INTERFACE wifi-host-driver/resources/nvram/TARGET_CY8CPROTO_062S3_4343W)
74-
75-
add_library(mbed-cy8cproto-062-4343w-whd INTERFACE)
76-
target_include_directories(mbed-cy8cproto-062-4343w-whd INTERFACE wifi-host-driver/resources/nvram/TARGET_CY8CPROTO_062_4343W)
77-
78-
add_library(mbed-cytfm-064b0s2-4343w-whd INTERFACE)
79-
target_include_directories(mbed-cytfm-064b0s2-4343w-whd INTERFACE wifi-host-driver/resources/nvram/TARGET_CYTFM_064B0S2_4343W)
80-
81-
add_library(mbed-cyw943012p6evb-01-whd INTERFACE)
82-
target_include_directories(mbed-cyw943012p6evb-01-whd INTERFACE wifi-host-driver/resources/nvram/TARGET_CYW943012P6EVB_01)
83-
84-
add_library(mbed-cyw943012wcd2-whd INTERFACE)
85-
target_include_directories(mbed-cyw943012wcd2-whd INTERFACE wifi-host-driver/resources/nvram/TARGET_CYW943012WCD2)
86-
87-
add_library(mbed-cyw9p62s1-43012car-01-whd INTERFACE)
88-
target_include_directories(mbed-cyw9p62s1-43012car-01-whd INTERFACE wifi-host-driver/resources/nvram/TARGET_CYW9P62S1_43012CAR_01)
89-
90-
add_library(mbed-cyw9p62s1-43012evb-01-whd INTERFACE)
91-
target_include_directories(mbed-cyw9p62s1-43012evb-01-whd INTERFACE wifi-host-driver/resources/nvram/TARGET_CYW9P62S1_43012EVB_01)
92-
93-
add_library(mbed-cyw9p62s1-43438evb-01-whd INTERFACE)
94-
target_include_directories(mbed-cyw9p62s1-43438evb-01-whd INTERFACE wifi-host-driver/resources/nvram/TARGET_CYW9P62S1_43438EVB_01)
95-
96-
add_library(mbed-cy8ckit-064b0s2-4343w-whd INTERFACE)
97-
target_include_directories(mbed-cy8ckit-064b0s2-4343w-whd INTERFACE wifi-host-driver/resources/nvram/TARGET_CY8CKIT_064B0S2_4343W)
98-
99-
100-
add_library(mbed-cy-psoc6-whd STATIC EXCLUDE_FROM_ALL)
101-
102-
target_include_directories(mbed-cy-psoc6-whd
103-
PUBLIC
104-
wifi-host-driver
105-
wifi-host-driver/inc
106-
wifi-host-driver/resources/resource_imp
107-
wifi-host-driver/src
108-
wifi-host-driver/src/include
109-
wifi-host-driver/src/bus_protocols
110-
)
111-
112-
target_sources(mbed-cy-psoc6-whd
113-
PRIVATE
114-
wifi-host-driver/resources/resource_imp/whd_resources.c
115-
116-
wifi-host-driver/src/whd_ap.c
117-
wifi-host-driver/src/whd_buffer_api.c
118-
wifi-host-driver/src/whd_cdc_bdc.c
119-
wifi-host-driver/src/whd_chip.c
120-
wifi-host-driver/src/whd_chip_constants.c
121-
wifi-host-driver/src/whd_clm.c
122-
wifi-host-driver/src/whd_debug.c
123-
wifi-host-driver/src/whd_events.c
124-
wifi-host-driver/src/whd_logging.c
125-
wifi-host-driver/src/whd_management.c
126-
wifi-host-driver/src/whd_network_if.c
127-
wifi-host-driver/src/whd_resource_if.c
128-
wifi-host-driver/src/whd_sdpcm.c
129-
wifi-host-driver/src/whd_thread.c
130-
wifi-host-driver/src/whd_utils.c
131-
wifi-host-driver/src/whd_wifi.c
132-
wifi-host-driver/src/whd_wifi_api.c
133-
wifi-host-driver/src/whd_wifi_p2p.c
134-
135-
wifi-host-driver/src/bus_protocols/whd_bus.c
136-
wifi-host-driver/src/bus_protocols/whd_bus_common.c
137-
wifi-host-driver/src/bus_protocols/whd_bus_sdio_protocol.c
138-
wifi-host-driver/src/bus_protocols/whd_bus_spi_protocol.c
139-
)
140-
141-
target_compile_definitions(mbed-cy-psoc6-whd
142-
PUBLIC
143-
MBED_CONF_CY_PSOC6_WHD_PRESENT=1
144-
)
4+
# If not running on a Cypress chip, we need to build the CyHAL support library.
5+
if(NOT "Cypress" IN_LIST MBED_TARGET_LABELS)
6+
add_subdirectory(minimal-cyhal)
7+
endif()
8+
9+
add_subdirectory(whd-bsp-integration)
10+
add_subdirectory(wifi-host-driver)
11+
add_subdirectory(whd_mac)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cy_psoc6_whd",
33
"config": {
4-
"present": 1
4+
"present": 1
55
}
66
}

0 commit comments

Comments
 (0)