diff options
Diffstat (limited to 'protocol/lufa/LUFA-git/BuildTests/SingleUSBModeTest')
5 files changed, 199 insertions, 0 deletions
diff --git a/protocol/lufa/LUFA-git b/protocol/lufa/LUFA-git deleted file mode 160000 -Subproject b6c18b2a7c544653efbe12a1d4e8ba65e7d83c3 diff --git a/protocol/lufa/LUFA-git/BuildTests/SingleUSBModeTest/Dummy.S b/protocol/lufa/LUFA-git/BuildTests/SingleUSBModeTest/Dummy.S new file mode 100644 index 0000000000..b5655add56 --- /dev/null +++ b/protocol/lufa/LUFA-git/BuildTests/SingleUSBModeTest/Dummy.S @@ -0,0 +1,42 @@ +/* + LUFA Library + Copyright (C) Dean Camera, 2014. + + dean [at] fourwalledcubicle [dot] com + www.lufa-lib.org +*/ + +/* + Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + + The author disclaims all warranties with regard to this + software, including all implied warranties of merchantability + and fitness. In no event shall the author be liable for any + special, indirect or consequential damages or any damages + whatsoever resulting from loss of use, data or profits, whether + in an action of contract, negligence or other tortious action, + arising out of or in connection with the use or performance of + this software. +*/ + +.section .text + + +# Mandatory entry point for successful compilation and link +.global main +main: + # Force code generation of the base USB stack + call USB_Init + +# Mandatory callback needed for base compile of the USB driver +.global CALLBACK_USB_GetDescriptor +CALLBACK_USB_GetDescriptor: diff --git a/protocol/lufa/LUFA-git/BuildTests/SingleUSBModeTest/Test.c b/protocol/lufa/LUFA-git/BuildTests/SingleUSBModeTest/Test.c new file mode 100644 index 0000000000..7a83794df6 --- /dev/null +++ b/protocol/lufa/LUFA-git/BuildTests/SingleUSBModeTest/Test.c @@ -0,0 +1,32 @@ +/* + LUFA Library + Copyright (C) Dean Camera, 2014. + + dean [at] fourwalledcubicle [dot] com + www.lufa-lib.org +*/ + +/* + Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + + The author disclaims all warranties with regard to this + software, including all implied warranties of merchantability + and fitness. In no event shall the author be liable for any + special, indirect or consequential damages or any damages + whatsoever resulting from loss of use, data or profits, whether + in an action of contract, negligence or other tortious action, + arising out of or in connection with the use or performance of + this software. +*/ + +#include <LUFA/Common/Common.h> +#include <LUFA/Drivers/USB/USB.h> diff --git a/protocol/lufa/LUFA-git/BuildTests/SingleUSBModeTest/makefile b/protocol/lufa/LUFA-git/BuildTests/SingleUSBModeTest/makefile new file mode 100644 index 0000000000..cd88754db3 --- /dev/null +++ b/protocol/lufa/LUFA-git/BuildTests/SingleUSBModeTest/makefile @@ -0,0 +1,56 @@ +# +# LUFA Library +# Copyright (C) Dean Camera, 2014. +# +# dean [at] fourwalledcubicle [dot] com +# www.lufa-lib.org +# + +# Makefile for the single USB mode build test. +# This test attempts to build the USB module +# under fixed device and fixed host modes under +# all supported architectures + +# Path to the LUFA library core +LUFA_PATH := ../../LUFA/ + +# Build test cannot be run with multiple parallel jobs +.NOTPARALLEL: + +all: begin compile clean end + +begin: + @echo Executing build test "SingleUSBModeTest". + @echo + +end: + @echo Build test "SingleUSBModeTest" complete. + @echo + +compile: + @echo Building SingleUSBModeTest for ARCH=AVR8 in device only mode... + $(MAKE) -f makefile.test clean elf ARCH=AVR8 MCU=at90usb1287 CC_FLAGS='-D USB_DEVICE_ONLY' + + @echo Building SingleUSBModeTest for ARCH=AVR8 in host only mode... + $(MAKE) -f makefile.test clean elf ARCH=AVR8 MCU=at90usb1287 CC_FLAGS='-D USB_HOST_ONLY' + + @echo Building SingleUSBModeTest for ARCH=XMEGA in device only mode... + $(MAKE) -f makefile.test clean elf ARCH=XMEGA MCU=atxmega128a1u CC_FLAGS='-D USB_DEVICE_ONLY' + + @echo Building SingleUSBModeTest for ARCH=UC3 in device only mode... + $(MAKE) -f makefile.test clean elf ARCH=UC3 MCU=uc3a0256 CC_FLAGS='-D USB_DEVICE_ONLY' + + @echo Building SingleUSBModeTest for ARCH=UC3 in host only mode... + $(MAKE) -f makefile.test clean elf ARCH=UC3 MCU=uc3a0256 CC_FLAGS='-D USB_HOST_ONLY' + +clean: + $(MAKE) -f makefile.test clean ARCH=AVR8 MCU=at90usb1287 + $(MAKE) -f makefile.test clean ARCH=XMEGA MCU=atxmega128a1u + $(MAKE) -f makefile.test clean ARCH=UC3 MCU=uc3a0256 + +%: + +.PHONY: begin end compile clean + +# Include LUFA build script makefiles +include $(LUFA_PATH)/Build/lufa_core.mk diff --git a/protocol/lufa/LUFA-git/BuildTests/SingleUSBModeTest/makefile.test b/protocol/lufa/LUFA-git/BuildTests/SingleUSBModeTest/makefile.test new file mode 100644 index 0000000000..242e530ea3 --- /dev/null +++ b/protocol/lufa/LUFA-git/BuildTests/SingleUSBModeTest/makefile.test @@ -0,0 +1,69 @@ +# +# LUFA Library +# Copyright (C) Dean Camera, 2014. +# +# dean [at] fourwalledcubicle [dot] com +# www.lufa-lib.org +# +# -------------------------------------- +# LUFA Project Makefile. +# -------------------------------------- + +# Run "make help" for target help. + +MCU = +ARCH = +BOARD = NONE +F_CPU = $(F_USB) +DEBUG_LEVEL = 0 + +ifeq ($(ARCH), AVR8) + F_USB = 8000000 +else ifeq ($(ARCH), XMEGA) + F_USB = 48000000 +else ifeq ($(ARCH), UC3) + F_USB = 48000000 +endif + +OPTIMIZATION = 1 +TARGET = Test +SRC = Test.c Dummy.S $(LUFA_SRC_USB) +LUFA_PATH = ../../LUFA + +# Generic C/C++ compiler flags +CC_FLAGS = -Wextra +CC_FLAGS += -Werror +CC_FLAGS += -Wformat=2 +CC_FLAGS += -Winit-self +CC_FLAGS += -Wswitch-enum +CC_FLAGS += -Wunused +CC_FLAGS += -Wundef +CC_FLAGS += -Wpointer-arith +CC_FLAGS += -Wcast-align +CC_FLAGS += -Wwrite-strings +CC_FLAGS += -Wlogical-op +CC_FLAGS += -Wmissing-declarations +CC_FLAGS += -Wmissing-field-initializers +CC_FLAGS += -Wmissing-format-attribute +CC_FLAGS += -Woverlength-strings + +# Only enable rendundant declaration warnings for AVR8 target (FIXME) +ifeq ($(ARCH), AVR8) + CC_FLAGS += -Wredundant-decls +endif + +# C compiler only flags +C_FLAGS += -Wmissing-parameter-type +C_FLAGS += -Wnested-externs + +# Potential additional warnings to enable in the future (FIXME) +#CC_FLAGS += -Wswitch-default +#CC_FLAGS += -Wc++-compat +#CC_FLAGS += -Wcast-qual +#CC_FLAGS += -Wconversion +#CC_FLAGS += -Wjump-misses-init +#CC_FLAGS += -pedantic + +# Include LUFA build script makefiles +include $(LUFA_PATH)/Build/lufa_sources.mk +include $(LUFA_PATH)/Build/lufa_build.mk |