2009-08-16 13:07:24 +00:00
|
|
|
# List of all the ChibiOS/RT kernel files, there is no need to remove the files
|
|
|
|
# from this list, you can disable parts of the kernel by editing chconf.h.
|
2015-05-08 14:04:32 +00:00
|
|
|
ifeq ($(USE_SMART_BUILD),yes)
|
|
|
|
CHCONF := $(strip $(shell cat chconf.h | egrep -e "define"))
|
|
|
|
|
|
|
|
KERNSRC := $(CHIBIOS)/os/rt/src/chsys.c \
|
|
|
|
$(CHIBIOS)/os/rt/src/chdebug.c \
|
|
|
|
$(CHIBIOS)/os/rt/src/chvt.c \
|
|
|
|
$(CHIBIOS)/os/rt/src/chschd.c \
|
|
|
|
$(CHIBIOS)/os/rt/src/chthreads.c
|
|
|
|
ifneq ($(findstring CH_CFG_USE_TM TRUE,$(CHCONF)),)
|
|
|
|
KERNSRC += $(CHIBIOS)/os/rt/src/chtm.c
|
|
|
|
endif
|
|
|
|
ifneq ($(findstring CH_DBG_STATISTICS TRUE,$(CHCONF)),)
|
|
|
|
KERNSRC += $(CHIBIOS)/os/rt/src/chstats.c
|
|
|
|
endif
|
|
|
|
ifneq ($(findstring CH_CFG_USE_REGISTRY TRUE,$(CHCONF)),)
|
|
|
|
KERNSRC += $(CHIBIOS)/os/rt/src/chregistry.c
|
|
|
|
endif
|
|
|
|
ifneq ($(findstring CH_CFG_USE_SEMAPHORES TRUE,$(CHCONF)),)
|
|
|
|
KERNSRC += $(CHIBIOS)/os/rt/src/chsem.c
|
|
|
|
endif
|
|
|
|
ifneq ($(findstring CH_CFG_USE_MUTEXES TRUE,$(CHCONF)),)
|
|
|
|
KERNSRC += $(CHIBIOS)/os/rt/src/chmtx.c
|
|
|
|
endif
|
|
|
|
ifneq ($(findstring CH_CFG_USE_CONDVARS TRUE,$(CHCONF)),)
|
|
|
|
KERNSRC += $(CHIBIOS)/os/rt/src/chcond.c
|
|
|
|
endif
|
|
|
|
ifneq ($(findstring CH_CFG_USE_EVENTS TRUE,$(CHCONF)),)
|
|
|
|
KERNSRC += $(CHIBIOS)/os/rt/src/chevents.c
|
|
|
|
endif
|
|
|
|
ifneq ($(findstring CH_CFG_USE_MESSAGES TRUE,$(CHCONF)),)
|
|
|
|
KERNSRC += $(CHIBIOS)/os/rt/src/chmsg.c
|
|
|
|
endif
|
|
|
|
ifneq ($(findstring CH_CFG_USE_QUEUES TRUE,$(CHCONF)),)
|
|
|
|
KERNSRC += $(CHIBIOS)/os/rt/src/chqueues.c
|
|
|
|
endif
|
2016-02-24 11:22:05 +00:00
|
|
|
ifneq ($(findstring CH_CFG_USE_DYNAMIC TRUE,$(CHCONF)),)
|
|
|
|
KERNSRC += $(CHIBIOS)/os/rt/src/chdynamic.c
|
|
|
|
endif
|
2016-02-16 10:07:00 +00:00
|
|
|
ifneq ($(findstring CH_CFG_USE_MAILBOXES TRUE,$(CHCONF)),)
|
|
|
|
KERNSRC += $(CHIBIOS)/os/common/oslib/src/chmboxes.c
|
|
|
|
endif
|
2015-05-08 14:04:32 +00:00
|
|
|
ifneq ($(findstring CH_CFG_USE_MEMCORE TRUE,$(CHCONF)),)
|
2016-02-16 10:07:00 +00:00
|
|
|
KERNSRC += $(CHIBIOS)/os/common/oslib/src/chmemcore.c
|
2015-05-08 14:04:32 +00:00
|
|
|
endif
|
|
|
|
ifneq ($(findstring CH_CFG_USE_HEAP TRUE,$(CHCONF)),)
|
2016-02-16 10:07:00 +00:00
|
|
|
KERNSRC += $(CHIBIOS)/os/common/oslib/src/chheap.c
|
2015-05-08 14:04:32 +00:00
|
|
|
endif
|
|
|
|
ifneq ($(findstring CH_CFG_USE_MEMPOOLS TRUE,$(CHCONF)),)
|
2016-02-16 10:07:00 +00:00
|
|
|
KERNSRC += $(CHIBIOS)/os/common/oslib/src/chmempools.c
|
|
|
|
endif
|
2015-05-08 14:04:32 +00:00
|
|
|
else
|
2016-02-16 10:07:00 +00:00
|
|
|
KERNSRC := $(CHIBIOS)/os/rt/src/chsys.c \
|
|
|
|
$(CHIBIOS)/os/rt/src/chdebug.c \
|
|
|
|
$(CHIBIOS)/os/rt/src/chvt.c \
|
|
|
|
$(CHIBIOS)/os/rt/src/chschd.c \
|
|
|
|
$(CHIBIOS)/os/rt/src/chthreads.c \
|
|
|
|
$(CHIBIOS)/os/rt/src/chtm.c \
|
|
|
|
$(CHIBIOS)/os/rt/src/chstats.c \
|
|
|
|
$(CHIBIOS)/os/rt/src/chregistry.c \
|
|
|
|
$(CHIBIOS)/os/rt/src/chsem.c \
|
|
|
|
$(CHIBIOS)/os/rt/src/chmtx.c \
|
|
|
|
$(CHIBIOS)/os/rt/src/chcond.c \
|
|
|
|
$(CHIBIOS)/os/rt/src/chevents.c \
|
|
|
|
$(CHIBIOS)/os/rt/src/chmsg.c \
|
|
|
|
$(CHIBIOS)/os/rt/src/chqueues.c \
|
2016-02-24 11:22:05 +00:00
|
|
|
$(CHIBIOS)/os/rt/src/chdynamic.c \
|
2016-02-16 10:07:00 +00:00
|
|
|
$(CHIBIOS)/os/common/oslib/src/chmboxes.c \
|
|
|
|
$(CHIBIOS)/os/common/oslib/src/chmemcore.c \
|
|
|
|
$(CHIBIOS)/os/common/oslib/src/chheap.c \
|
2016-02-24 11:22:05 +00:00
|
|
|
$(CHIBIOS)/os/common/oslib/src/chmempools.c
|
2015-05-08 14:04:32 +00:00
|
|
|
endif
|
2009-08-16 13:07:24 +00:00
|
|
|
|
|
|
|
# Required include directories
|
2016-02-16 10:07:00 +00:00
|
|
|
KERNINC := $(CHIBIOS)/os/rt/include \
|
|
|
|
$(CHIBIOS)/os/common/oslib/include
|