forked from tudelft/paparazzi
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.lpctools
executable file
·31 lines (21 loc) · 1.1 KB
/
Makefile.lpctools
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# 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