From 282d96785fa77f0975f3856778d55b8d9fc136d8 Mon Sep 17 00:00:00 2001 From: enriquezgarc Date: Tue, 29 Aug 2023 17:14:31 +0200 Subject: [PATCH] ports/psoc6: WIP makefile system for multi board support. Signed-off-by: enriquezgarc --- ports/psoc6/mtb-libs/Makefile | 11 ++++++++--- ports/psoc6/mtb-libs/makefile_mtb.mk | 4 ++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ports/psoc6/mtb-libs/Makefile b/ports/psoc6/mtb-libs/Makefile index 298c13ec3d61..cd63c140834a 100755 --- a/ports/psoc6/mtb-libs/Makefile +++ b/ports/psoc6/mtb-libs/Makefile @@ -42,7 +42,7 @@ MTB_TYPE=COMBINED # configurations. If TARGET is manually edited, ensure TARGET_.mtb with a # valid URL exists in the application, run 'make getlibs' to fetch BSP contents # and update or regenerate launch configurations for your IDE. -TARGET=APP_CY8CPROTO-062-4343W +TARGET=APP_CY8CPROTO-063-BLE # Board dependendencies ifeq ($(TARGET),APP_CY8CPROTO-062-4343W) @@ -92,8 +92,10 @@ VERBOSE= # ... then code in directories named COMPONENT_foo and COMPONENT_bar will be # added to the build # +COMPONENTS+=FREERTOS + ifeq ($(NETWORK_ENABLE),1) -COMPONENTS+=FREERTOS LWIP MBEDTLS +COMPONENTS+= LWIP MBEDTLS endif # Like COMPONENTS, but disable optional code that was enabled by default. @@ -105,11 +107,14 @@ DISABLE_COMPONENTS= # by default, or otherwise not found by the build system. SOURCES= +DEFINES=CY_RETARGET_IO_CONVERT_LF_TO_CRLF CY_RTOS_AWARE + ifeq ($(NETWORK_ENABLE),1) # Custom configuration of mbedtls library. MBEDTLSFLAGS = MBEDTLS_USER_CONFIG_FILE='"mbedtls_config.h"' -DEFINES=$(MBEDTLSFLAGS) CYBSP_WIFI_CAPABLE CY_RETARGET_IO_CONVERT_LF_TO_CRLF CY_RTOS_AWARE +DEFINES+=$(MBEDTLSFLAGS) CYBSP_WIFI_CAPABLE +# TODO: This is only for the CYCPROTO_BOARD?? # CY8CPROTO-062-4343W board shares the same GPIO for the user button (USER BTN1) # and the CYW4343W host wake up pin. Since this example uses the GPIO for # interfacing with the user button, the SDIO interrupt to wake up the host is diff --git a/ports/psoc6/mtb-libs/makefile_mtb.mk b/ports/psoc6/mtb-libs/makefile_mtb.mk index d92ffdd9cc24..8344c71abd44 100644 --- a/ports/psoc6/mtb-libs/makefile_mtb.mk +++ b/ports/psoc6/mtb-libs/makefile_mtb.mk @@ -54,8 +54,7 @@ mtb_config_deps: $(info mtb_deps_dir : $(MTB_BASE_EXAMPLE_MAKEFILE_DIR)deps/$(MTB_DEPS_DIRS)/) $(Q) $(foreach DIR, $(MTB_DEPS_DIRS), $(shell cp -r $(MTB_BASE_EXAMPLE_MAKEFILE_DIR)deps/$(DIR)/. $(MTB_BASE_EXAMPLE_MAKEFILE_DIR)deps)) - -mtb_get_libs: +mtb_get_libs: mtb_config_deps $(info ) $(info Retrieving ModusToolbox dependencies ...) $(Q) $(MAKE) -C $(MTB_BASE_EXAMPLE_MAKEFILE_DIR) getlibs @@ -77,6 +76,7 @@ mtb_deinit: mtb_clean -$(Q) cd $(MTB_BASE_EXAMPLE_MAKEFILE_DIR); rm -rf libs -$(Q) cd $(MTB_BASE_EXAMPLE_MAKEFILE_DIR); rm -rf bsps -$(Q) cd $(MTB_BASE_EXAMPLE_MAKEFILE_DIR); rm -rf ../mtb_shared + -$(Q) cd $(MTB_BASE_EXAMPLE_MAKEFILE_DIR); rm -f deps/* # build MTB project mtb_build: