TARGETS = projects/gcc/tools modules service_hw #iap BUILDDIR = build .PHONY: all config $(TARGETS) tools distclean all: config $(TARGETS) CFLAGS += -DHARDWARE_$(HARDWARE) bt6702: @$(MAKE) HARDWARE=$@ $(TARGETS): @$(MAKE) -C $@ clean: $(TARGETS) distclean: rm -rf build output output: $(TARGETS) openocd_ups: $(shell openocd -f projects/gcc/configs/stm32f4discovery.cfg) gdb: $(shell arm-none-eabi-gdb build/stm32bt6702/stm32bt6702.elf) reset: st-flash --reset read /dev/null 0x8000000 1 erase: st-flash --reset erase iapflash: st-flash --reset write output/iap.bin 0x8000000 fwflash: st-flash --reset write output/stm32bt6702.bin 0x8020000 fullflash: st-flash --reset write output/iap.bin 0x8000000 sleep 1 st-flash --reset write output/stm32bt6702.bin 0x8020000