Makefile 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. TARGETS = projects/gcc/tools iap modules service_hw
  2. BUILDDIR = build
  3. .PHONY: all config $(TARGETS) tools distclean
  4. all: config $(TARGETS)
  5. CFLAGS += -DHARDWARE_$(HARDWARE)
  6. bt6702:
  7. @$(MAKE) HARDWARE=$@
  8. $(TARGETS):
  9. @$(MAKE) -C $@
  10. clean: $(TARGETS)
  11. distclean:
  12. rm -rf build output
  13. output: $(TARGETS)
  14. openocd_ups:
  15. $(shell openocd -f projects/gcc/configs/stm32f4discovery.cfg)
  16. gdb:
  17. $(shell arm-none-eabi-gdb build/stm32bt6702/stm32bt6702.elf)
  18. reset:
  19. st-flash --reset read /dev/null 0x8000000 1
  20. erase:
  21. st-flash --reset erase
  22. iapflash:
  23. st-flash --reset write output/iap.bin 0x8000000
  24. fwflash_6702:
  25. st-flash --reset write output/stm32bt6702.bin 0x8020000
  26. fullflash_6702:
  27. st-flash --reset write output/iap.bin 0x8000000
  28. sleep 1
  29. st-flash --reset write output/stm32bt6702.bin 0x8020000
  30. fwflash_6706:
  31. st-flash --reset write output/stm32bt6706.bin 0x8020000
  32. fullflash_6706:
  33. st-flash --reset write output/iap.bin 0x8000000
  34. sleep 1
  35. st-flash --reset write output/stm32bt6706.bin 0x8020000
  36. fullflash_6708:
  37. st-flash --reset write output/iap.bin 0x8000000
  38. sleep 1
  39. st-flash --reset write output/stm32bt6708.bin 0x8020000
  40. release_6702:
  41. $(MAKE) -C modules HARDWARE=bt6702 VERBOSE=1 DEBUG=0 PRINTF=custom MAC=EC-4C-4D-00-80-0A release
  42. release_6706:
  43. $(MAKE) -C modules HARDWARE=bt6706 VERBOSE=1 DEBUG=0 PRINTF=custom MAC=EC-4C-4D-00-80-0A release
  44. release_6708:
  45. $(MAKE) -C modules HARDWARE=bt6708 VERBOSE=1 DEBUG=0 PRINTF=custom MAC=EC-4C-4D-00-80-0A release