fix board name with dash

This commit is contained in:
hathach 2023-08-01 11:18:00 +07:00
parent 3f788a4e5a
commit 1cccbaf7ec
No known key found for this signature in database
GPG Key ID: F5D50C6D51D17CBA
2 changed files with 2 additions and 1 deletions

View File

@ -116,7 +116,7 @@ INC += \
$(TOP)/$(FAMILY_PATH) \
$(TOP)/src \
BOARD_UPPER = $(shell echo $(BOARD) | tr a-z A-Z)
BOARD_UPPER = $(shell echo $(subst -,_,$(BOARD)) | tr a-z A-Z)
CFLAGS += -DBOARD_$(BOARD_UPPER)
# Log level is mapped to TUSB DEBUG option

View File

@ -182,6 +182,7 @@ function(family_configure_common TARGET RTOS)
family_add_rtos(${TARGET} ${RTOS})
string(TOUPPER ${BOARD} BOARD_UPPER)
string(REPLACE "-" "_" BOARD_UPPER ${BOARD_UPPER})
target_compile_definitions(${TARGET} PUBLIC
BOARD_${BOARD_UPPER}
)