Update SVN line endings property on newer source files to native.

This commit is contained in:
Dean Camera 2012-06-07 20:49:47 +00:00
parent 082537f5bd
commit 6e29655b54
36 changed files with 3684 additions and 3684 deletions

View File

@ -1,73 +1,73 @@
# #
# LUFA Library # LUFA Library
# Copyright (C) Dean Camera, 2012. # Copyright (C) Dean Camera, 2012.
# #
# dean [at] fourwalledcubicle [dot] com # dean [at] fourwalledcubicle [dot] com
# www.lufa-lib.org # www.lufa-lib.org
# #
# #
# ============================================================================= # =============================================================================
# Board configuration map script, processed with the "BoardDriverTest" # Board configuration map script, processed with the "BoardDriverTest"
# makefile. This script file maps the possible LUFA target BOARD makefile # makefile. This script file maps the possible LUFA target BOARD makefile
# value in user projects to a specific architecture and device. This mapping is # value in user projects to a specific architecture and device. This mapping is
# then used by the makefile to build all possible drivers for that board, to # then used by the makefile to build all possible drivers for that board, to
# detect any missing or erroneous functions. To add a new board mapping, use # detect any missing or erroneous functions. To add a new board mapping, use
# the syntax: # the syntax:
# #
# BOARD DEFINE = {ARCH} : {MCU} : # BOARD DEFINE = {ARCH} : {MCU} :
# #
# And re-run the makefile. Note that each board may have only one target. # And re-run the makefile. Note that each board may have only one target.
# ============================================================================= # =============================================================================
# #
# #
BOARD_USER = AVR8 : at90usb1287 : BOARD_USER = AVR8 : at90usb1287 :
BOARD_NONE = AVR8 : at90usb1287 : BOARD_NONE = AVR8 : at90usb1287 :
BOARD_USBKEY = AVR8 : at90usb1287 : BOARD_USBKEY = AVR8 : at90usb1287 :
BOARD_STK525 = AVR8 : at90usb647 : BOARD_STK525 = AVR8 : at90usb647 :
BOARD_STK526 = AVR8 : at90usb162 : BOARD_STK526 = AVR8 : at90usb162 :
BOARD_RZUSBSTICK = AVR8 : at90usb1287 : BOARD_RZUSBSTICK = AVR8 : at90usb1287 :
BOARD_ATAVRUSBRF01 = AVR8 : at90usb1287 : BOARD_ATAVRUSBRF01 = AVR8 : at90usb1287 :
BOARD_BUMBLEB = AVR8 : at90usb162 : BOARD_BUMBLEB = AVR8 : at90usb162 :
BOARD_XPLAIN = AVR8 : at90usb1287 : BOARD_XPLAIN = AVR8 : at90usb1287 :
BOARD_XPLAIN_REV1 = AVR8 : at90usb1287 : BOARD_XPLAIN_REV1 = AVR8 : at90usb1287 :
BOARD_EVK527 = AVR8 : atmega32u4 : BOARD_EVK527 = AVR8 : atmega32u4 :
BOARD_TEENSY = AVR8 : at90usb162 : BOARD_TEENSY = AVR8 : at90usb162 :
BOARD_USBTINYMKII = AVR8 : at90usb162 : BOARD_USBTINYMKII = AVR8 : at90usb162 :
BOARD_BENITO = AVR8 : at90usb162 : BOARD_BENITO = AVR8 : at90usb162 :
BOARD_JMDBU2 = AVR8 : atmega32u2 : BOARD_JMDBU2 = AVR8 : atmega32u2 :
BOARD_OLIMEX162 = AVR8 : at90usb162 : BOARD_OLIMEX162 = AVR8 : at90usb162 :
BOARD_UDIP = AVR8 : atmega32u2 : BOARD_UDIP = AVR8 : atmega32u2 :
BOARD_BUI = AVR8 : at90usb646 : BOARD_BUI = AVR8 : at90usb646 :
BOARD_UNO = AVR8 : atmega8u2 : BOARD_UNO = AVR8 : atmega8u2 :
BOARD_CULV3 = AVR8 : atmega32u4 : BOARD_CULV3 = AVR8 : atmega32u4 :
BOARD_BLACKCAT = AVR8 : at90usb162 : BOARD_BLACKCAT = AVR8 : at90usb162 :
BOARD_MAXIMUS = AVR8 : at90usb162 : BOARD_MAXIMUS = AVR8 : at90usb162 :
BOARD_MINIMUS = AVR8 : atmega32u2 : BOARD_MINIMUS = AVR8 : atmega32u2 :
BOARD_ADAFRUITU4 = AVR8 : atmega32u4 : BOARD_ADAFRUITU4 = AVR8 : atmega32u4 :
BOARD_MICROSIN162 = AVR8 : atmega162 : BOARD_MICROSIN162 = AVR8 : atmega162 :
BOARD_USBFOO = AVR8 : atmega162 : BOARD_USBFOO = AVR8 : atmega162 :
BOARD_SPARKFUN8U2 = AVR8 : atmega8u2 : BOARD_SPARKFUN8U2 = AVR8 : atmega8u2 :
BOARD_EVK1101 = UC3 : uc3b0256 : BOARD_EVK1101 = UC3 : uc3b0256 :
BOARD_TUL = AVR8 : atmega32u4 : BOARD_TUL = AVR8 : atmega32u4 :
BOARD_EVK1100 = UC3 : uc3a0512 : BOARD_EVK1100 = UC3 : uc3a0512 :
BOARD_EVK1104 = UC3 : uc3a3256 : BOARD_EVK1104 = UC3 : uc3a3256 :
BOARD_A3BU_XPLAINED = XMEGA : atxmega256a3bu : BOARD_A3BU_XPLAINED = XMEGA : atxmega256a3bu :
BOARD_TEENSY2 = AVR8 : at90usb646 : BOARD_TEENSY2 = AVR8 : at90usb646 :
BOARD_USB2AX = AVR8 : atmega32u4 : BOARD_USB2AX = AVR8 : atmega32u4 :
BOARD_USB2AX_V3 = AVR8 : atmega32u4 : BOARD_USB2AX_V3 = AVR8 : atmega32u4 :
BOARD_MICROPENDOUS_32U2 = AVR8 : atmega32u2 : BOARD_MICROPENDOUS_32U2 = AVR8 : atmega32u2 :
BOARD_MICROPENDOUS_A = AVR8 : at90usb1287 : BOARD_MICROPENDOUS_A = AVR8 : at90usb1287 :
BOARD_MICROPENDOUS_1 = AVR8 : at90usb162 : BOARD_MICROPENDOUS_1 = AVR8 : at90usb162 :
BOARD_MICROPENDOUS_2 = AVR8 : atmega32u4 : BOARD_MICROPENDOUS_2 = AVR8 : atmega32u4 :
BOARD_MICROPENDOUS_3 = AVR8 : at90usb1287 : BOARD_MICROPENDOUS_3 = AVR8 : at90usb1287 :
BOARD_MICROPENDOUS_4 = AVR8 : at90usb1287 : BOARD_MICROPENDOUS_4 = AVR8 : at90usb1287 :
BOARD_MICROPENDOUS_DIP = AVR8 : at90usb1287 : BOARD_MICROPENDOUS_DIP = AVR8 : at90usb1287 :
BOARD_MICROPENDOUS_REV1 = AVR8 : at90usb1287 : BOARD_MICROPENDOUS_REV1 = AVR8 : at90usb1287 :
BOARD_MICROPENDOUS_REV2 = AVR8 : at90usb1287 : BOARD_MICROPENDOUS_REV2 = AVR8 : at90usb1287 :
BOARD_B1_XPLAINED = XMEGA : atxmega128b1 : BOARD_B1_XPLAINED = XMEGA : atxmega128b1 :
BOARD_MULTIO = AVR8 : at90usb162 : BOARD_MULTIO = AVR8 : at90usb162 :
BOARD_BIGMULTIO = AVR8 : atmega32u4 : BOARD_BIGMULTIO = AVR8 : atmega32u4 :
BOARD_DUCE = AVR8 : atmega32u2 : BOARD_DUCE = AVR8 : atmega32u2 :
BOARD_OLIMEX32U4 = AVR8 : atmega32u4 : BOARD_OLIMEX32U4 = AVR8 : atmega32u4 :
BOARD_OLIMEXT32U4 = AVR8 : atmega32u4 : BOARD_OLIMEXT32U4 = AVR8 : atmega32u4 :
# #

View File

@ -1,66 +1,66 @@
# #
# LUFA Library # LUFA Library
# Copyright (C) Dean Camera, 2012. # Copyright (C) Dean Camera, 2012.
# #
# dean [at] fourwalledcubicle [dot] com # dean [at] fourwalledcubicle [dot] com
# www.lufa-lib.org # www.lufa-lib.org
# #
# Makefile for the board driver build test. This # Makefile for the board driver build test. This
# test attempts to build a dummy project with all # test attempts to build a dummy project with all
# possible board targets using their respective # possible board targets using their respective
# compiler. # compiler.
# Path to the LUFA library core # Path to the LUFA library core
LUFA_PATH = ../../LUFA/ LUFA_PATH = ../../LUFA/
all: begin makeboardlist testboards clean end all: begin makeboardlist testboards clean end
begin: begin:
@echo Executing build test "BoardDriverTest". @echo Executing build test "BoardDriverTest".
@echo @echo
end: end:
@echo Build test "BoardDriverTest" complete. @echo Build test "BoardDriverTest" complete.
@echo @echo
makeboardlist: makeboardlist:
@grep "BOARD_" $(patsubst %/,%,$(LUFA_PATH))/Common/BoardTypes.h | cut -d'#' -f2 | cut -d' ' -f2 | grep "BOARD_" > BoardList.txt @grep "BOARD_" $(patsubst %/,%,$(LUFA_PATH))/Common/BoardTypes.h | cut -d'#' -f2 | cut -d' ' -f2 | grep "BOARD_" > BoardList.txt
testboards: testboards:
@echo "buildtest:" > BuildMakefile @echo "buildtest:" > BuildMakefile
@while read line; \ @while read line; \
do \ do \
build_cfg=`grep "$$line " BoardDeviceMap.cfg | grep -v "#" | cut -d'=' -f2- | sed 's/ //g'`; \ build_cfg=`grep "$$line " BoardDeviceMap.cfg | grep -v "#" | cut -d'=' -f2- | sed 's/ //g'`; \
\ \
build_board=$$line; \ build_board=$$line; \
build_arch=`echo $$build_cfg | cut -d':' -f1`; \ build_arch=`echo $$build_cfg | cut -d':' -f1`; \
build_mcu=`echo $$build_cfg | cut -d':' -f2`; \ build_mcu=`echo $$build_cfg | cut -d':' -f2`; \
\ \
if ( test -z "$$build_cfg" ); then \ if ( test -z "$$build_cfg" ); then \
echo "No matching information set for board $$build_board"; \ echo "No matching information set for board $$build_board"; \
else \ else \
echo "Found board configuration for $$build_board - $$build_arch, $$build_mcu"; \ echo "Found board configuration for $$build_board - $$build_arch, $$build_mcu"; \
\ \
printf "\t@echo Building dummy project for $$build_board...\n" >> BuildMakefile; \ printf "\t@echo Building dummy project for $$build_board...\n" >> BuildMakefile; \
printf "\t$(MAKE) -s -f makefile.test clean elf MCU=%s ARCH=%s BOARD=%s\n\n" $$build_mcu $$build_arch $$build_board >> BuildMakefile; \ printf "\t$(MAKE) -s -f makefile.test clean elf MCU=%s ARCH=%s BOARD=%s\n\n" $$build_mcu $$build_arch $$build_board >> BuildMakefile; \
fi; \ fi; \
done < BoardList.txt done < BoardList.txt
$(MAKE) -f BuildMakefile buildtest $(MAKE) -f BuildMakefile buildtest
clean: clean:
rm -f BuildMakefile rm -f BuildMakefile
rm -f BoardList.txt rm -f BoardList.txt
$(MAKE) -s -f makefile.test clean ARCH=AVR8 MCU=at90usb1287 $(MAKE) -s -f makefile.test clean ARCH=AVR8 MCU=at90usb1287
$(MAKE) -s -f makefile.test clean ARCH=XMEGA MCU=atxmega128a1u $(MAKE) -s -f makefile.test clean ARCH=XMEGA MCU=atxmega128a1u
$(MAKE) -s -f makefile.test clean ARCH=UC3 MCU=uc3a0256 $(MAKE) -s -f makefile.test clean ARCH=UC3 MCU=uc3a0256
%: %:
.PHONY: all begin end makeboardlist testboards clean .PHONY: all begin end makeboardlist testboards clean
# Include LUFA build script makefiles # Include LUFA build script makefiles
include $(LUFA_PATH)/Build/lufa.core.in include $(LUFA_PATH)/Build/lufa.core.in

View File

@ -1,24 +1,24 @@
# #
# LUFA Library # LUFA Library
# Copyright (C) Dean Camera, 2012. # Copyright (C) Dean Camera, 2012.
# #
# dean [at] fourwalledcubicle [dot] com # dean [at] fourwalledcubicle [dot] com
# www.lufa-lib.org # www.lufa-lib.org
# #
# -------------------------------------- # --------------------------------------
# LUFA Project Makefile. # LUFA Project Makefile.
# -------------------------------------- # --------------------------------------
MCU = MCU =
ARCH = ARCH =
BOARD = BOARD =
F_CPU = $(F_USB) F_CPU = $(F_USB)
F_USB = 8000000 F_USB = 8000000
OPTIMIZATION = 1 OPTIMIZATION = 1
TARGET = Test TARGET = Test
SRC = $(TARGET).c SRC = $(TARGET).c
LUFA_PATH = ../../LUFA/ LUFA_PATH = ../../LUFA/
CC_FLAGS = -Werror CC_FLAGS = -Werror
# Include LUFA build script makefiles # Include LUFA build script makefiles
include $(LUFA_PATH)/Build/lufa.build.in include $(LUFA_PATH)/Build/lufa.build.in

View File

@ -1,63 +1,63 @@
# #
# LUFA Library # LUFA Library
# Copyright (C) Dean Camera, 2012. # Copyright (C) Dean Camera, 2012.
# #
# dean [at] fourwalledcubicle [dot] com # dean [at] fourwalledcubicle [dot] com
# www.lufa-lib.org # www.lufa-lib.org
# #
# #
# ============================================================================= # =============================================================================
# Bootloader configuration map script, processed with the "BootloaderTest" # Bootloader configuration map script, processed with the "BootloaderTest"
# makefile. This script file defines the targets for each LUFA bootloader, # makefile. This script file defines the targets for each LUFA bootloader,
# which are then built as part of the build test to ensure that there are no # which are then built as part of the build test to ensure that there are no
# failures on all standard configurations. To add a new build target for a # failures on all standard configurations. To add a new build target for a
# bootloader to this script, use the format: # bootloader to this script, use the format:
# #
# BOOTLOADER = {ARCH} : {MCU} : {BOARD} : {FLASH SIZE KB} : {BOOT SIZE KB} : # BOOTLOADER = {ARCH} : {MCU} : {BOARD} : {FLASH SIZE KB} : {BOOT SIZE KB} :
# #
# And re-run the makefile. # And re-run the makefile.
# ============================================================================= # =============================================================================
# #
# #
# ------------ CDC Bootloader ------------- # ------------ CDC Bootloader -------------
CDC = AVR8 : at90usb1287 : NONE : 128 : 8 : CDC = AVR8 : at90usb1287 : NONE : 128 : 8 :
CDC = AVR8 : at90usb647 : NONE : 64 : 4 : CDC = AVR8 : at90usb647 : NONE : 64 : 4 :
CDC = AVR8 : at90usb1286 : NONE : 128 : 8 : CDC = AVR8 : at90usb1286 : NONE : 128 : 8 :
CDC = AVR8 : at90usb646 : NONE : 64 : 4 : CDC = AVR8 : at90usb646 : NONE : 64 : 4 :
CDC = AVR8 : atmega32u6 : NONE : 32 : 4 : CDC = AVR8 : atmega32u6 : NONE : 32 : 4 :
CDC = AVR8 : atmega32u4 : NONE : 32 : 4 : CDC = AVR8 : atmega32u4 : NONE : 32 : 4 :
CDC = AVR8 : atmega16u4 : NONE : 16 : 4 : CDC = AVR8 : atmega16u4 : NONE : 16 : 4 :
CDC = AVR8 : atmega32u2 : NONE : 32 : 4 : CDC = AVR8 : atmega32u2 : NONE : 32 : 4 :
CDC = AVR8 : atmega16u2 : NONE : 16 : 4 : CDC = AVR8 : atmega16u2 : NONE : 16 : 4 :
CDC = AVR8 : atmega8u2 : NONE : 8 : 4 : CDC = AVR8 : atmega8u2 : NONE : 8 : 4 :
CDC = AVR8 : at90usb162 : NONE : 16 : 4 : CDC = AVR8 : at90usb162 : NONE : 16 : 4 :
CDC = AVR8 : at90usb82 : NONE : 8 : 4 : CDC = AVR8 : at90usb82 : NONE : 8 : 4 :
# #
# ------------ DFU Bootloader ------------- # ------------ DFU Bootloader -------------
DFU = AVR8 : at90usb1287 : NONE : 128 : 8 : DFU = AVR8 : at90usb1287 : NONE : 128 : 8 :
DFU = AVR8 : at90usb647 : NONE : 64 : 4 : DFU = AVR8 : at90usb647 : NONE : 64 : 4 :
DFU = AVR8 : at90usb1286 : NONE : 128 : 8 : DFU = AVR8 : at90usb1286 : NONE : 128 : 8 :
DFU = AVR8 : at90usb646 : NONE : 64 : 4 : DFU = AVR8 : at90usb646 : NONE : 64 : 4 :
DFU = AVR8 : atmega32u6 : NONE : 32 : 4 : DFU = AVR8 : atmega32u6 : NONE : 32 : 4 :
DFU = AVR8 : atmega32u4 : NONE : 32 : 4 : DFU = AVR8 : atmega32u4 : NONE : 32 : 4 :
DFU = AVR8 : atmega16u4 : NONE : 16 : 4 : DFU = AVR8 : atmega16u4 : NONE : 16 : 4 :
DFU = AVR8 : atmega32u2 : NONE : 32 : 4 : DFU = AVR8 : atmega32u2 : NONE : 32 : 4 :
DFU = AVR8 : atmega16u2 : NONE : 16 : 4 : DFU = AVR8 : atmega16u2 : NONE : 16 : 4 :
DFU = AVR8 : atmega8u2 : NONE : 8 : 4 : DFU = AVR8 : atmega8u2 : NONE : 8 : 4 :
DFU = AVR8 : at90usb162 : NONE : 16 : 4 : DFU = AVR8 : at90usb162 : NONE : 16 : 4 :
DFU = AVR8 : at90usb82 : NONE : 8 : 4 : DFU = AVR8 : at90usb82 : NONE : 8 : 4 :
# #
# ------------ HID Bootloader ------------- # ------------ HID Bootloader -------------
HID = AVR8 : at90usb1287 : NONE : 128 : 4 : HID = AVR8 : at90usb1287 : NONE : 128 : 4 :
HID = AVR8 : at90usb647 : NONE : 64 : 4 : HID = AVR8 : at90usb647 : NONE : 64 : 4 :
HID = AVR8 : at90usb1286 : NONE : 128 : 4 : HID = AVR8 : at90usb1286 : NONE : 128 : 4 :
HID = AVR8 : at90usb646 : NONE : 64 : 4 : HID = AVR8 : at90usb646 : NONE : 64 : 4 :
HID = AVR8 : atmega32u6 : NONE : 32 : 4 : HID = AVR8 : atmega32u6 : NONE : 32 : 4 :
HID = AVR8 : atmega32u4 : NONE : 32 : 4 : HID = AVR8 : atmega32u4 : NONE : 32 : 4 :
HID = AVR8 : atmega16u4 : NONE : 16 : 4 : HID = AVR8 : atmega16u4 : NONE : 16 : 4 :
HID = AVR8 : atmega32u2 : NONE : 32 : 2 : HID = AVR8 : atmega32u2 : NONE : 32 : 2 :
HID = AVR8 : atmega16u2 : NONE : 16 : 2 : HID = AVR8 : atmega16u2 : NONE : 16 : 2 :
HID = AVR8 : atmega8u2 : NONE : 8 : 2 : HID = AVR8 : atmega8u2 : NONE : 8 : 2 :
HID = AVR8 : at90usb162 : NONE : 16 : 2 : HID = AVR8 : at90usb162 : NONE : 16 : 2 :
HID = AVR8 : at90usb82 : NONE : 8 : 2 : HID = AVR8 : at90usb82 : NONE : 8 : 2 :
# #

View File

@ -1,61 +1,61 @@
# #
# LUFA Library # LUFA Library
# Copyright (C) Dean Camera, 2012. # Copyright (C) Dean Camera, 2012.
# #
# dean [at] fourwalledcubicle [dot] com # dean [at] fourwalledcubicle [dot] com
# www.lufa-lib.org # www.lufa-lib.org
# #
# Makefile for the bootloader build test. This # Makefile for the bootloader build test. This
# test attempts to build all the bootloaders # test attempts to build all the bootloaders
# with all supported device configurations. # with all supported device configurations.
# Path to the LUFA library core # Path to the LUFA library core
LUFA_PATH = ../../LUFA/ LUFA_PATH = ../../LUFA/
all: begin testbootloaders clean end all: begin testbootloaders clean end
begin: begin:
@echo Executing build test "BootloaderTest". @echo Executing build test "BootloaderTest".
@echo @echo
end: end:
@echo Build test "BootloaderTest" complete. @echo Build test "BootloaderTest" complete.
@echo @echo
testbootloaders: testbootloaders:
@echo "buildtest:" > BuildMakefile @echo "buildtest:" > BuildMakefile
@while read line; \ @while read line; \
do \ do \
build_cfg=`echo $$line | grep -v "#" | sed 's/ //g'`; \ build_cfg=`echo $$line | grep -v "#" | sed 's/ //g'`; \
\ \
if ( test -n "$$build_cfg" ); then \ if ( test -n "$$build_cfg" ); then \
build_bootloader=`echo $$build_cfg | cut -d'=' -f1`; \ build_bootloader=`echo $$build_cfg | cut -d'=' -f1`; \
build_cfg=`echo $$build_cfg | cut -d'=' -f2-`; \ build_cfg=`echo $$build_cfg | cut -d'=' -f2-`; \
\ \
build_arch=`echo $$build_cfg | cut -d':' -f1`; \ build_arch=`echo $$build_cfg | cut -d':' -f1`; \
build_mcu=`echo $$build_cfg | cut -d':' -f2`; \ build_mcu=`echo $$build_cfg | cut -d':' -f2`; \
build_board=`echo $$build_cfg | cut -d':' -f3`; \ build_board=`echo $$build_cfg | cut -d':' -f3`; \
build_flashsize=`echo $$build_cfg | cut -d':' -f4`; \ build_flashsize=`echo $$build_cfg | cut -d':' -f4`; \
build_bootsize=`echo $$build_cfg | cut -d':' -f5`; \ build_bootsize=`echo $$build_cfg | 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 "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 "\t@echo Building bootloader %s - %s - FLASH: %s KB, BOOT: %s KB\n" $$build_bootloader $$build_mcu $$build_flashsize $$build_bootsize >> BuildMakefile; \
printf "\t$(MAKE) -s -C $(patsubst %/,%,$(LUFA_PATH))/../Bootloaders/%s/ clean elf ARCH=%s MCU=%s BOARD=%s FLASH_SIZE_KB=%s BOOT_SECTION_SIZE_KB=%s\n\n" $$build_bootloader $$build_arch $$build_mcu $$build_board $$build_flashsize $$build_bootsize >> BuildMakefile; \ printf "\t$(MAKE) -s -C $(patsubst %/,%,$(LUFA_PATH))/../Bootloaders/%s/ clean elf ARCH=%s MCU=%s BOARD=%s FLASH_SIZE_KB=%s BOOT_SECTION_SIZE_KB=%s\n\n" $$build_bootloader $$build_arch $$build_mcu $$build_board $$build_flashsize $$build_bootsize >> BuildMakefile; \
fi; \ fi; \
done < BootloaderDeviceMap.cfg done < BootloaderDeviceMap.cfg
$(MAKE) -f BuildMakefile buildtest $(MAKE) -f BuildMakefile buildtest
clean: clean:
rm -f BuildMakefile rm -f BuildMakefile
%: %:
.PHONY: all begin end testbootloaders clean .PHONY: all begin end testbootloaders clean
# Include LUFA build script makefiles # Include LUFA build script makefiles
include $(LUFA_PATH)/Build/lufa.core.in include $(LUFA_PATH)/Build/lufa.core.in

View File

@ -1,41 +1,41 @@
/* /*
LUFA Library LUFA Library
Copyright (C) Dean Camera, 2012. Copyright (C) Dean Camera, 2012.
dean [at] fourwalledcubicle [dot] com dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org www.lufa-lib.org
*/ */
/* /*
Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com) Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com)
Permission to use, copy, modify, distribute, and sell this Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted software and its documentation for any purpose is hereby granted
without fee, provided that the above copyright notice appear in without fee, provided that the above copyright notice appear in
all copies and that both that the copyright notice and this all copies and that both that the copyright notice and this
permission notice and warranty disclaimer appear in supporting permission notice and warranty disclaimer appear in supporting
documentation, and that the name of the author not be used in documentation, and that the name of the author not be used in
advertising or publicity pertaining to distribution of the advertising or publicity pertaining to distribution of the
software without specific, written prior permission. software without specific, written prior permission.
The author disclaim all warranties with regard to this The author disclaim all warranties with regard to this
software, including all implied warranties of merchantability software, including all implied warranties of merchantability
and fitness. In no event shall the author be liable for any and fitness. In no event shall the author be liable for any
special, indirect or consequential damages or any damages special, indirect or consequential damages or any damages
whatsoever resulting from loss of use, data or profits, whether whatsoever resulting from loss of use, data or profits, whether
in an action of contract, negligence or other tortious action, in an action of contract, negligence or other tortious action,
arising out of or in connection with the use or performance of arising out of or in connection with the use or performance of
this software. this software.
*/ */
.section .text .section .text
# Mandatory entry point for successful compilation and link # Mandatory entry point for successful compilation and link
.global main .global main
main: main:
# Mandatory callback needed for base compile of the USB driver # Mandatory callback needed for base compile of the USB driver
.global CALLBACK_USB_GetDescriptor .global CALLBACK_USB_GetDescriptor
CALLBACK_USB_GetDescriptor: CALLBACK_USB_GetDescriptor:

View File

@ -1,58 +1,58 @@
/* /*
LUFA Library LUFA Library
Copyright (C) Dean Camera, 2012. Copyright (C) Dean Camera, 2012.
dean [at] fourwalledcubicle [dot] com dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org www.lufa-lib.org
*/ */
/* /*
Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com) Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com)
Permission to use, copy, modify, distribute, and sell this Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted software and its documentation for any purpose is hereby granted
without fee, provided that the above copyright notice appear in without fee, provided that the above copyright notice appear in
all copies and that both that the copyright notice and this all copies and that both that the copyright notice and this
permission notice and warranty disclaimer appear in supporting permission notice and warranty disclaimer appear in supporting
documentation, and that the name of the author not be used in documentation, and that the name of the author not be used in
advertising or publicity pertaining to distribution of the advertising or publicity pertaining to distribution of the
software without specific, written prior permission. software without specific, written prior permission.
The author disclaim all warranties with regard to this The author disclaim all warranties with regard to this
software, including all implied warranties of merchantability software, including all implied warranties of merchantability
and fitness. In no event shall the author be liable for any and fitness. In no event shall the author be liable for any
special, indirect or consequential damages or any damages special, indirect or consequential damages or any damages
whatsoever resulting from loss of use, data or profits, whether whatsoever resulting from loss of use, data or profits, whether
in an action of contract, negligence or other tortious action, in an action of contract, negligence or other tortious action,
arising out of or in connection with the use or performance of arising out of or in connection with the use or performance of
this software. this software.
*/ */
#include <LUFA/Common/Common.h> #include <LUFA/Common/Common.h>
#include <LUFA/Drivers/USB/USB.h> #include <LUFA/Drivers/USB/USB.h>
#include <LUFA/Drivers/Misc/RingBuffer.h> #include <LUFA/Drivers/Misc/RingBuffer.h>
#include <LUFA/Drivers/Misc/TerminalCodes.h> #include <LUFA/Drivers/Misc/TerminalCodes.h>
#if (ARCH == ARCH_AVR8) #if (ARCH == ARCH_AVR8)
#if defined(TWCR) #if defined(TWCR)
#include <LUFA/Drivers/Peripheral/TWI.h> #include <LUFA/Drivers/Peripheral/TWI.h>
#endif #endif
#if defined(ADC) #if defined(ADC)
#include <LUFA/Drivers/Peripheral/ADC.h> #include <LUFA/Drivers/Peripheral/ADC.h>
#endif #endif
#include <LUFA/Drivers/Peripheral/Serial.h> #include <LUFA/Drivers/Peripheral/Serial.h>
#include <LUFA/Drivers/Peripheral/SPI.h> #include <LUFA/Drivers/Peripheral/SPI.h>
#include <LUFA/Drivers/Peripheral/SerialSPI.h> #include <LUFA/Drivers/Peripheral/SerialSPI.h>
#elif (ARCH == ARCH_XMEGA) #elif (ARCH == ARCH_XMEGA)
#include <LUFA/Drivers/Peripheral/Serial.h> #include <LUFA/Drivers/Peripheral/Serial.h>
#include <LUFA/Drivers/Peripheral/SPI.h> #include <LUFA/Drivers/Peripheral/SPI.h>
#include <LUFA/Drivers/Peripheral/SerialSPI.h> #include <LUFA/Drivers/Peripheral/SerialSPI.h>
#include <LUFA/Platform/XMEGA/ClockManagement.h> #include <LUFA/Platform/XMEGA/ClockManagement.h>
#elif (ARCH == ARCH_UC3) #elif (ARCH == ARCH_UC3)
#include <LUFA/Platform/UC3/ClockManagement.h> #include <LUFA/Platform/UC3/ClockManagement.h>
#include <LUFA/Platform/UC3/InterruptManagement.h> #include <LUFA/Platform/UC3/InterruptManagement.h>
#endif #endif

View File

@ -1,31 +1,31 @@
/* /*
LUFA Library LUFA Library
Copyright (C) Dean Camera, 2012. Copyright (C) Dean Camera, 2012.
dean [at] fourwalledcubicle [dot] com dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org www.lufa-lib.org
*/ */
/* /*
Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com) Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com)
Permission to use, copy, modify, distribute, and sell this Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted software and its documentation for any purpose is hereby granted
without fee, provided that the above copyright notice appear in without fee, provided that the above copyright notice appear in
all copies and that both that the copyright notice and this all copies and that both that the copyright notice and this
permission notice and warranty disclaimer appear in supporting permission notice and warranty disclaimer appear in supporting
documentation, and that the name of the author not be used in documentation, and that the name of the author not be used in
advertising or publicity pertaining to distribution of the advertising or publicity pertaining to distribution of the
software without specific, written prior permission. software without specific, written prior permission.
The author disclaim all warranties with regard to this The author disclaim all warranties with regard to this
software, including all implied warranties of merchantability software, including all implied warranties of merchantability
and fitness. In no event shall the author be liable for any and fitness. In no event shall the author be liable for any
special, indirect or consequential damages or any damages special, indirect or consequential damages or any damages
whatsoever resulting from loss of use, data or profits, whether whatsoever resulting from loss of use, data or profits, whether
in an action of contract, negligence or other tortious action, in an action of contract, negligence or other tortious action,
arising out of or in connection with the use or performance of arising out of or in connection with the use or performance of
this software. this software.
*/ */
#include "Modules.h" #include "Modules.h"

View File

@ -1,31 +1,31 @@
/* /*
LUFA Library LUFA Library
Copyright (C) Dean Camera, 2012. Copyright (C) Dean Camera, 2012.
dean [at] fourwalledcubicle [dot] com dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org www.lufa-lib.org
*/ */
/* /*
Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com) Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com)
Permission to use, copy, modify, distribute, and sell this Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted software and its documentation for any purpose is hereby granted
without fee, provided that the above copyright notice appear in without fee, provided that the above copyright notice appear in
all copies and that both that the copyright notice and this all copies and that both that the copyright notice and this
permission notice and warranty disclaimer appear in supporting permission notice and warranty disclaimer appear in supporting
documentation, and that the name of the author not be used in documentation, and that the name of the author not be used in
advertising or publicity pertaining to distribution of the advertising or publicity pertaining to distribution of the
software without specific, written prior permission. software without specific, written prior permission.
The author disclaim all warranties with regard to this The author disclaim all warranties with regard to this
software, including all implied warranties of merchantability software, including all implied warranties of merchantability
and fitness. In no event shall the author be liable for any and fitness. In no event shall the author be liable for any
special, indirect or consequential damages or any damages special, indirect or consequential damages or any damages
whatsoever resulting from loss of use, data or profits, whether whatsoever resulting from loss of use, data or profits, whether
in an action of contract, negligence or other tortious action, in an action of contract, negligence or other tortious action,
arising out of or in connection with the use or performance of arising out of or in connection with the use or performance of
this software. this software.
*/ */
#include "Modules.h" #include "Modules.h"

View File

@ -1,60 +1,60 @@
# #
# LUFA Library # LUFA Library
# Copyright (C) Dean Camera, 2012. # Copyright (C) Dean Camera, 2012.
# #
# dean [at] fourwalledcubicle [dot] com # dean [at] fourwalledcubicle [dot] com
# www.lufa-lib.org # www.lufa-lib.org
# #
# Makefile for the module build test. This test # Makefile for the module build test. This test
# attempts to build as many modules as possible # attempts to build as many modules as possible
# under all supported architectures, and include # under all supported architectures, and include
# all module headers in a simple C and C++ # all module headers in a simple C and C++
# application. # application.
# Path to the LUFA library core # Path to the LUFA library core
LUFA_PATH = ../../LUFA/ LUFA_PATH = ../../LUFA/
# List of device families per architecture, one device per architecture sub-family # List of device families per architecture, one device per architecture sub-family
AVR8_FAMILIES = at90usb1287 at90usb1286 atmega16u4 atmega16u2 at90usb162 AVR8_FAMILIES = at90usb1287 at90usb1286 atmega16u4 atmega16u2 at90usb162
XMEGA_FAMILIES = atxmega128a1u atxmega128a3u atxmega256a3bu atxmega128a4u atxmega128b1 atxmega128b3 atxmega128c3 atxmega32c4 XMEGA_FAMILIES = atxmega128a1u atxmega128a3u atxmega256a3bu atxmega128a4u atxmega128b1 atxmega128b3 atxmega128c3 atxmega32c4
UC3_FAMILIES = uc3a0256 uc3a1256 uc3a3256 uc3a4256 uc3b0256 uc3b1256 UC3_FAMILIES = uc3a0256 uc3a1256 uc3a3256 uc3a4256 uc3b0256 uc3b1256
# List of all device families, with a family postfix # List of all device families, with a family postfix
DEVICE_FAMILIES = $(AVR8_FAMILIES:%=%.avr8) $(XMEGA_FAMILIES:%=%.xmega) $(UC3_FAMILIES:%=%.uc3) DEVICE_FAMILIES = $(AVR8_FAMILIES:%=%.avr8) $(XMEGA_FAMILIES:%=%.xmega) $(UC3_FAMILIES:%=%.uc3)
all: begin $(DEVICE_FAMILIES) clean end all: begin $(DEVICE_FAMILIES) clean end
arch_avr8: begin $(AVR8_FAMILIES:%=%.avr8) end arch_avr8: begin $(AVR8_FAMILIES:%=%.avr8) end
arch_xmega: begin $(XMEGA_FAMILIES:%=%.xmega) end arch_xmega: begin $(XMEGA_FAMILIES:%=%.xmega) end
arch_uc3: begin $(UC3_FAMILIES:%=%.uc3) end arch_uc3: begin $(UC3_FAMILIES:%=%.uc3) end
begin: begin:
@echo Executing build test "ModuleTest". @echo Executing build test "ModuleTest".
@echo @echo
end: end:
@echo Build test "ModuleTest" complete. @echo Build test "ModuleTest" complete.
@echo @echo
%.avr8: %.avr8:
$(MAKE) -s -f makefile.test clean elf ARCH=AVR8 MCU=$(@:%.avr8=%) $(MAKE) -s -f makefile.test clean elf ARCH=AVR8 MCU=$(@:%.avr8=%)
%.xmega: %.xmega:
$(MAKE) -s -f makefile.test clean elf ARCH=XMEGA MCU=$(@:%.xmega=%) $(MAKE) -s -f makefile.test clean elf ARCH=XMEGA MCU=$(@:%.xmega=%)
%.uc3: %.uc3:
$(MAKE) -s -f makefile.test clean elf ARCH=UC3 MCU=$(@:%.uc3=%) $(MAKE) -s -f makefile.test clean elf ARCH=UC3 MCU=$(@:%.uc3=%)
clean: clean:
$(MAKE) -s -f makefile.test clean ARCH=AVR8 MCU=$(firstword $(AVR8_FAMILIES)) $(MAKE) -s -f makefile.test clean ARCH=AVR8 MCU=$(firstword $(AVR8_FAMILIES))
$(MAKE) -s -f makefile.test clean ARCH=XMEGA MCU=$(firstword $(XMEGA_FAMILIES)) $(MAKE) -s -f makefile.test clean ARCH=XMEGA MCU=$(firstword $(XMEGA_FAMILIES))
$(MAKE) -s -f makefile.test clean ARCH=UC3 MCU=$(firstword $(UC3_FAMILIES)) $(MAKE) -s -f makefile.test clean ARCH=UC3 MCU=$(firstword $(UC3_FAMILIES))
%: %:
.PHONY: all arch_avr8 arch_xmega arch_uc3 begin end .PHONY: all arch_avr8 arch_xmega arch_uc3 begin end
# Include LUFA build script makefiles # Include LUFA build script makefiles
include $(LUFA_PATH)/Build/lufa.core.in include $(LUFA_PATH)/Build/lufa.core.in

View File

@ -1,65 +1,65 @@
# #
# LUFA Library # LUFA Library
# Copyright (C) Dean Camera, 2012. # Copyright (C) Dean Camera, 2012.
# #
# dean [at] fourwalledcubicle [dot] com # dean [at] fourwalledcubicle [dot] com
# www.lufa-lib.org # www.lufa-lib.org
# #
# -------------------------------------- # --------------------------------------
# LUFA Project Makefile. # LUFA Project Makefile.
# -------------------------------------- # --------------------------------------
MCU = MCU =
ARCH = ARCH =
BOARD = NONE BOARD = NONE
F_CPU = $(F_USB) F_CPU = $(F_USB)
OPTIMIZATION = 1 OPTIMIZATION = 1
TARGET = Test TARGET = Test
SRC = $(TARGET)_C.c $(TARGET)_CPP.cpp Dummy.S $(LUFA_SRC_USB) SRC = $(TARGET)_C.c $(TARGET)_CPP.cpp Dummy.S $(LUFA_SRC_USB)
LUFA_PATH = ../../LUFA/ LUFA_PATH = ../../LUFA/
ifeq ($(ARCH), AVR8) ifeq ($(ARCH), AVR8)
F_USB = 8000000 F_USB = 8000000
else ifeq ($(ARCH), XMEGA) else ifeq ($(ARCH), XMEGA)
F_USB = 48000000 F_USB = 48000000
else ifeq ($(ARCH), UC3) else ifeq ($(ARCH), UC3)
F_USB = 48000000 F_USB = 48000000
endif endif
# Generic C/C++ compiler flags # Generic C/C++ compiler flags
CC_FLAGS = -Wextra CC_FLAGS = -Wextra
CC_FLAGS += -Werror CC_FLAGS += -Werror
CC_FLAGS += -Wformat=2 CC_FLAGS += -Wformat=2
CC_FLAGS += -Winit-self CC_FLAGS += -Winit-self
CC_FLAGS += -Wswitch-enum CC_FLAGS += -Wswitch-enum
CC_FLAGS += -Wunused CC_FLAGS += -Wunused
CC_FLAGS += -Wundef CC_FLAGS += -Wundef
CC_FLAGS += -Wpointer-arith CC_FLAGS += -Wpointer-arith
CC_FLAGS += -Wcast-align CC_FLAGS += -Wcast-align
CC_FLAGS += -Wwrite-strings CC_FLAGS += -Wwrite-strings
CC_FLAGS += -Wlogical-op CC_FLAGS += -Wlogical-op
CC_FLAGS += -Wmissing-declarations CC_FLAGS += -Wmissing-declarations
CC_FLAGS += -Wmissing-field-initializers CC_FLAGS += -Wmissing-field-initializers
CC_FLAGS += -Wmissing-format-attribute CC_FLAGS += -Wmissing-format-attribute
CC_FLAGS += -Woverlength-strings CC_FLAGS += -Woverlength-strings
# Only enable rendundant declaration warnings for AVR8 target (FIXME) # Only enable rendundant declaration warnings for AVR8 target (FIXME)
ifeq ($(ARCH), AVR8) ifeq ($(ARCH), AVR8)
CC_FLAGS += -Wredundant-decls CC_FLAGS += -Wredundant-decls
endif endif
# C compiler only flags # C compiler only flags
C_FLAGS += -Wmissing-parameter-type C_FLAGS += -Wmissing-parameter-type
C_FLAGS += -Wnested-externs C_FLAGS += -Wnested-externs
# Potential additional warnings to enable in the future (FIXME) # Potential additional warnings to enable in the future (FIXME)
#CC_FLAGS += -Wswitch-default #CC_FLAGS += -Wswitch-default
#CC_FLAGS += -Wc++-compat #CC_FLAGS += -Wc++-compat
#CC_FLAGS += -Wcast-qual #CC_FLAGS += -Wcast-qual
#CC_FLAGS += -Wconversion #CC_FLAGS += -Wconversion
#CC_FLAGS += -Wjump-misses-init #CC_FLAGS += -Wjump-misses-init
#CC_FLAGS += -pedantic #CC_FLAGS += -pedantic
# Include LUFA build script makefiles # Include LUFA build script makefiles
include $(LUFA_PATH)/Build/lufa.sources.in include $(LUFA_PATH)/Build/lufa.sources.in
include $(LUFA_PATH)/Build/lufa.build.in include $(LUFA_PATH)/Build/lufa.build.in

View File

@ -1,42 +1,42 @@
/* /*
LUFA Library LUFA Library
Copyright (C) Dean Camera, 2012. Copyright (C) Dean Camera, 2012.
dean [at] fourwalledcubicle [dot] com dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org www.lufa-lib.org
*/ */
/* /*
Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com) Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com)
Permission to use, copy, modify, distribute, and sell this Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted software and its documentation for any purpose is hereby granted
without fee, provided that the above copyright notice appear in without fee, provided that the above copyright notice appear in
all copies and that both that the copyright notice and this all copies and that both that the copyright notice and this
permission notice and warranty disclaimer appear in supporting permission notice and warranty disclaimer appear in supporting
documentation, and that the name of the author not be used in documentation, and that the name of the author not be used in
advertising or publicity pertaining to distribution of the advertising or publicity pertaining to distribution of the
software without specific, written prior permission. software without specific, written prior permission.
The author disclaim all warranties with regard to this The author disclaim all warranties with regard to this
software, including all implied warranties of merchantability software, including all implied warranties of merchantability
and fitness. In no event shall the author be liable for any and fitness. In no event shall the author be liable for any
special, indirect or consequential damages or any damages special, indirect or consequential damages or any damages
whatsoever resulting from loss of use, data or profits, whether whatsoever resulting from loss of use, data or profits, whether
in an action of contract, negligence or other tortious action, in an action of contract, negligence or other tortious action,
arising out of or in connection with the use or performance of arising out of or in connection with the use or performance of
this software. this software.
*/ */
.section .text .section .text
# Mandatory entry point for successful compilation and link # Mandatory entry point for successful compilation and link
.global main .global main
main: main:
# Force code generation of the base USB stack # Force code generation of the base USB stack
call USB_Init call USB_Init
# Mandatory callback needed for base compile of the USB driver # Mandatory callback needed for base compile of the USB driver
.global CALLBACK_USB_GetDescriptor .global CALLBACK_USB_GetDescriptor
CALLBACK_USB_GetDescriptor: CALLBACK_USB_GetDescriptor:

View File

@ -1,32 +1,32 @@
/* /*
LUFA Library LUFA Library
Copyright (C) Dean Camera, 2012. Copyright (C) Dean Camera, 2012.
dean [at] fourwalledcubicle [dot] com dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org www.lufa-lib.org
*/ */
/* /*
Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com) Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com)
Permission to use, copy, modify, distribute, and sell this Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted software and its documentation for any purpose is hereby granted
without fee, provided that the above copyright notice appear in without fee, provided that the above copyright notice appear in
all copies and that both that the copyright notice and this all copies and that both that the copyright notice and this
permission notice and warranty disclaimer appear in supporting permission notice and warranty disclaimer appear in supporting
documentation, and that the name of the author not be used in documentation, and that the name of the author not be used in
advertising or publicity pertaining to distribution of the advertising or publicity pertaining to distribution of the
software without specific, written prior permission. software without specific, written prior permission.
The author disclaim all warranties with regard to this The author disclaim all warranties with regard to this
software, including all implied warranties of merchantability software, including all implied warranties of merchantability
and fitness. In no event shall the author be liable for any and fitness. In no event shall the author be liable for any
special, indirect or consequential damages or any damages special, indirect or consequential damages or any damages
whatsoever resulting from loss of use, data or profits, whether whatsoever resulting from loss of use, data or profits, whether
in an action of contract, negligence or other tortious action, in an action of contract, negligence or other tortious action,
arising out of or in connection with the use or performance of arising out of or in connection with the use or performance of
this software. this software.
*/ */
#include <LUFA/Common/Common.h> #include <LUFA/Common/Common.h>
#include <LUFA/Drivers/USB/USB.h> #include <LUFA/Drivers/USB/USB.h>

View File

@ -1,46 +1,46 @@
# #
# LUFA Library # LUFA Library
# Copyright (C) Dean Camera, 2012. # Copyright (C) Dean Camera, 2012.
# #
# dean [at] fourwalledcubicle [dot] com # dean [at] fourwalledcubicle [dot] com
# www.lufa-lib.org # www.lufa-lib.org
# #
# Makefile for the single USB mode build test. # Makefile for the single USB mode build test.
# This test attempts to build the USB module # This test attempts to build the USB module
# under fixed device and fixed host modes under # under fixed device and fixed host modes under
# all supported architectures # all supported architectures
# Path to the LUFA library core # Path to the LUFA library core
LUFA_PATH = ../../LUFA/ LUFA_PATH = ../../LUFA/
all: begin compile clean end all: begin compile clean end
begin: begin:
@echo Executing build test "SingleUSBModeTest". @echo Executing build test "SingleUSBModeTest".
@echo @echo
end: end:
@echo Build test "SingleUSBModeTest" complete. @echo Build test "SingleUSBModeTest" complete.
@echo @echo
compile: compile:
$(MAKE) -s -f makefile.test clean elf ARCH=AVR8 MCU=at90usb1287 CC_FLAGS='-D USB_DEVICE_ONLY' $(MAKE) -s -f makefile.test clean elf ARCH=AVR8 MCU=at90usb1287 CC_FLAGS='-D USB_DEVICE_ONLY'
$(MAKE) -s -f makefile.test clean elf ARCH=AVR8 MCU=at90usb1287 CC_FLAGS='-D USB_HOST_ONLY' $(MAKE) -s -f makefile.test clean elf ARCH=AVR8 MCU=at90usb1287 CC_FLAGS='-D USB_HOST_ONLY'
$(MAKE) -s -f makefile.test clean elf ARCH=XMEGA MCU=atxmega128a1u CC_FLAGS='-D USB_DEVICE_ONLY' $(MAKE) -s -f makefile.test clean elf ARCH=XMEGA MCU=atxmega128a1u CC_FLAGS='-D USB_DEVICE_ONLY'
$(MAKE) -s -f makefile.test clean elf ARCH=UC3 MCU=uc3a0256 CC_FLAGS='-D USB_DEVICE_ONLY' $(MAKE) -s -f makefile.test clean elf ARCH=UC3 MCU=uc3a0256 CC_FLAGS='-D USB_DEVICE_ONLY'
$(MAKE) -s -f makefile.test clean elf ARCH=UC3 MCU=uc3a0256 CC_FLAGS='-D USB_HOST_ONLY' $(MAKE) -s -f makefile.test clean elf ARCH=UC3 MCU=uc3a0256 CC_FLAGS='-D USB_HOST_ONLY'
clean: clean:
$(MAKE) -s -f makefile.test clean ARCH=AVR8 MCU=at90usb1287 $(MAKE) -s -f makefile.test clean ARCH=AVR8 MCU=at90usb1287
$(MAKE) -s -f makefile.test clean ARCH=XMEGA MCU=atxmega128a1u $(MAKE) -s -f makefile.test clean ARCH=XMEGA MCU=atxmega128a1u
$(MAKE) -s -f makefile.test clean ARCH=UC3 MCU=uc3a0256 $(MAKE) -s -f makefile.test clean ARCH=UC3 MCU=uc3a0256
%: %:
.PHONY: begin end compile clean .PHONY: begin end compile clean
# Include LUFA build script makefiles # Include LUFA build script makefiles
include $(LUFA_PATH)/Build/lufa.core.in include $(LUFA_PATH)/Build/lufa.core.in

View File

@ -1,34 +1,34 @@
# #
# LUFA Library # LUFA Library
# Copyright (C) Dean Camera, 2012. # Copyright (C) Dean Camera, 2012.
# #
# dean [at] fourwalledcubicle [dot] com # dean [at] fourwalledcubicle [dot] com
# www.lufa-lib.org # www.lufa-lib.org
# #
# -------------------------------------- # --------------------------------------
# LUFA Project Makefile. # LUFA Project Makefile.
# -------------------------------------- # --------------------------------------
MCU = MCU =
ARCH = ARCH =
BOARD = NONE BOARD = NONE
F_CPU = $(F_USB) F_CPU = $(F_USB)
ifeq ($(ARCH), AVR8) ifeq ($(ARCH), AVR8)
F_USB = 8000000 F_USB = 8000000
else ifeq ($(ARCH), XMEGA) else ifeq ($(ARCH), XMEGA)
F_USB = 48000000 F_USB = 48000000
else ifeq ($(ARCH), UC3) else ifeq ($(ARCH), UC3)
F_USB = 48000000 F_USB = 48000000
endif endif
OPTIMIZATION = 1 OPTIMIZATION = 1
TARGET = Test TARGET = Test
SRC = Test.c Dummy.S $(LUFA_SRC_USB) SRC = Test.c Dummy.S $(LUFA_SRC_USB)
LUFA_PATH = ../../LUFA/ LUFA_PATH = ../../LUFA/
CC_FLAGS = CC_FLAGS =
# TODO: Add warnings and set warnings as errors # TODO: Add warnings and set warnings as errors
# Include LUFA build script makefiles # Include LUFA build script makefiles
include $(LUFA_PATH)/Build/lufa.sources.in include $(LUFA_PATH)/Build/lufa.sources.in
include $(LUFA_PATH)/Build/lufa.build.in include $(LUFA_PATH)/Build/lufa.build.in

View File

@ -1,38 +1,38 @@
# #
# LUFA Library # LUFA Library
# Copyright (C) Dean Camera, 2012. # Copyright (C) Dean Camera, 2012.
# #
# dean [at] fourwalledcubicle [dot] com # dean [at] fourwalledcubicle [dot] com
# www.lufa-lib.org # www.lufa-lib.org
# #
# Static anlysis of the entire LUFA source tree, using the free cross-platform "cppcheck" tool. # Static anlysis of the entire LUFA source tree, using the free cross-platform "cppcheck" tool.
# Path to the LUFA library core # Path to the LUFA library core
LUFA_PATH = ../../LUFA/ LUFA_PATH = ../../LUFA/
CPPCHECK_EXCLUDES = FATFs/ \ CPPCHECK_EXCLUDES = FATFs/ \
PetiteFATFs/ \ PetiteFATFs/ \
uip/ uip/
CPPCHECK_INCLUDES = $(patsubst %/,%,$(LUFA_PATH))/CodeTemplates/ \ CPPCHECK_INCLUDES = $(patsubst %/,%,$(LUFA_PATH))/CodeTemplates/ \
$(patsubst %/,%,$(LUFA_PATH))/../Projects/AVRISP-MKII/ $(patsubst %/,%,$(LUFA_PATH))/../Projects/AVRISP-MKII/
CPPCHECK_PATH = $(patsubst %/,%,$(LUFA_PATH))/.. CPPCHECK_PATH = $(patsubst %/,%,$(LUFA_PATH))/..
all: begin cppcheck-config cppcheck end all: begin cppcheck-config cppcheck end
begin: begin:
@echo Executing build test "StaticAnalysisTest". @echo Executing build test "StaticAnalysisTest".
@echo @echo
end: end:
@echo Build test "StaticAnalysisTest" complete. @echo Build test "StaticAnalysisTest" complete.
@echo @echo
%: %:
.PHONY: all begin end .PHONY: all begin end
# Include LUFA build script makefiles # Include LUFA build script makefiles
include $(LUFA_PATH)/Build/lufa.core.in include $(LUFA_PATH)/Build/lufa.core.in
include $(LUFA_PATH)/Build/lufa.cppcheck.in include $(LUFA_PATH)/Build/lufa.cppcheck.in

View File

@ -1,19 +1,19 @@
# #
# LUFA Library # LUFA Library
# Copyright (C) Dean Camera, 2012. # Copyright (C) Dean Camera, 2012.
# #
# dean [at] fourwalledcubicle [dot] com # dean [at] fourwalledcubicle [dot] com
# www.lufa-lib.org # www.lufa-lib.org
# #
# Makefile to build all the LUFA Build Tests. Build Tests are # Makefile to build all the LUFA Build Tests. Build Tests are
# used to verify the correctness of the LUFA library, and are # used to verify the correctness of the LUFA library, and are
# not intended to be modified or compiled by non-developers. # not intended to be modified or compiled by non-developers.
all: all:
%: %:
$(MAKE) -C BoardDriverTest $@ $(MAKE) -C BoardDriverTest $@
$(MAKE) -C BootloaderTest $@ $(MAKE) -C BootloaderTest $@
$(MAKE) -C ModuleTest $@ $(MAKE) -C ModuleTest $@
$(MAKE) -C SingleUSBModeTest $@ $(MAKE) -C SingleUSBModeTest $@
$(MAKE) -C StaticAnalysisTest $@ $(MAKE) -C StaticAnalysisTest $@

View File

@ -1,89 +1,89 @@
# #
# LUFA Library # LUFA Library
# Copyright (C) Dean Camera, 2012. # Copyright (C) Dean Camera, 2012.
# #
# dean [at] fourwalledcubicle [dot] com # dean [at] fourwalledcubicle [dot] com
# www.lufa-lib.org # www.lufa-lib.org
# #
LUFA_BUILD_MODULES += ATPROGRAM LUFA_BUILD_MODULES += ATPROGRAM
LUFA_BUILD_TARGETS += atprogram atprogram-ee LUFA_BUILD_TARGETS += atprogram atprogram-ee
LUFA_BUILD_MANDATORY_VARS += MCU TARGET LUFA_BUILD_MANDATORY_VARS += MCU TARGET
LUFA_BUILD_OPTIONAL_VARS += ATPROGRAM_PROGRAMMER ATPROGRAM_INTERFACE ATPROGRAM_PORT LUFA_BUILD_OPTIONAL_VARS += ATPROGRAM_PROGRAMMER ATPROGRAM_INTERFACE ATPROGRAM_PORT
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# LUFA ATPROGRAM Programmer Buildsystem Makefile Module. # LUFA ATPROGRAM Programmer Buildsystem Makefile Module.
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DESCRIPTION: # DESCRIPTION:
# Provides a set of targets to re-program a device using the Atmel atprogram # Provides a set of targets to re-program a device using the Atmel atprogram
# utility in AVR Studio 5.x and Atmel Studio 6.0 onwards. # utility in AVR Studio 5.x and Atmel Studio 6.0 onwards.
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# TARGETS: # TARGETS:
# #
# atprogram - Program target FLASH with application using # atprogram - Program target FLASH with application using
# atprogram # atprogram
# atprogram-ee - Program target EEPROM with application data # atprogram-ee - Program target EEPROM with application data
# using atprogram # using atprogram
# #
# MANDATORY PARAMETERS: # MANDATORY PARAMETERS:
# #
# MCU - Microcontroller device model name # MCU - Microcontroller device model name
# TARGET - Application name # TARGET - Application name
# #
# OPTIONAL PARAMETERS: # OPTIONAL PARAMETERS:
# #
# ATPROGRAM_PROGRAMMER - Name of programming hardware to use # ATPROGRAM_PROGRAMMER - Name of programming hardware to use
# ATPROGRAM_INTERFACE - Name of programming interface to use # ATPROGRAM_INTERFACE - Name of programming interface to use
# ATPROGRAM_PORT - Name of communication port to use # ATPROGRAM_PORT - Name of communication port to use
# #
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Sanity-check values of mandatory user-supplied variables # Sanity-check values of mandatory user-supplied variables
MCU ?= $(error Makefile MCU value not set) MCU ?= $(error Makefile MCU value not set)
TARGET ?= $(error Makefile TARGET value not set) TARGET ?= $(error Makefile TARGET value not set)
ifeq ($(MCU),) ifeq ($(MCU),)
$(error Makefile MCU option cannot be blank) $(error Makefile MCU option cannot be blank)
endif endif
ifeq ($(TARGET),) ifeq ($(TARGET),)
$(error Makefile TARGET option cannot be blank) $(error Makefile TARGET option cannot be blank)
endif endif
# Default values of optionally user-supplied variables # Default values of optionally user-supplied variables
ATPROGRAM_PROGRAMMER ?= jtagice3 ATPROGRAM_PROGRAMMER ?= jtagice3
ATPROGRAM_INTERFACE ?= jtag ATPROGRAM_INTERFACE ?= jtag
ATPROGRAM_PORT ?= ATPROGRAM_PORT ?=
# Output Messages # Output Messages
MSG_ATPROGRAM_CMD := ' [ATPRGRM] :' MSG_ATPROGRAM_CMD := ' [ATPRGRM] :'
# Construct base atprogram command flags # Construct base atprogram command flags
BASE_ATPROGRAM_FLAGS := --tool $(ATPROGRAM_PROGRAMMER) --interface $(ATPROGRAM_INTERFACE) --device $(MCU) BASE_ATPROGRAM_FLAGS := --tool $(ATPROGRAM_PROGRAMMER) --interface $(ATPROGRAM_INTERFACE) --device $(MCU)
ifneq ($(ATPROGRAM_PORT),) ifneq ($(ATPROGRAM_PORT),)
BASE_ATPROGRAM_FLAGS += --port $(ATPROGRAM_PORT) BASE_ATPROGRAM_FLAGS += --port $(ATPROGRAM_PORT)
endif endif
# Construct the flags to use for the various memory spaces # Construct the flags to use for the various memory spaces
ifeq ($(ARCH), AVR8) ifeq ($(ARCH), AVR8)
ATPROGRAM_FLASH_FLAGS := --chiperase --flash ATPROGRAM_FLASH_FLAGS := --chiperase --flash
ATPROGRAM_EEPROM_FLAGS := --eeprom ATPROGRAM_EEPROM_FLAGS := --eeprom
else ifeq ($(ARCH), XMEGA) else ifeq ($(ARCH), XMEGA)
ATPROGRAM_FLASH_FLAGS := --erase --flash ATPROGRAM_FLASH_FLAGS := --erase --flash
ATPROGRAM_EEPROM_FLAGS := --eeprom ATPROGRAM_EEPROM_FLAGS := --eeprom
else ifeq ($(ARCH), UC3) else ifeq ($(ARCH), UC3)
ATPROGRAM_FLASH_FLAGS := --erase ATPROGRAM_FLASH_FLAGS := --erase
ATPROGRAM_EEPROM_FLAGS := --eeprom ATPROGRAM_EEPROM_FLAGS := --eeprom
else else
$(error Unsupported architecture "$(ARCH)") $(error Unsupported architecture "$(ARCH)")
endif endif
atprogram: $(TARGET).elf $(MAKEFILE_LIST) atprogram: $(TARGET).elf $(MAKEFILE_LIST)
@echo $(MSG_ATPROGRAM_CMD) Programming device \"$(MCU)\" FLASH using \"$(ATPROGRAM_PROGRAMMER)\" @echo $(MSG_ATPROGRAM_CMD) Programming device \"$(MCU)\" FLASH using \"$(ATPROGRAM_PROGRAMMER)\"
atprogram $(BASE_ATPROGRAM_FLAGS) program $(ATPROGRAM_FLASH_FLAGS) --file $< atprogram $(BASE_ATPROGRAM_FLAGS) program $(ATPROGRAM_FLASH_FLAGS) --file $<
atprogram-ee: $(TARGET).elf $(MAKEFILE_LIST) atprogram-ee: $(TARGET).elf $(MAKEFILE_LIST)
@echo $(MSG_ATPROGRAM_CMD) Programming device \"$(MCU)\" EEPROM using \"$(ATPROGRAM_PROGRAMMER)\" @echo $(MSG_ATPROGRAM_CMD) Programming device \"$(MCU)\" EEPROM using \"$(ATPROGRAM_PROGRAMMER)\"
atprogram $(BASE_ATPROGRAM_FLAGS) program $(ATPROGRAM_EEPROM_FLAGS) --file $< atprogram $(BASE_ATPROGRAM_FLAGS) program $(ATPROGRAM_EEPROM_FLAGS) --file $<
# Phony build targets for this module # Phony build targets for this module
.PHONY: atprogram atprogram-ee .PHONY: atprogram atprogram-ee

View File

@ -1,69 +1,69 @@
# #
# LUFA Library # LUFA Library
# Copyright (C) Dean Camera, 2012. # Copyright (C) Dean Camera, 2012.
# #
# dean [at] fourwalledcubicle [dot] com # dean [at] fourwalledcubicle [dot] com
# www.lufa-lib.org # www.lufa-lib.org
# #
LUFA_BUILD_MODULES += AVRDUDE LUFA_BUILD_MODULES += AVRDUDE
LUFA_BUILD_TARGETS += avrdude avrdude-ee LUFA_BUILD_TARGETS += avrdude avrdude-ee
LUFA_BUILD_MANDATORY_VARS += MCU TARGET LUFA_BUILD_MANDATORY_VARS += MCU TARGET
LUFA_BUILD_OPTIONAL_VARS += AVRDUDE_PROGRAMMER AVRDUDE_PORT AVRDUDE_FLAGS LUFA_BUILD_OPTIONAL_VARS += AVRDUDE_PROGRAMMER AVRDUDE_PORT AVRDUDE_FLAGS
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# LUFA AVRDUDE Programmer Buildsystem Makefile Module. # LUFA AVRDUDE Programmer Buildsystem Makefile Module.
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DESCRIPTION: # DESCRIPTION:
# Provides a set of targets to re-program a device using the open source # Provides a set of targets to re-program a device using the open source
# avr-dude utility. # avr-dude utility.
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# TARGETS: # TARGETS:
# #
# avrdude - Program target FLASH with application using # avrdude - Program target FLASH with application using
# avrdude # avrdude
# avrdude-ee - Program target EEPROM with application data # avrdude-ee - Program target EEPROM with application data
# using avrdude # using avrdude
# #
# MANDATORY PARAMETERS: # MANDATORY PARAMETERS:
# #
# MCU - Microcontroller device model name # MCU - Microcontroller device model name
# TARGET - Application name # TARGET - Application name
# #
# OPTIONAL PARAMETERS: # OPTIONAL PARAMETERS:
# #
# AVRDUDE_PROGRAMMER - Name of programming hardware to use # AVRDUDE_PROGRAMMER - Name of programming hardware to use
# AVRDUDE_PORT - Name of communication port to use # AVRDUDE_PORT - Name of communication port to use
# AVRDUDE_FLAGS - Flags to pass to avr-dude # AVRDUDE_FLAGS - Flags to pass to avr-dude
# #
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Sanity-check values of mandatory user-supplied variables # Sanity-check values of mandatory user-supplied variables
MCU ?= $(error Makefile MCU value not set) MCU ?= $(error Makefile MCU value not set)
TARGET ?= $(error Makefile TARGET value not set) TARGET ?= $(error Makefile TARGET value not set)
ifeq ($(MCU),) ifeq ($(MCU),)
$(error Makefile MCU option cannot be blank) $(error Makefile MCU option cannot be blank)
endif endif
ifeq ($(TARGET),) ifeq ($(TARGET),)
$(error Makefile TARGET option cannot be blank) $(error Makefile TARGET option cannot be blank)
endif endif
# Default values of optionally user-supplied variables # Default values of optionally user-supplied variables
AVRDUDE_PROGRAMMER ?= jtagicemkii AVRDUDE_PROGRAMMER ?= jtagicemkii
AVRDUDE_PORT ?= usb AVRDUDE_PORT ?= usb
AVRDUDE_FLAGS ?= AVRDUDE_FLAGS ?=
# Output Messages # Output Messages
MSG_AVRDUDE_CMD := ' [AVRDUDE] :' MSG_AVRDUDE_CMD := ' [AVRDUDE] :'
avrdude: $(TARGET).hex $(MAKEFILE_LIST) avrdude: $(TARGET).hex $(MAKEFILE_LIST)
@echo $(MSG_AVRDUDE_CMD) Programming device \"$(MCU)\" FLASH with settings \"$(AVRDUDE_FLASH_FLAGS)\" using \"$(AVRDUDE_PROGRAMMER)\" on port \"$(AVRDUDE_PORT)\" @echo $(MSG_AVRDUDE_CMD) Programming device \"$(MCU)\" FLASH with settings \"$(AVRDUDE_FLASH_FLAGS)\" using \"$(AVRDUDE_PROGRAMMER)\" on port \"$(AVRDUDE_PORT)\"
avrdude -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) -U flash:w:$< $(AVRDUDE_FLAGS) avrdude -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) -U flash:w:$< $(AVRDUDE_FLAGS)
avrdude-ee: $(TARGET).eep $(MAKEFILE_LIST) avrdude-ee: $(TARGET).eep $(MAKEFILE_LIST)
@echo $(MSG_AVRDUDE_CMD) Programming device \"$(MCU)\" EEPROM with settings \"$(AVRDUDE_EEP_FLAGS)\" using \"$(AVRDUDE_PROGRAMMER)\" on port \"$(AVRDUDE_PORT)\" @echo $(MSG_AVRDUDE_CMD) Programming device \"$(MCU)\" EEPROM with settings \"$(AVRDUDE_EEP_FLAGS)\" using \"$(AVRDUDE_PROGRAMMER)\" on port \"$(AVRDUDE_PORT)\"
avrdude -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) -U eeprom:w:$< $(AVRDUDE_FLAGS) avrdude -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) -U eeprom:w:$< $(AVRDUDE_FLAGS)
# Phony build targets for this module # Phony build targets for this module
.PHONY: avrdude avrdude-ee .PHONY: avrdude avrdude-ee

View File

@ -1,240 +1,240 @@
# #
# LUFA Library # LUFA Library
# Copyright (C) Dean Camera, 2012. # Copyright (C) Dean Camera, 2012.
# #
# dean [at] fourwalledcubicle [dot] com # dean [at] fourwalledcubicle [dot] com
# www.lufa-lib.org # www.lufa-lib.org
# #
LUFA_BUILD_MODULES += BUILD LUFA_BUILD_MODULES += BUILD
LUFA_BUILD_TARGETS += size symbol-sizes all elf hex lss clean LUFA_BUILD_TARGETS += size symbol-sizes all elf hex lss clean
LUFA_BUILD_MANDATORY_VARS += TARGET ARCH MCU SRC F_USB LUFA_PATH LUFA_BUILD_MANDATORY_VARS += TARGET ARCH MCU SRC F_USB LUFA_PATH
LUFA_BUILD_OPTIONAL_VARS += BOARD OPTIMIZATION C_STANDARD CPP_STANDARD F_CPU C_FLAGS CPP_FLAGS ASM_FLAGS CC_FLAGS LD_FLAGS LUFA_BUILD_OPTIONAL_VARS += BOARD OPTIMIZATION C_STANDARD CPP_STANDARD F_CPU C_FLAGS CPP_FLAGS ASM_FLAGS CC_FLAGS LD_FLAGS
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# LUFA GCC Compiler Buildsystem Makefile Module. # LUFA GCC Compiler Buildsystem Makefile Module.
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DESCRIPTION: # DESCRIPTION:
# Provides a set of targets to build a C, C++ and/or Assembly application # Provides a set of targets to build a C, C++ and/or Assembly application
# via the AVR-GCC compiler. # via the AVR-GCC compiler.
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# TARGETS: # TARGETS:
# #
# size - List built application size # size - List built application size
# symbol-sizes - Print application symbols from the binary ELF # symbol-sizes - Print application symbols from the binary ELF
# file as a list sorted by size in bytes # file as a list sorted by size in bytes
# all - Build application and list size # all - Build application and list size
# elf - Build application ELF debug object file # elf - Build application ELF debug object file
# hex - Build application HEX object files # hex - Build application HEX object files
# lss - Build application LSS assembly listing file # lss - Build application LSS assembly listing file
# clean - Remove output files # clean - Remove output files
# #
# MANDATORY PARAMETERS: # MANDATORY PARAMETERS:
# #
# TARGET - Application name # TARGET - Application name
# ARCH - Device architecture name # ARCH - Device architecture name
# MCU - Microcontroller device model name # MCU - Microcontroller device model name
# SRC - List of input source files (*.c, *.cpp, *.S) # SRC - List of input source files (*.c, *.cpp, *.S)
# F_USB - Speed of the input clock of the USB controller # F_USB - Speed of the input clock of the USB controller
# in Hz # in Hz
# LUFA_PATH - Path to the LUFA library core # LUFA_PATH - Path to the LUFA library core
# #
# OPTIONAL PARAMETERS: # OPTIONAL PARAMETERS:
# #
# BOARD - LUFA board hardware # BOARD - LUFA board hardware
# OPTIMIZATION - Optimization level # OPTIMIZATION - Optimization level
# C_STANDARD - C Language Standard to use # C_STANDARD - C Language Standard to use
# CPP_STANDARD - C++ Language Standard to use # CPP_STANDARD - C++ Language Standard to use
# F_CPU - Speed of the CPU, in Hz # F_CPU - Speed of the CPU, in Hz
# C_FLAGS - Flags to pass to the C compiler only # C_FLAGS - Flags to pass to the C compiler only
# CPP_FLAGS - Flags to pass to the C++ compiler only # CPP_FLAGS - Flags to pass to the C++ compiler only
# ASM_FLAGS - Flags to pass to the assembler only # ASM_FLAGS - Flags to pass to the assembler only
# CC_FLAGS - Common flags to pass to the C/C++ compiler and # CC_FLAGS - Common flags to pass to the C/C++ compiler and
# assembler # assembler
# LD_FLAGS - Flags to pass to the linker # LD_FLAGS - Flags to pass to the linker
# #
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Sanity-check values of mandatory user-supplied variables # Sanity-check values of mandatory user-supplied variables
MCU ?= $(error Makefile MCU value not set) MCU ?= $(error Makefile MCU value not set)
TARGET ?= $(error Makefile TARGET value not set) TARGET ?= $(error Makefile TARGET value not set)
ARCH ?= $(error Makefile ARCH value not set) ARCH ?= $(error Makefile ARCH value not set)
SRC ?= $(error Makefile SRC value not set) SRC ?= $(error Makefile SRC value not set)
F_USB ?= $(error Makefile F_USB value not set) F_USB ?= $(error Makefile F_USB value not set)
LUFA_PATH ?= $(error Makefile LUFA_PATH value not set) LUFA_PATH ?= $(error Makefile LUFA_PATH value not set)
ifeq ($(MCU),) ifeq ($(MCU),)
$(error Makefile MCU option cannot be blank) $(error Makefile MCU option cannot be blank)
endif endif
ifeq ($(TARGET),) ifeq ($(TARGET),)
$(error Makefile TARGET option cannot be blank) $(error Makefile TARGET option cannot be blank)
endif endif
ifeq ($(ARCH),) ifeq ($(ARCH),)
$(error Makefile ARCH option cannot be blank) $(error Makefile ARCH option cannot be blank)
endif endif
ifeq ($(F_USB),) ifeq ($(F_USB),)
$(error Makefile F_USB option cannot be blank) $(error Makefile F_USB option cannot be blank)
endif endif
# Default values of optionally user-supplied variables # Default values of optionally user-supplied variables
BOARD ?= NONE BOARD ?= NONE
OPTIMIZATION ?= s OPTIMIZATION ?= s
F_CPU ?= F_CPU ?=
C_STANDARD ?= gnu99 C_STANDARD ?= gnu99
CPP_STANDARD ?= gnu++98 CPP_STANDARD ?= gnu++98
C_FLAGS ?= C_FLAGS ?=
CPP_FLAGS ?= CPP_FLAGS ?=
ASM_FLAGS ?= ASM_FLAGS ?=
CC_FLAGS ?= CC_FLAGS ?=
# Determine the utility prefix to use for the selected architecture # Determine the utility prefix to use for the selected architecture
ifeq ($(ARCH), AVR8) ifeq ($(ARCH), AVR8)
CROSS := avr- CROSS := avr-
else ifeq ($(ARCH), XMEGA) else ifeq ($(ARCH), XMEGA)
CROSS := avr- CROSS := avr-
else ifeq ($(ARCH), UC3) else ifeq ($(ARCH), UC3)
CROSS := avr32- CROSS := avr32-
else else
$(error Unsupported architecture "$(ARCH)".) $(error Unsupported architecture "$(ARCH)".)
endif endif
# Output Messages # Output Messages
MSG_BUILD_BEGIN := Begin compilation of project \"$(TARGET)\"... MSG_BUILD_BEGIN := Begin compilation of project \"$(TARGET)\"...
MSG_BUILD_END := Finished building project \"$(TARGET)\". MSG_BUILD_END := Finished building project \"$(TARGET)\".
MSG_COMPILE_CMD := ' [CC] :' MSG_COMPILE_CMD := ' [CC] :'
MSG_ASSEMBLE_CMD := ' [AS] :' MSG_ASSEMBLE_CMD := ' [AS] :'
MSG_NM_CMD := ' [NM] :' MSG_NM_CMD := ' [NM] :'
MSG_REMOVE_CMD := ' [RM] :' MSG_REMOVE_CMD := ' [RM] :'
MSG_LINKER_CMD := ' [LNK] :' MSG_LINKER_CMD := ' [LNK] :'
MSG_SIZE_CMD := ' [SIZE] :' MSG_SIZE_CMD := ' [SIZE] :'
MSG_OBJCPY_CMD := ' [OBJCPY] :' MSG_OBJCPY_CMD := ' [OBJCPY] :'
MSG_OBJDMP_CMD := ' [OBJDMP] :' MSG_OBJDMP_CMD := ' [OBJDMP] :'
# Convert input source file list to differentiate them by type # Convert input source file list to differentiate them by type
C_SOURCE = $(filter %.c, $(SRC)) C_SOURCE = $(filter %.c, $(SRC))
CPP_SOURCE = $(filter %.cpp, $(SRC)) CPP_SOURCE = $(filter %.cpp, $(SRC))
ASM_SOURCE = $(filter %.S, $(SRC)) ASM_SOURCE = $(filter %.S, $(SRC))
# Create a list of unknown source file types, if any are found throw an error # Create a list of unknown source file types, if any are found throw an error
UNKNOWN_SOURCE = $(filter-out $(C_SOURCE) $(CPP_SOURCE) $(ASM_SOURCE), $(SRC)) UNKNOWN_SOURCE = $(filter-out $(C_SOURCE) $(CPP_SOURCE) $(ASM_SOURCE), $(SRC))
ifneq ($(UNKNOWN_SOURCE),) ifneq ($(UNKNOWN_SOURCE),)
$(error Unknown input source formats: $(UNKNOWN_SOURCE)) $(error Unknown input source formats: $(UNKNOWN_SOURCE))
endif endif
# Convert input source filenames into a list of required output object files # Convert input source filenames into a list of required output object files
OBJECT_FILES = $(filter %.o, $(C_SOURCE:%.c=%.o) $(CPP_SOURCE:%.cpp=%.o) $(ASM_SOURCE:%.S=%.o)) OBJECT_FILES = $(filter %.o, $(C_SOURCE:%.c=%.o) $(CPP_SOURCE:%.cpp=%.o) $(ASM_SOURCE:%.S=%.o))
DEPENDENCY_FILES = $(OBJECT_FILES:%.o=%.d) DEPENDENCY_FILES = $(OBJECT_FILES:%.o=%.d)
# Create a list of common flags to pass to the compiler/linker/assembler # Create a list of common flags to pass to the compiler/linker/assembler
BASE_CC_FLAGS := BASE_CC_FLAGS :=
ifeq ($(ARCH), AVR8) ifeq ($(ARCH), AVR8)
BASE_CC_FLAGS += -mmcu=$(MCU) -gdwarf-2 -fshort-enums -fno-inline-small-functions -fpack-struct BASE_CC_FLAGS += -mmcu=$(MCU) -gdwarf-2 -fshort-enums -fno-inline-small-functions -fpack-struct
else ifeq ($(ARCH), XMEGA) else ifeq ($(ARCH), XMEGA)
BASE_CC_FLAGS += -mmcu=$(MCU) -gdwarf-2 -fshort-enums -fno-inline-small-functions -fpack-struct BASE_CC_FLAGS += -mmcu=$(MCU) -gdwarf-2 -fshort-enums -fno-inline-small-functions -fpack-struct
else ifeq ($(ARCH), UC3) else ifeq ($(ARCH), UC3)
BASE_CC_FLAGS += -mpart=$(MCU:at32%=%) -g3 -masm-addr-pseudos BASE_CC_FLAGS += -mpart=$(MCU:at32%=%) -g3 -masm-addr-pseudos
endif endif
BASE_CC_FLAGS += -Wall -fno-strict-aliasing -funsigned-char -funsigned-bitfields -ffunction-sections BASE_CC_FLAGS += -Wall -fno-strict-aliasing -funsigned-char -funsigned-bitfields -ffunction-sections
BASE_CC_FLAGS += -I. -I$(patsubst %/,%,$(LUFA_PATH))/.. BASE_CC_FLAGS += -I. -I$(patsubst %/,%,$(LUFA_PATH))/..
BASE_CC_FLAGS += -DARCH=ARCH_$(ARCH) -DBOARD=BOARD_$(BOARD) -DF_USB=$(F_USB)UL BASE_CC_FLAGS += -DARCH=ARCH_$(ARCH) -DBOARD=BOARD_$(BOARD) -DF_USB=$(F_USB)UL
ifneq ($(F_CPU),) ifneq ($(F_CPU),)
BASE_CC_FLAGS += -DF_CPU=$(F_CPU)UL BASE_CC_FLAGS += -DF_CPU=$(F_CPU)UL
endif endif
# Additional language specific compiler flags # Additional language specific compiler flags
BASE_C_FLAGS := -x c -O$(OPTIMIZATION) -std=$(C_STANDARD) -Wstrict-prototypes BASE_C_FLAGS := -x c -O$(OPTIMIZATION) -std=$(C_STANDARD) -Wstrict-prototypes
BASE_CPP_FLAGS := -x c++ -O$(OPTIMIZATION) -std=$(CPP_STANDARD) BASE_CPP_FLAGS := -x c++ -O$(OPTIMIZATION) -std=$(CPP_STANDARD)
BASE_ASM_FLAGS := -x assembler-with-cpp BASE_ASM_FLAGS := -x assembler-with-cpp
# Create a list of flags to pass to the linker # Create a list of flags to pass to the linker
BASE_LD_FLAGS := -lm -Wl,-Map=$(TARGET).map,--cref -Wl,--gc-sections BASE_LD_FLAGS := -lm -Wl,-Map=$(TARGET).map,--cref -Wl,--gc-sections
ifeq ($(ARCH), UC3) ifeq ($(ARCH), UC3)
BASE_LD_FLAGS += --rodata-writable --direct-data BASE_LD_FLAGS += --rodata-writable --direct-data
else else
BASE_LD_FLAGS += -Wl,--relax BASE_LD_FLAGS += -Wl,--relax
endif endif
# Determine flags to pass to the size utility based on its reported features # Determine flags to pass to the size utility based on its reported features
SIZE_MCU_FLAG := $(shell $(CROSS)size --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) ) SIZE_MCU_FLAG := $(shell $(CROSS)size --help | grep -- --mcu > /dev/null && echo --mcu=$(MCU) )
SIZE_FORMAT_FLAG := $(shell $(CROSS)size --help | grep -- --format=.*avr > /dev/null && echo --format=avr ) SIZE_FORMAT_FLAG := $(shell $(CROSS)size --help | grep -- --format=.*avr > /dev/null && echo --format=avr )
begin: begin:
@echo "" @echo ""
@echo $(MSG_BUILD_BEGIN) @echo $(MSG_BUILD_BEGIN)
@echo "" @echo ""
end: end:
@echo "" @echo ""
@echo $(MSG_BUILD_END) @echo $(MSG_BUILD_END)
@echo "" @echo ""
gcc_version: gcc_version:
@$(CROSS)gcc --version @$(CROSS)gcc --version
check_source: check_source:
@for f in $(SRC); do \ @for f in $(SRC); do \
if [ ! -f $$f ]; then \ if [ ! -f $$f ]; then \
echo "Error: Source file not found: $$f"; \ echo "Error: Source file not found: $$f"; \
exit 1; \ exit 1; \
fi; \ fi; \
done done
size: $(TARGET).elf size: $(TARGET).elf
@echo $(MSG_SIZE_CMD) Determining size of \"$<\" @echo $(MSG_SIZE_CMD) Determining size of \"$<\"
@if test -f $(TARGET).elf; then \ @if test -f $(TARGET).elf; then \
$(CROSS)size $(SIZE_MCU_FLAG) $(SIZE_FORMAT_FLAG) $< ; 2>/dev/null; \ $(CROSS)size $(SIZE_MCU_FLAG) $(SIZE_FORMAT_FLAG) $< ; 2>/dev/null; \
fi fi
symbol-sizes: $(TARGET).elf symbol-sizes: $(TARGET).elf
@echo $(MSG_NM_CMD) Extracting \"$<\" symbols with decimal byte sizes @echo $(MSG_NM_CMD) Extracting \"$<\" symbols with decimal byte sizes
avr-nm --size-sort --demangle --radix=d $< avr-nm --size-sort --demangle --radix=d $<
clean: clean:
@echo $(MSG_REMOVE_CMD) Removing object files of \"$(TARGET)\" @echo $(MSG_REMOVE_CMD) Removing object files of \"$(TARGET)\"
rm -f $(OBJECT_FILES) rm -f $(OBJECT_FILES)
@echo $(MSG_REMOVE_CMD) Removing dependency files of \"$(TARGET)\" @echo $(MSG_REMOVE_CMD) Removing dependency files of \"$(TARGET)\"
rm -f $(DEPENDENCY_FILES) rm -f $(DEPENDENCY_FILES)
@echo $(MSG_REMOVE_CMD) Removing output files of \"$(TARGET)\" @echo $(MSG_REMOVE_CMD) Removing output files of \"$(TARGET)\"
rm -f $(TARGET).elf $(TARGET).hex $(TARGET).eep $(TARGET).map $(TARGET).lss rm -f $(TARGET).elf $(TARGET).hex $(TARGET).eep $(TARGET).map $(TARGET).lss
all: begin check_source gcc_version elf hex lss size end all: begin check_source gcc_version elf hex lss size end
elf: $(TARGET).elf elf: $(TARGET).elf
hex: $(TARGET).hex $(TARGET).eep hex: $(TARGET).hex $(TARGET).eep
lss: $(TARGET).lss lss: $(TARGET).lss
%.o: %.c $(MAKEFILE_LIST) %.o: %.c $(MAKEFILE_LIST)
@echo $(MSG_COMPILE_CMD) Compiling C file \"$<\" @echo $(MSG_COMPILE_CMD) Compiling C file \"$<\"
$(CROSS)gcc -c $(BASE_CC_FLAGS) $(BASE_C_FLAGS) $(CC_FLAGS) $(C_FLAGS) -MMD -MP -MF $(@:%.o=%.d) $< -o $@ $(CROSS)gcc -c $(BASE_CC_FLAGS) $(BASE_C_FLAGS) $(CC_FLAGS) $(C_FLAGS) -MMD -MP -MF $(@:%.o=%.d) $< -o $@
%.o: %.cpp $(MAKEFILE_LIST) %.o: %.cpp $(MAKEFILE_LIST)
@echo $(MSG_COMPILE_CMD) Compiling C++ file \"$<\" @echo $(MSG_COMPILE_CMD) Compiling C++ file \"$<\"
$(CROSS)gcc -c $(BASE_CC_FLAGS) $(BASE_CPP_FLAGS) $(CC_FLAGS) $(CPP_FLAGS) -MMD -MP -MF $(@:%.o=%.d) $< -o $@ $(CROSS)gcc -c $(BASE_CC_FLAGS) $(BASE_CPP_FLAGS) $(CC_FLAGS) $(CPP_FLAGS) -MMD -MP -MF $(@:%.o=%.d) $< -o $@
%.o: %.S $(MAKEFILE_LIST) %.o: %.S $(MAKEFILE_LIST)
@echo $(MSG_ASSEMBLE_CMD) Assembling \"$<\" @echo $(MSG_ASSEMBLE_CMD) Assembling \"$<\"
$(CROSS)gcc -c $(BASE_CC_FLAGS) $(BASE_ASM_FLAGS) $(CC_FLAGS) $(ASM_FLAGS) $< -o $@ $(CROSS)gcc -c $(BASE_CC_FLAGS) $(BASE_ASM_FLAGS) $(CC_FLAGS) $(ASM_FLAGS) $< -o $@
.PRECIOUS : $(OBJECT_FILES) .PRECIOUS : $(OBJECT_FILES)
%.elf: $(OBJECT_FILES) %.elf: $(OBJECT_FILES)
@echo $(MSG_LINKER_CMD) Linking object files into \"$@\" @echo $(MSG_LINKER_CMD) Linking object files into \"$@\"
$(CROSS)gcc $(BASE_CC_FLAGS) $(BASE_LD_FLAGS) $(CC_FLAGS) $(LD_FLAGS) $^ -o $@ $(CROSS)gcc $(BASE_CC_FLAGS) $(BASE_LD_FLAGS) $(CC_FLAGS) $(LD_FLAGS) $^ -o $@
%.hex: %.elf %.hex: %.elf
@echo $(MSG_OBJCPY_CMD) Extracting HEX file data from \"$<\" @echo $(MSG_OBJCPY_CMD) Extracting HEX file data from \"$<\"
$(CROSS)objcopy -O ihex -R .eeprom -R .fuse -R .lock -R .signature $< $@ $(CROSS)objcopy -O ihex -R .eeprom -R .fuse -R .lock -R .signature $< $@
%.eep: %.elf %.eep: %.elf
@echo $(MSG_OBJCPY_CMD) Extracting EEP file data from \"$<\" @echo $(MSG_OBJCPY_CMD) Extracting EEP file data from \"$<\"
$(CROSS)objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 --no-change-warnings -O ihex $< $@ || exit 0 $(CROSS)objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 --no-change-warnings -O ihex $< $@ || exit 0
%.lss: %.elf %.lss: %.elf
@echo $(MSG_OBJDMP_CMD) Extracting LSS file data from \"$<\" @echo $(MSG_OBJDMP_CMD) Extracting LSS file data from \"$<\"
$(CROSS)objdump -h -S -z $< > $@ $(CROSS)objdump -h -S -z $< > $@
# Include build dependency files # Include build dependency files
-include $(DEPENDENCY_FILES) -include $(DEPENDENCY_FILES)
# Phony build targets for this module # Phony build targets for this module
.PHONY: begin end gcc_version check_source size symbol-sizes elf hex lss clean .PHONY: begin end gcc_version check_source size symbol-sizes elf hex lss clean

View File

@ -1,109 +1,109 @@
# #
# LUFA Library # LUFA Library
# Copyright (C) Dean Camera, 2012. # Copyright (C) Dean Camera, 2012.
# #
# dean [at] fourwalledcubicle [dot] com # dean [at] fourwalledcubicle [dot] com
# www.lufa-lib.org # www.lufa-lib.org
# #
LUFA_BUILD_MODULES += CORE LUFA_BUILD_MODULES += CORE
LUFA_BUILD_TARGETS += help list_targets list_modules list_mandatory list_optional LUFA_BUILD_TARGETS += help list_targets list_modules list_mandatory list_optional
LUFA_BUILD_MANDATORY_VARS += LUFA_BUILD_MANDATORY_VARS +=
LUFA_BUILD_OPTIONAL_VARS += LUFA_BUILD_OPTIONAL_VARS +=
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# LUFA Core Buildsystem Makefile Module. # LUFA Core Buildsystem Makefile Module.
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DESCRIPTION: # DESCRIPTION:
# Provides a set of core build targets for the LUFA buildsystem # Provides a set of core build targets for the LUFA buildsystem
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# TARGETS: # TARGETS:
# #
# help - Build system help # help - Build system help
# list_targets - List all build targets # list_targets - List all build targets
# list_modules - List all build modules # list_modules - List all build modules
# list_mandatory - List all mandatory make variables required by # list_mandatory - List all mandatory make variables required by
# the included build modules of the application # the included build modules of the application
# list_optional - List all optional make variables required by # list_optional - List all optional make variables required by
# the included build modules of the application # the included build modules of the application
# #
# MANDATORY PARAMETERS: # MANDATORY PARAMETERS:
# #
# (None) # (None)
# #
# OPTIONAL PARAMETERS: # OPTIONAL PARAMETERS:
# #
# (None) # (None)
# #
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Build sorted and filtered lists of the included build module data # Build sorted and filtered lists of the included build module data
SORTED_LUFA_BUILD_MODULES = $(sort $(LUFA_BUILD_MODULES)) SORTED_LUFA_BUILD_MODULES = $(sort $(LUFA_BUILD_MODULES))
SORTED_LUFA_BUILD_TARGETS = $(sort $(LUFA_BUILD_TARGETS)) SORTED_LUFA_BUILD_TARGETS = $(sort $(LUFA_BUILD_TARGETS))
SORTED_LUFA_MANDATORY_VARS = $(sort $(LUFA_BUILD_MANDATORY_VARS)) SORTED_LUFA_MANDATORY_VARS = $(sort $(LUFA_BUILD_MANDATORY_VARS))
SORTED_LUFA_OPTIONAL_VARS = $(filter-out $(SORTED_LUFA_MANDATORY_VARS), $(sort $(LUFA_BUILD_OPTIONAL_VARS))) SORTED_LUFA_OPTIONAL_VARS = $(filter-out $(SORTED_LUFA_MANDATORY_VARS), $(sort $(LUFA_BUILD_OPTIONAL_VARS)))
help: help:
@echo "===================================================================" @echo "==================================================================="
@echo " LUFA Build System 2.0 " @echo " LUFA Build System 2.0 "
@echo " (C) Dean Camera, 2012 { dean @ fourwalledcubicle . com } " @echo " (C) Dean Camera, 2012 { dean @ fourwalledcubicle . com } "
@echo "===================================================================" @echo "==================================================================="
@echo "DESCRIPTION: " @echo "DESCRIPTION: "
@echo " This build system is a set of makefile modules for (GNU) Make, to " @echo " This build system is a set of makefile modules for (GNU) Make, to "
@echo " provide a simple system for building LUFA powered applications. " @echo " provide a simple system for building LUFA powered applications. "
@echo " Each makefile module can be included from within a user makefile, " @echo " Each makefile module can be included from within a user makefile, "
@echo " to expose the build rules documented in the comments at the top of" @echo " to expose the build rules documented in the comments at the top of"
@echo " each build module. " @echo " each build module. "
@echo " " @echo " "
@echo "USAGE: " @echo "USAGE: "
@echo " To execute a rule, define all variables indicated in the desired " @echo " To execute a rule, define all variables indicated in the desired "
@echo " module as a required parameter before including the build module " @echo " module as a required parameter before including the build module "
@echo " in your project makefile. Parameters marked as optional will " @echo " in your project makefile. Parameters marked as optional will "
@echo " assume a default value in the modules if not user-assigned. " @echo " assume a default value in the modules if not user-assigned. "
@echo " " @echo " "
@echo " By default the target output shows both a friendly summary, as " @echo " By default the target output shows both a friendly summary, as "
@echo " well as the actual invoked command. To suppress the output of the " @echo " well as the actual invoked command. To suppress the output of the "
@echo " invoked commands and show only the friendly command output, run " @echo " invoked commands and show only the friendly command output, run "
@echo " make with the \"-s\" switch added before the target(s). " @echo " make with the \"-s\" switch added before the target(s). "
@echo "===================================================================" @echo "==================================================================="
@echo " Currently used build system modules in this application: " @echo " Currently used build system modules in this application: "
@echo " " @echo " "
@printf " %b" "$(SORTED_LUFA_BUILD_MODULES:%= - %\n)" @printf " %b" "$(SORTED_LUFA_BUILD_MODULES:%= - %\n)"
@echo " " @echo " "
@echo " " @echo " "
@echo " Currently available build targets in this application: " @echo " Currently available build targets in this application: "
@echo " " @echo " "
@printf " %b" "$(SORTED_LUFA_BUILD_TARGETS:%= - %\n)" @printf " %b" "$(SORTED_LUFA_BUILD_TARGETS:%= - %\n)"
@echo " " @echo " "
@echo " " @echo " "
@echo " Mandatory variables required by the selected build Modules: " @echo " Mandatory variables required by the selected build Modules: "
@echo " " @echo " "
@printf " %b" "$(SORTED_LUFA_MANDATORY_VARS:%= - %\n)" @printf " %b" "$(SORTED_LUFA_MANDATORY_VARS:%= - %\n)"
@echo " " @echo " "
@echo " " @echo " "
@echo " Optional variables required by the selected build Modules: " @echo " Optional variables required by the selected build Modules: "
@echo " " @echo " "
@printf " %b" "$(SORTED_LUFA_OPTIONAL_VARS:%= - %\n)" @printf " %b" "$(SORTED_LUFA_OPTIONAL_VARS:%= - %\n)"
@echo " " @echo " "
@echo "===================================================================" @echo "==================================================================="
@echo " The LUFA BuildSystem 2.0 - Powered By Unicorns (tm) " @echo " The LUFA BuildSystem 2.0 - Powered By Unicorns (tm) "
@echo "===================================================================" @echo "==================================================================="
list_modules: list_modules:
@echo Currently Used Build System Modules: $(SORTED_LUFA_BUILD_MODULES) @echo Currently Used Build System Modules: $(SORTED_LUFA_BUILD_MODULES)
list_targets: list_targets:
@echo Currently Available Build Targets: $(SORTED_LUFA_BUILD_TARGETS) @echo Currently Available Build Targets: $(SORTED_LUFA_BUILD_TARGETS)
list_mandatory: list_mandatory:
@echo Mandatory Variables for Included Modules: $(SORTED_LUFA_MANDATORY_VARS) @echo Mandatory Variables for Included Modules: $(SORTED_LUFA_MANDATORY_VARS)
list_optional: list_optional:
@echo Optional Variables for Included Modules: $(SORTED_LUFA_OPTIONAL_VARS) @echo Optional Variables for Included Modules: $(SORTED_LUFA_OPTIONAL_VARS)
# Disable default in-built make rules (those that are needed are explicitly # Disable default in-built make rules (those that are needed are explicitly
# defined, and doing so has performance benefits when recursively building) # defined, and doing so has performance benefits when recursively building)
.SUFFIXES: .SUFFIXES:
# Phony build targets for this module # Phony build targets for this module
.PHONY: help list_modules list_targets list_mandatory list_optional .PHONY: help list_modules list_targets list_mandatory list_optional

View File

@ -1,88 +1,88 @@
# #
# LUFA Library # LUFA Library
# Copyright (C) Dean Camera, 2012. # Copyright (C) Dean Camera, 2012.
# #
# dean [at] fourwalledcubicle [dot] com # dean [at] fourwalledcubicle [dot] com
# www.lufa-lib.org # www.lufa-lib.org
# #
LUFA_BUILD_MODULES += CPPCHECK LUFA_BUILD_MODULES += CPPCHECK
LUFA_BUILD_TARGETS += cppcheck cppcheck-config LUFA_BUILD_TARGETS += cppcheck cppcheck-config
LUFA_BUILD_MANDATORY_VARS += LUFA_BUILD_MANDATORY_VARS +=
LUFA_BUILD_OPTIONAL_VARS += CPPCHECK_PATH CPPCHECK_INCLUDES CPPCHECK_EXCLUDES CPPCHECK_MSG_TEMPLATE \ LUFA_BUILD_OPTIONAL_VARS += CPPCHECK_PATH CPPCHECK_INCLUDES CPPCHECK_EXCLUDES CPPCHECK_MSG_TEMPLATE \
CPPCHECK_ENABLE CPPCHECK_SUPPRESS CPPCHECK_FAIL_ON_WARNING CPPCHECK_QUIET \ CPPCHECK_ENABLE CPPCHECK_SUPPRESS CPPCHECK_FAIL_ON_WARNING CPPCHECK_QUIET \
CPPCHECK_FLAGS CPPCHECK_FLAGS
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# LUFA CPPCheck Buildsystem Makefile Module. # LUFA CPPCheck Buildsystem Makefile Module.
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DESCRIPTION: # DESCRIPTION:
# Provides a set of targets to scan a project with the free "cppcheck" static # Provides a set of targets to scan a project with the free "cppcheck" static
# analysis tool, to check for code errors at runtime (see http://cppcheck.sourceforge.net). # analysis tool, to check for code errors at runtime (see http://cppcheck.sourceforge.net).
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# TARGETS: # TARGETS:
# #
# cppcheck - Scan the project with CPPCheck # cppcheck - Scan the project with CPPCheck
# cppcheck-config - Use CPPCheck to look for missing include files # cppcheck-config - Use CPPCheck to look for missing include files
# #
# MANDATORY PARAMETERS: # MANDATORY PARAMETERS:
# #
# (None) # (None)
# #
# OPTIONAL PARAMETERS: # OPTIONAL PARAMETERS:
# #
# CPPCHECK_PATH - Path of the files to statically analyze # CPPCHECK_PATH - Path of the files to statically analyze
# CPPCHECK_INCLUDES - Extra include paths to search for missing # CPPCHECK_INCLUDES - Extra include paths to search for missing
# header files # header files
# CPPCHECK_EXCLUDES - Source file paths to exclude checking (can be # CPPCHECK_EXCLUDES - Source file paths to exclude checking (can be
# a path fragment if desired) # a path fragment if desired)
# CPPCHECK_MSG_TEMPLATE - Template for cppcheck error and warning output # CPPCHECK_MSG_TEMPLATE - Template for cppcheck error and warning output
# CPPCHECK_ENABLE - General cppcheck category checks to enable # CPPCHECK_ENABLE - General cppcheck category checks to enable
# CPPCHECK_SUPPRESS - Specific cppcheck warnings to disable by ID # CPPCHECK_SUPPRESS - Specific cppcheck warnings to disable by ID
# CPPCHECK_FAIL_ON_WARNING - Set to Y to fail the build on cppcheck # CPPCHECK_FAIL_ON_WARNING - Set to Y to fail the build on cppcheck
# warnings, N to continue even if warnings occur # warnings, N to continue even if warnings occur
# CPPCHECK_QUIET - Enable cppcheck verbose or quiet output mode # CPPCHECK_QUIET - Enable cppcheck verbose or quiet output mode
# CPPCHECK_FLAGS - Additional flags to pass to cppcheck # CPPCHECK_FLAGS - Additional flags to pass to cppcheck
# #
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Default values of optionally user-supplied variables # Default values of optionally user-supplied variables
CPPCHECK_PATH ?= . CPPCHECK_PATH ?= .
CPPCHECK_INCLUDES ?= CPPCHECK_INCLUDES ?=
CPPCHECK_EXCLUDES ?= CPPCHECK_EXCLUDES ?=
CPPCHECK_MSG_TEMPLATE ?= {file}:{line}: {severity} ({id}): {message} CPPCHECK_MSG_TEMPLATE ?= {file}:{line}: {severity} ({id}): {message}
CPPCHECK_ENABLE ?= all CPPCHECK_ENABLE ?= all
CPPCHECK_SUPPRESS ?= variableScope missingInclude CPPCHECK_SUPPRESS ?= variableScope missingInclude
CPPCHECK_FAIL_ON_WARNING ?= Y CPPCHECK_FAIL_ON_WARNING ?= Y
CPPCHECK_QUIET ?= Y CPPCHECK_QUIET ?= Y
CPPCHECK_FLAGS ?= CPPCHECK_FLAGS ?=
# Build a default argument list for cppcheck # Build a default argument list for cppcheck
BASE_CPPCHECK_FLAGS := --template="$(CPPCHECK_MSG_TEMPLATE)" $(CPPCHECK_INCLUDES:%=-I%) $(CPPCHECK_EXCLUDES:%=-i%) --inline-suppr --force --std=c99 BASE_CPPCHECK_FLAGS := --template="$(CPPCHECK_MSG_TEMPLATE)" $(CPPCHECK_INCLUDES:%=-I%) $(CPPCHECK_EXCLUDES:%=-i%) --inline-suppr --force --std=c99
# Sanity check parameters and construct additional command line arguments to cppcheck # Sanity check parameters and construct additional command line arguments to cppcheck
ifeq ($(CPPCHECK_FAIL_ON_WARNING), Y) ifeq ($(CPPCHECK_FAIL_ON_WARNING), Y)
BASE_CPPCHECK_FLAGS += --error-exitcode=1 BASE_CPPCHECK_FLAGS += --error-exitcode=1
else ifneq ($(CPPCHECK_FAIL_ON_WARNING), N) else ifneq ($(CPPCHECK_FAIL_ON_WARNING), N)
$(error CPPCHECK_FAIL_ON_WARNING must be Y or N) $(error CPPCHECK_FAIL_ON_WARNING must be Y or N)
endif endif
ifeq ($(CPPCHECK_QUIET), Y) ifeq ($(CPPCHECK_QUIET), Y)
BASE_CPPCHECK_FLAGS += --quiet BASE_CPPCHECK_FLAGS += --quiet
else ifneq ($(CPPCHECK_QUIET), N) else ifneq ($(CPPCHECK_QUIET), N)
$(error CPPCHECK_QUIET must be Y or N) $(error CPPCHECK_QUIET must be Y or N)
endif endif
# Output Messages # Output Messages
MSG_CPPCHECK_CMD := ' [CPPCHECK]:' MSG_CPPCHECK_CMD := ' [CPPCHECK]:'
cppcheck-config: cppcheck-config:
@echo $(MSG_CPPCHECK_CMD) Checking cppcheck configuration for path \"$(CPPCHECK_PATH)\" @echo $(MSG_CPPCHECK_CMD) Checking cppcheck configuration for path \"$(CPPCHECK_PATH)\"
cppcheck $(BASE_CPPCHECK_FLAGS) --check-config $(CPPCHECK_FLAGS) $(CPPCHECK_PATH) cppcheck $(BASE_CPPCHECK_FLAGS) --check-config $(CPPCHECK_FLAGS) $(CPPCHECK_PATH)
cppcheck: cppcheck:
@echo $(MSG_CPPCHECK_CMD) Performing cppcheck analysis on path \"$(CPPCHECK_PATH)\" @echo $(MSG_CPPCHECK_CMD) Performing cppcheck analysis on path \"$(CPPCHECK_PATH)\"
cppcheck $(BASE_CPPCHECK_FLAGS) --enable=$(CPPCHECK_ENABLE) $(CPPCHECK_SUPPRESS:%=--suppress=%) $(CPPCHECK_FLAGS) $(CPPCHECK_PATH) cppcheck $(BASE_CPPCHECK_FLAGS) --enable=$(CPPCHECK_ENABLE) $(CPPCHECK_SUPPRESS:%=--suppress=%) $(CPPCHECK_FLAGS) $(CPPCHECK_PATH)
# Phony build targets for this module # Phony build targets for this module
.PHONY: cppcheck-config cppcheck .PHONY: cppcheck-config cppcheck

View File

@ -1,83 +1,83 @@
# #
# LUFA Library # LUFA Library
# Copyright (C) Dean Camera, 2012. # Copyright (C) Dean Camera, 2012.
# #
# dean [at] fourwalledcubicle [dot] com # dean [at] fourwalledcubicle [dot] com
# www.lufa-lib.org # www.lufa-lib.org
# #
LUFA_BUILD_MODULES += DFU LUFA_BUILD_MODULES += DFU
LUFA_BUILD_TARGETS += flip flip-ee dfu dfu-ee LUFA_BUILD_TARGETS += flip flip-ee dfu dfu-ee
LUFA_BUILD_MANDATORY_VARS += MCU TARGET LUFA_BUILD_MANDATORY_VARS += MCU TARGET
LUFA_BUILD_OPTIONAL_VARS += LUFA_BUILD_OPTIONAL_VARS +=
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# LUFA DFU Bootloader Buildsystem Makefile Module. # LUFA DFU Bootloader Buildsystem Makefile Module.
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DESCRIPTION: # DESCRIPTION:
# Provides a set of targets to re-program a device currently running a DFU # Provides a set of targets to re-program a device currently running a DFU
# class bootloader with a project's FLASH and EEPROM files. # class bootloader with a project's FLASH and EEPROM files.
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# TARGETS: # TARGETS:
# #
# flip - Program FLASH into target via Atmel FLIP # flip - Program FLASH into target via Atmel FLIP
# flip-ee - Program EEPROM into target via Atmel FLIP # flip-ee - Program EEPROM into target via Atmel FLIP
# dfu - Program FLASH into target via dfu-programmer # dfu - Program FLASH into target via dfu-programmer
# dfu-ee - Program EEPROM into target via dfu-programmer # dfu-ee - Program EEPROM into target via dfu-programmer
# #
# MANDATORY PARAMETERS: # MANDATORY PARAMETERS:
# #
# MCU - Microcontroller device model name # MCU - Microcontroller device model name
# TARGET - Application name # TARGET - Application name
# #
# OPTIONAL PARAMETERS: # OPTIONAL PARAMETERS:
# #
# (None) # (None)
# #
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Sanity-check values of mandatory user-supplied variables # Sanity-check values of mandatory user-supplied variables
MCU ?= $(error Makefile MCU value not set) MCU ?= $(error Makefile MCU value not set)
TARGET ?= $(error Makefile TARGET value not set) TARGET ?= $(error Makefile TARGET value not set)
ifeq ($(MCU),) ifeq ($(MCU),)
$(error Makefile MCU option cannot be blank) $(error Makefile MCU option cannot be blank)
endif endif
ifeq ($(TARGET),) ifeq ($(TARGET),)
$(error Makefile TARGET option cannot be blank) $(error Makefile TARGET option cannot be blank)
endif endif
# Output Messages # Output Messages
MSG_COPY_CMD := ' [CP] :' MSG_COPY_CMD := ' [CP] :'
MSG_REMOVE_CMD := ' [RM] :' MSG_REMOVE_CMD := ' [RM] :'
MSG_DFU_CMD := ' [DFU] :' MSG_DFU_CMD := ' [DFU] :'
flip: $(TARGET).hex $(MAKEFILE_LIST) flip: $(TARGET).hex $(MAKEFILE_LIST)
@echo $(MSG_DFU_CMD) Programming FLASH with batchisp using \"$<\" @echo $(MSG_DFU_CMD) Programming FLASH with batchisp using \"$<\"
batchisp -hardware usb -device $(MCU) -operation erase f batchisp -hardware usb -device $(MCU) -operation erase f
batchisp -hardware usb -device $(MCU) -operation loadbuffer $< program batchisp -hardware usb -device $(MCU) -operation loadbuffer $< program
batchisp -hardware usb -device $(MCU) -operation start reset 0 batchisp -hardware usb -device $(MCU) -operation start reset 0
flip-ee: $(TARGET).eep $(MAKEFILE_LIST) flip-ee: $(TARGET).eep $(MAKEFILE_LIST)
@echo $(MSG_DFU_CMD) Copying EEP file to temporary file \"$<.hex\" @echo $(MSG_DFU_CMD) Copying EEP file to temporary file \"$<.hex\"
cp $< $<.hex cp $< $<.hex
@echo $(MSG_DFU_CMD) Programming EEPROM with batchisp using \"$<.hex\" @echo $(MSG_DFU_CMD) Programming EEPROM with batchisp using \"$<.hex\"
batchisp -hardware usb -device $(MCU) -operation memory EEPROM erase batchisp -hardware usb -device $(MCU) -operation memory EEPROM erase
batchisp -hardware usb -device $(MCU) -operation memory EEPROM loadbuffer $<.hex program batchisp -hardware usb -device $(MCU) -operation memory EEPROM loadbuffer $<.hex program
batchisp -hardware usb -device $(MCU) -operation start reset 0 batchisp -hardware usb -device $(MCU) -operation start reset 0
@echo $(MSG_DFU_CMD) Removing temporary file \"$<.hex\" @echo $(MSG_DFU_CMD) Removing temporary file \"$<.hex\"
rm $<.hex rm $<.hex
dfu: $(TARGET).hex $(MAKEFILE_LIST) dfu: $(TARGET).hex $(MAKEFILE_LIST)
@echo $(MSG_DFU_CMD) Programming FLASH with dfu-programmer using \"$<\" @echo $(MSG_DFU_CMD) Programming FLASH with dfu-programmer using \"$<\"
dfu-programmer $(MCU) erase dfu-programmer $(MCU) erase
dfu-programmer $(MCU) flash $< dfu-programmer $(MCU) flash $<
dfu-programmer $(MCU) reset dfu-programmer $(MCU) reset
dfu-ee: $(TARGET).eep $(MAKEFILE_LIST) dfu-ee: $(TARGET).eep $(MAKEFILE_LIST)
@echo $(MSG_DFU_CMD) Programming EEPROM with dfu-programmer using \"$<\" @echo $(MSG_DFU_CMD) Programming EEPROM with dfu-programmer using \"$<\"
dfu-programmer $(MCU) eeprom-flash $< dfu-programmer $(MCU) eeprom-flash $<
dfu-programmer $(MCU) reset dfu-programmer $(MCU) reset
# Phony build targets for this module # Phony build targets for this module
.PHONY: flip flip-ee dfu dfu-ee .PHONY: flip flip-ee dfu dfu-ee

View File

@ -1,64 +1,64 @@
# #
# LUFA Library # LUFA Library
# Copyright (C) Dean Camera, 2012. # Copyright (C) Dean Camera, 2012.
# #
# dean [at] fourwalledcubicle [dot] com # dean [at] fourwalledcubicle [dot] com
# www.lufa-lib.org # www.lufa-lib.org
# #
LUFA_BUILD_MODULES += DOXYGEN LUFA_BUILD_MODULES += DOXYGEN
LUFA_BUILD_TARGETS += doxygen LUFA_BUILD_TARGETS += doxygen
LUFA_BUILD_MANDATORY_VARS += LUFA_PATH LUFA_BUILD_MANDATORY_VARS += LUFA_PATH
LUFA_BUILD_OPTIONAL_VARS += DOXYGEN_CONF DOXYGEN_FAIL_ON_WARNING DOXYGEN_OVERRIDE_PARAMS LUFA_BUILD_OPTIONAL_VARS += DOXYGEN_CONF DOXYGEN_FAIL_ON_WARNING DOXYGEN_OVERRIDE_PARAMS
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# LUFA Doxygen Buildsystem Makefile Module. # LUFA Doxygen Buildsystem Makefile Module.
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DESCRIPTION: # DESCRIPTION:
# Provides a set of targets to automatically build Doxygen documentation for # Provides a set of targets to automatically build Doxygen documentation for
# a project (see www.doxygen.org). # a project (see www.doxygen.org).
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# TARGETS: # TARGETS:
# #
# doxygen - Build Doxygen Documentation # doxygen - Build Doxygen Documentation
# #
# MANDATORY PARAMETERS: # MANDATORY PARAMETERS:
# #
# LUFA_PATH - Path to the LUFA library core # LUFA_PATH - Path to the LUFA library core
# #
# OPTIONAL PARAMETERS: # OPTIONAL PARAMETERS:
# #
# DOXYGEN_CONF - Doxygen configuration filename # DOXYGEN_CONF - Doxygen configuration filename
# DOXYGEN_FAIL_ON_WARNING - Set to Y to fail the build on Doxygen warnings, # DOXYGEN_FAIL_ON_WARNING - Set to Y to fail the build on Doxygen warnings,
# N to continue even if warnings occur # N to continue even if warnings occur
# DOXYGEN_OVERRIDE_PARAMS - Parameters to override in the doxygen # DOXYGEN_OVERRIDE_PARAMS - Parameters to override in the doxygen
# configuration file # configuration file
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Sanity-check values of mandatory user-supplied variables # Sanity-check values of mandatory user-supplied variables
LUFA_PATH ?= $(error Makefile LUFA_PATH value not set) LUFA_PATH ?= $(error Makefile LUFA_PATH value not set)
# Default values of optionally user-supplied variables # Default values of optionally user-supplied variables
DOXYGEN_CONF ?= Doxygen.conf DOXYGEN_CONF ?= Doxygen.conf
DOXYGEN_FAIL_ON_WARNING ?= Y DOXYGEN_FAIL_ON_WARNING ?= Y
DOXYGEN_OVERRIDE_PARAMS ?= QUIET=YES HTML_STYLESHEET=$(patsubst %/,%,$(LUFA_PATH))/DoxygenPages/Style/Style.css DOXYGEN_OVERRIDE_PARAMS ?= QUIET=YES HTML_STYLESHEET=$(patsubst %/,%,$(LUFA_PATH))/DoxygenPages/Style/Style.css
# Output Messages # Output Messages
MSG_DOXYGEN_CMD := ' [DOXYGEN] :' MSG_DOXYGEN_CMD := ' [DOXYGEN] :'
# Determine Doxygen invocation command # Determine Doxygen invocation command
BASE_DOXYGEN_CMD = ( cat Doxygen.conf $(DOXYGEN_OVERRIDE_PARAMS:%=; echo "%") ) | doxygen - BASE_DOXYGEN_CMD = ( cat Doxygen.conf $(DOXYGEN_OVERRIDE_PARAMS:%=; echo "%") ) | doxygen -
ifeq ($(DOXYGEN_FAIL_ON_WARNING), Y) ifeq ($(DOXYGEN_FAIL_ON_WARNING), Y)
DOXYGEN_CMD = if ( $(BASE_DOXYGEN_CMD) 2>&1 | grep -v "warning: ignoring unsupported tag" ;); then exit 1; fi; DOXYGEN_CMD = if ( $(BASE_DOXYGEN_CMD) 2>&1 | grep -v "warning: ignoring unsupported tag" ;); then exit 1; fi;
else ifeq ($(DOXYGEN_FAIL_ON_WARNING), N) else ifeq ($(DOXYGEN_FAIL_ON_WARNING), N)
DOXYGEN_CMD = $(BASE_DOXYGEN_CMD) DOXYGEN_CMD = $(BASE_DOXYGEN_CMD)
else else
$(error DOXYGEN_FAIL_ON_WARNING must be Y or N.) $(error DOXYGEN_FAIL_ON_WARNING must be Y or N.)
endif endif
doxygen: doxygen:
@echo $(MSG_DOXYGEN_CMD) Configuration file \"$(DOXYGEN_CONF)\" with parameters \"$(DOXYGEN_OVERRIDE_PARAMS)\" @echo $(MSG_DOXYGEN_CMD) Configuration file \"$(DOXYGEN_CONF)\" with parameters \"$(DOXYGEN_OVERRIDE_PARAMS)\"
$(DOXYGEN_CMD) $(DOXYGEN_CMD)
# Phony build targets for this module # Phony build targets for this module
.PHONY: doxygen .PHONY: doxygen

View File

@ -1,95 +1,95 @@
# #
# LUFA Library # LUFA Library
# Copyright (C) Dean Camera, 2012. # Copyright (C) Dean Camera, 2012.
# #
# dean [at] fourwalledcubicle [dot] com # dean [at] fourwalledcubicle [dot] com
# www.lufa-lib.org # www.lufa-lib.org
# #
LUFA_BUILD_MODULES += SOURCES LUFA_BUILD_MODULES += SOURCES
LUFA_BUILD_TARGETS += LUFA_BUILD_TARGETS +=
LUFA_BUILD_MANDATORY_VARS += LUFA_PATH ARCH LUFA_BUILD_MANDATORY_VARS += LUFA_PATH ARCH
LUFA_BUILD_OPTIONAL_VARS += LUFA_BUILD_OPTIONAL_VARS +=
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# LUFA Sources Buildsystem Makefile Module. # LUFA Sources Buildsystem Makefile Module.
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# DESCRIPTION: # DESCRIPTION:
# Provides a set of makefile variables for the various LUFA module sources. # Provides a set of makefile variables for the various LUFA module sources.
# Once included, the sources required to use a given LUFA module will become # Once included, the sources required to use a given LUFA module will become
# available using the makefile variable names listed in the LUFA project # available using the makefile variable names listed in the LUFA project
# documentation. # documentation.
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# TARGETS: # TARGETS:
# #
# (None) # (None)
# #
# MANDATORY PARAMETERS: # MANDATORY PARAMETERS:
# #
# LUFA_PATH - Path to the LUFA library core # LUFA_PATH - Path to the LUFA library core
# ARCH - Device architecture name # ARCH - Device architecture name
# #
# OPTIONAL PARAMETERS: # OPTIONAL PARAMETERS:
# #
# (None) # (None)
# #
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Sanity-check values of mandatory user-supplied variables # Sanity-check values of mandatory user-supplied variables
ARCH ?= $(error Makefile ARCH value not set) ARCH ?= $(error Makefile ARCH value not set)
LUFA_PATH ?= $(error Makefile LUFA_PATH value not set) LUFA_PATH ?= $(error Makefile LUFA_PATH value not set)
ifeq ($(ARCH),) ifeq ($(ARCH),)
$(error Makefile ARCH option cannot be blank) $(error Makefile ARCH option cannot be blank)
endif endif
# Allow LUFA_ROOT_PATH to be overridden elsewhere to support legacy LUFA makefiles # Allow LUFA_ROOT_PATH to be overridden elsewhere to support legacy LUFA makefiles
LUFA_ROOT_PATH ?= $(patsubst %/,%,$(LUFA_PATH)) LUFA_ROOT_PATH ?= $(patsubst %/,%,$(LUFA_PATH))
# Construct LUFA module source variables # Construct LUFA module source variables
LUFA_SRC_USB = $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/Device_$(ARCH).c \ LUFA_SRC_USB = $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/Device_$(ARCH).c \
$(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/Endpoint_$(ARCH).c \ $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/Endpoint_$(ARCH).c \
$(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/Host_$(ARCH).c \ $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/Host_$(ARCH).c \
$(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/Pipe_$(ARCH).c \ $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/Pipe_$(ARCH).c \
$(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/USBController_$(ARCH).c \ $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/USBController_$(ARCH).c \
$(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/USBInterrupt_$(ARCH).c \ $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/USBInterrupt_$(ARCH).c \
$(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/EndpointStream_$(ARCH).c \ $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/EndpointStream_$(ARCH).c \
$(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/PipeStream_$(ARCH).c \ $(LUFA_ROOT_PATH)/Drivers/USB/Core/$(ARCH)/PipeStream_$(ARCH).c \
$(LUFA_ROOT_PATH)/Drivers/USB/Core/ConfigDescriptor.c \ $(LUFA_ROOT_PATH)/Drivers/USB/Core/ConfigDescriptor.c \
$(LUFA_ROOT_PATH)/Drivers/USB/Core/DeviceStandardReq.c \ $(LUFA_ROOT_PATH)/Drivers/USB/Core/DeviceStandardReq.c \
$(LUFA_ROOT_PATH)/Drivers/USB/Core/Events.c \ $(LUFA_ROOT_PATH)/Drivers/USB/Core/Events.c \
$(LUFA_ROOT_PATH)/Drivers/USB/Core/HostStandardReq.c \ $(LUFA_ROOT_PATH)/Drivers/USB/Core/HostStandardReq.c \
$(LUFA_ROOT_PATH)/Drivers/USB/Core/USBTask.c \ $(LUFA_ROOT_PATH)/Drivers/USB/Core/USBTask.c \
$(LUFA_ROOT_PATH)/Drivers/USB/Class/Common/HIDParser.c $(LUFA_ROOT_PATH)/Drivers/USB/Class/Common/HIDParser.c
LUFA_SRC_USBCLASS = $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/AudioClassDevice.c \ LUFA_SRC_USBCLASS = $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/AudioClassDevice.c \
$(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/CDCClassDevice.c \ $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/CDCClassDevice.c \
$(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/HIDClassDevice.c \ $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/HIDClassDevice.c \
$(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/MassStorageClassDevice.c \ $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/MassStorageClassDevice.c \
$(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/MIDIClassDevice.c \ $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/MIDIClassDevice.c \
$(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/RNDISClassDevice.c \ $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/RNDISClassDevice.c \
$(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/AndroidAccessoryClassHost.c \ $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/AndroidAccessoryClassHost.c \
$(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/AudioClassHost.c \ $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/AudioClassHost.c \
$(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/CDCClassHost.c \ $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/CDCClassHost.c \
$(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/HIDClassHost.c \ $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/HIDClassHost.c \
$(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/MassStorageClassHost.c \ $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/MassStorageClassHost.c \
$(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/MIDIClassHost.c \ $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/MIDIClassHost.c \
$(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/PrinterClassHost.c \ $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/PrinterClassHost.c \
$(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/RNDISClassHost.c \ $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/RNDISClassHost.c \
$(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/StillImageClassHost.c $(LUFA_ROOT_PATH)/Drivers/USB/Class/Host/StillImageClassHost.c
LUFA_SRC_TEMPERATURE = $(LUFA_ROOT_PATH)/Drivers/Board/Temperature.c LUFA_SRC_TEMPERATURE = $(LUFA_ROOT_PATH)/Drivers/Board/Temperature.c
LUFA_SRC_SERIAL = $(LUFA_ROOT_PATH)/Drivers/Peripheral/$(ARCH)/Serial_$(ARCH).c LUFA_SRC_SERIAL = $(LUFA_ROOT_PATH)/Drivers/Peripheral/$(ARCH)/Serial_$(ARCH).c
LUFA_SRC_TWI = $(LUFA_ROOT_PATH)/Drivers/Peripheral/$(ARCH)/TWI_$(ARCH).c LUFA_SRC_TWI = $(LUFA_ROOT_PATH)/Drivers/Peripheral/$(ARCH)/TWI_$(ARCH).c
ifeq ($(ARCH), UC3) ifeq ($(ARCH), UC3)
LUFA_SRC_PLATFORM = $(LUFA_PATH)/Platform/UC3/Exception.S $(LUFA_PATH)/Platform/UC3/InterruptManagement.c LUFA_SRC_PLATFORM = $(LUFA_PATH)/Platform/UC3/Exception.S $(LUFA_PATH)/Platform/UC3/InterruptManagement.c
else else
LUFA_SRC_PLATFORM = LUFA_SRC_PLATFORM =
endif endif
# Build a list of all available module sources # Build a list of all available module sources
LUFA_SRC_ALL_FILES = $(LUFA_SRC_USB) \ LUFA_SRC_ALL_FILES = $(LUFA_SRC_USB) \
$(LUFA_SRC_USBCLASS) \ $(LUFA_SRC_USBCLASS) \
$(LUFA_SRC_TEMPERATURE) \ $(LUFA_SRC_TEMPERATURE) \
$(LUFA_SRC_SERIAL) \ $(LUFA_SRC_SERIAL) \
$(LUFA_SRC_TWI) \ $(LUFA_SRC_TWI) \
$(LUFA_SRC_PLATFORM) $(LUFA_SRC_PLATFORM)

View File

@ -1,35 +1,35 @@
# #
# LUFA Library # LUFA Library
# Copyright (C) Dean Camera, 2012. # Copyright (C) Dean Camera, 2012.
# #
# dean [at] fourwalledcubicle [dot] com # dean [at] fourwalledcubicle [dot] com
# www.lufa-lib.org # www.lufa-lib.org
# #
# -------------------------------------- # --------------------------------------
# LUFA Project Makefile. # LUFA Project Makefile.
# -------------------------------------- # --------------------------------------
MCU = at90usb1287 MCU = at90usb1287
ARCH = AVR8 ARCH = AVR8
BOARD = USBKEY BOARD = USBKEY
F_CPU = 8000000 F_CPU = 8000000
F_USB = $(F_CPU) F_USB = $(F_CPU)
OPTIMIZATION = s OPTIMIZATION = s
TARGET = Target TARGET = Target
SRC = $(TARGET).c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS) $(LUFA_SRC_PLATFORM) SRC = $(TARGET).c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS) $(LUFA_SRC_PLATFORM)
LUFA_PATH = ../../LUFA/ LUFA_PATH = ../../LUFA/
CC_FLAGS = -DUSE_LUFA_CONFIG_HEADER -IConfig/ CC_FLAGS = -DUSE_LUFA_CONFIG_HEADER -IConfig/
LD_FLAGS = LD_FLAGS =
# Default target # Default target
all: all:
# Include LUFA build script makefiles # Include LUFA build script makefiles
include $(LUFA_PATH)/Build/lufa.core.in include $(LUFA_PATH)/Build/lufa.core.in
include $(LUFA_PATH)/Build/lufa.sources.in include $(LUFA_PATH)/Build/lufa.sources.in
include $(LUFA_PATH)/Build/lufa.build.in include $(LUFA_PATH)/Build/lufa.build.in
include $(LUFA_PATH)/Build/lufa.cppcheck.in include $(LUFA_PATH)/Build/lufa.cppcheck.in
include $(LUFA_PATH)/Build/lufa.doxygen.in include $(LUFA_PATH)/Build/lufa.doxygen.in
include $(LUFA_PATH)/Build/lufa.dfu.in include $(LUFA_PATH)/Build/lufa.dfu.in
include $(LUFA_PATH)/Build/lufa.avrdude.in include $(LUFA_PATH)/Build/lufa.avrdude.in
include $(LUFA_PATH)/Build/lufa.atprogram.in include $(LUFA_PATH)/Build/lufa.atprogram.in

View File

@ -1,106 +1,106 @@
/** \file /** \file
* *
* This file contains special DoxyGen information for the generation of the main page and other special * This file contains special DoxyGen information for the generation of the main page and other special
* documentation pages. It is not a project source file. * documentation pages. It is not a project source file.
*/ */
/** \page Page_ExportingLibrary Exporting the Library for IDE Use /** \page Page_ExportingLibrary Exporting the Library for IDE Use
* *
* While LUFA was designed to allow for easy compilation in a makefile driven environment, * While LUFA was designed to allow for easy compilation in a makefile driven environment,
* it is possible to export the library into a form suitable for drop-in use inside of an * it is possible to export the library into a form suitable for drop-in use inside of an
* IDE. * IDE.
* *
* \section Sec_LibraryExport Exporting the Library * \section Sec_LibraryExport Exporting the Library
* An export of the library is at its most basic, a direct copy of the main "LUFA" source folder from the * An export of the library is at its most basic, a direct copy of the main "LUFA" source folder from the
* root download folder; this contains the library core which can be re-used within external projects. * root download folder; this contains the library core which can be re-used within external projects.
* However, as many IDEs attempt to automatically compile all included source files, it is neccesary to * However, as many IDEs attempt to automatically compile all included source files, it is neccesary to
* exclude some directories and files from the library core export to allow for easier integration into * exclude some directories and files from the library core export to allow for easier integration into
* an IDE project. * an IDE project.
* *
* \subsection SSec_ManualExport Manual Export * \subsection SSec_ManualExport Manual Export
* To manually export the library core, copy over the main LUFA library folder from the LUFA root directory, * To manually export the library core, copy over the main LUFA library folder from the LUFA root directory,
* renaming as desired. Within the library core folder, the following directories should be removed or * renaming as desired. Within the library core folder, the following directories should be removed or
* excluded from your IDE import: * excluded from your IDE import:
* - Documentation/ * - Documentation/
* - DoxygenPages/ * - DoxygenPages/
* - CodeTemplates/ * - CodeTemplates/
* *
* If required, files from the CodeTemplates/ subdirectory may be copied to your IDE project as needed. * If required, files from the CodeTemplates/ subdirectory may be copied to your IDE project as needed.
* *
* The resulting copy of the library may then be imported into your chosen IDE according to the instructions * The resulting copy of the library may then be imported into your chosen IDE according to the instructions
* shown in \ref Sec_LibraryImport. * shown in \ref Sec_LibraryImport.
* *
* \subsection SSec_AutomaticExport Automatic Export * \subsection SSec_AutomaticExport Automatic Export
* If desired, the steps indicated in \ref SSec_ManualExport may be automatically performed, by running the * If desired, the steps indicated in \ref SSec_ManualExport may be automatically performed, by running the
* command <b><code>make export_tar</code></b> from the command line. This will generate two .tar files in the * command <b><code>make export_tar</code></b> from the command line. This will generate two .tar files in the
* current directory, named <code>LUFA_XXXXXX.tar</code> and <code>LUFA_XXXXXX_Code_Templates.tar</code> (where "XXXXXX" is * current directory, named <code>LUFA_XXXXXX.tar</code> and <code>LUFA_XXXXXX_Code_Templates.tar</code> (where "XXXXXX" is
* the version of the library being exported). The first archive contains the exported LUFA core with the * the version of the library being exported). The first archive contains the exported LUFA core with the
* non-required files removed, while the second contains an archived copy of the code template files for the * non-required files removed, while the second contains an archived copy of the code template files for the
* current LUFA version. * current LUFA version.
* *
* The resulting archived copy of the library may then be extracted to your chosen IDE project source directory * The resulting archived copy of the library may then be extracted to your chosen IDE project source directory
* and imported according to the instructions shown in \ref Sec_LibraryImport. * and imported according to the instructions shown in \ref Sec_LibraryImport.
* *
* \section Sec_LibraryImport Importing the Library * \section Sec_LibraryImport Importing the Library
* An exported copy of the library may be imported wholesale into an IDE project, if the instructions detailed * An exported copy of the library may be imported wholesale into an IDE project, if the instructions detailed
* in \ref Sec_LibraryExport are followed. * in \ref Sec_LibraryExport are followed.
* *
* Specific instructions for importing an exported version of LUFA into various IDEs are listed below. * Specific instructions for importing an exported version of LUFA into various IDEs are listed below.
* *
* \subsection SSec_AS56_Import Importing into AVRStudio 5/Atmel Studio 6 * \subsection SSec_AS56_Import Importing into AVRStudio 5/Atmel Studio 6
* To import LUFA into a new or existing project, the following steps must be followed. * To import LUFA into a new or existing project, the following steps must be followed.
* *
* \subsubsection SSSec_AS56_Import_Step1 Copy over the exported library * \subsubsection SSSec_AS56_Import_Step1 Copy over the exported library
* Copy over the exported library archive created via the steps listed in \ref Sec_LibraryExport to your AS5/AS6 * Copy over the exported library archive created via the steps listed in \ref Sec_LibraryExport to your AS5/AS6
* project directory. * project directory.
* *
* \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step1.png * \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step1.png
* *
* \subsubsection SSSec_AS56_Import_Step2 Extract exported library * \subsubsection SSSec_AS56_Import_Step2 Extract exported library
* Extract out the contents of the archive to a new folder. This may be any name you wish, however keep in mind * Extract out the contents of the archive to a new folder. This may be any name you wish, however keep in mind
* that this name will need to be referenced within your user application under most circumstances. It is * that this name will need to be referenced within your user application under most circumstances. It is
* suggested that this folder be named "LUFA", or "LUFA" followed by the version string for easy reference. * suggested that this folder be named "LUFA", or "LUFA" followed by the version string for easy reference.
* *
* \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step2.png * \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step2.png
* *
* \subsubsection SSSec_AS56_Import_Step3 Add the library files * \subsubsection SSSec_AS56_Import_Step3 Add the library files
* Open your AVRStudio 5/Atmel Studio 6 project. From the "Solution Explorer" pane, click the "Show All Files" * Open your AVRStudio 5/Atmel Studio 6 project. From the "Solution Explorer" pane, click the "Show All Files"
* button on the toolbar to display ghosted icons of files and folders located in the project source directory * button on the toolbar to display ghosted icons of files and folders located in the project source directory
* that are not currently added to the project. * that are not currently added to the project.
* *
* \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step3.png * \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step3.png
* *
* Right-click the ghosted version of the extracted LUFA export folder in the Solution Explorer pane, and * Right-click the ghosted version of the extracted LUFA export folder in the Solution Explorer pane, and
* choose the "Add to Project" option from the context menu. This will add the entire LUFA source tree to the * choose the "Add to Project" option from the context menu. This will add the entire LUFA source tree to the
* current project. * current project.
* *
* \subsubsection SSSec_AS56_Import_Step4 Open Project Toolchain Properties * \subsubsection SSSec_AS56_Import_Step4 Open Project Toolchain Properties
* In the Solution Explorer pane, click the project node, and press the "Properties" button in the toolbar to * In the Solution Explorer pane, click the project node, and press the "Properties" button in the toolbar to
* open the Project Properties window. This window allows you to configure the various project global compiler, * open the Project Properties window. This window allows you to configure the various project global compiler,
* assembler and linker options. * assembler and linker options.
* *
* \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step4.png * \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step4.png
* *
* Click the "Toolchain" tab on the left side of the Project Properties window. * Click the "Toolchain" tab on the left side of the Project Properties window.
* *
* \subsubsection SSSec_AS56_Import_Step5 Configure Project Toolchain Properties * \subsubsection SSSec_AS56_Import_Step5 Configure Project Toolchain Properties
* *
* In the GNU C Compiler section, open the "Symbols" page. Click the "Add Item" button to the top-right of the * In the GNU C Compiler section, open the "Symbols" page. Click the "Add Item" button to the top-right of the
* "Defined Symbols" section to add new symbols. * "Defined Symbols" section to add new symbols.
* *
* At a minimum, you will need to define the following symbols (for more information on these symbols, see * At a minimum, you will need to define the following symbols (for more information on these symbols, see
* \ref Page_ConfiguringApps): * \ref Page_ConfiguringApps):
* - ARCH * - ARCH
* - F_CPU * - F_CPU
* - F_USB * - F_USB
* - BOARD * - BOARD
* \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step5_1.png * \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step5_1.png
* *
* Next, open the GNU C Compiler section's "Optimization" page. Ensure that the option to prepare functions for * Next, open the GNU C Compiler section's "Optimization" page. Ensure that the option to prepare functions for
* garbage collection is enabled. * garbage collection is enabled.
* \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step5_2.png * \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step5_2.png
* *
* Finally, in the GNU C Linker section, open the "Optimization" page. Ensure that the option to garbage collect * Finally, in the GNU C Linker section, open the "Optimization" page. Ensure that the option to garbage collect
* unused sections is selected. * unused sections is selected.
* \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step5_3.png * \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step5_3.png
*/ */

View File

@ -1,42 +1,42 @@
/** \file /** \file
* *
* This file contains special DoxyGen information for the generation of the main page and other special * This file contains special DoxyGen information for the generation of the main page and other special
* documentation pages. It is not a project source file. * documentation pages. It is not a project source file.
*/ */
/** \page Page_KnownIssues Known Issues /** \page Page_KnownIssues Known Issues
* The following are known issues present in each official LUFA release. This list should contain all known * The following are known issues present in each official LUFA release. This list should contain all known
* issues in the library. Most of these issues should be corrected in the future release - see * issues in the library. Most of these issues should be corrected in the future release - see
* \ref Page_FutureChanges for a list of planned changes in future releases. * \ref Page_FutureChanges for a list of planned changes in future releases.
* *
* \section Sec_KnownIssuesXXXXXX Version XXXXXX * \section Sec_KnownIssuesXXXXXX Version XXXXXX
* - AVR8 Architecture * - AVR8 Architecture
* - No known issues. * - No known issues.
* - XMEGA Architecture * - XMEGA Architecture
* - No demos, bootloaders or projects have been ported for the XMEGA devices in the current release, * - No demos, bootloaders or projects have been ported for the XMEGA devices in the current release,
* although the architecture is supported in the LUFA core library. * although the architecture is supported in the LUFA core library.
* - Endpoints of more than 64 bytes are not currently supported in this release. * - Endpoints of more than 64 bytes are not currently supported in this release.
* - Isochronous endpoints are not currently supported in this release. As a result, the audio class * - Isochronous endpoints are not currently supported in this release. As a result, the audio class
* cannot be used on XMEGA devices. * cannot be used on XMEGA devices.
* - Multiple-bank endpoints are not currently supported in this release. * - Multiple-bank endpoints are not currently supported in this release.
* - Early revisions of the ATXMEGA128A1U are incompatible with LUFA, due to their various errata * - Early revisions of the ATXMEGA128A1U are incompatible with LUFA, due to their various errata
* relating to the USB controller. * relating to the USB controller.
* - UC3 Architecture * - UC3 Architecture
* - No demos, bootloaders or projects have been ported for the UC3 devices in the current release, * - No demos, bootloaders or projects have been ported for the UC3 devices in the current release,
* although the architecture is supported in the LUFA core library. * although the architecture is supported in the LUFA core library.
* - DMA transfers to and from the USB controller are not yet implemented for this release. * - DMA transfers to and from the USB controller are not yet implemented for this release.
* - The UC3C, UC3D and UC3L sub-families of UC3 are not currently supported by the library due to their * - The UC3C, UC3D and UC3L sub-families of UC3 are not currently supported by the library due to their
* altered USB controller design. * altered USB controller design.
* - The various \c CreateStream() functions for creating standard \c <stdio.h> compatible virtual file * - The various \c CreateStream() functions for creating standard \c <stdio.h> compatible virtual file
* streams are not available on the UC3 architecture, due to a lack of suitable library support. * streams are not available on the UC3 architecture, due to a lack of suitable library support.
* - Architecture Independant * - Architecture Independant
* - The HID parser fails for array type elements that have a MIN and MAX usage applied; each element * - The HID parser fails for array type elements that have a MIN and MAX usage applied; each element
* in the array will receive a unique incrementing usage from the MIN value, up to MAX. * in the array will receive a unique incrementing usage from the MIN value, up to MAX.
* - The current application makefiles do not work if the output directory is not the same directory * - The current application makefiles do not work if the output directory is not the same directory
* as the makefile itself. * as the makefile itself.
* - The LUFA library is not watchdog aware, and thus timeouts are possible if short periods are used * - The LUFA library is not watchdog aware, and thus timeouts are possible if short periods are used
* and a lengthy USB operation is initiated. * and a lengthy USB operation is initiated.
* - Build System * - Build System
* - No known issues. * - No known issues.
*/ */

File diff suppressed because it is too large Load Diff

View File

@ -1,161 +1,161 @@
/* /*
LUFA Library LUFA Library
Copyright (C) Dean Camera, 2012. Copyright (C) Dean Camera, 2012.
dean [at] fourwalledcubicle [dot] com dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org www.lufa-lib.org
*/ */
/* /*
Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com) Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com)
Permission to use, copy, modify, distribute, and sell this Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted software and its documentation for any purpose is hereby granted
without fee, provided that the above copyright notice appear in without fee, provided that the above copyright notice appear in
all copies and that both that the copyright notice and this all copies and that both that the copyright notice and this
permission notice and warranty disclaimer appear in supporting permission notice and warranty disclaimer appear in supporting
documentation, and that the name of the author not be used in documentation, and that the name of the author not be used in
advertising or publicity pertaining to distribution of the advertising or publicity pertaining to distribution of the
software without specific, written prior permission. software without specific, written prior permission.
The author disclaim all warranties with regard to this The author disclaim all warranties with regard to this
software, including all implied warranties of merchantability software, including all implied warranties of merchantability
and fitness. In no event shall the author be liable for any and fitness. In no event shall the author be liable for any
special, indirect or consequential damages or any damages special, indirect or consequential damages or any damages
whatsoever resulting from loss of use, data or profits, whether whatsoever resulting from loss of use, data or profits, whether
in an action of contract, negligence or other tortious action, in an action of contract, negligence or other tortious action,
arising out of or in connection with the use or performance of arising out of or in connection with the use or performance of
this software. this software.
*/ */
/** \file /** \file
* \brief Board specific LED driver header for the Bitwizard Big-Multio. * \brief Board specific LED driver header for the Bitwizard Big-Multio.
* \copydetails Group_LEDs_BIGMULTIO * \copydetails Group_LEDs_BIGMULTIO
* *
* \note This file should not be included directly. It is automatically included as needed by the LEDs driver * \note This file should not be included directly. It is automatically included as needed by the LEDs driver
* dispatch header located in LUFA/Drivers/Board/LEDs.h. * dispatch header located in LUFA/Drivers/Board/LEDs.h.
*/ */
/** \ingroup Group_LEDs /** \ingroup Group_LEDs
* \defgroup Group_LEDs_BIGMULTIO BIGMULTIO * \defgroup Group_LEDs_BIGMULTIO BIGMULTIO
* \brief Board specific LED driver header for the Bitwizard Big-Multio. * \brief Board specific LED driver header for the Bitwizard Big-Multio.
* *
* Board specific LED driver header for the Bitwizard Big-Multio (http://www.bitwizard.nl/wiki/index.php/Usbbigmultio). * Board specific LED driver header for the Bitwizard Big-Multio (http://www.bitwizard.nl/wiki/index.php/Usbbigmultio).
* *
* <table> * <table>
* <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr> * <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
* <tr><td>LEDS_LED1</td><td>Unknown</td><td>LED0</td><td>High</td><td>PORTF.6</td></tr> * <tr><td>LEDS_LED1</td><td>Unknown</td><td>LED0</td><td>High</td><td>PORTF.6</td></tr>
* <tr><td>LEDS_LED2</td><td>Unknown</td><td>LED1</td><td>High</td><td>PORTF.7</td></tr> * <tr><td>LEDS_LED2</td><td>Unknown</td><td>LED1</td><td>High</td><td>PORTF.7</td></tr>
* <tr><td>LEDS_LED3</td><td>Unknown</td><td>LED2</td><td>High</td><td>PORTE.2</td></tr> * <tr><td>LEDS_LED3</td><td>Unknown</td><td>LED2</td><td>High</td><td>PORTE.2</td></tr>
* </table> * </table>
* *
* @{ * @{
*/ */
#ifndef __LEDS_BIGMULTIO_H__ #ifndef __LEDS_BIGMULTIO_H__
#define __LEDS_BIGMULTIO_H__ #define __LEDS_BIGMULTIO_H__
/* Includes: */ /* Includes: */
#include "../../../../Common/Common.h" #include "../../../../Common/Common.h"
/* Enable C linkage for C++ Compilers: */ /* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus) #if defined(__cplusplus)
extern "C" { extern "C" {
#endif #endif
/* Preprocessor Checks: */ /* Preprocessor Checks: */
#if !defined(__INCLUDE_FROM_LEDS_H) #if !defined(__INCLUDE_FROM_LEDS_H)
#error Do not include this file directly. Include LUFA/Drivers/Board/LEDS.h instead. #error Do not include this file directly. Include LUFA/Drivers/Board/LEDS.h instead.
#endif #endif
/* Private Interface - For use in library only: */ /* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__) #if !defined(__DOXYGEN__)
/* Macros: */ /* Macros: */
#define LEDS_PORTF_LEDS (LEDS_LED1 | LEDS_LED2) #define LEDS_PORTF_LEDS (LEDS_LED1 | LEDS_LED2)
#define LEDS_PORTE_LEDS LEDS_LED3 #define LEDS_PORTE_LEDS LEDS_LED3
#endif #endif
/* Public Interface - May be used in end-application: */ /* Public Interface - May be used in end-application: */
/* Macros: */ /* Macros: */
/** LED mask for the first LED on the board. */ /** LED mask for the first LED on the board. */
#define LEDS_LED1 (1 << 6) #define LEDS_LED1 (1 << 6)
/** LED mask for the second LED on the board. */ /** LED mask for the second LED on the board. */
#define LEDS_LED2 (1 << 7) #define LEDS_LED2 (1 << 7)
/** LED mask for the second LED on the board. */ /** LED mask for the second LED on the board. */
#define LEDS_LED3 (1 << 2) #define LEDS_LED3 (1 << 2)
/** LED mask for all the LEDs on the board. */ /** LED mask for all the LEDs on the board. */
#define LEDS_ALL_LEDS (LEDS_LED1 | LEDS_LED2 | LEDS_LED3) #define LEDS_ALL_LEDS (LEDS_LED1 | LEDS_LED2 | LEDS_LED3)
/** LED mask for none of the board LEDs. */ /** LED mask for none of the board LEDs. */
#define LEDS_NO_LEDS 0 #define LEDS_NO_LEDS 0
/* Inline Functions: */ /* Inline Functions: */
#if !defined(__DOXYGEN__) #if !defined(__DOXYGEN__)
static inline void LEDs_Init(void) static inline void LEDs_Init(void)
{ {
DDRF |= LEDS_PORTF_LEDS; DDRF |= LEDS_PORTF_LEDS;
DDRE |= LEDS_PORTE_LEDS; DDRE |= LEDS_PORTE_LEDS;
PORTF &= ~LEDS_PORTF_LEDS; PORTF &= ~LEDS_PORTF_LEDS;
PORTE &= ~LEDS_PORTE_LEDS; PORTE &= ~LEDS_PORTE_LEDS;
} }
static inline void LEDs_Disable(void) static inline void LEDs_Disable(void)
{ {
DDRF |= LEDS_PORTF_LEDS; DDRF |= LEDS_PORTF_LEDS;
DDRE |= LEDS_PORTE_LEDS; DDRE |= LEDS_PORTE_LEDS;
PORTF &= ~LEDS_PORTF_LEDS; PORTF &= ~LEDS_PORTF_LEDS;
PORTE &= ~LEDS_PORTE_LEDS; PORTE &= ~LEDS_PORTE_LEDS;
} }
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask) static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{ {
PORTF |= (LEDMask & LEDS_PORTF_LEDS); PORTF |= (LEDMask & LEDS_PORTF_LEDS);
PORTE |= (LEDMask & LEDS_PORTE_LEDS); PORTE |= (LEDMask & LEDS_PORTE_LEDS);
} }
static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask) static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask)
{ {
PORTF &= ~(LEDMask & LEDS_PORTF_LEDS); PORTF &= ~(LEDMask & LEDS_PORTF_LEDS);
PORTE &= ~(LEDMask & LEDS_PORTE_LEDS); PORTE &= ~(LEDMask & LEDS_PORTE_LEDS);
} }
static inline void LEDs_SetAllLEDs(const uint8_t LEDMask) static inline void LEDs_SetAllLEDs(const uint8_t LEDMask)
{ {
PORTF = (PORTF & ~LEDS_PORTF_LEDS) | (LEDMask & LEDS_PORTF_LEDS); PORTF = (PORTF & ~LEDS_PORTF_LEDS) | (LEDMask & LEDS_PORTF_LEDS);
PORTE = (PORTE & ~LEDS_PORTE_LEDS) | (LEDMask & LEDS_PORTE_LEDS); PORTE = (PORTE & ~LEDS_PORTE_LEDS) | (LEDMask & LEDS_PORTE_LEDS);
} }
static inline void LEDs_ChangeLEDs(const uint8_t LEDMask, static inline void LEDs_ChangeLEDs(const uint8_t LEDMask,
const uint8_t ActiveMask) const uint8_t ActiveMask)
{ {
PORTF = (PORTF & ~(LEDMask & LEDS_PORTF_LEDS)) | (ActiveMask & LEDS_PORTF_LEDS); PORTF = (PORTF & ~(LEDMask & LEDS_PORTF_LEDS)) | (ActiveMask & LEDS_PORTF_LEDS);
PORTE = (PORTE & ~(LEDMask & LEDS_PORTE_LEDS)) | (ActiveMask & LEDS_PORTE_LEDS); PORTE = (PORTE & ~(LEDMask & LEDS_PORTE_LEDS)) | (ActiveMask & LEDS_PORTE_LEDS);
} }
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask) static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{ {
PINF = (LEDMask & LEDS_PORTF_LEDS); PINF = (LEDMask & LEDS_PORTF_LEDS);
PINE = (LEDMask & LEDS_PORTE_LEDS); PINE = (LEDMask & LEDS_PORTE_LEDS);
} }
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT; static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t LEDs_GetLEDs(void) static inline uint8_t LEDs_GetLEDs(void)
{ {
return ((PORTF & LEDS_PORTF_LEDS) | (PORTE & LEDS_PORTE_LEDS)); return ((PORTF & LEDS_PORTF_LEDS) | (PORTE & LEDS_PORTE_LEDS));
} }
#endif #endif
/* Disable C linkage for C++ Compilers: */ /* Disable C linkage for C++ Compilers: */
#if defined(__cplusplus) #if defined(__cplusplus)
} }
#endif #endif
#endif #endif
/** @} */ /** @} */

View File

@ -1,161 +1,161 @@
/* /*
LUFA Library LUFA Library
Copyright (C) Dean Camera, 2012. Copyright (C) Dean Camera, 2012.
dean [at] fourwalledcubicle [dot] com dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org www.lufa-lib.org
*/ */
/* /*
Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com) Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com)
Permission to use, copy, modify, distribute, and sell this Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted software and its documentation for any purpose is hereby granted
without fee, provided that the above copyright notice appear in without fee, provided that the above copyright notice appear in
all copies and that both that the copyright notice and this all copies and that both that the copyright notice and this
permission notice and warranty disclaimer appear in supporting permission notice and warranty disclaimer appear in supporting
documentation, and that the name of the author not be used in documentation, and that the name of the author not be used in
advertising or publicity pertaining to distribution of the advertising or publicity pertaining to distribution of the
software without specific, written prior permission. software without specific, written prior permission.
The author disclaim all warranties with regard to this The author disclaim all warranties with regard to this
software, including all implied warranties of merchantability software, including all implied warranties of merchantability
and fitness. In no event shall the author be liable for any and fitness. In no event shall the author be liable for any
special, indirect or consequential damages or any damages special, indirect or consequential damages or any damages
whatsoever resulting from loss of use, data or profits, whether whatsoever resulting from loss of use, data or profits, whether
in an action of contract, negligence or other tortious action, in an action of contract, negligence or other tortious action,
arising out of or in connection with the use or performance of arising out of or in connection with the use or performance of
this software. this software.
*/ */
/** \file /** \file
* \brief Board specific LED driver header for the Bitwizard Multio. * \brief Board specific LED driver header for the Bitwizard Multio.
* \copydetails Group_LEDs_MULTIO * \copydetails Group_LEDs_MULTIO
* *
* \note This file should not be included directly. It is automatically included as needed by the LEDs driver * \note This file should not be included directly. It is automatically included as needed by the LEDs driver
* dispatch header located in LUFA/Drivers/Board/LEDs.h. * dispatch header located in LUFA/Drivers/Board/LEDs.h.
*/ */
/** \ingroup Group_LEDs /** \ingroup Group_LEDs
* \defgroup Group_LEDs_MULTIO MULTIO * \defgroup Group_LEDs_MULTIO MULTIO
* \brief Board specific LED driver header for the Bitwizard Multio. * \brief Board specific LED driver header for the Bitwizard Multio.
* *
* Board specific LED driver header for the Bitwizard Multio (http://www.bitwizard.nl/wiki/index.php/USB-multio). * Board specific LED driver header for the Bitwizard Multio (http://www.bitwizard.nl/wiki/index.php/USB-multio).
* *
* <table> * <table>
* <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr> * <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
* <tr><td>LEDS_LED1</td><td>Green</td><td>General Indicator</td><td>High</td><td>PORTD.0</td></tr> * <tr><td>LEDS_LED1</td><td>Green</td><td>General Indicator</td><td>High</td><td>PORTD.0</td></tr>
* <tr><td>LEDS_LED2</td><td>Green</td><td>General Indicator</td><td>High</td><td>PORTC.2</td></tr> * <tr><td>LEDS_LED2</td><td>Green</td><td>General Indicator</td><td>High</td><td>PORTC.2</td></tr>
* <tr><td>LEDS_LED3</td><td>Green</td><td>General Indicator</td><td>High</td><td>PORTD.7</td></tr> * <tr><td>LEDS_LED3</td><td>Green</td><td>General Indicator</td><td>High</td><td>PORTD.7</td></tr>
* </table> * </table>
* *
* @{ * @{
*/ */
#ifndef __LEDS_MULTIO_H__ #ifndef __LEDS_MULTIO_H__
#define __LEDS_MULTIO_H__ #define __LEDS_MULTIO_H__
/* Includes: */ /* Includes: */
#include "../../../../Common/Common.h" #include "../../../../Common/Common.h"
/* Enable C linkage for C++ Compilers: */ /* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus) #if defined(__cplusplus)
extern "C" { extern "C" {
#endif #endif
/* Preprocessor Checks: */ /* Preprocessor Checks: */
#if !defined(__INCLUDE_FROM_LEDS_H) #if !defined(__INCLUDE_FROM_LEDS_H)
#error Do not include this file directly. Include LUFA/Drivers/Board/LEDS.h instead. #error Do not include this file directly. Include LUFA/Drivers/Board/LEDS.h instead.
#endif #endif
/* Private Interface - For use in library only: */ /* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__) #if !defined(__DOXYGEN__)
/* Macros: */ /* Macros: */
#define LEDS_PORTD_LEDS (LEDS_LED1 | LEDS_LED3) #define LEDS_PORTD_LEDS (LEDS_LED1 | LEDS_LED3)
#define LEDS_PORTC_LEDS LEDS_LED2 #define LEDS_PORTC_LEDS LEDS_LED2
#endif #endif
/* Public Interface - May be used in end-application: */ /* Public Interface - May be used in end-application: */
/* Macros: */ /* Macros: */
/** LED mask for the first LED on the board. */ /** LED mask for the first LED on the board. */
#define LEDS_LED1 (1 << 0) #define LEDS_LED1 (1 << 0)
/** LED mask for the second LED on the board. */ /** LED mask for the second LED on the board. */
#define LEDS_LED2 (1 << 2) #define LEDS_LED2 (1 << 2)
/** LED mask for the second LED on the board. */ /** LED mask for the second LED on the board. */
#define LEDS_LED3 (1 << 7) #define LEDS_LED3 (1 << 7)
/** LED mask for all the LEDs on the board. */ /** LED mask for all the LEDs on the board. */
#define LEDS_ALL_LEDS (LEDS_LED1 | LEDS_LED2 | LEDS_LED3) #define LEDS_ALL_LEDS (LEDS_LED1 | LEDS_LED2 | LEDS_LED3)
/** LED mask for none of the board LEDs. */ /** LED mask for none of the board LEDs. */
#define LEDS_NO_LEDS 0 #define LEDS_NO_LEDS 0
/* Inline Functions: */ /* Inline Functions: */
#if !defined(__DOXYGEN__) #if !defined(__DOXYGEN__)
static inline void LEDs_Init(void) static inline void LEDs_Init(void)
{ {
DDRD |= LEDS_PORTD_LEDS; DDRD |= LEDS_PORTD_LEDS;
DDRC |= LEDS_PORTC_LEDS; DDRC |= LEDS_PORTC_LEDS;
PORTD &= ~LEDS_PORTD_LEDS; PORTD &= ~LEDS_PORTD_LEDS;
PORTC &= ~LEDS_PORTC_LEDS; PORTC &= ~LEDS_PORTC_LEDS;
} }
static inline void LEDs_Disable(void) static inline void LEDs_Disable(void)
{ {
DDRD |= LEDS_PORTD_LEDS; DDRD |= LEDS_PORTD_LEDS;
DDRC |= LEDS_PORTC_LEDS; DDRC |= LEDS_PORTC_LEDS;
PORTD &= ~LEDS_PORTD_LEDS; PORTD &= ~LEDS_PORTD_LEDS;
PORTC &= ~LEDS_PORTC_LEDS; PORTC &= ~LEDS_PORTC_LEDS;
} }
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask) static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{ {
PORTD |= (LEDMask & LEDS_PORTD_LEDS); PORTD |= (LEDMask & LEDS_PORTD_LEDS);
PORTC |= (LEDMask & LEDS_PORTC_LEDS); PORTC |= (LEDMask & LEDS_PORTC_LEDS);
} }
static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask) static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask)
{ {
PORTD &= ~(LEDMask & LEDS_PORTD_LEDS); PORTD &= ~(LEDMask & LEDS_PORTD_LEDS);
PORTC &= ~(LEDMask & LEDS_PORTC_LEDS); PORTC &= ~(LEDMask & LEDS_PORTC_LEDS);
} }
static inline void LEDs_SetAllLEDs(const uint8_t LEDMask) static inline void LEDs_SetAllLEDs(const uint8_t LEDMask)
{ {
PORTD = (PORTD & ~LEDS_PORTD_LEDS) | (LEDMask & LEDS_PORTD_LEDS); PORTD = (PORTD & ~LEDS_PORTD_LEDS) | (LEDMask & LEDS_PORTD_LEDS);
PORTC = (PORTC & ~LEDS_PORTC_LEDS) | (LEDMask & LEDS_PORTC_LEDS); PORTC = (PORTC & ~LEDS_PORTC_LEDS) | (LEDMask & LEDS_PORTC_LEDS);
} }
static inline void LEDs_ChangeLEDs(const uint8_t LEDMask, static inline void LEDs_ChangeLEDs(const uint8_t LEDMask,
const uint8_t ActiveMask) const uint8_t ActiveMask)
{ {
PORTD = (PORTD & ~(LEDMask & LEDS_PORTD_LEDS)) | (ActiveMask & LEDS_PORTD_LEDS); PORTD = (PORTD & ~(LEDMask & LEDS_PORTD_LEDS)) | (ActiveMask & LEDS_PORTD_LEDS);
PORTC = (PORTC & ~(LEDMask & LEDS_PORTC_LEDS)) | (ActiveMask & LEDS_PORTC_LEDS); PORTC = (PORTC & ~(LEDMask & LEDS_PORTC_LEDS)) | (ActiveMask & LEDS_PORTC_LEDS);
} }
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask) static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{ {
PIND = (LEDMask & LEDS_PORTD_LEDS); PIND = (LEDMask & LEDS_PORTD_LEDS);
PINC = (LEDMask & LEDS_PORTC_LEDS); PINC = (LEDMask & LEDS_PORTC_LEDS);
} }
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT; static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t LEDs_GetLEDs(void) static inline uint8_t LEDs_GetLEDs(void)
{ {
return ((PORTD & LEDS_PORTD_LEDS) | (PORTC & LEDS_PORTC_LEDS)); return ((PORTD & LEDS_PORTD_LEDS) | (PORTC & LEDS_PORTC_LEDS));
} }
#endif #endif
/* Disable C linkage for C++ Compilers: */ /* Disable C linkage for C++ Compilers: */
#if defined(__cplusplus) #if defined(__cplusplus)
} }
#endif #endif
#endif #endif
/** @} */ /** @} */

View File

@ -1,221 +1,221 @@
/* /*
LUFA Library LUFA Library
Copyright (C) Dean Camera, 2012. Copyright (C) Dean Camera, 2012.
dean [at] fourwalledcubicle [dot] com dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org www.lufa-lib.org
*/ */
/* /*
Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com) Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com)
Permission to use, copy, modify, distribute, and sell this Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted software and its documentation for any purpose is hereby granted
without fee, provided that the above copyright notice appear in without fee, provided that the above copyright notice appear in
all copies and that both that the copyright notice and this all copies and that both that the copyright notice and this
permission notice and warranty disclaimer appear in supporting permission notice and warranty disclaimer appear in supporting
documentation, and that the name of the author not be used in documentation, and that the name of the author not be used in
advertising or publicity pertaining to distribution of the advertising or publicity pertaining to distribution of the
software without specific, written prior permission. software without specific, written prior permission.
The author disclaim all warranties with regard to this The author disclaim all warranties with regard to this
software, including all implied warranties of merchantability software, including all implied warranties of merchantability
and fitness. In no event shall the author be liable for any and fitness. In no event shall the author be liable for any
special, indirect or consequential damages or any damages special, indirect or consequential damages or any damages
whatsoever resulting from loss of use, data or profits, whether whatsoever resulting from loss of use, data or profits, whether
in an action of contract, negligence or other tortious action, in an action of contract, negligence or other tortious action,
arising out of or in connection with the use or performance of arising out of or in connection with the use or performance of
this software. this software.
*/ */
#include "../../../../Common/Common.h" #include "../../../../Common/Common.h"
#if (ARCH == ARCH_AVR8) #if (ARCH == ARCH_AVR8)
#define __INCLUDE_FROM_USB_DRIVER #define __INCLUDE_FROM_USB_DRIVER
#include "../USBMode.h" #include "../USBMode.h"
#if defined(USB_CAN_BE_HOST) #if defined(USB_CAN_BE_HOST)
#include "PipeStream_AVR8.h" #include "PipeStream_AVR8.h"
uint8_t Pipe_Discard_Stream(uint16_t Length, uint8_t Pipe_Discard_Stream(uint16_t Length,
uint16_t* const BytesProcessed) uint16_t* const BytesProcessed)
{ {
uint8_t ErrorCode; uint8_t ErrorCode;
uint16_t BytesInTransfer = 0; uint16_t BytesInTransfer = 0;
Pipe_SetPipeToken(PIPE_TOKEN_IN); Pipe_SetPipeToken(PIPE_TOKEN_IN);
if ((ErrorCode = Pipe_WaitUntilReady())) if ((ErrorCode = Pipe_WaitUntilReady()))
return ErrorCode; return ErrorCode;
if (BytesProcessed != NULL) if (BytesProcessed != NULL)
Length -= *BytesProcessed; Length -= *BytesProcessed;
while (Length) while (Length)
{ {
if (!(Pipe_IsReadWriteAllowed())) if (!(Pipe_IsReadWriteAllowed()))
{ {
Pipe_ClearIN(); Pipe_ClearIN();
if (BytesProcessed != NULL) if (BytesProcessed != NULL)
{ {
*BytesProcessed += BytesInTransfer; *BytesProcessed += BytesInTransfer;
return PIPE_RWSTREAM_IncompleteTransfer; return PIPE_RWSTREAM_IncompleteTransfer;
} }
if ((ErrorCode = Pipe_WaitUntilReady())) if ((ErrorCode = Pipe_WaitUntilReady()))
return ErrorCode; return ErrorCode;
} }
else else
{ {
Pipe_Discard_8(); Pipe_Discard_8();
Length--; Length--;
BytesInTransfer++; BytesInTransfer++;
} }
} }
return PIPE_RWSTREAM_NoError; return PIPE_RWSTREAM_NoError;
} }
uint8_t Pipe_Null_Stream(uint16_t Length, uint8_t Pipe_Null_Stream(uint16_t Length,
uint16_t* const BytesProcessed) uint16_t* const BytesProcessed)
{ {
uint8_t ErrorCode; uint8_t ErrorCode;
uint16_t BytesInTransfer = 0; uint16_t BytesInTransfer = 0;
Pipe_SetPipeToken(PIPE_TOKEN_OUT); Pipe_SetPipeToken(PIPE_TOKEN_OUT);
if ((ErrorCode = Pipe_WaitUntilReady())) if ((ErrorCode = Pipe_WaitUntilReady()))
return ErrorCode; return ErrorCode;
if (BytesProcessed != NULL) if (BytesProcessed != NULL)
Length -= *BytesProcessed; Length -= *BytesProcessed;
while (Length) while (Length)
{ {
if (!(Pipe_IsReadWriteAllowed())) if (!(Pipe_IsReadWriteAllowed()))
{ {
Pipe_ClearOUT(); Pipe_ClearOUT();
if (BytesProcessed != NULL) if (BytesProcessed != NULL)
{ {
*BytesProcessed += BytesInTransfer; *BytesProcessed += BytesInTransfer;
return PIPE_RWSTREAM_IncompleteTransfer; return PIPE_RWSTREAM_IncompleteTransfer;
} }
USB_USBTask(); USB_USBTask();
if ((ErrorCode = Pipe_WaitUntilReady())) if ((ErrorCode = Pipe_WaitUntilReady()))
return ErrorCode; return ErrorCode;
} }
else else
{ {
Pipe_Write_8(0); Pipe_Write_8(0);
Length--; Length--;
BytesInTransfer++; BytesInTransfer++;
} }
} }
return PIPE_RWSTREAM_NoError; return PIPE_RWSTREAM_NoError;
} }
/* The following abuses the C preprocessor in order to copy-paste common code with slight alterations, /* The following abuses the C preprocessor in order to copy-paste common code with slight alterations,
* so that the code needs to be written once. It is a crude form of templating to reduce code maintenance. */ * so that the code needs to be written once. It is a crude form of templating to reduce code maintenance. */
#define TEMPLATE_FUNC_NAME Pipe_Write_Stream_LE #define TEMPLATE_FUNC_NAME Pipe_Write_Stream_LE
#define TEMPLATE_BUFFER_TYPE const void* #define TEMPLATE_BUFFER_TYPE const void*
#define TEMPLATE_TOKEN PIPE_TOKEN_OUT #define TEMPLATE_TOKEN PIPE_TOKEN_OUT
#define TEMPLATE_CLEAR_PIPE() Pipe_ClearOUT() #define TEMPLATE_CLEAR_PIPE() Pipe_ClearOUT()
#define TEMPLATE_BUFFER_OFFSET(Length) 0 #define TEMPLATE_BUFFER_OFFSET(Length) 0
#define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) DataStream += Amount #define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) DataStream += Amount
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Pipe_Write_8(*BufferPtr) #define TEMPLATE_TRANSFER_BYTE(BufferPtr) Pipe_Write_8(*BufferPtr)
#include "Template/Template_Pipe_RW.c" #include "Template/Template_Pipe_RW.c"
#define TEMPLATE_FUNC_NAME Pipe_Write_Stream_BE #define TEMPLATE_FUNC_NAME Pipe_Write_Stream_BE
#define TEMPLATE_BUFFER_TYPE const void* #define TEMPLATE_BUFFER_TYPE const void*
#define TEMPLATE_TOKEN PIPE_TOKEN_OUT #define TEMPLATE_TOKEN PIPE_TOKEN_OUT
#define TEMPLATE_CLEAR_PIPE() Pipe_ClearOUT() #define TEMPLATE_CLEAR_PIPE() Pipe_ClearOUT()
#define TEMPLATE_BUFFER_OFFSET(Length) (Length - 1) #define TEMPLATE_BUFFER_OFFSET(Length) (Length - 1)
#define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) DataStream -= Amount #define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) DataStream -= Amount
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Pipe_Write_8(*BufferPtr) #define TEMPLATE_TRANSFER_BYTE(BufferPtr) Pipe_Write_8(*BufferPtr)
#include "Template/Template_Pipe_RW.c" #include "Template/Template_Pipe_RW.c"
#define TEMPLATE_FUNC_NAME Pipe_Read_Stream_LE #define TEMPLATE_FUNC_NAME Pipe_Read_Stream_LE
#define TEMPLATE_BUFFER_TYPE void* #define TEMPLATE_BUFFER_TYPE void*
#define TEMPLATE_TOKEN PIPE_TOKEN_IN #define TEMPLATE_TOKEN PIPE_TOKEN_IN
#define TEMPLATE_CLEAR_PIPE() Pipe_ClearIN() #define TEMPLATE_CLEAR_PIPE() Pipe_ClearIN()
#define TEMPLATE_BUFFER_OFFSET(Length) 0 #define TEMPLATE_BUFFER_OFFSET(Length) 0
#define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) DataStream += Amount #define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) DataStream += Amount
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) *BufferPtr = Pipe_Read_8() #define TEMPLATE_TRANSFER_BYTE(BufferPtr) *BufferPtr = Pipe_Read_8()
#include "Template/Template_Pipe_RW.c" #include "Template/Template_Pipe_RW.c"
#define TEMPLATE_FUNC_NAME Pipe_Read_Stream_BE #define TEMPLATE_FUNC_NAME Pipe_Read_Stream_BE
#define TEMPLATE_BUFFER_TYPE void* #define TEMPLATE_BUFFER_TYPE void*
#define TEMPLATE_TOKEN PIPE_TOKEN_IN #define TEMPLATE_TOKEN PIPE_TOKEN_IN
#define TEMPLATE_CLEAR_PIPE() Pipe_ClearIN() #define TEMPLATE_CLEAR_PIPE() Pipe_ClearIN()
#define TEMPLATE_BUFFER_OFFSET(Length) (Length - 1) #define TEMPLATE_BUFFER_OFFSET(Length) (Length - 1)
#define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) DataStream -= Amount #define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) DataStream -= Amount
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) *BufferPtr = Pipe_Read_8() #define TEMPLATE_TRANSFER_BYTE(BufferPtr) *BufferPtr = Pipe_Read_8()
#include "Template/Template_Pipe_RW.c" #include "Template/Template_Pipe_RW.c"
#define TEMPLATE_FUNC_NAME Pipe_Write_PStream_LE #define TEMPLATE_FUNC_NAME Pipe_Write_PStream_LE
#define TEMPLATE_BUFFER_TYPE const void* #define TEMPLATE_BUFFER_TYPE const void*
#define TEMPLATE_TOKEN PIPE_TOKEN_OUT #define TEMPLATE_TOKEN PIPE_TOKEN_OUT
#define TEMPLATE_CLEAR_PIPE() Pipe_ClearOUT() #define TEMPLATE_CLEAR_PIPE() Pipe_ClearOUT()
#define TEMPLATE_BUFFER_OFFSET(Length) 0 #define TEMPLATE_BUFFER_OFFSET(Length) 0
#define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) DataStream += Amount #define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) DataStream += Amount
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Pipe_Write_8(pgm_read_byte(BufferPtr)) #define TEMPLATE_TRANSFER_BYTE(BufferPtr) Pipe_Write_8(pgm_read_byte(BufferPtr))
#include "Template/Template_Pipe_RW.c" #include "Template/Template_Pipe_RW.c"
#define TEMPLATE_FUNC_NAME Pipe_Write_PStream_BE #define TEMPLATE_FUNC_NAME Pipe_Write_PStream_BE
#define TEMPLATE_BUFFER_TYPE const void* #define TEMPLATE_BUFFER_TYPE const void*
#define TEMPLATE_TOKEN PIPE_TOKEN_OUT #define TEMPLATE_TOKEN PIPE_TOKEN_OUT
#define TEMPLATE_CLEAR_PIPE() Pipe_ClearOUT() #define TEMPLATE_CLEAR_PIPE() Pipe_ClearOUT()
#define TEMPLATE_BUFFER_OFFSET(Length) (Length - 1) #define TEMPLATE_BUFFER_OFFSET(Length) (Length - 1)
#define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) DataStream -= Amount #define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) DataStream -= Amount
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Pipe_Write_8(pgm_read_byte(BufferPtr)) #define TEMPLATE_TRANSFER_BYTE(BufferPtr) Pipe_Write_8(pgm_read_byte(BufferPtr))
#include "Template/Template_Pipe_RW.c" #include "Template/Template_Pipe_RW.c"
#define TEMPLATE_FUNC_NAME Pipe_Write_EStream_LE #define TEMPLATE_FUNC_NAME Pipe_Write_EStream_LE
#define TEMPLATE_BUFFER_TYPE const void* #define TEMPLATE_BUFFER_TYPE const void*
#define TEMPLATE_TOKEN PIPE_TOKEN_OUT #define TEMPLATE_TOKEN PIPE_TOKEN_OUT
#define TEMPLATE_CLEAR_PIPE() Pipe_ClearOUT() #define TEMPLATE_CLEAR_PIPE() Pipe_ClearOUT()
#define TEMPLATE_BUFFER_OFFSET(Length) 0 #define TEMPLATE_BUFFER_OFFSET(Length) 0
#define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) DataStream += Amount #define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) DataStream += Amount
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Pipe_Write_8(eeprom_read_byte(BufferPtr)) #define TEMPLATE_TRANSFER_BYTE(BufferPtr) Pipe_Write_8(eeprom_read_byte(BufferPtr))
#include "Template/Template_Pipe_RW.c" #include "Template/Template_Pipe_RW.c"
#define TEMPLATE_FUNC_NAME Pipe_Write_EStream_BE #define TEMPLATE_FUNC_NAME Pipe_Write_EStream_BE
#define TEMPLATE_BUFFER_TYPE const void* #define TEMPLATE_BUFFER_TYPE const void*
#define TEMPLATE_TOKEN PIPE_TOKEN_OUT #define TEMPLATE_TOKEN PIPE_TOKEN_OUT
#define TEMPLATE_CLEAR_PIPE() Pipe_ClearOUT() #define TEMPLATE_CLEAR_PIPE() Pipe_ClearOUT()
#define TEMPLATE_BUFFER_OFFSET(Length) (Length - 1) #define TEMPLATE_BUFFER_OFFSET(Length) (Length - 1)
#define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) DataStream -= Amount #define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) DataStream -= Amount
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) Pipe_Write_8(eeprom_read_byte(BufferPtr)) #define TEMPLATE_TRANSFER_BYTE(BufferPtr) Pipe_Write_8(eeprom_read_byte(BufferPtr))
#include "Template/Template_Pipe_RW.c" #include "Template/Template_Pipe_RW.c"
#define TEMPLATE_FUNC_NAME Pipe_Read_EStream_LE #define TEMPLATE_FUNC_NAME Pipe_Read_EStream_LE
#define TEMPLATE_BUFFER_TYPE void* #define TEMPLATE_BUFFER_TYPE void*
#define TEMPLATE_TOKEN PIPE_TOKEN_IN #define TEMPLATE_TOKEN PIPE_TOKEN_IN
#define TEMPLATE_CLEAR_PIPE() Pipe_ClearIN() #define TEMPLATE_CLEAR_PIPE() Pipe_ClearIN()
#define TEMPLATE_BUFFER_OFFSET(Length) 0 #define TEMPLATE_BUFFER_OFFSET(Length) 0
#define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) DataStream += Amount #define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) DataStream += Amount
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) eeprom_update_byte(BufferPtr, Pipe_Read_8()) #define TEMPLATE_TRANSFER_BYTE(BufferPtr) eeprom_update_byte(BufferPtr, Pipe_Read_8())
#include "Template/Template_Pipe_RW.c" #include "Template/Template_Pipe_RW.c"
#define TEMPLATE_FUNC_NAME Pipe_Read_EStream_BE #define TEMPLATE_FUNC_NAME Pipe_Read_EStream_BE
#define TEMPLATE_BUFFER_TYPE void* #define TEMPLATE_BUFFER_TYPE void*
#define TEMPLATE_TOKEN PIPE_TOKEN_IN #define TEMPLATE_TOKEN PIPE_TOKEN_IN
#define TEMPLATE_CLEAR_PIPE() Pipe_ClearIN() #define TEMPLATE_CLEAR_PIPE() Pipe_ClearIN()
#define TEMPLATE_BUFFER_OFFSET(Length) (Length - 1) #define TEMPLATE_BUFFER_OFFSET(Length) (Length - 1)
#define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) DataStream -= Amount #define TEMPLATE_BUFFER_MOVE(BufferPtr, Amount) DataStream -= Amount
#define TEMPLATE_TRANSFER_BYTE(BufferPtr) eeprom_update_byte(BufferPtr, Pipe_Read_8()) #define TEMPLATE_TRANSFER_BYTE(BufferPtr) eeprom_update_byte(BufferPtr, Pipe_Read_8())
#include "Template/Template_Pipe_RW.c" #include "Template/Template_Pipe_RW.c"
#endif #endif
#endif #endif

View File

@ -1 +1 @@
<AVRStudio><MANAGEMENT><ProjectName>%TARGET%</ProjectName><Created>%CREATED%</Created><LastEdit>%CREATED%</LastEdit><ICON>241</ICON><ProjectType>0</ProjectType><Created>%CREATED%</Created><Version>4</Version><Build>4, 18, 0, 685</Build><ProjectTypeName>AVR GCC</ProjectTypeName></MANAGEMENT><CODE_CREATION><ObjectFile>%TARGET%.elf</ObjectFile><EntryFile></EntryFile></CODE_CREATION><DEBUG_TARGET><CURRENT_TARGET></CURRENT_TARGET><CURRENT_PART></CURRENT_PART><BREAKPOINTS></BREAKPOINTS><IO_EXPAND><HIDE>false</HIDE></IO_EXPAND><REGISTERNAMES><Register>R00</Register><Register>R01</Register><Register>R02</Register><Register>R03</Register><Register>R04</Register><Register>R05</Register><Register>R06</Register><Register>R07</Register><Register>R08</Register><Register>R09</Register><Register>R10</Register><Register>R11</Register><Register>R12</Register><Register>R13</Register><Register>R14</Register><Register>R15</Register><Register>R16</Register><Register>R17</Register><Register>R18</Register><Register>R19</Register><Register>R20</Register><Register>R21</Register><Register>R22</Register><Register>R23</Register><Register>R24</Register><Register>R25</Register><Register>R26</Register><Register>R27</Register><Register>R28</Register><Register>R29</Register><Register>R30</Register><Register>R31</Register></REGISTERNAMES><COM></COM><COMType>0</COMType><WATCHNUM>0</WATCHNUM><WATCHNAMES><Pane0></Pane0><Pane1></Pane1><Pane2></Pane2><Pane3></Pane3></WATCHNAMES><BreakOnTrcaeFull>0</BreakOnTrcaeFull></DEBUG_TARGET><Debugger><Triggers></Triggers></Debugger><AVRGCCPLUGIN><FILES>%FILE_LIST%</FILES><CONFIGS><CONFIG><NAME>default</NAME><USESEXTERNALMAKEFILE>YES</USESEXTERNALMAKEFILE><EXTERNALMAKEFILE>makefile</EXTERNALMAKEFILE><PART>atmega128</PART><HEX>1</HEX><LIST>1</LIST><MAP>1</MAP><OUTPUTFILENAME>BootloaderCDC.elf</OUTPUTFILENAME><OUTPUTDIR>default\</OUTPUTDIR><ISDIRTY>1</ISDIRTY><OPTIONS/><INCDIRS/><LIBDIRS/><LIBS/><LINKOBJECTS/><OPTIONSFORALL>-Wall -gdwarf-2 -std=gnu99 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums</OPTIONSFORALL><LINKEROPTIONS></LINKEROPTIONS><SEGMENTS/></CONFIG></CONFIGS><LASTCONFIG>default</LASTCONFIG><USES_WINAVR>1</USES_WINAVR><GCC_LOC>C:\WinAVR-20100110\bin\avr-gcc.exe</GCC_LOC><MAKE_LOC>C:\WinAVR-20100110\utils\bin\make.exe</MAKE_LOC></AVRGCCPLUGIN><ProjectFiles><Files>%GCC_FILE_LIST%</Files></ProjectFiles><IOView><usergroups/><sort sorted="0" column="0" ordername="0" orderaddress="0" ordergroup="0"/></IOView><Files></Files><Events><Bookmarks></Bookmarks></Events><Trace><Filters></Filters></Trace></AVRStudio> <AVRStudio><MANAGEMENT><ProjectName>%TARGET%</ProjectName><Created>%CREATED%</Created><LastEdit>%CREATED%</LastEdit><ICON>241</ICON><ProjectType>0</ProjectType><Created>%CREATED%</Created><Version>4</Version><Build>4, 18, 0, 685</Build><ProjectTypeName>AVR GCC</ProjectTypeName></MANAGEMENT><CODE_CREATION><ObjectFile>%TARGET%.elf</ObjectFile><EntryFile></EntryFile></CODE_CREATION><DEBUG_TARGET><CURRENT_TARGET></CURRENT_TARGET><CURRENT_PART></CURRENT_PART><BREAKPOINTS></BREAKPOINTS><IO_EXPAND><HIDE>false</HIDE></IO_EXPAND><REGISTERNAMES><Register>R00</Register><Register>R01</Register><Register>R02</Register><Register>R03</Register><Register>R04</Register><Register>R05</Register><Register>R06</Register><Register>R07</Register><Register>R08</Register><Register>R09</Register><Register>R10</Register><Register>R11</Register><Register>R12</Register><Register>R13</Register><Register>R14</Register><Register>R15</Register><Register>R16</Register><Register>R17</Register><Register>R18</Register><Register>R19</Register><Register>R20</Register><Register>R21</Register><Register>R22</Register><Register>R23</Register><Register>R24</Register><Register>R25</Register><Register>R26</Register><Register>R27</Register><Register>R28</Register><Register>R29</Register><Register>R30</Register><Register>R31</Register></REGISTERNAMES><COM></COM><COMType>0</COMType><WATCHNUM>0</WATCHNUM><WATCHNAMES><Pane0></Pane0><Pane1></Pane1><Pane2></Pane2><Pane3></Pane3></WATCHNAMES><BreakOnTrcaeFull>0</BreakOnTrcaeFull></DEBUG_TARGET><Debugger><Triggers></Triggers></Debugger><AVRGCCPLUGIN><FILES>%FILE_LIST%</FILES><CONFIGS><CONFIG><NAME>default</NAME><USESEXTERNALMAKEFILE>YES</USESEXTERNALMAKEFILE><EXTERNALMAKEFILE>makefile</EXTERNALMAKEFILE><PART>atmega128</PART><HEX>1</HEX><LIST>1</LIST><MAP>1</MAP><OUTPUTFILENAME>BootloaderCDC.elf</OUTPUTFILENAME><OUTPUTDIR>default\</OUTPUTDIR><ISDIRTY>1</ISDIRTY><OPTIONS/><INCDIRS/><LIBDIRS/><LIBS/><LINKOBJECTS/><OPTIONSFORALL>-Wall -gdwarf-2 -std=gnu99 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums</OPTIONSFORALL><LINKEROPTIONS></LINKEROPTIONS><SEGMENTS/></CONFIG></CONFIGS><LASTCONFIG>default</LASTCONFIG><USES_WINAVR>1</USES_WINAVR><GCC_LOC>C:\WinAVR-20100110\bin\avr-gcc.exe</GCC_LOC><MAKE_LOC>C:\WinAVR-20100110\utils\bin\make.exe</MAKE_LOC></AVRGCCPLUGIN><ProjectFiles><Files>%GCC_FILE_LIST%</Files></ProjectFiles><IOView><usergroups/><sort sorted="0" column="0" ordername="0" orderaddress="0" ordergroup="0"/></IOView><Files></Files><Events><Bookmarks></Bookmarks></Events><Trace><Filters></Filters></Trace></AVRStudio>

View File

@ -1,91 +1,91 @@
# #
# LUFA Library # LUFA Library
# Copyright (C) Dean Camera, 2012. # Copyright (C) Dean Camera, 2012.
# #
# dean [at] fourwalledcubicle [dot] com # dean [at] fourwalledcubicle [dot] com
# www.lufa-lib.org # www.lufa-lib.org
# #
# Maintenance scripts not required by general LUFA users, used for project development purposes. # Maintenance scripts not required by general LUFA users, used for project development purposes.
# Path to the root of the LUFA tree # Path to the root of the LUFA tree
LUFA_ROOT = ../ LUFA_ROOT = ../
all: all:
# Update all Doxygen configuration files to the latest Doxygen version - force Markdown support to be disabled # Update all Doxygen configuration files to the latest Doxygen version - force Markdown support to be disabled
upgrade-doxygen: upgrade-doxygen:
@echo Upgrading Doxygen.conf files... @echo Upgrading Doxygen.conf files...
@for doxygen_conf in `find $(LUFA_ROOT) -name Doxygen.conf`; do \ @for doxygen_conf in `find $(LUFA_ROOT) -name Doxygen.conf`; do \
doxygen -u $$doxygen_conf; \ doxygen -u $$doxygen_conf; \
sed "s/MARKDOWN_SUPPORT *= *YES/MARKDOWN_SUPPORT = NO/1" $$doxygen_conf > $$doxygen_conf.new; \ sed "s/MARKDOWN_SUPPORT *= *YES/MARKDOWN_SUPPORT = NO/1" $$doxygen_conf > $$doxygen_conf.new; \
sed "s/DISABLE_INDEX *= *NO/DISABLE_INDEX = YES/1" $$doxygen_conf.new > $$doxygen_conf.new2; \ sed "s/DISABLE_INDEX *= *NO/DISABLE_INDEX = YES/1" $$doxygen_conf.new > $$doxygen_conf.new2; \
mv -u $$doxygen_conf.new2 $$doxygen_conf; \ mv -u $$doxygen_conf.new2 $$doxygen_conf; \
rm $$doxygen_conf.new; \ rm $$doxygen_conf.new; \
done; done;
@echo Doxygen configuration update complete. @echo Doxygen configuration update complete.
# Generate AVR Studio 4 project files for each project from a template # Generate AVR Studio 4 project files for each project from a template
make-as4-projects: make-as4-projects:
@echo Creating AVR Studio 4 project files for Demos... @echo Creating AVR Studio 4 project files for Demos...
@for project_makefile in `find $(LUFA_ROOT)/Demos $(LUFA_ROOT)/Projects $(LUFA_ROOT)/Bootloaders -name makefile*`; do \ @for project_makefile in `find $(LUFA_ROOT)/Demos $(LUFA_ROOT)/Projects $(LUFA_ROOT)/Bootloaders -name makefile*`; do \
target_name=`grep "TARGET *=" $$project_makefile | cut -d'=' -f2 | sed 's/ //g'`; \ target_name=`grep "TARGET *=" $$project_makefile | cut -d'=' -f2 | sed 's/ //g'`; \
target_folder=`dirname $$project_makefile`; \ target_folder=`dirname $$project_makefile`; \
as4_date=`date "+%-e-%b-%Y %-H:%-M:%-S"`; \ as4_date=`date "+%-e-%b-%Y %-H:%-M:%-S"`; \
\ \
if ( test -n "$$target_name" ); then \ if ( test -n "$$target_name" ); then \
echo Creating AS4 project for project $$target_name; \ echo Creating AS4 project for project $$target_name; \
\ \
source_files="<OTHERFILE>`basename $$project_makefile`<\/OTHERFILE>"; \ source_files="<OTHERFILE>`basename $$project_makefile`<\/OTHERFILE>"; \
gcc_source_files=""; \ gcc_source_files=""; \
for c_source_file in `find $$target_folder -name *.c`; do \ for c_source_file in `find $$target_folder -name *.c`; do \
source_filename=`basename $$c_source_file`; \ source_filename=`basename $$c_source_file`; \
\ \
source_files="$$source_files<SOURCEFILE>$$source_filename<\/SOURCEFILE>"; \ source_files="$$source_files<SOURCEFILE>$$source_filename<\/SOURCEFILE>"; \
gcc_source_files="$$gcc_source_files<Name>$$source_filename<\/Name>"; \ gcc_source_files="$$gcc_source_files<Name>$$source_filename<\/Name>"; \
done; \ done; \
for c_header_file in `find $$target_folder -name *.h`; do \ for c_header_file in `find $$target_folder -name *.h`; do \
source_filename=`basename $$c_header_file`; \ source_filename=`basename $$c_header_file`; \
\ \
source_files="$$source_files<HEADERFILE>$$source_filename<\/HEADERFILE>"; \ source_files="$$source_files<HEADERFILE>$$source_filename<\/HEADERFILE>"; \
gcc_source_files="$$gcc_source_files<Name>$$source_filename<\/Name>"; \ gcc_source_files="$$gcc_source_files<Name>$$source_filename<\/Name>"; \
done; \ done; \
for assembly_file in `find $$target_folder -name *.S`; do \ for assembly_file in `find $$target_folder -name *.S`; do \
source_filename=`basename $$assembly_file`; \ source_filename=`basename $$assembly_file`; \
\ \
source_files="$$source_files<OTHERFILE>$$source_filename<\/OTHERFILE>"; \ source_files="$$source_files<OTHERFILE>$$source_filename<\/OTHERFILE>"; \
gcc_source_files="$$gcc_source_files<Name>$$source_filename<\/Name>"; \ gcc_source_files="$$gcc_source_files<Name>$$source_filename<\/Name>"; \
done; \ done; \
\ \
sed "s/%TARGET%/$$target_name/g" AS4Template.aps > $$target_folder/$$target_name.aps.new; \ sed "s/%TARGET%/$$target_name/g" AS4Template.aps > $$target_folder/$$target_name.aps.new; \
sed "s/%CREATED%/$$as4_date/g" $$target_folder/$$target_name.aps.new > $$target_folder/$$target_name.aps.new2; \ sed "s/%CREATED%/$$as4_date/g" $$target_folder/$$target_name.aps.new > $$target_folder/$$target_name.aps.new2; \
sed "s/%FILE_LIST%/$$source_files/g" $$target_folder/$$target_name.aps.new2 > $$target_folder/$$target_name.aps.new3; \ sed "s/%FILE_LIST%/$$source_files/g" $$target_folder/$$target_name.aps.new2 > $$target_folder/$$target_name.aps.new3; \
sed "s/%GCC_FILE_LIST%/$$gcc_source_files/g" $$target_folder/$$target_name.aps.new3 > $$target_folder/$$target_name.aps.new4; \ sed "s/%GCC_FILE_LIST%/$$gcc_source_files/g" $$target_folder/$$target_name.aps.new3 > $$target_folder/$$target_name.aps.new4; \
mv $$target_folder/$$target_name.aps.new4 $$target_folder/$$target_name.aps; \ mv $$target_folder/$$target_name.aps.new4 $$target_folder/$$target_name.aps; \
rm $$target_folder/$$target_name.aps.new $$target_folder/$$target_name.aps.new2 $$target_folder/$$target_name.aps.new3; \ rm $$target_folder/$$target_name.aps.new $$target_folder/$$target_name.aps.new2 $$target_folder/$$target_name.aps.new3; \
fi; \ fi; \
done; done;
@echo AVR Studio 4 project generation complete. @echo AVR Studio 4 project generation complete.
# Check the working branch documentation, ensure no placeholder values # Check the working branch documentation, ensure no placeholder values
check-documentation-placeholders: check-documentation-placeholders:
@echo Checking for release suitability... @echo Checking for release suitability...
@if ( grep "XXXXXX" $(LUFA_ROOT)/LUFA/DoxygenPages/*.txt > /dev/null ;); then \ @if ( grep "XXXXXX" $(LUFA_ROOT)/LUFA/DoxygenPages/*.txt > /dev/null ;); then \
echo " ERROR: Doxygen documentation has not been updated for release!"; \ echo " ERROR: Doxygen documentation has not been updated for release!"; \
exit 1; \ exit 1; \
fi; fi;
@if ( grep "000000" $(LUFA_ROOT)/LUFA/Version.h > /dev/null ;); then \ @if ( grep "000000" $(LUFA_ROOT)/LUFA/Version.h > /dev/null ;); then \
echo " ERROR: Version header has not been updated for release!"; \ echo " ERROR: Version header has not been updated for release!"; \
exit 1; \ exit 1; \
fi; fi;
@echo Done. @echo Done.
# Validate the working branch - compile all documentation, demos/projects/examples and run build tests # Validate the working branch - compile all documentation, demos/projects/examples and run build tests
validate-branch: validate-branch:
make -C $(LUFA_ROOT) doxygen make -C $(LUFA_ROOT) doxygen
make -C $(LUFA_ROOT) all make -C $(LUFA_ROOT) all
make -C $(LUFA_ROOT)/BuildTests all make -C $(LUFA_ROOT)/BuildTests all
# Validate the working branch for general release, check for placeholder documentation then build and test everything # Validate the working branch for general release, check for placeholder documentation then build and test everything
validate-release: check-documentation-placeholders validate-branch validate-release: check-documentation-placeholders validate-branch

View File

@ -1,97 +1,97 @@
/** \file /** \file
* *
* This file contains special DoxyGen information for the generation of the main page and other special * This file contains special DoxyGen information for the generation of the main page and other special
* documentation pages. It is not a project source file. * documentation pages. It is not a project source file.
*/ */
/** \mainpage Simon Foster's USB Serial to HD44780 LCD Project /** \mainpage Simon Foster's USB Serial to HD44780 LCD Project
* *
* \section Sec_Compat Project Compatibility: * \section Sec_Compat Project Compatibility:
* *
* The following list indicates what microcontrollers are compatible with this project. * The following list indicates what microcontrollers are compatible with this project.
* *
* \li AT90USB162 * \li AT90USB162
* *
* \section Sec_Info USB Information: * \section Sec_Info USB Information:
* *
* The following table gives a rundown of the USB utilization of this project. * The following table gives a rundown of the USB utilization of this project.
* *
* <table> * <table>
* <tr> * <tr>
* <td><b>USB Mode:</b></td> * <td><b>USB Mode:</b></td>
* <td>Device</td> * <td>Device</td>
* </tr> * </tr>
* <tr> * <tr>
* <td><b>USB Class:</b></td> * <td><b>USB Class:</b></td>
* <td>Communications Device Class (CDC)</td> * <td>Communications Device Class (CDC)</td>
* </tr> * </tr>
* <tr> * <tr>
* <td><b>USB Subclass:</b></td> * <td><b>USB Subclass:</b></td>
* <td>Abstract Control Model (ACM)</td> * <td>Abstract Control Model (ACM)</td>
* </tr> * </tr>
* <tr> * <tr>
* <td><b>Relevant Standards:</b></td> * <td><b>Relevant Standards:</b></td>
* <td>USBIF CDC Class Standard</td> * <td>USBIF CDC Class Standard</td>
* </tr> * </tr>
* <tr> * <tr>
* <td><b>Supported USB Speeds:</b></td> * <td><b>Supported USB Speeds:</b></td>
* <td>Full Speed Mode</td> * <td>Full Speed Mode</td>
* </tr> * </tr>
* </table> * </table>
* *
* \section Sec_Description Project Description: * \section Sec_Description Project Description:
* *
* Firmware for a USB Virtual Serial to HD44780 LCD controller project, by Simon Foster. This * Firmware for a USB Virtual Serial to HD44780 LCD controller project, by Simon Foster. This
* project connects a standard HD7780 compatible LCD controller to a PC via a virtual serial * project connects a standard HD7780 compatible LCD controller to a PC via a virtual serial
* link, so that data supplied by the host can be written to the display. This project is * link, so that data supplied by the host can be written to the display. This project is
* designed to use the Minimum USB AVR board, however it can be modified to suit other hardware * designed to use the Minimum USB AVR board, however it can be modified to suit other hardware
* if desired. * if desired.
* *
* LCD Datasheet: http://www.sparkfun.com/datasheets/LCD/HD44780.pdf \n * LCD Datasheet: http://www.sparkfun.com/datasheets/LCD/HD44780.pdf \n
* More Information: http://en.wikipedia.org/wiki/HD44780_Character_LCD \n * More Information: http://en.wikipedia.org/wiki/HD44780_Character_LCD \n
* *
* Below are the connections between the AVR Minimus board and LCD. * Below are the connections between the AVR Minimus board and LCD.
* *
* <table> * <table>
* <tr> * <tr>
* <td><b>AVR Pin:</b></td> * <td><b>AVR Pin:</b></td>
* <td><b>HD44780 LCD Pin:</b></td> * <td><b>HD44780 LCD Pin:</b></td>
* </tr> * </tr>
* <tr> * <tr>
* <td>VCC</td> * <td>VCC</td>
* <td>VCC</td> * <td>VCC</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>GND</td> * <td>GND</td>
* <td>GND</td> * <td>GND</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>PD0</td> * <td>PD0</td>
* <td>DB4</td> * <td>DB4</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>PD1</td> * <td>PD1</td>
* <td>DB5</td> * <td>DB5</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>PD2</td> * <td>PD2</td>
* <td>DB6</td> * <td>DB6</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>PD3</td> * <td>PD3</td>
* <td>DB7</td> * <td>DB7</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>PD4</td> * <td>PD4</td>
* <td>/RS</td> * <td>/RS</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>GND</td> * <td>GND</td>
* <td>/RW</td> * <td>/RW</td>
* </tr> * </tr>
* <tr> * <tr>
* <td>PD7</td> * <td>PD7</td>
* <td>/E</td> * <td>/E</td>
* </tr> * </tr>
* </table> * </table>
*/ */

View File

@ -1,35 +1,35 @@
# #
# LUFA Library # LUFA Library
# Copyright (C) Dean Camera, 2012. # Copyright (C) Dean Camera, 2012.
# #
# dean [at] fourwalledcubicle [dot] com # dean [at] fourwalledcubicle [dot] com
# www.lufa-lib.org # www.lufa-lib.org
# #
# -------------------------------------- # --------------------------------------
# LUFA Project Makefile. # LUFA Project Makefile.
# -------------------------------------- # --------------------------------------
MCU = at90usb162 MCU = at90usb162
ARCH = AVR8 ARCH = AVR8
BOARD = MINIMUS BOARD = MINIMUS
F_CPU = 16000000 F_CPU = 16000000
F_USB = $(F_CPU) F_USB = $(F_CPU)
OPTIMIZATION = s OPTIMIZATION = s
TARGET = SerialToLCD TARGET = SerialToLCD
SRC = $(TARGET).c Descriptors.c Lib/HD44780.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS) SRC = $(TARGET).c Descriptors.c Lib/HD44780.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)
LUFA_PATH = ../../LUFA/ LUFA_PATH = ../../LUFA/
CC_FLAGS = -DUSE_LUFA_CONFIG_HEADER -IConfig/ CC_FLAGS = -DUSE_LUFA_CONFIG_HEADER -IConfig/
LD_FLAGS = LD_FLAGS =
# Default target # Default target
all: all:
# Include LUFA build script makefiles # Include LUFA build script makefiles
include $(LUFA_PATH)/Build/lufa.core.in include $(LUFA_PATH)/Build/lufa.core.in
include $(LUFA_PATH)/Build/lufa.sources.in include $(LUFA_PATH)/Build/lufa.sources.in
include $(LUFA_PATH)/Build/lufa.build.in include $(LUFA_PATH)/Build/lufa.build.in
include $(LUFA_PATH)/Build/lufa.cppcheck.in include $(LUFA_PATH)/Build/lufa.cppcheck.in
include $(LUFA_PATH)/Build/lufa.doxygen.in include $(LUFA_PATH)/Build/lufa.doxygen.in
include $(LUFA_PATH)/Build/lufa.dfu.in include $(LUFA_PATH)/Build/lufa.dfu.in
include $(LUFA_PATH)/Build/lufa.avrdude.in include $(LUFA_PATH)/Build/lufa.avrdude.in
include $(LUFA_PATH)/Build/lufa.atprogram.in include $(LUFA_PATH)/Build/lufa.atprogram.in