aboutsummaryrefslogtreecommitdiffstats
path: root/demos/various/RT-ARMCM0-GENERIC/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'demos/various/RT-ARMCM0-GENERIC/Makefile')
-rw-r--r--demos/various/RT-ARMCM0-GENERIC/Makefile37
1 files changed, 25 insertions, 12 deletions
diff --git a/demos/various/RT-ARMCM0-GENERIC/Makefile b/demos/various/RT-ARMCM0-GENERIC/Makefile
index dfd7b0106..b16c044e9 100644
--- a/demos/various/RT-ARMCM0-GENERIC/Makefile
+++ b/demos/various/RT-ARMCM0-GENERIC/Makefile
@@ -54,7 +54,7 @@ endif
# 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
+ USE_PROCESS_STACKSIZE = 0x200
endif
# Stack size to the allocated to the Cortex-M main/exceptions stack. This
@@ -76,16 +76,32 @@ PROJECT = ch
# Imported source files and paths
CHIBIOS = ../../..
+# Startup files.
+include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32f0xx.mk
+# HAL-OSAL files (optional).
+#include $(CHIBIOS)/os/hal/hal.mk
+#include $(CHIBIOS)/os/hal/ports/STM32/STM32F0xx/platform.mk
+#include $(CHIBIOS)/os/hal/boards/ST_STM32F072B_DISCOVERY/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_generic_cm0.mk
+include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_v6m.mk
+# Other files (optional).
+#include $(CHIBIOS)/test/rt/test.mk
# Define linker script file here
-LDSCRIPT= ch.ld
+LDSCRIPT= $(STARTUPLD)/STM32F051x8.ld
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
-CSRC = $(PORTSRC) \
+CSRC = $(STARTUPSRC) \
$(KERNSRC) \
+ $(PORTSRC) \
+ $(OSALSRC) \
+ $(HALSRC) \
+ $(PLATFORMSRC) \
+ $(BOARDSRC) \
+ $(TESTSRC) \
main.c
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
@@ -113,14 +129,11 @@ TCSRC =
TCPPSRC =
# List ASM source files here
-ASMSRC = $(PORTASM)
-
-# List of the standard inclusion directories.
-INCDIR = $(PORTINC) $(KERNINC)
-
-# Make this point to your CMSIS and chparams.h headers.
-INCDIR += $(CHIBIOS)/os/ext/CMSIS/ST \
- $(CHIBIOS)/os/common/ports/ARMCMx/devices/STM32F0xx
+ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM)
+
+INCDIR = $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \
+ $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \
+ $(CHIBIOS)/os/various
#
# Project, sources and paths