Makefile 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. bt6703:
  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/stm32bt6703/stm32bt6703.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_6703:
  25. st-flash --reset write output/stm32bt6703.bin 0x8020000
  26. fullflash_6703:
  27. st-flash --reset write output/iap.bin 0x8000000
  28. sleep 1
  29. st-flash --reset write output/stm32bt6703.bin 0x8020000
  30. fwflash_6707:
  31. st-flash --reset write output/stm32bt6707.bin 0x8020000
  32. fullflash_6707:
  33. st-flash --reset write output/iap.bin 0x8000000
  34. sleep 1
  35. st-flash --reset write output/stm32bt6707.bin 0x8020000
  36. fullflash_6709:
  37. st-flash --reset write output/iap.bin 0x8000000
  38. sleep 1
  39. st-flash --reset write output/stm32bt6709.bin 0x8020000
  40. fullflash_6710:
  41. st-flash --reset write output/iap.bin 0x8000000
  42. sleep 1
  43. st-flash --reset write output/stm32bt6710.bin 0x8020000
  44. release_6703:
  45. $(MAKE) -C modules HARDWARE=bt6703 VERBOSE=1 DEBUG=0 PRINTF=custom MAC=EC-4C-4D-00-80-0A release
  46. release_6707:
  47. $(MAKE) -C modules HARDWARE=bt6707 VERBOSE=1 DEBUG=0 PRINTF=custom MAC=EC-4C-4D-00-80-0A release
  48. release_6709_mts:
  49. $(MAKE) -C modules HARDWARE=bt6709 ORDER=mts VERBOSE=1 DEBUG=0 PRINTF=custom MAC=EC-4C-4D-00-80-0A release
  50. release_6709_beeline:
  51. $(MAKE) -C modules HARDWARE=bt6709 ORDER=beeline VERBOSE=1 DEBUG=0 PRINTF=custom MAC=EC-4C-4D-00-80-0A release
  52. release_6710:
  53. $(MAKE) -C modules HARDWARE=bt6710 VERBOSE=1 DEBUG=0 PRINTF=custom MAC=EC-4C-4D-00-80-0A release