mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-08-30 22:48:51 +00:00
This commit add support to the Kbuild system for the NUM_TASK_PRIORITIES Kconfig symbol and the corresponding sysgen parameter. Change-Id: I6b035437c86d62f72c25d696d18182a7b0448e8f Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
113 lines
3.5 KiB
Makefile
113 lines
3.5 KiB
Makefile
ifneq ($(strip $(CONFIG_MAX_NUM_TASK_IRQS)),)
|
|
ifneq (${CONFIG_MAX_NUM_TASK_IRQS},0)
|
|
TASK_IRQS=y
|
|
endif
|
|
endif
|
|
|
|
define filechk_prj.vpf
|
|
(echo "% WARNING. THIS FILE IS AUTO-GENERATED. DO NOT MODIFY!"; \
|
|
echo; \
|
|
echo "% CONFIG NUM_COMMAND_PACKETS NUM_TIMER_PACKETS NUM_TASK_PRIORITIES"; \
|
|
echo "% ============================================================="; \
|
|
echo " CONFIG ${CONFIG_NUM_COMMAND_PACKETS} ${CONFIG_NUM_TIMER_PACKETS} ${CONFIG_NUM_TASK_PRIORITIES}"; \
|
|
echo; \
|
|
echo "% TASKGROUP NAME";\
|
|
echo "% ==============";\
|
|
echo " TASKGROUP EXE";\
|
|
echo " TASKGROUP SYS";\
|
|
echo " TASKGROUP FPU";\
|
|
echo " TASKGROUP SSE";\
|
|
echo; \
|
|
if test "$(TASK_IRQS)" = "y"; then \
|
|
echo "% Task IRQ objects";\
|
|
echo "% EVENT NAME HANDLER"; \
|
|
echo "% ======================================="; \
|
|
for (( i=0; i < $(CONFIG_MAX_NUM_TASK_IRQS); i++ )) do \
|
|
echo " EVENT _TaskIrqEvt$$i NULL"; \
|
|
done; \
|
|
fi; \
|
|
cat $(PROJECT)/$(VPFILE); \
|
|
cat $(srctree)/config/$(CONFIG_BSP_DIR)/ukernel/config1p.vpf;)
|
|
endef
|
|
|
|
#Specific source code generation for Viper
|
|
misc/generated/nodes/prj.vpf: $(srctree)/config/$(CONFIG_BSP_DIR)/ukernel/config1p.vpf \
|
|
$(PROJECT)/$(VPFILE) \
|
|
include/config/auto.conf FORCE
|
|
$(call filechk,prj.vpf)
|
|
|
|
misc/generated/nodes/microkernel_objects.h: misc/generated/nodes/prj.vpf FORCE
|
|
$(Q)$(srctree)/scripts/sysgen.py $(CURDIR)/misc/generated/nodes/prj.vpf $(CURDIR)/misc/generated/nodes/
|
|
|
|
define filechk_configs.c
|
|
(echo "/* file is auto-generated, do not modify ! */"; \
|
|
echo; \
|
|
echo "#include <absSym.h>"; \
|
|
echo; \
|
|
echo "GEN_ABS_SYM_BEGIN (_ConfigAbsSyms)"; \
|
|
echo; \
|
|
cat $(CURDIR)/include/generated/autoconf.h | sed \
|
|
's/".*"/1/' | awk \
|
|
'/#define/{printf "GEN_ABSOLUTE_SYM(%s, %s);\n", $$2, $$3}'; \
|
|
echo; \
|
|
echo "GEN_ABS_SYM_END";)
|
|
endef
|
|
|
|
misc/generated/configs.c: include/config/auto.conf FORCE
|
|
$(call filechk,configs.c)
|
|
|
|
define filechk_offsets.h
|
|
(echo "/* THIS FILE IS AUTO-GENERATED. PLEASE DO NOT EDIT */"; \
|
|
echo; \
|
|
echo "/*"; \
|
|
echo " * This header file provides macros for the offsets of various structure"; \
|
|
echo " * members. These offset macros are primarily intended to be used in"; \
|
|
echo " * assembly code."; \
|
|
echo " */"; \
|
|
echo; \
|
|
echo "/*"; \
|
|
echo " * Auto-generated header guard."; \
|
|
echo " */"; \
|
|
echo "#ifndef _OFFSETS_H_"; \
|
|
echo "#define _OFFSETS_H_"; \
|
|
echo; \
|
|
echo "#ifdef __cplusplus"; \
|
|
echo "extern "C" {"; \
|
|
echo "#endif"; \
|
|
echo; \
|
|
echo "/* defines */"; \
|
|
echo; \
|
|
nm -g $(CURDIR)/include/generated/offsets.o | awk \
|
|
--non-decimal-data \
|
|
'{ if($$1 ~ /[0-9a-f]+/) {p1= "0x" $$1; printf "#define %s \t 0x%X\n", $$3, p1;} }'; \
|
|
echo; \
|
|
echo "#ifdef __cplusplus"; \
|
|
echo "}"; \
|
|
echo "#endif"; \
|
|
echo; \
|
|
echo "#endif /* _OFFSETS_H_ */";)
|
|
endef
|
|
|
|
include/generated/offsets.h: include/generated/offsets.o include/config/auto.conf FORCE
|
|
$(call filechk,offsets.h)
|
|
|
|
define rule_cc_o_c
|
|
$(call echo-cmd,cc_o_c) $(cmd_cc_o_c);
|
|
endef
|
|
|
|
OFFSETS_INCLUDE = $(strip \
|
|
-I $(srctree)/include \
|
|
-I $(CURDIR)/include/generated \
|
|
-I $(srctree)/kernel/microkernel/include \
|
|
-I $(srctree)/kernel/nanokernel/include \
|
|
-I $(srctree)/target/src/kernel/arch/common/include \
|
|
-I $(srctree)/lib/libc/minimal/include \
|
|
-I $(srctree)/arch/${SRCARCH}/include )
|
|
|
|
cmd_cc_o_c = $(CC) $(KBUILD_CFLAGS) $(OFFSETS_INCLUDE) $(USERINCLUDE) -c -o $@ $<
|
|
|
|
include/generated/offsets.o: $(srctree)/arch/$(SRCARCH)/core/offsets/offsets.c FORCE
|
|
$(call if_changed_rule,cc_o_c)
|
|
|
|
.PHONY: $(srctree)/config/$(CONFIG_BSP_DIR)/ukernel/config1p.vpf
|