time to go
This commit is contained in:
parent
e09af796c5
commit
a8e2f22dae
|
@ -1,340 +0,0 @@
|
|||
##############################################################################
|
||||
# Build global options
|
||||
# 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.
|
||||
ifeq ($(USE_OPT),)
|
||||
#USE_OPT = $(EXTRA_PARAMS) $(RFLAGS) -Os -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
|
||||
USE_OPT = -Os -ggdb -fomit-frame-pointer -falign-functions=16
|
||||
endif
|
||||
|
||||
# C specific options here (added to USE_OPT).
|
||||
ifeq ($(USE_COPT),)
|
||||
USE_COPT = -fgnu89-inline -std=gnu99
|
||||
endif
|
||||
|
||||
# C++ specific options here (added to USE_OPT).
|
||||
ifeq ($(USE_CPPOPT),)
|
||||
USE_CPPOPT = -std=c++11 -fno-rtti -fno-exceptions -fno-use-cxa-atexit -Werror=write-strings -Werror=type-limits
|
||||
endif
|
||||
|
||||
# Enable this if you want the linker to remove unused code and data
|
||||
ifeq ($(USE_LINK_GC),)
|
||||
USE_LINK_GC = yes
|
||||
endif
|
||||
|
||||
# Linker extra options here.
|
||||
ifeq ($(USE_LDOPT),)
|
||||
USE_LDOPT = -Os -flto=5
|
||||
endif
|
||||
|
||||
# Enable this if you want link time optimizations (LTO)
|
||||
ifeq ($(USE_LTO),)
|
||||
USE_LTO = yes
|
||||
endif
|
||||
|
||||
# If enabled, this option allows to compile the application in THUMB mode.
|
||||
ifeq ($(USE_THUMB),)
|
||||
USE_THUMB = yes
|
||||
endif
|
||||
|
||||
# Enable this if you want to see the full log while compiling.
|
||||
ifeq ($(USE_VERBOSE_COMPILE),)
|
||||
USE_VERBOSE_COMPILE = no
|
||||
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 = yes
|
||||
endif
|
||||
|
||||
#
|
||||
# Build global options
|
||||
##############################################################################
|
||||
|
||||
##############################################################################
|
||||
# Architecture or project specific options
|
||||
#
|
||||
|
||||
# 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).
|
||||
ifeq ($(USE_FPU),)
|
||||
USE_FPU = hard
|
||||
endif
|
||||
|
||||
#
|
||||
# Architecture or project specific options
|
||||
##############################################################################
|
||||
|
||||
##############################################################################
|
||||
# Project, sources and paths
|
||||
#
|
||||
|
||||
# Define project name here
|
||||
PROJECT = rusefi
|
||||
|
||||
# Imported source files and paths
|
||||
CHIBIOS = ChibiOS
|
||||
|
||||
#PROJECT_BOARD = OLIMEX_STM32_E407
|
||||
ifneq ($(PROJECT_BOARD),OLIMEX_STM32_E407)
|
||||
PROJECT_BOARD = ST_STM32F4_DISCOVERY
|
||||
endif
|
||||
DDEFS += -D$(PROJECT_BOARD)
|
||||
|
||||
# Startup files.
|
||||
include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32f4xx.mk
|
||||
# HAL-OSAL files (optional).
|
||||
include $(CHIBIOS)/os/hal/hal.mk
|
||||
include $(CHIBIOS)/os/hal/ports/STM32/STM32F4xx/platform.mk
|
||||
include $(CHIBIOS)/os/hal/boards/$(PROJECT_BOARD)/board.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 console/binary/tunerstudio.mk
|
||||
include ext/ext.mk
|
||||
include $(PROJECT_DIR)/hw_layer/hw_layer.mk
|
||||
include $(PROJECT_DIR)/hw_layer/sensors/sensors.mk
|
||||
include $(PROJECT_DIR)/hw_layer/mass_storage/mass_storage.mk
|
||||
include development/development.mk
|
||||
include controllers/controllers.mk
|
||||
|
||||
include $(PROJECT_DIR)/util/util.mk
|
||||
include $(PROJECT_DIR)/config/engines/engines.mk
|
||||
include $(PROJECT_DIR)/controllers/algo/algo.mk
|
||||
include $(PROJECT_DIR)/controllers/core/core.mk
|
||||
include $(PROJECT_DIR)/controllers/math/math.mk
|
||||
include $(PROJECT_DIR)/controllers/sensors/sensors.mk
|
||||
include $(PROJECT_DIR)/controllers/system/system.mk
|
||||
include $(PROJECT_DIR)/controllers/trigger/trigger.mk
|
||||
include $(PROJECT_DIR)/console/console.mk
|
||||
|
||||
|
||||
# Define linker script file here
|
||||
LDSCRIPT= config/stm32f4ems/STM32F407xG_CCM.ld
|
||||
|
||||
# C sources that can be compiled in ARM or THUMB mode depending on the global
|
||||
# setting.
|
||||
CSRC = $(STARTUPSRC) \
|
||||
$(KERNSRC) \
|
||||
$(PORTSRC) \
|
||||
$(OSALSRC) \
|
||||
$(HALSRC) \
|
||||
$(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} \
|
||||
$(UTILSRC) \
|
||||
$(ENGINES_SRC) \
|
||||
$(CONSOLESRC) \
|
||||
$(DEV_SRC) \
|
||||
$(HW_LAYER_EMS) \
|
||||
$(CONTROLLERSSRC) \
|
||||
$(CONTROLLERS_ALGO_SRC) \
|
||||
$(CONTROLLERS_CORE_SRC) \
|
||||
$(CONTROLLERS_SENSORS_SRC) \
|
||||
$(FATFSSRC) \
|
||||
$(SYSTEMSRC)
|
||||
|
||||
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
|
||||
# setting.
|
||||
CPPSRC = $(CHCPPSRC) \
|
||||
$(TRIGGER_SRC_CPP) \
|
||||
$(TRIGGER_DECODERS_SRC_CPP) \
|
||||
$(DEV_SRC_CPP) \
|
||||
$(CONTROLLERS_ALGO_SRC_CPP) \
|
||||
$(SYSTEMSRC_CPP) \
|
||||
$(ENGINES_SRC_CPP) \
|
||||
$(HW_LAYER_EMS_CPP) \
|
||||
$(HW_SENSORS_SRC) \
|
||||
$(TUNERSTUDIO_SRC_CPP) \
|
||||
$(CONSOLE_SRC_CPP) \
|
||||
$(CONTROLLERS_SENSORS_SRC_CPP) \
|
||||
$(CONTROLLERS_SRC_CPP) \
|
||||
$(UTILSRC_CPP) \
|
||||
$(CONTROLLERS_CORE_SRC_CPP) \
|
||||
$(CONTROLLERS_MATH_SRC_CPP) \
|
||||
rusefi.cpp \
|
||||
main.cpp
|
||||
|
||||
# C sources to be compiled in ARM mode regardless of the global setting.
|
||||
# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
|
||||
# option that results in lower performance and larger code size.
|
||||
ACSRC =
|
||||
|
||||
# C++ sources to be compiled in ARM mode regardless of the global setting.
|
||||
# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
|
||||
# option that results in lower performance and larger code size.
|
||||
ACPPSRC =
|
||||
|
||||
# C sources to be compiled in THUMB mode regardless of the global setting.
|
||||
# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
|
||||
# option that results in lower performance and larger code size.
|
||||
TCSRC =
|
||||
|
||||
# C sources to be compiled in THUMB mode regardless of the global setting.
|
||||
# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
|
||||
# option that results in lower performance and larger code size.
|
||||
TCPPSRC =
|
||||
|
||||
# List ASM source files here
|
||||
ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM)
|
||||
|
||||
INCDIR = $(PORTINC) \
|
||||
$(OSALINC) \
|
||||
$(KERNINC) \
|
||||
$(TESTINC) \
|
||||
$(STARTUPINC) \
|
||||
$(HALINC) \
|
||||
$(PLATFORMINC) \
|
||||
$(BOARDINC) \
|
||||
$(CHCPPINC) \
|
||||
$(CHIBIOS)/os/hal/lib/streams \
|
||||
$(CHIBIOS)/os/various \
|
||||
$(CHIBIOS)/os/various/devices_lib/accel \
|
||||
config/stm32f4ems \
|
||||
config/engines \
|
||||
config \
|
||||
chibios/os/various \
|
||||
ext \
|
||||
ext_algo \
|
||||
util \
|
||||
console_util \
|
||||
console \
|
||||
$(PROJECT_DIR)/console/binary \
|
||||
$(PROJECT_DIR)/console/fl_binary \
|
||||
$(PROJECT_DIR)/hw_layer \
|
||||
$(PROJECT_DIR)/mass_storage \
|
||||
hw_layer/serial_over_usb \
|
||||
hw_layer/algo \
|
||||
hw_layer/lcd \
|
||||
hw_layer/sensors \
|
||||
hw_layer/mass_storage \
|
||||
hw_layer/stm32f4 \
|
||||
development \
|
||||
development/hw_layer \
|
||||
development/test \
|
||||
controllers \
|
||||
controllers/sensors \
|
||||
controllers/system \
|
||||
controllers/algo \
|
||||
controllers/core \
|
||||
controllers/math \
|
||||
controllers/trigger/decoders \
|
||||
controllers/trigger
|
||||
|
||||
#
|
||||
# Project, sources and paths
|
||||
##############################################################################
|
||||
|
||||
##############################################################################
|
||||
# Compiler settings
|
||||
#
|
||||
|
||||
MCU = cortex-m4
|
||||
|
||||
#TRGT = arm-elf-
|
||||
TRGT = arm-none-eabi-
|
||||
CC = $(TRGT)gcc
|
||||
CPPC = $(TRGT)g++
|
||||
# Enable loading with g++ only if you need C++ runtime support.
|
||||
# NOTE: You can use C++ even without C++ support if you are careful. C++
|
||||
# runtime support makes code size explode.
|
||||
LD = $(TRGT)gcc
|
||||
#LD = $(TRGT)g++
|
||||
CP = $(TRGT)objcopy
|
||||
AS = $(TRGT)gcc -x assembler-with-cpp
|
||||
OD = $(TRGT)objdump
|
||||
SZ = $(TRGT)size
|
||||
HEX = $(CP) -O ihex
|
||||
BIN = $(CP) -O binary
|
||||
|
||||
# ARM-specific options here
|
||||
AOPT =
|
||||
|
||||
# THUMB-specific options here
|
||||
TOPT = -mthumb -DTHUMB
|
||||
|
||||
# Define C warning options here
|
||||
CWARN = -Wall -Wextra -Wstrict-prototypes
|
||||
|
||||
# Define C++ warning options here
|
||||
CPPWARN = -Wall -Wextra
|
||||
|
||||
#
|
||||
# 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
|
||||
#
|
||||
|
||||
# List all user C define here, like -D_DEBUG=1
|
||||
UDEFS =
|
||||
|
||||
# Define ASM defines here
|
||||
UADEFS =
|
||||
|
||||
# List all user directories here
|
||||
UINCDIR =
|
||||
|
||||
# List the user directory to look for the libraries here
|
||||
ULIBDIR =
|
||||
|
||||
# List all user libraries here
|
||||
ULIBS = -lm
|
||||
|
||||
#
|
||||
# End of user defines
|
||||
##############################################################################
|
||||
|
||||
RULESPATH = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC
|
||||
include $(RULESPATH)/rules.mk
|
Loading…
Reference in New Issue