Skip to content

Commit

Permalink
ports/psoc6/Makefile: Get board from mtb-lib makefile.
Browse files Browse the repository at this point in the history
Signed-off-by: enriquezgarc <[email protected]>
  • Loading branch information
jaenrig-ifx committed Aug 28, 2023
1 parent 81f6dc2 commit 5bf092f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions ports/psoc6/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
# TODO: get active board from mtb-base-example makefile
BOARD ?= CY8CPROTO-062-4343W
# get active board from mtb-lib makefile
# mtb-lib makefile set TARGET board by using
# "mtb_set_bsp" target or targets depending on it
# as "mtb_init".
MTB_LIB_DIR = mtb-libs
MTB_LIB_MAKEFILE = $(MTB_LIB_DIR)/Makefile
BOARD ?= $(shell egrep '^ *TARGET' $(MTB_LIB_MAKEFILE) | sed 's/^.*= *//g' | sed 's/APP_//')
BOARD_DIR = boards/$(BOARD)

$(info Active PSoC6 board : $(BOARD))

ifeq ($(wildcard $(BOARD_DIR)/.),)
$(error Invalid BOARD specified)
Expand Down

0 comments on commit 5bf092f

Please sign in to comment.