Makefile.f1 850 B

1234567891011121314151617181920212223242526272829303132
  1. #
  2. # PX4 bootloader build rules for STM32F1 targets.
  3. #
  4. ARCH=stm32
  5. OPENOCD ?= ../../sat/bin/openocd
  6. JTAGCONFIG ?= interface/olimex-jtag-tiny.cfg
  7. #JTAGCONFIG ?= interface/jtagkey-tiny.cfg
  8. # 3 seconds / 3000 ms default delay
  9. PX4_BOOTLOADER_DELAY ?= 3000
  10. SRCS = $(COMMON_SRCS) $(addprefix $(ARCH)/,$(ARCH_SRCS)) main_f1.c
  11. FLAGS += -mthumb -mcpu=cortex-m3\
  12. -DTARGET_HW_$(TARGET_HW) \
  13. -DSTM32F1 \
  14. -T$(LINKER_FILE) \
  15. -L$(LIBOPENCM3)/lib \
  16. -lopencm3_stm32f1
  17. #
  18. # General rules for making dependency and object files
  19. # This is where the compiler is called
  20. #
  21. include rules.mk
  22. #upload: all flash flash-bootloader
  23. upload: all flash-bootloader
  24. flash-bootloader:
  25. $(OPENOCD) --search ../px4_bootloader -f $(JTAGCONFIG) -f stm32f1.cfg -c init -c "reset halt" -c "flash write_image erase $(BINARY)" -c "reset run" -c shutdown