Disabling smart build and verbose compile.

This commit is contained in:
Fabien Poussin 2017-03-22 12:08:20 +01:00
parent 1eb330c600
commit 3b851fb3f3
1 changed files with 61 additions and 63 deletions

View File

@ -3,17 +3,9 @@
# NOTE: Can be overridden externally. # NOTE: Can be overridden externally.
# #
PROJECT_DIR = .
# by default EXTRA_PARAMS is empty and we create 'debug' version of the firmware with additional assertions and statistics
# for 'release' options see 'clean_compile_two_versions.bat' file
# Compiler options here. # Compiler options here.
ifeq ($(USE_OPT),) ifeq ($(USE_OPT),)
# USE_OPT = -O2 -ggdb -std=gnu99 -fomit-frame-pointer -falign-functions=16 USE_OPT = $(EXTRA_PARAMS) $(RFLAGS) -Os -ggdb -fomit-frame-pointer -falign-functions=16
# USE_OPT = $(RFLAGS) -O1 -fgnu89-inline -ggdb -fomit-frame-pointer -falign-functions=16 -std=gnu99 -Werror-implicit-function-declaration -Werror -Wno-error=pointer-sign -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=sign-compare -Wno-error=unused-parameter -Wno-error=missing-field-initializers
USE_OPT = $(EXTRA_PARAMS) $(RFLAGS) -O2 -fomit-frame-pointer -falign-functions=16 -Werror-implicit-function-declaration -Werror -Wno-error=pointer-sign -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=sign-compare -Wno-error=unused-parameter -Wno-error=missing-field-initializers -Werror=type-limits -Wno-error=strict-aliasing -Wno-error=attributes
endif endif
# C specific options here (added to USE_OPT). # C specific options here (added to USE_OPT).
@ -33,12 +25,12 @@ endif
# Linker extra options here. # Linker extra options here.
ifeq ($(USE_LDOPT),) ifeq ($(USE_LDOPT),)
USE_LDOPT = USE_LDOPT = -flto=4
endif endif
# Enable this if you want link time optimizations (LTO) # Enable this if you want link time optimizations (LTO)
ifeq ($(USE_LTO),) ifeq ($(USE_LTO),)
USE_LTO = no USE_LTO = yes
endif endif
# If enabled, this option allows to compile the application in THUMB mode. # If enabled, this option allows to compile the application in THUMB mode.
@ -51,6 +43,12 @@ ifeq ($(USE_VERBOSE_COMPILE),)
USE_VERBOSE_COMPILE = no USE_VERBOSE_COMPILE = no
endif endif
# If enabled, this option makes the build process faster by not compiling
# modules not used in the current configuration.
ifeq ($(USE_SMART_BUILD),)
USE_SMART_BUILD = no
endif
# #
# Build global options # Build global options
############################################################################## ##############################################################################
@ -59,11 +57,21 @@ endif
# Architecture or project specific options # Architecture or project specific options
# #
USE_FPU = hard # Stack size to be allocated to the Cortex-M process stack. This stack is
# the stack used by the main() thread.
ifeq ($(USE_PROCESS_STACKSIZE),)
USE_PROCESS_STACKSIZE = 0x0600
endif
# Stack size to the allocated to the Cortex-M main/exceptions stack. This
# stack is used for processing interrupts and exceptions.
ifeq ($(USE_EXCEPTIONS_STACKSIZE),)
USE_EXCEPTIONS_STACKSIZE = 0x1000
endif
# Enables the use of FPU on Cortex-M4 (no, softfp, hard). # Enables the use of FPU on Cortex-M4 (no, softfp, hard).
ifeq ($(USE_FPU),) ifeq ($(USE_FPU),)
USE_FPU = no USE_FPU = hard
endif endif
# #
@ -76,26 +84,30 @@ endif
# Define project name here # Define project name here
PROJECT = rusefi PROJECT = rusefi
PROJECT_DIR = .
# Imported source files and paths # Imported source files and paths
CHIBIOS = chibios CHIBIOS = ChibiOS
#include $(CHIBIOS)/test/test.mk
#PROJECT_BOARD = OLIMEX_STM32_E407
ifneq ($(PROJECT_BOARD),OLIMEX_STM32_E407) ifneq ($(PROJECT_BOARD),OLIMEX_STM32_E407)
PROJECT_BOARD = ST_STM32F4 PROJECT_BOARD = ST_STM32F4_DISCOVERY
endif endif
DDEFS += -D$(PROJECT_BOARD) DDEFS += -D$(PROJECT_BOARD)
# Startup files.
# Imported source files and paths include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32f4xx.mk
include $(CHIBIOS)/os/hal/platforms/STM32F4xx/platform.mk # HAL-OSAL files (optional).
include $(CHIBIOS)/os/hal/hal.mk include $(CHIBIOS)/os/hal/hal.mk
include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F4xx/port.mk include $(CHIBIOS)/os/hal/ports/STM32/STM32F4xx/platform.mk
include $(CHIBIOS)/os/kernel/kernel.mk include $(CHIBIOS)/os/hal/boards/$(PROJECT_BOARD)/board.mk
#include $(CHIBIOS)/os/various/cpp_wrappers/kernel.mk include $(CHIBIOS)/os/hal/osal/rt/osal.mk
# RTOS files (optional).
include $(CHIBIOS)/os/rt/rt.mk
include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
include $(CHIBIOS)/os/various/fatfs_bindings/fatfs.mk include $(CHIBIOS)/os/various/fatfs_bindings/fatfs.mk
include $(CHIBIOS)/os/various/cpp_wrappers/chcpp.mk
include console/binary/tunerstudio.mk include console/binary/tunerstudio.mk
include ext/ext.mk include ext/ext.mk
include $(PROJECT_DIR)/hw_layer/hw_layer.mk include $(PROJECT_DIR)/hw_layer/hw_layer.mk
@ -105,7 +117,6 @@ include development/development.mk
include controllers/controllers.mk include controllers/controllers.mk
include $(PROJECT_DIR)/util/util.mk include $(PROJECT_DIR)/util/util.mk
include $(PROJECT_DIR)/config/boards/$(PROJECT_BOARD)/board.mk
include $(PROJECT_DIR)/config/engines/engines.mk include $(PROJECT_DIR)/config/engines/engines.mk
include $(PROJECT_DIR)/controllers/algo/algo.mk include $(PROJECT_DIR)/controllers/algo/algo.mk
include $(PROJECT_DIR)/controllers/core/core.mk include $(PROJECT_DIR)/controllers/core/core.mk
@ -115,31 +126,32 @@ include $(PROJECT_DIR)/controllers/system/system.mk
include $(PROJECT_DIR)/controllers/trigger/trigger.mk include $(PROJECT_DIR)/controllers/trigger/trigger.mk
include $(PROJECT_DIR)/console/console.mk include $(PROJECT_DIR)/console/console.mk
# Define linker script file here # Define linker script file here
LDSCRIPT= config/stm32f4ems/STM32F407xG_CCM.ld LDSCRIPT= config/stm32f4ems/STM32F407xG_CCM.ld
# C sources that can be compiled in ARM or THUMB mode depending on the global # C sources that can be compiled in ARM or THUMB mode depending on the global
# setting. # setting.
CSRC = $(PORTSRC) \ CSRC = $(STARTUPSRC) \
$(KERNSRC) \ $(KERNSRC) \
chibios/os/various/syscalls.c \ $(PORTSRC) \
chibios/os/various/chprintf.c \ $(OSALSRC) \
chibios/os/various/memstreams.c \ $(HALSRC) \
chibios/os/various/chrtclib.c \ $(PLATFORMSRC) \
$(BOARDSRC) \
$(CHIBIOS)/os/various/syscalls.c \
$(CHIBIOS)/os/hal/lib/streams/memstreams.c \
$(CHIBIOS)/os/hal/lib/streams/chprintf.c \
$(CHIBIOS)/os/various/shell.c \
${HW_MASS_STORAGE_SRC_C} \ ${HW_MASS_STORAGE_SRC_C} \
$(UTILSRC) \ $(UTILSRC) \
$(ENGINES_SRC) \ $(ENGINES_SRC) \
$(CONSOLESRC) \ $(CONSOLESRC) \
$(HALSRC) \
$(DEV_SRC) \ $(DEV_SRC) \
$(HW_LAYER_EMS) \ $(HW_LAYER_EMS) \
$(CONTROLLERSSRC) \ $(CONTROLLERSSRC) \
$(CONTROLLERS_ALGO_SRC) \ $(CONTROLLERS_ALGO_SRC) \
$(CONTROLLERS_CORE_SRC) \ $(CONTROLLERS_CORE_SRC) \
$(CONTROLLERS_SENSORS_SRC) \ $(CONTROLLERS_SENSORS_SRC) \
$(PLATFORMSRC) \
$(BOARDSRC) \
$(FATFSSRC) \ $(FATFSSRC) \
$(SYSTEMSRC) $(SYSTEMSRC)
@ -185,11 +197,19 @@ TCSRC =
TCPPSRC = TCPPSRC =
# List ASM source files here # List ASM source files here
ASMSRC = $(PORTASM) # List ASM source files here
ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM)
INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \ INCDIR = $(PORTINC) \
$(HALINC) $(PLATFORMINC) $(BOARDINC) \ $(OSALINC) \
$(KERNINC) \
$(TESTINC) \
$(STARTUPINC) \
$(HALINC) \
$(PLATFORMINC) \
$(BOARDINC) \
$(CHCPPINC) \ $(CHCPPINC) \
$(CHIBIOS)/os/hal/lib/streams \
$(CHIBIOS)/os/various \ $(CHIBIOS)/os/various \
$(CHIBIOS)/os/various/devices_lib/accel \ $(CHIBIOS)/os/various/devices_lib/accel \
config/stm32f4ems \ config/stm32f4ems \
@ -244,6 +264,7 @@ LD = $(TRGT)gcc
#LD = $(TRGT)g++ #LD = $(TRGT)g++
CP = $(TRGT)objcopy CP = $(TRGT)objcopy
AS = $(TRGT)gcc -x assembler-with-cpp AS = $(TRGT)gcc -x assembler-with-cpp
AR = $(TRGT)ar
OD = $(TRGT)objdump OD = $(TRGT)objdump
SZ = $(TRGT)size SZ = $(TRGT)size
HEX = $(CP) -O ihex HEX = $(CP) -O ihex
@ -265,29 +286,6 @@ CPPWARN = -Wall -Wextra
# Compiler settings # Compiler settings
############################################################################## ##############################################################################
##############################################################################
# Start of default section
#
# List all default C defines here, like -D_DEBUG=1
DDEFS =
# List all default ASM defines here, like -D_DEBUG=1
DADEFS =
# List all default directories to look for include files here
DINCDIR =
# List the default directory to look for the libraries here
DLIBDIR =
# List all default libraries here
DLIBS =
#
# End of default section
##############################################################################
############################################################################## ##############################################################################
# Start of user section # Start of user section
# #
@ -311,5 +309,5 @@ ULIBS = -lm
# End of user defines # End of user defines
############################################################################## ##############################################################################
RULESPATH = $(CHIBIOS)/os/ports/GCC/ARMCMx RULESPATH = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC
include $(RULESPATH)/rules.mk include $(RULESPATH)/rules.mk