LP-500 HoTT Telemetry added device definitions
[librepilot.git] / flight / targets / common / entire_flash / Makefile
blob16a16e5f7997eb94969330307a34cab438a1fad8
2 # Copyright (c) 2009-2013, The OpenPilot Team, http://www.openpilot.org
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 # for more details.
14 # You should have received a copy of the GNU General Public License along
15 # with this program; if not, write to the Free Software Foundation, Inc.,
16 # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 ifndef FLIGHT_MAKEFILE
20 $(error Top level Makefile must be used to build this target)
21 endif
23 include ../../boards/$(BOARD_NAME)/board-info.mk
24 include $(FLIGHT_ROOT_DIR)/make/firmware-defs.mk
26 # Paths
27 TOPDIR = .
28 ENTIRE_FLASH = $(PYTHON) "$(TOPDIR)/entire-flash.py"
30 ifeq ($(V), 1)
31 EF_VERBOSE := --verbose
32 else
33 EF_VERBOSE :=
34 endif
36 .PHONY: bin
37 bin: $(OUTDIR)/$(TARGET).bin
39 BL_BIN = $(FLIGHT_OUT_DIR)/bl_$(BOARD_NAME)/bl_$(BOARD_NAME).bin
40 FW_BIN = $(FLIGHT_OUT_DIR)/fw_$(BOARD_NAME)/fw_$(BOARD_NAME).bin
41 FWINFO_BIN = $(FW_BIN).firmware_info.bin
43 $(OUTDIR)/$(TARGET).bin: $(BL_BIN) $(FW_BIN)
44 $(V0) @echo $(MSG_FLASH_IMG) $@
45 $(V1) $(ENTIRE_FLASH) \
46 $(EF_VERBOSE) \
47 --bl-bank-base=$(BL_BANK_BASE) \
48 --bl-bank-size=$(BL_BANK_SIZE) \
49 --fw-bank-base=$(FW_BANK_BASE) \
50 --fw-bank-size=$(FW_BANK_SIZE) \
51 --fw-desc-size=$(FW_DESC_SIZE) \
52 --bl-bin-path="$(BL_BIN)" \
53 --fw-bin-path="$(FW_BIN)" \
54 --fwinfo-bin-path="$(FWINFO_BIN)" \
55 --outfile="$@"
57 .PHONY: dfu
58 dfu: $(OUTDIR)/$(TARGET).bin
59 $(V0) @echo " DFU RESCUE $<"
60 $(V1) ( \
61 sudo $(DFU_CMD) -l && \
62 sudo $(DFU_CMD) -d 0483:df11 -c 1 -i 0 -a 0 -D $< -s $(BL_BANK_BASE) ; \