forked from ARMmbed/mbed-os
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor CYW43xxx wi-fi driver to better work with CMake and move cod…
…e 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
- Loading branch information
1 parent
de882e6
commit 25dbf7c
Showing
107 changed files
with
854 additions
and
3,071 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
...ENTA_H7/COMPONENT_CYW43XXX/CMakeLists.txt → ...X/TARGET_STM32H747_ARDUINO/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
# Copyright (c) 2020 ARM Limited. All rights reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
add_subdirectory(firmware) | ||
target_sources(mbed-ble | ||
PRIVATE | ||
cy_bt_cordio_cfg.cpp | ||
) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,144 +1,11 @@ | ||
# Copyright (c) 2020-2021 ARM Limited. All rights reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
add_subdirectory(whd-bsp-integration EXCLUDE_FROM_ALL) | ||
|
||
add_library(mbed-cy-psoc6-whd-43012 STATIC EXCLUDE_FROM_ALL) | ||
target_include_directories(mbed-cy-psoc6-whd-43012 | ||
PUBLIC | ||
wifi-host-driver/resources/firmware/COMPONENT_43012 | ||
) | ||
target_sources(mbed-cy-psoc6-whd-43012 | ||
PRIVATE | ||
wifi-host-driver/resources/firmware/COMPONENT_43012/43012C0-mfgtest_bin.c | ||
wifi-host-driver/resources/firmware/COMPONENT_43012/43012C0-mfgtest_clm_blob.c | ||
wifi-host-driver/resources/firmware/COMPONENT_43012/43012C0_bin.c | ||
wifi-host-driver/resources/firmware/COMPONENT_43012/43012C0_clm_blob.c | ||
) | ||
|
||
add_library(mbed-cy-psoc6-whd-43438 STATIC EXCLUDE_FROM_ALL) | ||
target_include_directories(mbed-cy-psoc6-whd-43438 | ||
PUBLIC | ||
wifi-host-driver/resources/firmware/COMPONENT_43438 | ||
) | ||
target_sources(mbed-cy-psoc6-whd-43438 | ||
PRIVATE | ||
wifi-host-driver/resources/firmware/COMPONENT_43438/43438A1-mfgtest_bin.c | ||
wifi-host-driver/resources/firmware/COMPONENT_43438/43438A1-mfgtest_clm_blob.c | ||
wifi-host-driver/resources/firmware/COMPONENT_43438/43438A1_bin.c | ||
wifi-host-driver/resources/firmware/COMPONENT_43438/43438A1_clm_blob.c | ||
) | ||
|
||
add_library(mbed-cy-psoc6-whd-4343w STATIC EXCLUDE_FROM_ALL) | ||
target_include_directories(mbed-cy-psoc6-whd-4343w | ||
PUBLIC | ||
wifi-host-driver/resources/firmware/COMPONENT_4343W | ||
) | ||
target_sources(mbed-cy-psoc6-whd-4343w | ||
PRIVATE | ||
wifi-host-driver/resources/firmware/COMPONENT_4343W/4343WA1-mfgtest_bin.c | ||
wifi-host-driver/resources/firmware/COMPONENT_4343W/4343WA1-mfgtest_clm_blob.c | ||
wifi-host-driver/resources/firmware/COMPONENT_4343W/4343WA1_bin.c | ||
wifi-host-driver/resources/firmware/COMPONENT_4343W/4343WA1_clm_blob.c | ||
) | ||
|
||
add_library(mbed-cy8ckit-062s2-43012-whd INTERFACE) | ||
target_include_directories(mbed-cy8ckit-062s2-43012-whd INTERFACE wifi-host-driver/resources/nvram/TARGET_CY8CKIT_062S2_43012) | ||
|
||
add_library(mbed-cy8ckit-062s2-4343w-whd INTERFACE) | ||
target_include_directories(mbed-cy8ckit-062s2-4343w-whd INTERFACE wifi-host-driver/resources/nvram/TARGET_CY8CKIT_062S2_4343W) | ||
|
||
add_library(mbed-cy8ckit-062-4343w-whd INTERFACE) | ||
target_include_directories(mbed-cy8ckit-062-4343w-whd INTERFACE wifi-host-driver/resources/nvram/TARGET_CY8CKIT_062_4343W) | ||
|
||
add_library(mbed-cy8ckit-062-wifi-bt-whd INTERFACE) | ||
target_include_directories(mbed-cy8ckit-062-wifi-bt-whd INTERFACE wifi-host-driver/resources/nvram/TARGET_CY8CKIT_062_WIFI_BT) | ||
|
||
add_library(mbed-cy8ckit-064s1-4343w-whd INTERFACE) | ||
target_include_directories(mbed-cy8ckit-064s1-4343w-whd INTERFACE wifi-host-driver/resources/nvram/TARGET_CY8CKIT_064S1_4343W) | ||
|
||
add_library(mbed-cy8ckit-064s2-4343w-whd INTERFACE) | ||
target_include_directories(mbed-cy8ckit-064s2-4343w-whd INTERFACE wifi-host-driver/resources/nvram/TARGET_CY8CKIT_064S2_4343W) | ||
|
||
add_library(mbed-cy8cmod-062s2-43012-whd INTERFACE) | ||
target_include_directories(mbed-cy8cmod-062s2-43012-whd INTERFACE wifi-host-driver/resources/nvram/TARGET_CY8CMOD_062S2_43012) | ||
|
||
add_library(mbed-cy8cmod-062s3-4343w-whd INTERFACE) | ||
target_include_directories(mbed-cy8cmod-062s3-4343w-whd INTERFACE wifi-host-driver/resources/nvram/TARGET_CY8CMOD_062S3_4343W) | ||
|
||
add_library(mbed-cy8cmod-062-4343w-whd INTERFACE) | ||
target_include_directories(mbed-cy8cmod-062-4343w-whd INTERFACE wifi-host-driver/resources/nvram/TARGET_CY8CMOD_062_4343W) | ||
|
||
add_library(mbed-cy8cproto-062s3-4343w-whd INTERFACE) | ||
target_include_directories(mbed-cy8cproto-062s3-4343w-whd INTERFACE wifi-host-driver/resources/nvram/TARGET_CY8CPROTO_062S3_4343W) | ||
|
||
add_library(mbed-cy8cproto-062-4343w-whd INTERFACE) | ||
target_include_directories(mbed-cy8cproto-062-4343w-whd INTERFACE wifi-host-driver/resources/nvram/TARGET_CY8CPROTO_062_4343W) | ||
|
||
add_library(mbed-cytfm-064b0s2-4343w-whd INTERFACE) | ||
target_include_directories(mbed-cytfm-064b0s2-4343w-whd INTERFACE wifi-host-driver/resources/nvram/TARGET_CYTFM_064B0S2_4343W) | ||
|
||
add_library(mbed-cyw943012p6evb-01-whd INTERFACE) | ||
target_include_directories(mbed-cyw943012p6evb-01-whd INTERFACE wifi-host-driver/resources/nvram/TARGET_CYW943012P6EVB_01) | ||
|
||
add_library(mbed-cyw943012wcd2-whd INTERFACE) | ||
target_include_directories(mbed-cyw943012wcd2-whd INTERFACE wifi-host-driver/resources/nvram/TARGET_CYW943012WCD2) | ||
|
||
add_library(mbed-cyw9p62s1-43012car-01-whd INTERFACE) | ||
target_include_directories(mbed-cyw9p62s1-43012car-01-whd INTERFACE wifi-host-driver/resources/nvram/TARGET_CYW9P62S1_43012CAR_01) | ||
|
||
add_library(mbed-cyw9p62s1-43012evb-01-whd INTERFACE) | ||
target_include_directories(mbed-cyw9p62s1-43012evb-01-whd INTERFACE wifi-host-driver/resources/nvram/TARGET_CYW9P62S1_43012EVB_01) | ||
|
||
add_library(mbed-cyw9p62s1-43438evb-01-whd INTERFACE) | ||
target_include_directories(mbed-cyw9p62s1-43438evb-01-whd INTERFACE wifi-host-driver/resources/nvram/TARGET_CYW9P62S1_43438EVB_01) | ||
|
||
add_library(mbed-cy8ckit-064b0s2-4343w-whd INTERFACE) | ||
target_include_directories(mbed-cy8ckit-064b0s2-4343w-whd INTERFACE wifi-host-driver/resources/nvram/TARGET_CY8CKIT_064B0S2_4343W) | ||
|
||
|
||
add_library(mbed-cy-psoc6-whd STATIC EXCLUDE_FROM_ALL) | ||
|
||
target_include_directories(mbed-cy-psoc6-whd | ||
PUBLIC | ||
wifi-host-driver | ||
wifi-host-driver/inc | ||
wifi-host-driver/resources/resource_imp | ||
wifi-host-driver/src | ||
wifi-host-driver/src/include | ||
wifi-host-driver/src/bus_protocols | ||
) | ||
|
||
target_sources(mbed-cy-psoc6-whd | ||
PRIVATE | ||
wifi-host-driver/resources/resource_imp/whd_resources.c | ||
|
||
wifi-host-driver/src/whd_ap.c | ||
wifi-host-driver/src/whd_buffer_api.c | ||
wifi-host-driver/src/whd_cdc_bdc.c | ||
wifi-host-driver/src/whd_chip.c | ||
wifi-host-driver/src/whd_chip_constants.c | ||
wifi-host-driver/src/whd_clm.c | ||
wifi-host-driver/src/whd_debug.c | ||
wifi-host-driver/src/whd_events.c | ||
wifi-host-driver/src/whd_logging.c | ||
wifi-host-driver/src/whd_management.c | ||
wifi-host-driver/src/whd_network_if.c | ||
wifi-host-driver/src/whd_resource_if.c | ||
wifi-host-driver/src/whd_sdpcm.c | ||
wifi-host-driver/src/whd_thread.c | ||
wifi-host-driver/src/whd_utils.c | ||
wifi-host-driver/src/whd_wifi.c | ||
wifi-host-driver/src/whd_wifi_api.c | ||
wifi-host-driver/src/whd_wifi_p2p.c | ||
|
||
wifi-host-driver/src/bus_protocols/whd_bus.c | ||
wifi-host-driver/src/bus_protocols/whd_bus_common.c | ||
wifi-host-driver/src/bus_protocols/whd_bus_sdio_protocol.c | ||
wifi-host-driver/src/bus_protocols/whd_bus_spi_protocol.c | ||
) | ||
|
||
target_compile_definitions(mbed-cy-psoc6-whd | ||
PUBLIC | ||
MBED_CONF_CY_PSOC6_WHD_PRESENT=1 | ||
) | ||
# If not running on a Cypress chip, we need to build the CyHAL support library. | ||
if(NOT "Cypress" IN_LIST MBED_TARGET_LABELS) | ||
add_subdirectory(minimal-cyhal) | ||
endif() | ||
|
||
add_subdirectory(whd-bsp-integration) | ||
add_subdirectory(wifi-host-driver) | ||
add_subdirectory(whd_mac) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "cy_psoc6_whd", | ||
"config": { | ||
"present": 1 | ||
"present": 1 | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
connectivity/drivers/wifi/COMPONENT_WHD/minimal-cyhal/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Copyright (c) 2024 ARM Limited. All rights reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# In order to use the Cypress WHD driver, we need some level of Cypress HAL functionality available. | ||
# However, for non-Cypress chips, these functions aren't available from the target code. | ||
# This directory contains a minimal implementation of Cypress HAL designed to work on generic chips. | ||
# Note that currently some of this has to be implemented on a per-target level, as Mbed | ||
# does not have an SDIO HAL API. Hopefully this can be fixed someday... | ||
|
||
add_library(mbed-minimal-cyhal STATIC | ||
cy_hal.c | ||
cyhal_spi.c | ||
cyhal_system.c | ||
cyhal_gpio.cpp | ||
wiced_filesystem.cpp) | ||
target_include_directories(mbed-minimal-cyhal PUBLIC .) | ||
target_link_libraries(mbed-minimal-cyhal PUBLIC | ||
mbed-core-flags | ||
mbed-cy-rtos-abstraction) | ||
|
||
# This is needed in order to make cybsp_wifi.h include cycfg.h | ||
target_compile_definitions(mbed-minimal-cyhal PUBLIC COMPONENT_CUSTOM_DESIGN_MODUS) | ||
|
||
# This is needed in order to make cyabs_rtos_internal.h include cyhal.h | ||
target_compile_definitions(mbed-minimal-cyhal PUBLIC CY_USING_HAL) | ||
|
||
if(STM32H7 IN_LIST MBED_TARGET_LABELS) | ||
target_sources(mbed-minimal-cyhal PRIVATE | ||
TARGET_STM32H7/cyhal_sdio.c) | ||
target_include_directories(mbed-minimal-cyhal PUBLIC TARGET_STM32H7) | ||
|
||
if(STM32H747_ARDUINO IN_LIST MBED_TARGET_LABELS) | ||
target_include_directories(mbed-minimal-cyhal PUBLIC TARGET_STM32H7/TARGET_STM32H747_ARDUINO) | ||
target_sources(mbed-minimal-cyhal PRIVATE | ||
TARGET_STM32H7/TARGET_STM32H747_ARDUINO/wiced_filesystem_setup.cpp) | ||
target_link_libraries(mbed-minimal-cyhal PRIVATE | ||
mbed-storage-qspif | ||
mbed-storage-blockdevice | ||
mbed-storage-fat) | ||
endif() | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.