summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.idea/cmake.xml2
-rw-r--r--examples/build_system/make/make.mk4
-rw-r--r--hw/bsp/family_support.cmake5
-rw-r--r--hw/bsp/rp2040/family.cmake5
4 files changed, 9 insertions, 7 deletions
diff --git a/.idea/cmake.xml b/.idea/cmake.xml
index 3c51031c1..1055e31d3 100644
--- a/.idea/cmake.xml
+++ b/.idea/cmake.xml
@@ -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=&quot;CFG_TUH_RPI_PIO_USB=1&quot;" BUILD_OPTIONS="-v" />
+ <configuration PROFILE_NAME="pico pio-host" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DBOARD=raspberry_pi_pico -DLOG=1 -DCFLAGS_CLI=&quot;-DCFG_TUH_RPI_PIO_USB=1&quot;" 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" />
diff --git a/examples/build_system/make/make.mk b/examples/build_system/make/make.mk
index a78f4130d..1500a51e0 100644
--- a/examples/build_system/make/make.mk
+++ b/examples/build_system/make/make.mk
@@ -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
diff --git a/hw/bsp/family_support.cmake b/hw/bsp/family_support.cmake
index d631c8563..9f2e34691 100644
--- a/hw/bsp/family_support.cmake
+++ b/hw/bsp/family_support.cmake
@@ -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}})
diff --git a/hw/bsp/rp2040/family.cmake b/hw/bsp/rp2040/family.cmake
index 5d82cbf62..c81390b28 100644
--- a/hw/bsp/rp2040/family.cmake
+++ b/hw/bsp/rp2040/family.cmake
@@ -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})