aboutsummaryrefslogtreecommitdiffstats
path: root/BuildTests
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2012-05-13 13:06:11 +0000
committerDean Camera <dean@fourwalledcubicle.com>2012-05-13 13:06:11 +0000
commit380f014c4c7b3e317181654577b24c41c266bf8f (patch)
treec2b820da79d77809c0001f16527c902b27fdbe7f /BuildTests
parent96fd39eda86e963177cb7895f6c2216ecb9c732a (diff)
downloadlufa-380f014c4c7b3e317181654577b24c41c266bf8f.tar.gz
lufa-380f014c4c7b3e317181654577b24c41c266bf8f.tar.bz2
lufa-380f014c4c7b3e317181654577b24c41c266bf8f.zip
Added build test to verify correct compilation of all bootloaders using all supported devices.
Fixed compile error with the unreleased ATMEGA32U6 device.
Diffstat (limited to 'BuildTests')
-rw-r--r--BuildTests/BoardDriverTest/BoardDeviceMap.cfg3
-rw-r--r--BuildTests/BoardDriverTest/makefile4
-rw-r--r--BuildTests/BootloaderTest/BootloaderDeviceMap.cfg42
-rw-r--r--BuildTests/BootloaderTest/makefile56
-rw-r--r--BuildTests/makefile1
5 files changed, 103 insertions, 3 deletions
diff --git a/BuildTests/BoardDriverTest/BoardDeviceMap.cfg b/BuildTests/BoardDriverTest/BoardDeviceMap.cfg
index 683b1819d..b566ce6bf 100644
--- a/BuildTests/BoardDriverTest/BoardDeviceMap.cfg
+++ b/BuildTests/BoardDriverTest/BoardDeviceMap.cfg
@@ -1,4 +1,5 @@
# BOARD DEFINE = {ARCH} : {MCU} :
+
BOARD_USER = avr8 : at90usb1287 :
BOARD_NONE = avr8 : at90usb1287 :
BOARD_USBKEY = avr8 : at90usb1287 :
@@ -48,4 +49,4 @@ BOARD_MULTIO = avr8 : at90usb162 :
BOARD_BIGMULTIO = avr8 : atmega32u4 :
BOARD_DUCE = avr8 : atmega32u2 :
BOARD_OLIMEX32U4 = avr8 : atmega32u4 :
-BOARD_OLIMEXT32U4 = avr8 : atmega32u4 : \ No newline at end of file
+BOARD_OLIMEXT32U4 = avr8 : atmega32u4 :
diff --git a/BuildTests/BoardDriverTest/makefile b/BuildTests/BoardDriverTest/makefile
index 598d953b6..bc4d55977 100644
--- a/BuildTests/BoardDriverTest/makefile
+++ b/BuildTests/BoardDriverTest/makefile
@@ -29,11 +29,11 @@ makeboardlist:
@grep "BOARD_" $(LUFA_ROOT_PATH)/LUFA/Common/BoardTypes.h | cut -d'#' -f2 | cut -d' ' -f2 | grep "BOARD_" > BoardList.txt
testboards:
- echo "buildtest:" > BuildMakefile
+ @echo "buildtest:" > BuildMakefile
@while read line; \
do \
- build_cfg=`grep "$$line " BoardDeviceMap.cfg | sed 's/ //g' | cut -d'=' -f2-`; \
+ build_cfg=`grep "$$line " BoardDeviceMap.cfg | sed 's/ //g' | grep -v "#" | cut -d'=' -f2-`; \
\
build_board=$$line; \
build_arch=`echo $$build_cfg | cut -d':' -f1`; \
diff --git a/BuildTests/BootloaderTest/BootloaderDeviceMap.cfg b/BuildTests/BootloaderTest/BootloaderDeviceMap.cfg
new file mode 100644
index 000000000..4d6bbd7b8
--- /dev/null
+++ b/BuildTests/BootloaderTest/BootloaderDeviceMap.cfg
@@ -0,0 +1,42 @@
+# BOOTLOADER = {ARCH} : {MCU} : {BOARD} : {FLASH SIZE KB} : {BOOT SIZE KB} :
+
+# ------------ CDC Bootloader -------------
+CDC = avr8 : at90usb1287 : NONE : 128 : 8 :
+CDC = avr8 : at90usb647 : NONE : 64 : 4 :
+CDC = avr8 : at90usb1286 : NONE : 128 : 8 :
+CDC = avr8 : at90usb646 : NONE : 64 : 4 :
+CDC = avr8 : atmega32u4 : NONE : 32 : 4 :
+CDC = avr8 : atmega16u4 : NONE : 16 : 4 :
+CDC = avr8 : atmega32u2 : NONE : 32 : 4 :
+CDC = avr8 : atmega16u2 : NONE : 16 : 4 :
+CDC = avr8 : atmega8u2 : NONE : 8 : 4 :
+CDC = avr8 : at90usb162 : NONE : 16 : 4 :
+CDC = avr8 : at90usb82 : NONE : 8 : 4 :
+
+# ------------ DFU Bootloader -------------
+DFU = avr8 : at90usb1287 : NONE : 128 : 8 :
+DFU = avr8 : at90usb647 : NONE : 64 : 4 :
+DFU = avr8 : at90usb1286 : NONE : 128 : 8 :
+DFU = avr8 : at90usb646 : NONE : 64 : 4 :
+DFU = avr8 : atmega32u6 : NONE : 32 : 4 :
+DFU = avr8 : atmega32u4 : NONE : 32 : 4 :
+DFU = avr8 : atmega16u4 : NONE : 16 : 4 :
+DFU = avr8 : atmega32u2 : NONE : 32 : 4 :
+DFU = avr8 : atmega16u2 : NONE : 16 : 4 :
+DFU = avr8 : atmega8u2 : NONE : 8 : 4 :
+DFU = avr8 : at90usb162 : NONE : 16 : 4 :
+DFU = avr8 : at90usb82 : NONE : 8 : 4 :
+
+# ------------ HID Bootloader -------------
+HID = avr8 : at90usb1287 : NONE : 128 : 4 :
+HID = avr8 : at90usb647 : NONE : 64 : 4 :
+HID = avr8 : at90usb1286 : NONE : 128 : 4 :
+HID = avr8 : at90usb646 : NONE : 64 : 4 :
+HID = avr8 : atmega32u6 : NONE : 32 : 4 :
+HID = avr8 : atmega32u4 : NONE : 32 : 4 :
+HID = avr8 : atmega16u4 : NONE : 16 : 4 :
+HID = avr8 : atmega32u2 : NONE : 32 : 2 :
+HID = avr8 : atmega16u2 : NONE : 16 : 2 :
+HID = avr8 : atmega8u2 : NONE : 8 : 2 :
+HID = avr8 : at90usb162 : NONE : 16 : 2 :
+HID = avr8 : at90usb82 : NONE : 8 : 2 :
diff --git a/BuildTests/BootloaderTest/makefile b/BuildTests/BootloaderTest/makefile
new file mode 100644
index 000000000..3a6e5574c
--- /dev/null
+++ b/BuildTests/BootloaderTest/makefile
@@ -0,0 +1,56 @@
+#
+# LUFA Library
+# Copyright (C) Dean Camera, 2011.
+#
+# dean [at] fourwalledcubicle [dot] com
+# www.lufa-lib.org
+#
+
+# Makefile for the bootloader build test. This
+# test attempts to build all the bootloaders
+# with all supported device configurations.
+
+# Path to the root of the LUFA tree to scan
+LUFA_ROOT_PATH = ../..
+
+
+all: begin testbootloaders clean end
+
+begin:
+ @echo Executing build test "BootloaderTest".
+ @echo
+
+end:
+ @echo Build test "BootloaderTest" complete.
+ @echo
+
+testbootloaders:
+ @echo "buildtest:" > BuildMakefile
+
+ @while read line; \
+ do \
+ build_cfg=`echo $$line | sed 's/ //g' | grep -v "#"`; \
+ \
+ if ( ! test -z "$$build_cfg" ); then \
+ build_bootloader=`echo $$build_cfg | cut -d'=' -f1`; \
+ build_arch=`echo $$build_cfg | cut -d'=' -f2- | cut -d':' -f1`; \
+ build_mcu=`echo $$build_cfg | cut -d'=' -f2- | cut -d':' -f2`; \
+ build_board=`echo $$build_cfg | cut -d'=' -f2- | cut -d':' -f3`; \
+ build_flashsize=`echo $$build_cfg | cut -d'=' -f2- | cut -d':' -f4`; \
+ build_bootsize=`echo $$build_cfg | cut -d'=' -f2- | cut -d':' -f5`; \
+ \
+ printf "Found bootloader configuration for bootloader '%s' (FLASH: %3s KB | BOOT: %3s KB | MCU: %12s / %4s)\n" $$build_bootloader $$build_flashsize $$build_bootsize $$build_mcu $$build_arch; \
+ \
+ printf "\t@echo Building bootloader %s - %s - FLASH: %s KB, BOOT: %s KB\n" $$build_bootloader $$build_mcu $$build_flashsize $$build_bootsize >> BuildMakefile; \
+ printf "\tmake -s -C $(LUFA_ROOT_PATH)/Bootloaders/%s/ clean\n" $$build_bootloader >> BuildMakefile; \
+ printf "\tmake -s -C $(LUFA_ROOT_PATH)/Bootloaders/%s/ MCU=%s BOARD=%s FLASH_SIZE_KB=%s BOOT_SECTION_SIZE_KB=%s elf\n\n" $$build_bootloader $$build_mcu $$build_board $$build_flashsize $$build_bootsize >> BuildMakefile; \
+ fi; \
+ done < BootloaderDeviceMap.cfg
+
+ $(MAKE) -f BuildMakefile buildtest
+
+clean:
+ rm -f BuildMakefile
+
+%:
+ \ No newline at end of file
diff --git a/BuildTests/makefile b/BuildTests/makefile
index ac0cde260..3f3ca5a03 100644
--- a/BuildTests/makefile
+++ b/BuildTests/makefile
@@ -13,6 +13,7 @@
all:
%:
$(MAKE) -C BoardDriverTest $@
+ $(MAKE) -C BootloaderBuildTest $@
$(MAKE) -C ModuleTest $@
$(MAKE) -C SingleUSBModeTest $@
$(MAKE) -C StaticAnalysisTest $@