Use EXTRAFLAGS instead of EXTRADEFINES

This commit is contained in:
David Sidrane 2020-06-22 11:46:59 -07:00 committed by Daniel Agar
parent b2a31e15da
commit fbf110f6be
3 changed files with 5 additions and 4 deletions

View File

@ -1,5 +1,5 @@
$(info px4_developer.mk inclded)
ifeq ($(UAVCAN_BL_OVERRIDE),y)
$(info ************************** UAVCAN BOOT LOADERS built for In place application Debugging ***************************************)
export EXTRADEFINES +=-DDEBUG_APPLICATION_INPLACE
export EXTRAFLAGS +=-DDEBUG_APPLICATION_INPLACE
endif

View File

@ -294,7 +294,7 @@ function(add_nuttx_dir nuttx_lib nuttx_lib_dir kernel extra)
add_custom_command(OUTPUT ${NUTTX_DIR}/${nuttx_lib_dir}/lib${nuttx_lib}.a
COMMAND find ${nuttx_lib_dir} -type f -name *.o -delete
COMMAND make -C ${nuttx_lib_dir} ${nuttx_build_options} --no-print-directory all TOPDIR=${NUTTX_DIR} KERNEL=${kernel} EXTRADEFINES=${extra}
COMMAND make -C ${nuttx_lib_dir} ${nuttx_build_options} --no-print-directory all TOPDIR=${NUTTX_DIR} KERNEL=${kernel} EXTRAFLAGS=${extra}
DEPENDS
${nuttx_lib_files}
nuttx_context ${NUTTX_DIR}/include/nuttx/config.h ${NUTTX_DIR}/include/nuttx/version.h

View File

@ -48,7 +48,6 @@ else
ARCHSCRIPT = -T$(BOARD_DIR)$(DELIM)scripts$(DELIM)flash.ld
endif
CC = ${CMAKE_C_COMPILER}
CXX = ${CMAKE_CXX_COMPILER}
CPP = ${CMAKE_C_COMPILER} -E
@ -94,6 +93,8 @@ FLAGS = $(MAXOPTIMIZATION) -g2 \
-Wno-unused-parameter \
-Wpointer-arith
FLAGS += $(EXTRAFLAGS)
# enable precise stack overflow tracking
ifeq ($(CONFIG_ARMV7M_STACKCHECK),y)
FLAGS += -finstrument-functions -ffixed-r10
@ -132,7 +133,7 @@ CXXFLAGS = $(ARCHXXINCLUDES) \
-Wno-double-promotion \
-Wno-missing-declarations
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
ASMEXT = .S