aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32L1xx/IRQ_STORM/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'testhal/STM32L1xx/IRQ_STORM/Makefile')
-rw-r--r--testhal/STM32L1xx/IRQ_STORM/Makefile64
1 files changed, 25 insertions, 39 deletions
diff --git a/testhal/STM32L1xx/IRQ_STORM/Makefile b/testhal/STM32L1xx/IRQ_STORM/Makefile
index 0d3a8e2b2..d52983d00 100644
--- a/testhal/STM32L1xx/IRQ_STORM/Makefile
+++ b/testhal/STM32L1xx/IRQ_STORM/Makefile
@@ -23,6 +23,11 @@ ifeq ($(USE_LINK_GC),)
USE_LINK_GC = yes
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
@@ -41,9 +46,16 @@ endif
# Architecture or project specific options
#
-# Enable this if you really want to use the STM FWLib.
-ifeq ($(USE_FWLIB),)
- USE_FWLIB = no
+# 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 = 0x400
+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 = 0x400
endif
#
@@ -59,11 +71,12 @@ PROJECT = ch
# Imported source files and paths
CHIBIOS = ../../..
-include $(CHIBIOS)/boards/ST_STM32L_DISCOVERY/board.mk
-include $(CHIBIOS)/os/hal/platforms/STM32L1xx/platform.mk
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32L1xx/port.mk
-include $(CHIBIOS)/os/kernel/kernel.mk
+include $(CHIBIOS)/os/hal/boards/ST_STM32L_DISCOVERY/board.mk
+include $(CHIBIOS)/os/hal/ports/STM32L1xx/platform.mk
+include $(CHIBIOS)/os/rt/rt.mk
+include $(CHIBIOS)/os/rt/osal/osal.mk
+include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32l1xx.mk
#include $(CHIBIOS)/test/test.mk
# Define linker script file here
@@ -75,6 +88,7 @@ CSRC = $(PORTSRC) \
$(KERNSRC) \
$(TESTSRC) \
$(HALSRC) \
+ $(OSALSRC) \
$(PLATFORMSRC) \
$(BOARDSRC) \
main.c
@@ -107,7 +121,7 @@ TCPPSRC =
ASMSRC = $(PORTASM)
INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
- $(HALINC) $(PLATFORMINC) $(BOARDINC) \
+ $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \
$(CHIBIOS)/os/various
#
@@ -132,6 +146,7 @@ LD = $(TRGT)gcc
CP = $(TRGT)objcopy
AS = $(TRGT)gcc -x assembler-with-cpp
OD = $(TRGT)objdump
+SZ = $(TRGT)size
HEX = $(CP) -O ihex
BIN = $(CP) -O binary
@@ -152,29 +167,6 @@ CPPWARN = -Wall -Wextra
##############################################################################
##############################################################################
-# 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
#
@@ -197,11 +189,5 @@ ULIBS =
# End of user defines
##############################################################################
-ifeq ($(USE_FWLIB),yes)
- include $(CHIBIOS)/ext/stm32lib/stm32lib.mk
- CSRC += $(STM32SRC)
- INCDIR += $(STM32INC)
- USE_OPT += -DUSE_STDPERIPH_DRIVER
-endif
-
-include $(CHIBIOS)/os/ports/GCC/ARMCMx/rules.mk
+RULESPATH = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC
+include $(RULESPATH)/rules.mk