diff --git a/firmware/Makefile b/firmware/Makefile index 92bfbc9..a17dc25 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -196,6 +196,15 @@ endif # RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk + +ifeq ("$(wildcard $(RULESPATH)/rules.mk)","") +$(info Invoking "git submodule update --init") +$(shell git submodule update --init) +$(info Invoked "git submodule update --init") +# make is not happy about newly checked out module for some reason but next invocation would work +$(error Please run 'make' again. Please make sure you have 'git' command in PATH) +endif + include $(RULESPATH)/arm-none-eabi.mk include $(RULESPATH)/rules.mk