1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 00:29:46 +01:00

core: split out library code

This commit splits core into it's scheduler/IPC part and into other code
that is either used or uses the scheduler, through defined APIs.
This commit is contained in:
Kaspar Schleiser 2020-10-22 13:37:31 +02:00
parent a3fc5c1d17
commit 3db7c1150a
35 changed files with 26 additions and 4 deletions

View File

@ -407,7 +407,10 @@ ifneq (,$(IOTLAB_NODE))
endif
# Add standard include directories
INCLUDES += -I$(RIOTBASE)/core/include -I$(RIOTBASE)/drivers/include -I$(RIOTBASE)/sys/include
INCLUDES += -I$(RIOTBASE)/core/lib/include
INCLUDES += -I$(RIOTBASE)/core/include
INCLUDES += -I$(RIOTBASE)/drivers/include
INCLUDES += -I$(RIOTBASE)/sys/include
# process provided features
include $(RIOTBASE)/Makefile.features

View File

@ -1,5 +1,6 @@
NATIVEINCLUDES += -DNATIVE_INCLUDES
NATIVEINCLUDES += -I$(RIOTBOARD)/native/include/
NATIVEINCLUDES += -I$(RIOTBASE)/core/lib/include/
NATIVEINCLUDES += -I$(RIOTBASE)/core/include/
NATIVEINCLUDES += -I$(RIOTBASE)/drivers/include/

View File

@ -1,5 +1,5 @@
# exclude submodule sources from *.c wildcard source selection
SRC := $(filter-out init.c mbox.c msg.c msg_bus.c panic.c thread_flags.c,$(wildcard *.c))
SRC := $(filter-out mbox.c msg.c msg_bus.c thread_flags.c,$(wildcard *.c))
# enable submodules
SUBMODULES := 1

12
core/lib/Makefile Normal file
View File

@ -0,0 +1,12 @@
MODULE = core_lib
# enable submodules
SUBMODULES := 1
# set this so the panic and init code is available as "core_panic" and "core_init"
# instead of "core_lib_..."
BASE_MODULE = core
# exclude submodule sources from *.c wildcard source selection
SRC := $(filter-out panic.c init.c,$(wildcard *.c))
include $(RIOTBASE)/Makefile.base

View File

@ -1,7 +1,7 @@
MODULE = $(APPLICATION_MODULE)
DIRS += $(RIOTCPU)/$(CPU) $(BOARDDIR)
DIRS += $(RIOTBASE)/core $(RIOTBASE)/drivers $(RIOTBASE)/sys
DIRS += $(RIOTBASE)/core $(RIOTBASE)/core/lib $(RIOTBASE)/drivers $(RIOTBASE)/sys
# For regular modules, adding files to BLOBS to their Makefile is sufficient to
# create the corresponding headers.

View File

@ -1,4 +1,7 @@
DEFAULT_MODULE += board board_common_init cpu core core_init core_msg core_panic sys
DEFAULT_MODULE += board board_common_init \
cpu \
core core_init core_lib core_msg core_panic \
sys
# Include potentially added default modules by the board
-include $(BOARDDIR)/Makefile.default

View File

@ -274,6 +274,9 @@ PSEUDOMODULES += ztimer64_%
## configuration header board.h. These can be found out by running tests/ztimer_overhead
PSEUDOMODULES += ztimer_auto_adjust
# core_lib is not a submodule
NO_PSEUDOMODULES += core_lib
# ztimer's main module is called "ztimer_core"
NO_PSEUDOMODULES += ztimer_core
NO_PSEUDOMODULES += netdev_ieee802154_submac