Skip to content

Commit

Permalink
ports/psoc6: WIP makefile system for multi board support.
Browse files Browse the repository at this point in the history
Signed-off-by: enriquezgarc <enriquezgarcia.external@infineon.com>
  • Loading branch information
jaenrig-ifx committed Aug 29, 2023
1 parent 11b4a67 commit 282d967
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
11 changes: 8 additions & 3 deletions ports/psoc6/mtb-libs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ MTB_TYPE=COMBINED
# configurations. If TARGET is manually edited, ensure TARGET_<BSP>.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)
Expand Down Expand Up @@ -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.
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions ports/psoc6/mtb-libs/makefile_mtb.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit 282d967

Please sign in to comment.