Skip to content

Commit 6352a90

Browse files
Add building, flashing, and debugging support for CY8CPROTO_062S3_4343W (#501)
* Start adding build and upload support for Cypress PSoC62 * Add OpenOCD support for PSOC62 * OpenOCD working! * Debugging on PSoC 62 working! * OK it's actually really working now! * Remove unneeded cmake options
1 parent d135826 commit 6352a90

File tree

70 files changed

+322
-157
lines changed

Some content is hidden

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

70 files changed

+322
-157
lines changed

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ list(APPEND CMAKE_MODULE_PATH
104104
add_subdirectory(extern)
105105

106106
if(MBED_IS_STANDALONE)
107+
108+
# Always print output on test failure
109+
list(APPEND CMAKE_CTEST_ARGUMENTS --output-on-failure)
110+
107111
include(CTest)
108112

109113
if((NOT MBED_BUILD_GREENTEA_TESTS) AND MBED_ENABLE_TESTING)

connectivity/drivers/wifi/COMPONENT_WHD/wifi-host-driver/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,13 @@ target_sources(mbed-wifi
119119
src/bus_protocols/whd_bus_spi_protocol.c
120120
)
121121

122+
if("TARGET_CY_EXTERNAL_WIFI_FW" IN_LIST MBED_TARGET_DEFINITIONS)
123+
# For Cypress targets, add additional resource driver for external wifi firmware
124+
target_sources(mbed-wifi PRIVATE
125+
resources/resource_imp/cy_ext_wifi_fw_resources.c)
126+
target_link_libraries(mbed-wifi PUBLIC mbed-cy-external-wifi-fw)
127+
endif()
128+
122129
target_compile_definitions(mbed-wifi
123130
PUBLIC
124131
MBED_CONF_CY_PSOC6_WHD_PRESENT=1

storage/kvstore/kv_config/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,9 @@ target_link_libraries(mbed-storage-kv-config
2929

3030
if("DEVICE_FLASH=1" IN_LIST MBED_TARGET_DEFINITIONS)
3131
target_link_libraries(mbed-storage-kv-config PUBLIC mbed-storage-flashiap)
32-
endif()
32+
endif()
33+
34+
if("TARGET_CY_EXTERNAL_WIFI_FW" IN_LIST MBED_TARGET_DEFINITIONS)
35+
# On some Cypress PSOC6 targets, the external wifi fw library provides the definition of get_other_blockdevice()
36+
target_link_libraries(mbed-storage-kv-config PUBLIC mbed-cy-external-wifi-fw)
37+
endif()

storage/platform/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ list(APPEND mbed-storage-libs
1414
mbed-storage-littlefs-v2
1515
)
1616

17+
if("TARGET_CY_EXTERNAL_WIFI_FW" IN_LIST MBED_TARGET_DEFINITIONS)
18+
# On some Cypress PSOC6 targets, the external wifi fw library provides the definition of BlockDevice::get_default_instance()
19+
target_link_libraries(mbed-storage PUBLIC mbed-cy-external-wifi-fw)
20+
endif()
21+
1722
if("COMPONENT_DATAFLASH=1" IN_LIST MBED_TARGET_DEFINITIONS)
1823
list(APPEND mbed-storage-libs mbed-storage-dataflash)
1924
endif()

targets/TARGET_Cypress/CMakeLists.txt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,4 @@
33

44
add_subdirectory(TARGET_PSOC6 EXCLUDE_FROM_ALL)
55

6-
add_library(mbed-cy-external-wifi-fw INTERFACE)
7-
target_compile_definitions(mbed-cy-external-wifi-fw
8-
INTERFACE
9-
"CY_ENABLE_XIP_PROGRAM"
10-
"CY_STORAGE_WIFI_DATA=\".cy_xip\""
11-
"CY_STORAGE_WIFI_DATA_OUTPUT=cy_xip"
12-
"CY_EXT_WIFI_FW_STORAGE=QSPIF"
13-
)
146

targets/TARGET_Cypress/TARGET_PSOC6/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
add_subdirectory(COMPONENT_SCL EXCLUDE_FROM_ALL)
5+
add_subdirectory(ext-wifi-fw EXCLUDE_FROM_ALL)
56

67
add_library(mbed-cat1a INTERFACE)
78

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
add_library(mbed-cy-external-wifi-fw STATIC
2+
cy_ext_wifi_fw_reserved_region_bd.cpp
3+
CyReservedRegionBlockDevice.cpp)
4+
5+
target_include_directories(mbed-cy-external-wifi-fw PUBLIC .)
6+
7+
target_link_libraries(mbed-cy-external-wifi-fw PUBLIC
8+
mbed-core-flags
9+
mbed-storage-qspif)
10+
11+
# Force linking of the cy_ext_wifi_fw_reserved_region_bd.o object file to correctly resolve weak symbols
12+
target_link_options(mbed-cy-external-wifi-fw
13+
INTERFACE
14+
LINKER:--undefined=force_link_cy_ext_wifi_fw_reserved_region_bd_o
15+
)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#define CY_RESERVED_REGION_BLOCK_DEVICE_H
2828

2929
#include "mbed.h"
30+
#include "BlockDevice.h"
3031

3132
/**
3233
* Block device for working via an underlying block device without altering

0 commit comments

Comments
 (0)