aboutsummaryrefslogtreecommitdiffstats
path: root/demos/NRF52/Classic/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'demos/NRF52/Classic/Makefile')
-rw-r--r--demos/NRF52/Classic/Makefile48
1 files changed, 16 insertions, 32 deletions
diff --git a/demos/NRF52/Classic/Makefile b/demos/NRF52/Classic/Makefile
index 0f318b1..8742dd3 100644
--- a/demos/NRF52/Classic/Makefile
+++ b/demos/NRF52/Classic/Makefile
@@ -3,9 +3,6 @@
# NOTE: Can be overridden externally.
#
-PLATFORM=NRF5/NRF52832
-BOARD=NRF52-DK
-
# Compiler options here.
ifeq ($(USE_OPT),)
USE_OPT = -Os -ggdb -fomit-frame-pointer -falign-functions=16 -std=c11
@@ -49,7 +46,7 @@ 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 = no
+ USE_SMART_BUILD = yes
endif
#
@@ -91,19 +88,23 @@ 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_nrf52.mk
# HAL-OSAL files (optional).
-include $(CHIBIOS)/os/hal/hal.mk
include $(CHIBIOS_CONTRIB)/os/hal/hal.mk
-include $(CHIBIOS_CONTRIB)/os/hal/ports/$(PLATFORM)/platform.mk
-include $(CHIBIOS_CONTRIB)/os/hal/boards/$(BOARD)/board.mk
+include $(CHIBIOS_CONTRIB)/os/hal/ports/NRF5/NRF52832/platform.mk
+include $(CHIBIOS_CONTRIB)/os/hal/boards/NRF52-DK/board.mk
include $(CHIBIOS)/os/hal/osal/rt/osal.mk
+include $(CHIBIOS)/os/hal/lib/streams/streams.mk
# RTOS files (optional).
include $(CHIBIOS)/os/rt/rt.mk
include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
# Other files (optional).
-include $(CHIBIOS)/test/rt/test.mk
+include $(CHIBIOS)/test/lib/test.mk
+include $(CHIBIOS)/test/rt/rt_test.mk
+include $(CHIBIOS)/test/oslib/oslib_test.mk
include $(CHIBIOS)/os/various/shell/shell.mk
# Define linker script file here
@@ -111,23 +112,13 @@ LDSCRIPT= $(STARTUPLD)/NRF52832.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) \
- $(SHELLSRC) \
- $(CHIBIOS)/os/hal/lib/streams/memstreams.c \
- $(CHIBIOS)/os/hal/lib/streams/chprintf.c
-
-CSRC += main.c
+ 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
@@ -150,18 +141,11 @@ TCSRC =
TCPPSRC =
# List ASM source files here
-ASMSRC =
-ASMXSRC = $(STARTUPASM) $(PORTASM) $(OSALASM)
-
-
-INCDIR = $(CHIBIOS)/os/license \
- $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \
- $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \
- $(SHELLINC) \
- $(CHIBIOS)/os/hal/lib/streams $(CHIBIOS)/os/various
-
+ASMSRC = $(ALLASMSRC)
+ASMXSRC = $(ALLXASMSRC)
-INCDIR += $(CHIBIOS_CONTRIB)/os/various
+INCDIR = $(ALLINC) $(TESTINC) \
+ $(TESTHAL)
#
# Project, sources and paths