diff --git a/firmware/rusefi.mk b/firmware/rusefi.mk index e3b9d7bd55..8f4e8f8fe7 100644 --- a/firmware/rusefi.mk +++ b/firmware/rusefi.mk @@ -1,6 +1,7 @@ -ifeq ("$(wildcard $(RULESFILE))","") -$(info $(RULESFILE) not found. Chibios: Invoking "git submodule update --init") +CHIBIOS_FILE=$(CHIBIOS)/os/readme.txt +ifeq ("$(wildcard $(CHIBIOS_FILE))","") +$(info $(CHIBIOS_FILE) not found. Chibios: 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 diff --git a/simulator/Makefile b/simulator/Makefile index 977c5bbc03..31a933ab63 100644 --- a/simulator/Makefile +++ b/simulator/Makefile @@ -7,16 +7,15 @@ # As of Sep 2019, this is known to compile on Linux # in my case I had to # sudo apt-get install gcc-multilib g++-multilib -# +# # todo: automatically execute that command same as we automatically fetch submodules? -# +# CHIBIOS = ../firmware/ChibiOS CHIBIOS_CONTRIB= ../firmware/ChibiOS-Contrib RULESPATH = $(CHIBIOS)/os/common/startup/SIMIA32/compilers/GCC -RULESFILE = $(RULESPATH)/rules.mk PROJECT_CPU=simulator @@ -85,7 +84,7 @@ endif # Linker extra options here. ifeq ($(USE_LDOPT),) - USE_LDOPT = + USE_LDOPT = endif # Enable this if you want link time optimizations (LTO) @@ -216,13 +215,13 @@ $(info OS is [${OS}]) ifeq ($(OS),Windows_NT) # ChibiOS seem to require 32 bit compiler at least on Windows - # base 32-bit Cygwin is needed with mingw64 32-bit version + # base 32-bit Cygwin is needed with mingw64 32-bit version # Cygwin64 would not debug if used with mingw64 32-bit version # 32 bit GDB available at http://www.equation.com/servlet/equation.cmd?fa=gdb TRGT = i686-w64-mingw32- else - TRGT = + TRGT = endif CC = $(TRGT)gcc