feat: add build option for usb-c version

This commit is contained in:
Dien-Nhung Nguyen-Phu
2024-09-29 13:56:35 +07:00
parent 68e4ce488d
commit b30731ff6c
2 changed files with 10 additions and 0 deletions

View File

@@ -9,6 +9,8 @@ TARGET = badgemagic-ch582
######################################
# Uncomment below line to enable debugging
# DEBUG = 1
# Uncomment below to build for USB-C version
# USBC_VERSION = 1
# optimization for size
OPT = -Os
@@ -120,6 +122,10 @@ ifeq ($(DEBUG), 1)
CFLAGS += -g -gdwarf-2 -DDEBUG=$(DEBUG)
endif
ifeq ($(USBC_VERSION), 1)
CFLAGS += -DUSBC_VERSION=$(USBC_VERSION)
endif
# Generate dependency information
CFLAGS += -MMD -MP