aboutsummaryrefslogtreecommitdiffstats
path: root/demos/STM32/RT-STM32F103_INEMO_DISCOVERY/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'demos/STM32/RT-STM32F103_INEMO_DISCOVERY/Makefile')
-rw-r--r--demos/STM32/RT-STM32F103_INEMO_DISCOVERY/Makefile64
1 files changed, 30 insertions, 34 deletions
diff --git a/demos/STM32/RT-STM32F103_INEMO_DISCOVERY/Makefile b/demos/STM32/RT-STM32F103_INEMO_DISCOVERY/Makefile
index 3aedb30c5..fac6c60c9 100644
--- a/demos/STM32/RT-STM32F103_INEMO_DISCOVERY/Makefile
+++ b/demos/STM32/RT-STM32F103_INEMO_DISCOVERY/Makefile
@@ -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.
@@ -51,6 +51,23 @@ endif
# 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 = 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
+
+# Enables the use of FPU on Cortex-M4.
+ifeq ($(USE_FPU),)
+ USE_FPU = no
+endif
+
#
# Architecture or project specific options
##############################################################################
@@ -63,13 +80,14 @@ endif
PROJECT = ch
# Imported source files and paths
-CHIBIOS = ../..
-include $(CHIBIOS)/boards/ST_INEMO_M1_DISCOVERY/board.mk
-include $(CHIBIOS)/os/hal/platforms/STM32F1xx/platform.mk
+CHIBIOS = ../../..
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F1xx/port.mk
-include $(CHIBIOS)/os/kernel/kernel.mk
-include $(CHIBIOS)/test/test.mk
+include $(CHIBIOS)/os/hal/boards/ST_INEMO_M1_DISCOVERY/board.mk
+include $(CHIBIOS)/os/hal/ports/STM32/STM32F1xx/platform.mk
+include $(CHIBIOS)/os/hal/osal/rt/osal.mk
+include $(CHIBIOS)/os/rt/rt.mk
+include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f1xx.mk
+include $(CHIBIOS)/test/rt/test.mk
# Define linker script file here
LDSCRIPT= $(PORTLD)/STM32F103xE.ld
@@ -80,12 +98,12 @@ CSRC = $(PORTSRC) \
$(KERNSRC) \
$(TESTSRC) \
$(HALSRC) \
+ $(OSALSRC) \
$(PLATFORMSRC) \
$(BOARDSRC) \
$(CHIBIOS)/os/various/shell.c \
$(CHIBIOS)/os/various/chprintf.c \
- $(CHIBIOS)/os/various/memstreams.c \
- main.c
+ usbcfg.c main.c
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
@@ -115,7 +133,7 @@ TCPPSRC =
ASMSRC = $(PORTASM)
INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
- $(HALINC) $(PLATFORMINC) $(BOARDINC) \
+ $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \
$(CHIBIOS)/os/various
#
@@ -139,6 +157,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
@@ -161,29 +180,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
#
@@ -206,5 +202,5 @@ ULIBS =
# End of user defines
##############################################################################
-RULESPATH = $(CHIBIOS)/os/ports/GCC/ARMCMx
+RULESPATH = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC
include $(RULESPATH)/rules.mk