Makefile 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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. fwflash_6703_rt:
  27. st-flash --reset write output/stm32bt6703_rt.bin 0x8020000
  28. fullflash_6703:
  29. st-flash --reset write output/iap.bin 0x8000000
  30. sleep 1
  31. st-flash --reset write output/stm32bt6703.bin 0x8020000
  32. fullflash_6703_rt:
  33. st-flash --reset write output/iap.bin 0x8000000
  34. sleep 1
  35. st-flash --reset write output/stm32bt6703_rt.bin 0x8020000
  36. fwflash_6707:
  37. st-flash --reset write output/stm32bt6707.bin 0x8020000
  38. fullflash_6707:
  39. st-flash --reset write output/iap.bin 0x8000000
  40. sleep 1
  41. st-flash --reset write output/stm32bt6707.bin 0x8020000
  42. fullflash_6709:
  43. st-flash --reset write output/iap.bin 0x8000000
  44. sleep 1
  45. st-flash --reset write output/stm32bt6709.bin 0x8020000
  46. fullflash_6709_mts:
  47. st-flash --reset write output/iap.bin 0x8000000
  48. sleep 1
  49. st-flash --reset write output/stm32bt6709_mts.bin 0x8020000
  50. fullflash_6710:
  51. st-flash --reset write output/iap.bin 0x8000000
  52. sleep 1
  53. st-flash --reset write output/stm32bt6710.bin 0x8020000
  54. fullflash_6711:
  55. st-flash --reset write output/iap.bin 0x8000000
  56. sleep 1
  57. st-flash --reset write output/stm32bt6711.bin 0x8020000
  58. fwflash_6711_v1:
  59. st-flash --reset write output/stm32bt6711_v1.bin 0x8020000
  60. fullflash_6711_v1:
  61. st-flash --reset write output/iap.bin 0x8000000
  62. sleep 1
  63. st-flash --reset write output/stm32bt6711_v1.bin 0x8020000
  64. fwflash_6721:
  65. st-flash --reset write output/stm32bt6721.bin 0x8020000
  66. fullflash_6721:
  67. st-flash --reset write output/iap.bin 0x8000000
  68. sleep 1
  69. st-flash --reset write output/stm32bt6721.bin 0x8020000
  70. release_6703:
  71. $(MAKE) -C modules HARDWARE=bt6703 VERBOSE=1 DEBUG=0 PRINTF=custom MAC=EC-4C-4D-00-80-0A release
  72. release_6703_rt:
  73. $(MAKE) -C modules HARDWARE=bt6703_rt VERBOSE=1 DEBUG=0 PRINTF=custom MAC=EC-4C-4D-00-80-0A release
  74. release_6707:
  75. $(MAKE) -C modules HARDWARE=bt6707 VERBOSE=1 DEBUG=0 PRINTF=custom MAC=EC-4C-4D-00-80-0A release
  76. release_6709_mts:
  77. $(MAKE) -C modules HARDWARE=bt6709_mts VERBOSE=1 DEBUG=0 PRINTF=custom MAC=EC-4C-4D-00-80-0A release
  78. release_6709_beeline:
  79. $(MAKE) -C modules HARDWARE=bt6709 VERBOSE=1 DEBUG=0 PRINTF=custom MAC=EC-4C-4D-00-80-0A release
  80. release_6710:
  81. $(MAKE) -C modules HARDWARE=bt6710 VERBOSE=1 DEBUG=0 PRINTF=custom MAC=EC-4C-4D-00-80-0A release
  82. release_6711:
  83. $(MAKE) -C modules HARDWARE=bt6711 VERBOSE=1 DEBUG=0 PRINTF=custom MAC=EC-4C-4D-00-80-0A release
  84. release_6711_v1:
  85. $(MAKE) -C modules HARDWARE=bt6711_v1 VERBOSE=1 DEBUG=0 PRINTF=custom MAC=EC-4C-4D-00-80-0A release
  86. release_6721:
  87. $(MAKE) -C modules HARDWARE=bt6721 VERBOSE=1 DEBUG=0 PRINTF=custom MAC=EC-4C-4D-00-80-0A release