Open Lakshay983 opened 1 month ago
In my top level makefile I should be able to add a DEFINE while making my project. This can be to add defines or to override defines
For example, in BPS I may want to set the NUM_BATTERY_MODULES define to 34 In the BPS repo you can run make test=Voltage DEFINES=NUM_BATTERY_MODULES=34 https://github.com/lhr-solar/BPS/blob/master/BSP/STM32F413/Makefile
make test=Voltage DEFINES=NUM_BATTERY_MODULES=34
ifneq ($(DEFINES), none) # need to split defines PREFIXED = $(addprefix -D,$(DEFINES)) SPLIT = $(subst /, -D, $(PREFIXED)) CFLAGS += $(SPLIT) endif
In my top level makefile I should be able to add a DEFINE while making my project. This can be to add defines or to override defines
For example, in BPS I may want to set the NUM_BATTERY_MODULES define to 34 In the BPS repo you can run
make test=Voltage DEFINES=NUM_BATTERY_MODULES=34
https://github.com/lhr-solar/BPS/blob/master/BSP/STM32F413/Makefile