Answer the question
In order to leave comments, you need to log in
Duplicate code for makefile purposes, how to avoid?
ubrige:
make -j5 TARGET=unwired BOARD=$(BOARD)/$(CPU) -f makefiles/Makefile.[email protected]
../bootloader/generate-metadata/generate-metadata [email protected].bin 0x0 0x01A00001 1
srec_cat firmware-metadata.bin -binary [email protected].bin -binary -offset 0x100 -o [email protected]-ota-image.bin -binary
rm [email protected].hex
ubrige-fb: ubrige-CLEAN
../../tools/backdoor-bootloader.py -e -w -v ubrige-firmware.hex
ubrige-f: ubrige-CLEAN
/Applications/ti/Uniflash/flash_cc1310.sh ubrige-firmware.hex
ubrige-ota: ubrige
scp ubrige-ota-image.bin [email protected]:/root/unwired_smarthome
Answer the question
In order to leave comments, you need to log in
How do I get rid of duplicating code that is the same for several targets, but differs in filenames (let the filenames be the same as the target name)?
define generate-targets
$(1):
make -j5 TARGET=unwired BOARD=$$(BOARD)/$$(CPU) -f makefiles/[email protected]
../bootloader/generate-metadata/generate-metadata [email protected] 0x0 0x01A00001 1
srec_cat firmware-metadata.bin -binary [email protected] -binary -offset 0x100 -o [email protected] -binary
rm [email protected]
$(1)-fb: $(1)-CLEAN
../../tools/backdoor-bootloader.py -e -w -v $(1)-firmware.hex
$(1)-f: $(1)-CLEAN
/Applications/ti/Uniflash/flash_cc1310.sh $(1)-firmware.hex
$(1)-ota: $(1)
scp $(1)-ota-image.bin [email protected]:/root/unwired_smarthome
endef
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question