Revision 7cb69d0860d96534a4d433bb7ba1333ffd273b5f authored by Christophe De Wagter on 18 September 2013, 12:25:56 UTC, committed by Christophe De Wagter on 18 September 2013, 12:25:56 UTC
1 parent 0ddbf29
Raw File
Makefile.lpctools
# Hey Emacs, this is a -*- makefile -*-

bl:
	cd $(AIRBORNE)/arch/lpc21/test/bootloader; $(MAKE) clean; $(MAKE)

BOOTLOADER_DEV ?= /dev/ttyUSB0
upload_bl bl.upload: bl
	lpc21isp -control $(AIRBORNE)/arch/lpc21/test/bootloader/bl.hex $(BOOTLOADER_DEV) 38400 12000

JTAG_INTERFACE ?= olimex-jtag-tiny.cfg
#JTAG_INTERFACE = olimex-arm-usb-ocd.cfg

upload_jtag: bl
	openocd -f interface/$(JTAG_INTERFACE)  -f board/olimex_lpc_h2148.cfg -c init -c halt -c "flash write_image erase $(AIRBORNE)/arch/lpc21/test/bootloader/bl.hex"  -c reset -c shutdown


lpc21iap:
	$(MAKE) -C sw/ground_segment/lpc21iap

upgrade_bl bl.upgrade: bl lpc21iap
	$(PAPARAZZI_SRC)/sw/ground_segment/lpc21iap/lpc21iap $(AIRBORNE)/arch/lpc21/test/bootloader/bl_ram.elf
	$(PAPARAZZI_SRC)/sw/ground_segment/lpc21iap/lpc21iap $(AIRBORNE)/arch/lpc21/test/bootloader/bl.elf

ms:
	$(MAKE) -C $(AIRBORNE)/arch/lpc21/lpcusb
	$(MAKE) -C $(AIRBORNE)/arch/lpc21/lpcusb/examples

upload_ms ms.upload: ms
	$(PAPARAZZI_SRC)/sw/ground_segment/lpc21iap/lpc21iap $(AIRBORNE)/arch/lpc21/lpcusb/examples/msc.elf

.PHONY: bl upload_bl upload_jtag ms upload_ms lpc21iap upgrade_bl
back to top