diff --git a/make_helpers/build_macros.mk b/make_helpers/build_macros.mk index 1fa26cc..b6925d3 100644 --- a/make_helpers/build_macros.mk +++ b/make_helpers/build_macros.mk @@ -67,6 +67,17 @@ $(if $(__numeric),$(error $(1) must be numeric)) endef +# CREATE_SEQ is a recursive function to create sequence of numbers from 1 to +# $(2) and assign the sequence to $(1) +define CREATE_SEQ +$(if $(word $(2), $($(1))),\ + $(eval $(1) += $(words $($(1))))\ + $(eval $(1) := $(filter-out 0,$($(1)))),\ + $(eval $(1) += $(words $($(1))))\ + $(call CREATE_SEQ,$(1),$(2))\ +) +endef + # IMG_LINKERFILE defines the linker script corresponding to a BL stage # $(1) = BL stage (2, 30, 31, 32, 33) define IMG_LINKERFILE