mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-17 05:32:55 +08:00
change COMPILE_DEFINE to CFLAGS_CLI for cmake/make
This commit is contained in:
parent
f9cd5ccdf0
commit
4396ecd22c
2
.idea/cmake.xml
generated
2
.idea/cmake.xml
generated
@ -3,7 +3,7 @@
|
||||
<component name="CMakeSharedSettings">
|
||||
<configurations>
|
||||
<configuration PROFILE_NAME="pico" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=raspberry_pi_pico -DLOG=1" />
|
||||
<configuration PROFILE_NAME="pico pio-host" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=raspberry_pi_pico -DLOG=1 -DCOMPILE_DEFINE="CFG_TUH_RPI_PIO_USB=1"" BUILD_OPTIONS="-v" />
|
||||
<configuration PROFILE_NAME="pico pio-host" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=raspberry_pi_pico -DLOG=1 -DCFLAGS_CLI="-DCFG_TUH_RPI_PIO_USB=1"" BUILD_OPTIONS="-v" />
|
||||
<configuration PROFILE_NAME="feather_rp2040" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=pico_sdk -DPICO_BOARD=adafruit_feather_rp2040 -DLOG=2" />
|
||||
<configuration PROFILE_NAME="feather_rp2040_max3421" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=feather_rp2040_max3421 -DLOG=2" />
|
||||
<configuration PROFILE_NAME="metro_rp2040" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=pico_sdk -DPICO_BOARD=adafruit_metro_rp2040 -DLOG=2 -DMAX3421_HOST=1" />
|
||||
|
@ -109,6 +109,10 @@ INC += \
|
||||
BOARD_UPPER = $(subst a,A,$(subst b,B,$(subst c,C,$(subst d,D,$(subst e,E,$(subst f,F,$(subst g,G,$(subst h,H,$(subst i,I,$(subst j,J,$(subst k,K,$(subst l,L,$(subst m,M,$(subst n,N,$(subst o,O,$(subst p,P,$(subst q,Q,$(subst r,R,$(subst s,S,$(subst t,T,$(subst u,U,$(subst v,V,$(subst w,W,$(subst x,X,$(subst y,Y,$(subst z,Z,$(subst -,_,$(BOARD))))))))))))))))))))))))))))
|
||||
CFLAGS += -DBOARD_$(BOARD_UPPER)
|
||||
|
||||
ifdef CFLAGS_CLI
|
||||
CFLAGS += $(CFLAGS_CLI)
|
||||
endif
|
||||
|
||||
# use max3421 as host controller
|
||||
ifeq (${MAX3421_HOST},1)
|
||||
SRC_C += src/portable/analog/max3421/hcd_max3421.c
|
||||
|
@ -201,9 +201,8 @@ function(family_configure_common TARGET RTOS)
|
||||
)
|
||||
|
||||
# compile define from command line
|
||||
if(DEFINED COMPILE_DEFINE)
|
||||
#separate_arguments(COMPILE_DEFINE_LIST UNIX_COMMAND "${COMPILE_DEFINE}")
|
||||
target_compile_definitions(${TARGET} PUBLIC ${COMPILE_DEFINE})
|
||||
if(DEFINED CFLAGS_CLI)
|
||||
target_compile_options(${TARGET} PUBLIC ${CFLAGS_CLI})
|
||||
endif()
|
||||
|
||||
target_compile_options(${TARGET} PUBLIC ${WARNING_FLAGS_${CMAKE_C_COMPILER_ID}})
|
||||
|
@ -176,9 +176,8 @@ function(family_configure_target TARGET RTOS)
|
||||
set(RTOS_SUFFIX ${RTOS_SUFFIX} PARENT_SCOPE)
|
||||
|
||||
# compile define from command line
|
||||
if(DEFINED COMPILE_DEFINE)
|
||||
#separate_arguments(COMPILE_DEFINE_LIST UNIX_COMMAND "${COMPILE_DEFINE}")
|
||||
target_compile_definitions(${TARGET} PUBLIC ${COMPILE_DEFINE})
|
||||
if(DEFINED CFLAGS_CLI)
|
||||
target_compile_options(${TARGET} PUBLIC ${CFLAGS_CLI})
|
||||
endif()
|
||||
|
||||
pico_add_extra_outputs(${TARGET})
|
||||
|
Loading…
x
Reference in New Issue
Block a user