aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/KINETIS/FRDM-KL25Z/ADC/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'testhal/KINETIS/FRDM-KL25Z/ADC/Makefile')
-rw-r--r--testhal/KINETIS/FRDM-KL25Z/ADC/Makefile40
1 files changed, 22 insertions, 18 deletions
diff --git a/testhal/KINETIS/FRDM-KL25Z/ADC/Makefile b/testhal/KINETIS/FRDM-KL25Z/ADC/Makefile
index d5120b9..0a813ec 100644
--- a/testhal/KINETIS/FRDM-KL25Z/ADC/Makefile
+++ b/testhal/KINETIS/FRDM-KL25Z/ADC/Makefile
@@ -5,12 +5,12 @@
# Compiler options here.
ifeq ($(USE_OPT),)
- USE_OPT = -O0 -ggdb -fomit-frame-pointer -falign-functions=16
+ USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16
endif
# C specific options here (added to USE_OPT).
ifeq ($(USE_COPT),)
- USE_COPT = -std=gnu99
+ USE_COPT =
endif
# C++ specific options here (added to USE_OPT).
@@ -30,7 +30,7 @@ endif
# Enable this if you want link time optimizations (LTO)
ifeq ($(USE_LTO),)
- USE_LTO = no
+ USE_LTO = yes
endif
# If enabled, this option allows to compile the application in THUMB mode.
@@ -69,6 +69,11 @@ ifeq ($(USE_EXCEPTIONS_STACKSIZE),)
USE_EXCEPTIONS_STACKSIZE = 0x400
endif
+# Enables the use of FPU on Cortex-M4 (no, softfp, hard).
+ifeq ($(USE_FPU),)
+ USE_FPU = no
+endif
+
#
# Architecture or project specific options
##############################################################################
@@ -83,32 +88,32 @@ PROJECT = ch
# Imported source files and paths
CHIBIOS = ../../../../../ChibiOS-RT
CHIBIOS_CONTRIB = $(CHIBIOS)/../ChibiOS-Contrib
-
+# Licensing files.
+include $(CHIBIOS)/os/license/license.mk
+# Startup files.
include $(CHIBIOS_CONTRIB)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_kl2x.mk
+# HAL-OSAL files (optional).
include $(CHIBIOS)/os/hal/hal.mk
include $(CHIBIOS_CONTRIB)/os/hal/ports/KINETIS/KL2x/platform.mk
include $(CHIBIOS_CONTRIB)/os/hal/boards/FREESCALE_FREEDOM_KL25Z/board.mk
include $(CHIBIOS)/os/hal/osal/rt/osal.mk
+# RTOS files (optional).
include $(CHIBIOS)/os/rt/rt.mk
include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v6m.mk
+# Other files (optional).
# Define linker script file here
LDSCRIPT= $(STARTUPLD)/MKL2xZ128.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) \
+CSRC = $(ALLCSRC) \
+ $(TESTSRC) \
main.c
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
-CPPSRC =
+CPPSRC = $(ALLCPPSRC)
# C sources to be compiled in ARM mode regardless of the global setting.
# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
@@ -131,13 +136,11 @@ TCSRC =
TCPPSRC =
# List ASM source files here
-ASMSRC =
-ASMXSRC = $(STARTUPASM) $(PORTASM) $(OSALASM)
+ASMSRC = $(ALLASMSRC)
+ASMXSRC = $(ALLXASMSRC)
-INCDIR = $(CHIBIOS)/os/license \
- $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \
- $(HALINC) $(PLATFORMINC) $(BOARDINC) \
- $(CHIBIOS)/os/various
+INCDIR = $(ALLINC) $(TESTINC) \
+ $(TESTHAL)
#
# Project, sources and paths
@@ -160,6 +163,7 @@ LD = $(TRGT)gcc
#LD = $(TRGT)g++
CP = $(TRGT)objcopy
AS = $(TRGT)gcc -x assembler-with-cpp
+AR = $(TRGT)ar
OD = $(TRGT)objdump
SZ = $(TRGT)size
HEX = $(CP) -O ihex