From 0ecd09c3e1d1ed47c940541c41b79815b16bd627 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Sun, 3 Apr 2016 14:51:48 +1000 Subject: Add LUFA DMBS extension modules, use DMBS in project makefiles. --- LUFA/Build/DMBS/Template/makefile | 11 +- LUFA/Build/LUFA/lufa-gcc.mk | 43 ++ LUFA/Build/LUFA/lufa-sources.mk | 95 +++ LUFA/Build/lufa_build.mk | 78 +- LUFA/Build/lufa_sources.mk | 138 +--- LUFA/CodeTemplates/makefile_template | 25 +- LUFA/DoxygenPages/BuildSystem.txt | 829 ++------------------- LUFA/DoxygenPages/ChangeLog.txt | 2 + LUFA/DoxygenPages/DevelopingWithLUFA.txt | 1 - LUFA/DoxygenPages/ExportingLibrary.txt | 112 --- .../Images/AS5_AS6_Import/AS5_AS6_Import_Step1.png | Bin 98201 -> 0 bytes .../Images/AS5_AS6_Import/AS5_AS6_Import_Step2.png | Bin 100532 -> 0 bytes .../Images/AS5_AS6_Import/AS5_AS6_Import_Step3.png | Bin 32987 -> 0 bytes .../Images/AS5_AS6_Import/AS5_AS6_Import_Step4.png | Bin 161824 -> 0 bytes .../AS5_AS6_Import/AS5_AS6_Import_Step5_1.png | Bin 43666 -> 0 bytes .../AS5_AS6_Import/AS5_AS6_Import_Step5_2.png | Bin 28918 -> 0 bytes .../AS5_AS6_Import/AS5_AS6_Import_Step5_3.png | Bin 23561 -> 0 bytes LUFA/DoxygenPages/ProgrammingApps.txt | 3 - LUFA/doxyfile | 1 + LUFA/makefile | 43 +- 20 files changed, 243 insertions(+), 1138 deletions(-) create mode 100644 LUFA/Build/LUFA/lufa-gcc.mk create mode 100644 LUFA/Build/LUFA/lufa-sources.mk delete mode 100644 LUFA/DoxygenPages/ExportingLibrary.txt delete mode 100644 LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step1.png delete mode 100644 LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step2.png delete mode 100644 LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step3.png delete mode 100644 LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step4.png delete mode 100644 LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step5_1.png delete mode 100644 LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step5_2.png delete mode 100644 LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step5_3.png (limited to 'LUFA') diff --git a/LUFA/Build/DMBS/Template/makefile b/LUFA/Build/DMBS/Template/makefile index d88292388..ba60ab9c2 100644 --- a/LUFA/Build/DMBS/Template/makefile +++ b/LUFA/Build/DMBS/Template/makefile @@ -20,13 +20,18 @@ LD_FLAGS = # Default target all: -# Include DMBS build script makefiles -DMBS_PATH ?= ../DMBS +# Include LUFA-specific DMBS extension modules +DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA +include $(DMBS_LUFA_PATH)/lufa-sources.mk +include $(DMBS_LUFA_PATH)/lufa-gcc.mk + +# Include common DMBS build system modules +DMBS_PATH ?= $(LUFA_PATH)/Build/DMBS/DMBS include $(DMBS_PATH)/core.mk -include $(DMBS_PATH)/gcc.mk include $(DMBS_PATH)/cppcheck.mk include $(DMBS_PATH)/doxygen.mk include $(DMBS_PATH)/dfu.mk +include $(DMBS_PATH)/gcc.mk include $(DMBS_PATH)/hid.mk include $(DMBS_PATH)/avrdude.mk include $(DMBS_PATH)/atprogram.mk diff --git a/LUFA/Build/LUFA/lufa-gcc.mk b/LUFA/Build/LUFA/lufa-gcc.mk new file mode 100644 index 000000000..f824362e4 --- /dev/null +++ b/LUFA/Build/LUFA/lufa-gcc.mk @@ -0,0 +1,43 @@ +# +# LUFA Library +# Copyright (C) Dean Camera, 2015. +# +# dean [at] fourwalledcubicle [dot] com +# www.lufa-lib.org +# + +DMBS_BUILD_MODULES += LUFA_GCC +DMBS_BUILD_TARGETS += +DMBS_BUILD_MANDATORY_VARS += LUFA_PATH ARCH F_USB +DMBS_BUILD_OPTIONAL_VARS += BOARD +DMBS_BUILD_PROVIDED_VARS += +DMBS_BUILD_PROVIDED_MACROS += + +SHELL = /bin/sh + +ERROR_IF_UNSET ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set)) +ERROR_IF_EMPTY ?= $(if $(strip $($(strip $(1)))), , $(error Makefile $(strip $(1)) option cannot be blank)) +ERROR_IF_NONBOOL ?= $(if $(filter Y N, $($(strip $(1)))), , $(error Makefile $(strip $(1)) option must be Y or N)) + +# Sanity check user supplied values +$(call ERROR_IF_EMPTY, LUFA_PATH) +$(call ERROR_IF_EMPTY, ARCH) +$(call ERROR_IF_EMPTY, F_USB) + +# Default values of optionally user-supplied variables +BOARD ?= NONE + +# Determine the utility prefix to use for the selected architecture +ifeq ($(ARCH), XMEGA) + $(warning The XMEGA device support is currently EXPERIMENTAL (incomplete and/or non-functional), and is included for preview purposes only.) +else ifeq ($(ARCH), UC3) + $(warning The UC3 device support is currently EXPERIMENTAL (incomplete and/or non-functional), and is included for preview purposes only.) +endif + +# Common LUFA C/C++ includes/definitions +LUFA_CXX_INCLUDES = -I. -I$(patsubst %/,%,$(LUFA_PATH))/.. +LUFA_CXX_DEFINES = -DARCH=ARCH_$(ARCH) -DBOARD=BOARD_$(BOARD) -DF_USB=$(F_USB)UL + +# LUFA specific standard build options +C_FLAGS += $(LUFA_CXX_INCLUDES) $(LUFA_CXX_DEFINES) $(LUFA_CXX_FLAGS) +CPP_FLAGS += $(LUFA_CXX_INCLUDES) $(LUFA_CXX_DEFINES) $(LUFA_CXX_FLAGS) diff --git a/LUFA/Build/LUFA/lufa-sources.mk b/LUFA/Build/LUFA/lufa-sources.mk new file mode 100644 index 000000000..7ca9a28dc --- /dev/null +++ b/LUFA/Build/LUFA/lufa-sources.mk @@ -0,0 +1,95 @@ +# +# LUFA Library +# Copyright (C) Dean Camera, 2015. +# +# dean [at] fourwalledcubicle [dot] com +# www.lufa-lib.org +# + +DMBS_BUILD_MODULES += LUFA_SOURCES +DMBS_BUILD_TARGETS += +DMBS_BUILD_MANDATORY_VARS += LUFA_PATH ARCH +DMBS_BUILD_OPTIONAL_VARS += +DMBS_BUILD_PROVIDED_VARS += LUFA_SRC_USB_DEVICE LUFA_SRC_USB_HOST \ + LUFA_SRC_USB LUFA_SRC_USBCLASS_DEVICE \ + LUFA_SRC_USBCLASS_HOST LUFA_SRC_USBCLASS \ + LUFA_SRC_TEMPERATURE LUFA_SRC_SERIAL \ + LUFA_SRC_TWI LUFA_SRC_PLATFORM +DMBS_BUILD_PROVIDED_MACROS += + +SHELL = /bin/sh + +ERROR_IF_UNSET ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set)) +ERROR_IF_EMPTY ?= $(if $(strip $($(strip $(1)))), , $(error Makefile $(strip $(1)) option cannot be blank)) +ERROR_IF_NONBOOL ?= $(if $(filter Y N, $($(strip $(1)))), , $(error Makefile $(strip $(1)) option must be Y or N)) + +# Sanity check user supplied values +$(foreach MANDATORY_VAR, $(LUFA_BUILD_MANDATORY_VARS), $(call ERROR_IF_UNSET, $(MANDATORY_VAR))) +$(call ERROR_IF_EMPTY, LUFA_PATH) +$(call ERROR_IF_EMPTY, ARCH) + +# Allow LUFA_ROOT_PATH to be overridden elsewhere to support legacy LUFA makefiles +LUFA_ROOT_PATH ?= $(patsubst %/,%,$(LUFA_PATH)) + +# Construct LUFA module source variables +LUFA_SRC_USB_COMMON := $(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/ConfigDescriptors.c \ + $(LUFA_ROOT_PATH)/Drivers/USB/Core/Events.c \ + $(LUFA_ROOT_PATH)/Drivers/USB/Core/USBTask.c \ + $(LUFA_ROOT_PATH)/Drivers/USB/Class/Common/HIDParser.c \ + +LUFA_SRC_USB_HOST := $(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)/PipeStream_$(ARCH).c \ + $(LUFA_ROOT_PATH)/Drivers/USB/Core/HostStandardReq.c \ + $(LUFA_SRC_USB_COMMON) + +LUFA_SRC_USB_DEVICE := $(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)/EndpointStream_$(ARCH).c \ + $(LUFA_ROOT_PATH)/Drivers/USB/Core/DeviceStandardReq.c \ + $(LUFA_SRC_USB_COMMON) + +LUFA_SRC_USBCLASS_DEVICE := $(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/HIDClassDevice.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/PrinterClassDevice.c \ + $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/RNDISClassDevice.c \ + +LUFA_SRC_USBCLASS_HOST := $(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/CDCClassHost.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/MIDIClassHost.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/StillImageClassHost.c + +LUFA_SRC_USB := $(sort $(LUFA_SRC_USB_COMMON) $(LUFA_SRC_USB_HOST) $(LUFA_SRC_USB_DEVICE)) + +LUFA_SRC_USBCLASS := $(LUFA_SRC_USBCLASS_DEVICE) $(LUFA_SRC_USBCLASS_HOST) + +LUFA_SRC_TEMPERATURE := $(LUFA_ROOT_PATH)/Drivers/Board/Temperature.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 + +ifeq ($(ARCH), UC3) + LUFA_SRC_PLATFORM := $(LUFA_ROOT_PATH)/Platform/UC3/Exception.S \ + $(LUFA_ROOT_PATH)/Platform/UC3/InterruptManagement.c +else + LUFA_SRC_PLATFORM := +endif + +# Build a list of all available module sources +LUFA_SRC_ALL_FILES := $(LUFA_SRC_USB) \ + $(LUFA_SRC_USBCLASS) \ + $(LUFA_SRC_TEMPERATURE) \ + $(LUFA_SRC_SERIAL) \ + $(LUFA_SRC_TWI) \ + $(LUFA_SRC_PLATFORM) diff --git a/LUFA/Build/lufa_build.mk b/LUFA/Build/lufa_build.mk index d20493ea2..f7c496e18 100644 --- a/LUFA/Build/lufa_build.mk +++ b/LUFA/Build/lufa_build.mk @@ -6,79 +6,7 @@ # www.lufa-lib.org # -DMBS_BUILD_MODULES += -DMBS_BUILD_TARGETS += -DMBS_BUILD_MANDATORY_VARS += LUFA_PATH ARCH F_USB -DMBS_BUILD_OPTIONAL_VARS += BOARD -DMBS_BUILD_PROVIDED_VARS += -DMBS_BUILD_PROVIDED_MACROS += - -# ----------------------------------------------------------------------------- -# LUFA Core Build Buildsystem Makefile Module. -# ----------------------------------------------------------------------------- -# DESCRIPTION: -# Subclass of the standard DMBS GCC build module, with LUFA specific -# extensions. This module provides the core build rules for the compilation -# of LUFA projects using GCC. -# ----------------------------------------------------------------------------- -# TARGETS: -# -# (None) -# -# MANDATORY PARAMETERS: -# -# LUFA_PATH - Path to the LUFA library core -# ARCH - Device architecture name -# F_USB - Speed of the USB core clock, in Hz -# -# OPTIONAL PARAMETERS: -# -# BOARD - LUFA board drivers to use -# -# PROVIDED VARIABLES: -# -# (None) -# -# PROVIDED MACROS: -# -# (None) -# -# ----------------------------------------------------------------------------- - -SHELL = /bin/sh - -ERROR_IF_UNSET ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set)) -ERROR_IF_EMPTY ?= $(if $(strip $($(strip $(1)))), , $(error Makefile $(strip $(1)) option cannot be blank)) -ERROR_IF_NONBOOL ?= $(if $(filter Y N, $($(strip $(1)))), , $(error Makefile $(strip $(1)) option must be Y or N)) - -# Sanity check user supplied values -$(call ERROR_IF_EMPTY, LUFA_PATH) -$(call ERROR_IF_EMPTY, ARCH) -$(call ERROR_IF_EMPTY, F_USB) - -# Default values of optionally user-supplied variables -BOARD ?= NONE - -# Determine the utility prefix to use for the selected architecture -ifeq ($(ARCH), XMEGA) - $(warning The XMEGA device support is currently EXPERIMENTAL (incomplete and/or non-functional), and is included for preview purposes only.) -else ifeq ($(ARCH), UC3) - $(warning The UC3 device support is currently EXPERIMENTAL (incomplete and/or non-functional), and is included for preview purposes only.) -endif - -# Common LUFA C/C++ includes/definitions -LUFA_CXX_INCLUDES = -I. -I$(patsubst %/,%,$(LUFA_PATH))/.. -LUFA_CXX_DEFINES = -DARCH=ARCH_$(ARCH) -DBOARD=BOARD_$(BOARD) -DF_USB=$(F_USB)UL - -# This flag is required for bootloaders as GCC will emit invalid jump table -# assembly code for devices with large amounts of flash; the jump table target -# is extracted from FLASH without using the correct ELPM instruction, resulting -# in a pseudo-random jump target. -LUFA_CXX_FLAGS = -fno-jump-tables - -# LUFA specific standard build options -C_FLAGS += $(LUFA_CXX_INCLUDES) $(LUFA_CXX_DEFINES) $(LUFA_CXX_FLAGS) -CPP_FLAGS += $(LUFA_CXX_INCLUDES) $(LUFA_CXX_DEFINES) $(LUFA_CXX_FLAGS) - -DMBS_PATH := $(LUFA_PATH)/Build/DMBS/DMBS +DMBS_PATH ?= $(LUFA_PATH)/Build/DMBS/DMBS +DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA include $(DMBS_PATH)/gcc.mk +include $(DMBS_LUFA_PATH)/lufa-gcc.mk diff --git a/LUFA/Build/lufa_sources.mk b/LUFA/Build/lufa_sources.mk index 0764d30f1..48291c731 100644 --- a/LUFA/Build/lufa_sources.mk +++ b/LUFA/Build/lufa_sources.mk @@ -6,139 +6,5 @@ # www.lufa-lib.org # -DMBS_BUILD_MODULES += LUFA_SOURCES -DMBS_BUILD_TARGETS += -DMBS_BUILD_MANDATORY_VARS += LUFA_PATH ARCH -DMBS_BUILD_OPTIONAL_VARS += -DMBS_BUILD_PROVIDED_VARS += LUFA_SRC_USB_DEVICE LUFA_SRC_USB_HOST \ - LUFA_SRC_USB LUFA_SRC_USBCLASS_DEVICE \ - LUFA_SRC_USBCLASS_HOST LUFA_SRC_USBCLASS \ - LUFA_SRC_TEMPERATURE LUFA_SRC_SERIAL \ - LUFA_SRC_TWI LUFA_SRC_PLATFORM -DMBS_BUILD_PROVIDED_MACROS += - -# ----------------------------------------------------------------------------- -# LUFA Sources Buildsystem Makefile Module. -# ----------------------------------------------------------------------------- -# DESCRIPTION: -# 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 -# available using the makefile variable names listed in the LUFA project -# documentation. -# ----------------------------------------------------------------------------- -# TARGETS: -# -# (None) -# -# MANDATORY PARAMETERS: -# -# LUFA_PATH - Path to the LUFA library core -# ARCH - Device architecture name -# -# OPTIONAL PARAMETERS: -# -# (None) -# -# PROVIDED VARIABLES: -# -# LUFA_SRC_USB_DEVICE - List of LUFA USB driver source files required -# for USB Device mode only -# LUFA_SRC_USB_HOST - List of LUFA USB driver source files required -# for USB Host mode only -# LUFA_SRC_USB - List of LUFA USB driver source files for all -# USB modes -# LUFA_SRC_USBCLASS_DEVICE - List of LUFA USB Class driver source files for -# USB Device mode only -# LUFA_SRC_USBCLASS_HOST - List of LUFA USB Class driver source files for -# USB Host mode only -# LUFA_SRC_USBCLASS - List of LUFA USB Class driver source files for -# all USB modes -# LUFA_SRC_TEMPERATURE - List of LUFA temperature sensor driver source -# files -# LUFA_SRC_SERIAL - List of LUFA Serial U(S)ART driver source files -# LUFA_SRC_TWI - List of LUFA TWI driver source files -# LUFA_SRC_PLATFORM - List of LUFA architecture specific platform -# management source files -# -# PROVIDED MACROS: -# -# (None) -# -# ----------------------------------------------------------------------------- - -SHELL = /bin/sh - -ERROR_IF_UNSET ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set)) -ERROR_IF_EMPTY ?= $(if $(strip $($(strip $(1)))), , $(error Makefile $(strip $(1)) option cannot be blank)) -ERROR_IF_NONBOOL ?= $(if $(filter Y N, $($(strip $(1)))), , $(error Makefile $(strip $(1)) option must be Y or N)) - -# Sanity check user supplied values -$(foreach MANDATORY_VAR, $(LUFA_BUILD_MANDATORY_VARS), $(call ERROR_IF_UNSET, $(MANDATORY_VAR))) -$(call ERROR_IF_EMPTY, LUFA_PATH) -$(call ERROR_IF_EMPTY, ARCH) - -# Allow LUFA_ROOT_PATH to be overridden elsewhere to support legacy LUFA makefiles -LUFA_ROOT_PATH ?= $(patsubst %/,%,$(LUFA_PATH)) - -# Construct LUFA module source variables -LUFA_SRC_USB_COMMON := $(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/ConfigDescriptors.c \ - $(LUFA_ROOT_PATH)/Drivers/USB/Core/Events.c \ - $(LUFA_ROOT_PATH)/Drivers/USB/Core/USBTask.c \ - $(LUFA_ROOT_PATH)/Drivers/USB/Class/Common/HIDParser.c \ - -LUFA_SRC_USB_HOST := $(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)/PipeStream_$(ARCH).c \ - $(LUFA_ROOT_PATH)/Drivers/USB/Core/HostStandardReq.c \ - $(LUFA_SRC_USB_COMMON) - -LUFA_SRC_USB_DEVICE := $(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)/EndpointStream_$(ARCH).c \ - $(LUFA_ROOT_PATH)/Drivers/USB/Core/DeviceStandardReq.c \ - $(LUFA_SRC_USB_COMMON) - -LUFA_SRC_USBCLASS_DEVICE := $(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/HIDClassDevice.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/PrinterClassDevice.c \ - $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/RNDISClassDevice.c \ - -LUFA_SRC_USBCLASS_HOST := $(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/CDCClassHost.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/MIDIClassHost.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/StillImageClassHost.c - -LUFA_SRC_USB := $(sort $(LUFA_SRC_USB_COMMON) $(LUFA_SRC_USB_HOST) $(LUFA_SRC_USB_DEVICE)) - -LUFA_SRC_USBCLASS := $(LUFA_SRC_USBCLASS_DEVICE) $(LUFA_SRC_USBCLASS_HOST) - -LUFA_SRC_TEMPERATURE := $(LUFA_ROOT_PATH)/Drivers/Board/Temperature.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 - -ifeq ($(ARCH), UC3) - LUFA_SRC_PLATFORM := $(LUFA_ROOT_PATH)/Platform/UC3/Exception.S \ - $(LUFA_ROOT_PATH)/Platform/UC3/InterruptManagement.c -else - LUFA_SRC_PLATFORM := -endif - -# Build a list of all available module sources -LUFA_SRC_ALL_FILES := $(LUFA_SRC_USB) \ - $(LUFA_SRC_USBCLASS) \ - $(LUFA_SRC_TEMPERATURE) \ - $(LUFA_SRC_SERIAL) \ - $(LUFA_SRC_TWI) \ - $(LUFA_SRC_PLATFORM) +DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA +include $(DMBS_LUFA_PATH)/lufa-sources.mk diff --git a/LUFA/CodeTemplates/makefile_template b/LUFA/CodeTemplates/makefile_template index dc8fc7356..291da359c 100644 --- a/LUFA/CodeTemplates/makefile_template +++ b/LUFA/CodeTemplates/makefile_template @@ -26,13 +26,18 @@ LD_FLAGS = # Default target all: -# Include LUFA build script makefiles -include $(LUFA_PATH)/Build/lufa_core.mk -include $(LUFA_PATH)/Build/lufa_sources.mk -include $(LUFA_PATH)/Build/lufa_build.mk -include $(LUFA_PATH)/Build/lufa_cppcheck.mk -include $(LUFA_PATH)/Build/lufa_doxygen.mk -include $(LUFA_PATH)/Build/lufa_dfu.mk -include $(LUFA_PATH)/Build/lufa_hid.mk -include $(LUFA_PATH)/Build/lufa_avrdude.mk -include $(LUFA_PATH)/Build/lufa_atprogram.mk +# Include LUFA-specific DMBS extension modules +DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA +include $(DMBS_LUFA_PATH)/lufa-sources.mk +include $(DMBS_LUFA_PATH)/lufa-gcc.mk + +# Include common DMBS build system modules +DMBS_PATH ?= $(LUFA_PATH)/Build/DMBS/DMBS +include $(DMBS_PATH)/core.mk +include $(DMBS_PATH)/cppcheck.mk +include $(DMBS_PATH)/doxygen.mk +include $(DMBS_PATH)/dfu.mk +include $(DMBS_PATH)/gcc.mk +include $(DMBS_PATH)/hid.mk +include $(DMBS_PATH)/avrdude.mk +include $(DMBS_PATH)/atprogram.mk diff --git a/LUFA/DoxygenPages/BuildSystem.txt b/LUFA/DoxygenPages/BuildSystem.txt index d5e051b79..ef57fcf0c 100644 --- a/LUFA/DoxygenPages/BuildSystem.txt +++ b/LUFA/DoxygenPages/BuildSystem.txt @@ -14,790 +14,99 @@ * * As it turned out to be fairly generic in nature, it was split out into its * own separate project, called DMBS (Dean's Makefile Build System) - * which is released into the public domain. LUFA specific portions of the + * which is released into the public domain. LUFA-specific portions of the * LUFA build system extend DMBS, and provide a universal build system for all * LUFA projects. * - * The latest DMBS project information can be found at: + * The latest DMBS project information and documentation can be found at: * https://github.com/abcminiuser/dmbs * * DMBS is written in GNU Make, and each module is independent of one-another. * - * \section SSec_BuildSystem_Using Using the LUFA Build System + * LUFA now uses DMBS for its build system, with some LUFA specific extension + * modules. * - * For details on the prerequisites needed for Linux and Windows machines to be able to use the LUFA - * build system, see \ref Sec_CompilingApps_Prerequisites. + * If you have problems building using LUFA, see \subpage Page_BuildTroubleshooting for resolution steps. * - * To use a LUFA build system module, simply add an include to your project makefile. All user projects - * should at a minimum include \ref Page_BuildModule_CORE for base functionality: - * \code - * include $(LUFA_PATH)/Build/lufa_core.mk - * \endcode - * - * Once included in your project makefile, the associated build module targets will be added to your - * project's build makefile targets automatically. To call a build target, run make {TARGET_NAME} - * from the command line, substituting in the appropriate target name. - * - * \see \ref Sec_ConfiguringApps_AppMakefileParams for a copy of the sample LUFA project makefile. - * - * Each build module may have one or more mandatory parameters (GNU Make variables) which must - * be supplied in the project makefile for the module to work, and one or more optional parameters which - * may be defined and which will assume a sensible default if not. - * - * \section SSec_BuildSystem_Modules Available Modules - * - * The following modules are included in this LUFA release: - * - * \li \subpage Page_BuildModule_ATPROGRAM - Device Programming - * \li \subpage Page_BuildModule_AVRDUDE - Device Programming - * \li \subpage Page_BuildModule_BUILD - Compiling/Assembling/Linking - * \li \subpage Page_BuildModule_CORE - Core Build System Functions - * \li \subpage Page_BuildModule_CPPCHECK - Static Code Analysis - * \li \subpage Page_BuildModule_DFU - Device Programming - * \li \subpage Page_BuildModule_DOXYGEN - Automated Source Code Documentation - * \li \subpage Page_BuildModule_HID - Device Programming - * \li \subpage Page_BuildModule_SOURCES - LUFA Module Source Code Variables - * - * If you have problems building using the LUFA build system, see \subpage Page_BuildTroubleshooting for resolution steps. - */ - - /** \page Page_BuildModule_BUILD The BUILD build module - * - * The BUILD LUFA build system module, providing targets for the compilation, - * assembling and linking of an application from source code into binary files - * suitable for programming into a target device, using the GCC compiler. - * - * To use this module in your application makefile, add the following code: - * \code - * include $(LUFA_PATH)/Build/lufa_build.mk - * \endcode - * - * \section SSec_BuildModule_BUILD_Requirements Requirements - * This module requires the the architecture appropriate binaries of the GCC compiler are available in your - * system's PATH variable. The GCC compiler and associated toolchain is distributed in Atmel AVR Studio - * 5.x and Atmel Studio 6.x installation directories, as well as in many third party distribution packages. - * - * \section SSec_BuildModule_BUILD_Targets Targets - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
sizeDisplay size of the compiled application FLASH and SRAM segments.
symbol-sizesDisplay a size-sorted list of symbols from the compiled application, in decimal bytes.
libBuild and archive all source files into a library A binary file.
allBuild and link the application into ELF debug and HEX binary files.
elfBuild and link the application into an ELF debug file.
binBuild and link the application and produce a BIN binary file.
hexBuild and link the application and produce HEX and EEP binary files.
lssBuild and link the application and produce a LSS source code/assembly code mixed listing file.
cleanRemove all intermediary files and binary output files.
mostlycleanRemove all intermediary files but preserve any binary output files.
<filename>.sCreate an assembly listing of a given input C/C++ source file.
- * - * \section SSec_BuildModule_BUILD_MandatoryParams Mandatory Parameters - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
TARGETName of the application output file prefix (e.g. TestApplication).
ARCHArchitecture of the target processor (see \ref Page_DeviceSupport).
MCUName of the Atmel processor model (e.g. at90usb1287).
SRCList of relative or absolute paths to the application C (.c), C++ (.cpp) and Assembly (.S) source files.
F_USBSpeed in Hz of the input clock frequency to the target's USB controller.
LUFA_PATHPath to the LUFA library core, either relative or absolute (e.g. ../LUFA-000000/LUFA/).
- * - * \section SSec_BuildModule_BUILD_OptionalParams Optional Parameters - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
BOARDLUFA board hardware drivers to use (see \ref Page_DeviceSupport).
OPTIMIZATIONOptimization level to use when compiling source files (see GCC manual).
C_STANDARDVersion of the C standard to apply when compiling C++ source files (see GCC manual).
CPP_STANDARDVersion of the C++ standard to apply when compiling C++ source files (see GCC manual).
DEBUG_FORMATFormat of the debug information to embed in the generated object files (see GCC manual).
DEBUG_LEVELLevel of the debugging information to embed in the generated object files (see GCC manual).
F_CPUSpeed of the processor CPU clock, in Hz.
C_FLAGSFlags to pass to the C compiler only, after the automatically generated flags.
CPP_FLAGSFlags to pass to the C++ compiler only, after the automatically generated flags.
ASM_FLAGSFlags to pass to the assembler only, after the automatically generated flags.
CC_FLAGSCommon flags to pass to the C/C++ compiler and assembler, after the automatically generated flags.
COMPILER_PATHDirectory where the C/C++ toolchain is located, if not available in the system PATH.
LD_FLAGSFlags to pass to the linker, after the automatically generated flags.
LINKER_RELAXATIONSEnables or disables linker relaxations when linking the application binary. This can reduce the total size - * of the application by replacing full \c CALL instructions with smaller \c RCALL instructions where possible. - * \note On some unpatched versions of binutils, this can cause link failures in some circumstances. If you - * receive a link error relocation truncated to fit: R_AVR_13_PCREL, disable this setting.
OBJDIRDirectory to place the generated object and dependency files. If set to "." the same folder as the source file will be used. - * \note When this option is enabled, all source filenames must be unique.
OBJECT_FILESList of additional object files that should be linked into the resulting binary.
- * - * \section SSec_BuildModule_BUILD_ProvidedVariables Module Provided Variables - * - * - * - * - * - *
None
- * - * \section SSec_BuildModule_BUILD_ProvidedMacros Module Provided Macros - * - * - * - * - * - *
None
- */ - -/** \page Page_BuildModule_CORE The CORE build module - * - * The core LUFA build system module, providing common build system help and information targets. - * - * To use this module in your application makefile, add the following code: - * \code - * include $(LUFA_PATH)/Build/lufa_core.mk - * \endcode - * - * \section SSec_BuildModule_CORE_Requirements Requirements - * This module has no requirements outside a standard *nix shell like environment; the sh - * shell, GNU make and *nix CoreUtils (echo, printf, etc.). - * - * \section SSec_BuildModule_CORE_Targets Targets - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
helpDisplay build system help and configuration information.
list_targetsList all available build targets from the build system.
list_modulesList all available build modules from the build system.
list_mandatoryList all mandatory parameters required by the included modules.
list_optionalList all optional parameters required by the included modules.
list_providedList all variables provided by the included modules.
list_macrosList all macros provided by the included modules.
- * - * \section SSec_BuildModule_CORE_MandatoryParams Mandatory Parameters - * - * - * - * - * - *
None
- * - * \section SSec_BuildModule_CORE_OptionalParams Optional Parameters - * - * - * - * - * - *
None
- * - * \section SSec_BuildModule_CORE_ProvidedVariables Module Provided Variables - * - * - * - * - * - *
None
- * - * \section SSec_BuildModule_CORE_ProvidedMacros Module Provided Macros - * - * - * - * - * - *
None
- */ - -/** \page Page_BuildModule_ATPROGRAM The ATPROGRAM build module - * - * The ATPROGRAM programming utility LUFA build system module, providing targets to reprogram an - * Atmel processor FLASH and EEPROM memories with a project's compiled binary output files. - * - * To use this module in your application makefile, add the following code: - * \code - * include $(LUFA_PATH)/Build/lufa_atprogram.mk - * \endcode - * - * \section SSec_BuildModule_ATPROGRAM_Requirements Requirements - * This module requires the atprogram.exe utility to be available in your system's PATH - * variable. The atprogram.exe utility is distributed in Atmel AVR Studio 5.x and Atmel Studio 6.x - * inside the application install folder's "\atbackend" subdirectory. - * - * \section SSec_BuildModule_ATPROGRAM_Targets Targets - * - * - * - * - * - * - * - * - * - * - *
atprogramProgram the device FLASH memory with the application's executable data.
atprogram-eeProgram the device EEPROM memory with the application's EEPROM data.
- * - * \section SSec_BuildModule_ATPROGRAM_MandatoryParams Mandatory Parameters - * - * - * - * - * - * - * - * - * - * - *
MCUName of the Atmel processor model (e.g. at90usb1287).
TARGETName of the application output file prefix (e.g. TestApplication).
- * - * \section SSec_BuildModule_ATPROGRAM_OptionalParams Optional Parameters - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
ATPROGRAM_PROGRAMMERName of the Atmel programmer or debugger tool to communicate with (e.g. jtagice3).
ATPROGRAM_INTERFACEName of the programming interface to use when programming the target (e.g. spi).
ATPROGRAM_PORTName of the communication port to use when when programming with a serially connected tool (e.g. COM2).
- * - * \section SSec_BuildModule_ATPROGRAM_ProvidedVariables Module Provided Variables - * - * - * - * - * - *
None
- * - * \section SSec_BuildModule_ATPROGRAM_ProvidedMacros Module Provided Macros - * - * - * - * - * - *
None
- */ - -/** \page Page_BuildModule_AVRDUDE The AVRDUDE build module - * - * The AVRDUDE programming utility LUFA build system module, providing targets to reprogram an - * Atmel processor FLASH and EEPROM memories with a project's compiled binary output files. - * - * To use this module in your application makefile, add the following code: - * \code - * include $(LUFA_PATH)/Build/lufa_avrdude.mk - * \endcode - * - * \section SSec_BuildModule_AVRDUDE_Requirements Requirements - * This module requires the avrdude utility to be available in your system's PATH - * variable. The avrdude utility is distributed in the old WinAVR project releases for - * Windows (http://winavr.sourceforge.net) or can be installed on *nix systems via the project's - * source code (https://savannah.nongnu.org/projects/avrdude) or through the package manager. - * - * \section SSec_BuildModule_AVRDUDE_Targets Targets - * - * - * - * - * - * - * - * - * - * - *
avrdudeProgram the device FLASH memory with the application's executable data.
avrdude-eeProgram the device EEPROM memory with the application's EEPROM data.
- * - * \section SSec_BuildModule_AVRDUDE_MandatoryParams Mandatory Parameters - * - * - * - * - * - * - * - * - * - * - *
MCUName of the Atmel processor model (e.g. at90usb1287).
TARGETName of the application output file prefix (e.g. TestApplication).
- * - * \section SSec_BuildModule_AVRDUDE_OptionalParams Optional Parameters - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
AVRDUDE_PROGRAMMERName of the programmer or debugger tool to communicate with (e.g. jtagicemkii).
AVRDUDE_PORTName of the communication port to use when when programming with the connected tool (e.g. COM2, /dev/ttyUSB0 or usb).
AVRDUDE_FLAGSAdditional flags to pass to avrdude when programming, applied after the automatically generated flags.
AVRDUDE_MEMORYMain memory space used when programming in an application *e.g. application for a DFU bootloader, or flash for a regular programmer).
- * - * \section SSec_BuildModule_AVRDUDE_ProvidedVariables Module Provided Variables - * - * - * - * - * - *
None
- * - * \section SSec_BuildModule_AVRDUDE_ProvidedMacros Module Provided Macros - * - * - * - * - * - *
None
- */ - - /** \page Page_BuildModule_CPPCHECK The CPPCHECK build module - * - * The CPPCHECK programming utility LUFA build system module, providing targets to statically - * analyze C and C++ source code for errors and performance/style issues. - * - * To use this module in your application makefile, add the following code: - * \code - * include $(LUFA_PATH)/Build/lufa_cppcheck.mk - * \endcode - * - * \section SSec_BuildModule_CPPCHECK_Requirements Requirements - * This module requires the cppcheck utility to be available in your system's PATH - * variable. The cppcheck utility is distributed through the project's home page - * (http://cppcheck.sourceforge.net) for Windows, and can be installed on *nix systems via - * the project's source code or through the package manager. - * - * \section SSec_BuildModule_CPPCHECK_Targets Targets - * - * - * - * - * - * - * - * - * - * - *
cppcheckStatically analyze the project source code for issues.
cppcheck-configCheck the cppcheck configuration - scan source code and warn about missing header files and other issues.
- * - * \section SSec_BuildModule_CPPCHECK_MandatoryParams Mandatory Parameters - * - * - * - * - * - * - *
SRCList of source files to statically analyze.
- * - * \section SSec_BuildModule_CPPCHECK_OptionalParams Optional Parameters - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
CPPCHECK_INCLUDESPath of extra directories to check when attemting to resolve C/C++ header file includes.
CPPCHECK_EXCLUDESPaths or path fragments to exclude when analyzing.
CPPCHECK_MSG_TEMPLATEOutput message template to use when printing errors, warnings and information (see cppcheck documentation).
CPPCHECK_ENABLEAnalysis rule categories to enable (see cppcheck documentation).
CPPCHECK_SUPPRESSSpecific analysis rules to suppress (see cppcheck documentation).
CPPCHECK_FAIL_ON_WARNINGSet to Y to fail the analysis job with an error exit code if warnings are found, N to continue without failing.
CPPCHECK_QUIETSet to Y to suppress all output except warnings and errors, N to show verbose output information.
CPPCHECK_FLAGSExtra flags to pass to cppcheck, after the automatically generated flags.
- * - * \section SSec_BuildModule_CPPCHECK_ProvidedVariables Module Provided Variables - * - * - * - * - * - *
None
- * - * \section SSec_BuildModule_CPPCHECK_ProvidedMacros Module Provided Macros - * - * - * - * - * - *
None
+ * \li \subpage Page_BuildModule_LUFA_SOURCES - The LUFA SOURCES extension module for DMBS + * \li \subpage Page_BuildModule_LUFA_GCC - The LUFA GCC extension module for DMBS */ - /** \page Page_BuildModule_DFU The DFU build module +/** \page Page_BuildModule_LUFA_SOURCES LUFA SOURCES extension module for DMBS * - * The DFU programming utility LUFA build system module, providing targets to reprogram an - * Atmel processor FLASH and EEPROM memories with a project's compiled binary output files. - * This module requires a DFU class bootloader to be running in the target, compatible with - * the DFU bootloader protocol as published by Atmel. + * The LUFA SOURCES extension more for DMBS provides LUFA specific variables + * listing the various LUFA source files required to be build by a project for + * a given LUFA module. This module gives a way to reference LUFA source files + * symbolically, so that changes to the library structure do not break the + * library makefile. * * To use this module in your application makefile, add the following code: * \code - * include $(LUFA_PATH)/Build/lufa_dfu.mk + * include $(LUFA_PATH)/Build/LUFA/lufa-sources.mk * \endcode * - * \section SSec_BuildModule_DFU_Requirements Requirements - * This module requires either the batchisp utility from Atmel's FLIP utility, or the open - * source dfu-programmer utility (http://dfu-programmer.sourceforge.net/) to be - * available in your system's PATH variable. On *nix systems the dfu-programmer utility - * can be installed via the project's source code or through the package manager. - * - * \section SSec_BuildModule_DFU_Targets Targets - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
dfuProgram the device FLASH memory with the application's executable data using dfu-programmer.
dfu-eeProgram the device EEPROM memory with the application's EEPROM data using dfu-programmer.
flipProgram the device FLASH memory with the application's executable data using batchisp.
flip-eeProgram the device EEPROM memory with the application's EEPROM data using batchisp.
- * - * \section SSec_BuildModule_DFU_MandatoryParams Mandatory Parameters - * - * - * - * - * - * - * - * - * - * - *
MCUName of the Atmel processor model (e.g. at90usb1287).
TARGETName of the application output file prefix (e.g. TestApplication).
- * - * \section SSec_BuildModule_DFU_OptionalParams Optional Parameters - * - * - * - * - * - *
None
- * - * \section SSec_BuildModule_DFU_ProvidedVariables Module Provided Variables - * - * - * - * - * - *
None
+ * \section SSec_BuildModule_LUFA_SOURCES_Requirements Requirements + * None. * - * \section SSec_BuildModule_DFU_ProvidedMacros Module Provided Macros + * \section SSec_BuildModule_LUFA_SOURCES_Targets Targets * * * * * *
None
- */ - - /** \page Page_BuildModule_DOXYGEN The DOXYGEN build module - * - * The DOXYGEN code documentation utility LUFA build system module, providing targets to generate - * project HTML and other format documentation from a set of source files that include special - * Doxygen comments. - * - * To use this module in your application makefile, add the following code: - * \code - * include $(LUFA_PATH)/Build/lufa_doxygen.mk - * \endcode - * - * \section SSec_BuildModule_DOXYGEN_Requirements Requirements - * This module requires the doxygen utility from the Doxygen website - * (http://www.doxygen.org/) to be available in your system's PATH variable. On *nix - * systems the doxygen utility can be installed via the project's source code or through - * the package manager. - * - * \section SSec_BuildModule_DOXYGEN_Targets Targets - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
doxygenGenerate project documentation.
doxygen_createCreate a new Doxygen configuration file using the latest template.
doxygen_upgradeUpgrade an existing Doxygen configuration file to the latest template
* - * \section SSec_BuildModule_DOXYGEN_MandatoryParams Mandatory Parameters + * \section SSec_BuildModule_LUFA_SOURCES_MandatoryParams Mandatory Parameters * * * * * * - *
LUFA_PATHPath to the LUFA library core, either relative or absolute (e.g. ../LUFA-000000/LUFA/).
- * - * \section SSec_BuildModule_DOXYGEN_OptionalParams Optional Parameters - * - * - * - * - * - * - * - * - * - * * - * - * - * - *
DOXYGEN_CONFName and path of the base Doxygen configuration file for the project.
DOXYGEN_FAIL_ON_WARNINGSet to Y to fail the generation with an error exit code if warnings are found other than unsupported configuration parameters, N to continue without failing.
DOXYGEN_OVERRIDE_PARAMSExtra Doxygen configuration parameters to apply, overriding the corresponding config entry in the project's configuration file (e.g. QUIET=YES).
- * - * \section SSec_BuildModule_DOXYGEN_ProvidedVariables Module Provided Variables - * - * - * - * + * + * * *
NoneARCHArchitecture of the target processor (see \ref Page_DeviceSupport).
* - * \section SSec_BuildModule_DOXYGEN_ProvidedMacros Module Provided Macros + * \section SSec_BuildModule_LUFA_SOURCES_OptionalParams Optional Parameters * * * * * *
None
- */ - - /** \page Page_BuildModule_HID The HID build module - * - * The HID programming utility LUFA build system module, providing targets to reprogram an - * Atmel processor's FLASH memory with a project's compiled binary output file. This module - * requires a HID class bootloader to be running in the target, using a protocol compatible - * with the PJRC "HalfKay" protocol (http://www.pjrc.com/teensy/halfkay_protocol.html). - * - * To use this module in your application makefile, add the following code: - * \code - * include $(LUFA_PATH)/Build/lufa_hid.mk - * \endcode * - * \section SSec_BuildModule_HID_Requirements Requirements - * This module requires either the hid_bootloader_cli utility from the included LUFA HID - * class bootloader API subdirectory, or the teensy_loader_cli utility from PJRC - * (http://www.pjrc.com/teensy/loader_cli.html) to be available in your system's PATH - * variable. - * - * \section SSec_BuildModule_HID_Targets Targets + * \section SSec_BuildModule_LUFA_SOURCES_ProvidedVariables Module Provided Variables * * * - * - * - * - * - * - * - * - * - * - * + * + * * * - * - * + * + * * - *
hidProgram the device FLASH memory with the application's executable data using hid_bootloader_cli.
hid-eeProgram the device EEPROM memory with the application's EEPROM data using hid_bootloader_cli and - * a temporary AVR application programmed into the target's FLASH. - * \note This will erase the currently loaded application in the target.
teensyProgram the device FLASH memory with the application's executable data using teensy_loader_cli.LUFA_SRC_USBList of LUFA USB driver source files.
teensy-eeProgram the device EEPROM memory with the application's EEPROM data using teensy_loader_cli and - * a temporary AVR application programmed into the target's FLASH. - * \note This will erase the currently loaded application in the target.LUFA_SRC_USBCLASSList of LUFA USB Class driver source files.
- * - * \section SSec_BuildModule_HID_MandatoryParams Mandatory Parameters - * - * * - * - * + * + * * * - * - * + * + * * - *
MCUName of the Atmel processor model (e.g. at90usb1287).LUFA_SRC_TEMPERATUREList of LUFA temperature sensor driver source files.
TARGETName of the application output file prefix (e.g. TestApplication).LUFA_SRC_SERIALList of LUFA Serial U(S)ART driver source files.
- * - * \section SSec_BuildModule_HID_OptionalParams Optional Parameters - * - * * - * + * + * * - *
NoneLUFA_SRC_TWIList of LUFA TWI driver source files.
- * - * \section SSec_BuildModule_HID_ProvidedVariables Module Provided Variables - * - * * - * + * + * * *
NoneLUFA_SRC_PLATFORMList of LUFA architecture specific platform management source files.
* - * \section SSec_BuildModule_HID_ProvidedMacros Module Provided Macros + * \section SSec_BuildModule_LUFA_SOURCES_ProvidedMacros Module Provided Macros * * * @@ -806,22 +115,22 @@ *
*/ - /** \page Page_BuildModule_SOURCES The SOURCES build module +/** \page Page_BuildModule_LUFA_GCC LUFA GCC extension module for DMBS * - * The SOURCES LUFA build system module, providing variables listing the various LUFA source files - * required to be build by a project for a given LUFA module. This module gives a way to reference - * LUFA source files symbolically, so that changes to the library structure do not break the library - * makefile. + * The LUFA GCC extension module for the standard DMBS GCC module extends the + * latter to support the compilation of LUFA powered projects. It should be + * imported into your LUFA powered project makefiles to ensure that the correct + * build settings are used for the project's configuration. * * To use this module in your application makefile, add the following code: * \code - * include $(LUFA_PATH)/Build/lufa_sources.mk + * include $(LUFA_PATH)/Build/LUFA/lufa-gcc.mk * \endcode * - * \section SSec_BuildModule_SOURCES_Requirements Requirements - * None. + * \section SSec_BuildModule_LUFA_GCC_Requirements Requirements + * This module should be included in your makefile *after* the DMBS GCC module. * - * \section SSec_BuildModule_SOURCES_Targets Targets + * \section SSec_BuildModule_LUFA_GCC_Targets Targets * * * @@ -829,57 +138,33 @@ * *
* - * \section SSec_BuildModule_SOURCES_MandatoryParams Mandatory Parameters + * \section SSec_BuildModule_LUFA_GCC_MandatoryParams Mandatory Parameters * * * * * * - * - * - * - * *
LUFA_PATHPath to the LUFA library core, either relative or absolute (e.g. ../LUFA-000000/LUFA/).
ARCHArchitecture of the target processor (see \ref Page_DeviceSupport).
* - * \section SSec_BuildModule_SOURCES_OptionalParams Optional Parameters + * \section SSec_BuildModule_LUFA_GCC_OptionalParams Optional Parameters * * * - * + * + * * *
NoneBOARDLUFA board hardware drivers to use (see \ref Page_DeviceSupport).
* - * \section SSec_BuildModule_SOURCES_ProvidedVariables Module Provided Variables + * \section SSec_BuildModule_LUFA_GCC_ProvidedVariables Module Provided Variables * * * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * + * * *
LUFA_SRC_USBList of LUFA USB driver source files.
LUFA_SRC_USBCLASSList of LUFA USB Class driver source files.
LUFA_SRC_TEMPERATUREList of LUFA temperature sensor driver source files.
LUFA_SRC_SERIALList of LUFA Serial U(S)ART driver source files.
LUFA_SRC_TWIList of LUFA TWI driver source files.
LUFA_SRC_PLATFORMList of LUFA architecture specific platform management source files.None
* - * \section SSec_BuildModule_SOURCES_ProvidedMacros Module Provided Macros + * \section SSec_BuildModule_LUFA_GCC_ProvidedMacros Module Provided Macros * * * @@ -890,9 +175,13 @@ /** \page Page_BuildTroubleshooting Troubleshooting Information * - * LUFA uses a lot of advanced features of the AVR-GCC compiler, linker, and surrounding binaries. This can sometimes lead to problems compiling applications if one of these - * features is buggy in the version of the tools used in a build environment. Missing utilities and incorrectly set makefile configuration options can also result in different - * errors being produced when compilation or other operations are attempted. The table below lists a set of commonly encountered errors and their resolutions. + * LUFA uses a lot of advanced features of the AVR-GCC compiler, linker, and + * surrounding binaries. This can sometimes lead to problems compiling + * applications if one of these features is buggy in the version of the tools + * used in a build environment. Missing utilities and incorrectly set makefile + * configuration options can also result in different errors being produced + * when compilation or other operations are attempted. The table below lists a + * set of commonly encountered errors and their resolutions. * *
* @@ -984,7 +273,7 @@ * * * + * library, you may be missing a LUFA source makefile module (see \ref Page_BuildModule_LUFA_SOURCES). * *
Error "undefined reference to `{X}'" shown when compiling.This is usually caused by a missing source file in the user application's SRC configuration parameter. If the indicated symbol is one from the LUFA - * library, you may be missing a LUFA source makefile module (see \ref Page_BuildModule_SOURCES).
* diff --git a/LUFA/DoxygenPages/ChangeLog.txt b/LUFA/DoxygenPages/ChangeLog.txt index e0471888f..201a50068 100644 --- a/LUFA/DoxygenPages/ChangeLog.txt +++ b/LUFA/DoxygenPages/ChangeLog.txt @@ -29,6 +29,8 @@ * - Added signed alternative libUSB driver for the AVRISP-MKII clone project, to support Atmel Studio 7 (thanks to Atmel) * - Removed no longer required LIBUSB_DRIVER_COMPAT and RESET_TOGGLES_LIBUSB_COMPAT configuration options from the AVRISP-MKII * clone project, as the new libUSB driver works for AVRDUDE and Atmel Studio 7 under Windows + * - Replaced the LUFA build system with its (compatible) successor, DMBS (Dean's Makefile Build System) + * - Removed obsolete library TAR export and associated documentation * * \section Sec_ChangeLog151115 Version 151115 * New: diff --git a/LUFA/DoxygenPages/DevelopingWithLUFA.txt b/LUFA/DoxygenPages/DevelopingWithLUFA.txt index 9a02f95b9..31b58fa2a 100644 --- a/LUFA/DoxygenPages/DevelopingWithLUFA.txt +++ b/LUFA/DoxygenPages/DevelopingWithLUFA.txt @@ -17,7 +17,6 @@ * \li \subpage Page_VIDPID - Allocated USB VID and PID Values * \li \subpage Page_OSDrivers - Operating System Driver Information * \li \subpage Page_BuildLibrary - Building as a Linkable Library - * \li \subpage Page_ExportingLibrary - Exporting LUFA for IDE Use * \li \subpage Page_WritingBoardDrivers - How to Write Custom Board Drivers * \li \subpage Page_SoftwareBootloaderStart - How to jump to the bootloader in software */ diff --git a/LUFA/DoxygenPages/ExportingLibrary.txt b/LUFA/DoxygenPages/ExportingLibrary.txt deleted file mode 100644 index 095184862..000000000 --- a/LUFA/DoxygenPages/ExportingLibrary.txt +++ /dev/null @@ -1,112 +0,0 @@ -/** \file - * - * 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. - */ - -/** \page Page_ExportingLibrary Exporting the Library for IDE Use - * - * 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 - * IDE. - * - * \note LUFA is also available as a native Atmel Studio 6.1 extension, which integrates LUFA into - * Atmel Studio including all demos and projects. If you are running Atmel Studio 6.1 or later, the - * below instructions are not required; download and install the native LUFA extension from the - * Atmel Gallery instead. - * - * \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 - * 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 necessary to - * exclude some directories and files from the library core export to allow for easier integration into - * an IDE project. - * - * \subsection SSec_ManualExport Manual Export - * 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 - * excluded from your IDE import: - * - Documentation/ - * - DoxygenPages/ - * - CodeTemplates/ - * - StudioIntegration/ - * - * 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 - * shown in \ref Sec_LibraryImport. - * - * \subsection SSec_AutomaticExport Automatic Export - * If desired, the steps indicated in \ref SSec_ManualExport may be automatically performed, by running the - * command make export_tar from the command line. This will generate two .tar files in the - * current directory, named LUFA_YYMMDD.tar and LUFA_YYMMDD_Code_Templates.tar (where - * "YYMMDD" is 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 current LUFA version. - * - * 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. - * - * \section Sec_LibraryImport Importing the Library - * An exported copy of the library may be imported wholesale into an IDE project, if the instructions detailed - * in \ref Sec_LibraryExport are followed. - * - * Specific instructions for importing an exported version of LUFA into various IDEs are listed below. - * - * \subsection SSec_AS56_Import Importing into AVRStudio 5.x/Atmel Studio 6.0 - * 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 - * Copy over the exported library archive created via the steps listed in \ref Sec_LibraryExport to your AS5/AS6 - * project directory. - * - * \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step1.png - * - * \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 - * 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. - * - * \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step2.png - * - * \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" - * 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. - * - * \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 - * choose the "Add to Project" option from the context menu. This will add the entire LUFA source tree to the - * current project. - * - * \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 - * open the Project Properties window. This window allows you to configure the various project global compiler, - * assembler and linker options. - * - * \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step4.png - * - * Click the "Toolchain" tab on the left side of the Project Properties window. - * - * \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 - * "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 - * \ref Page_ConfiguringApps): - * - ARCH - * - F_CPU - * - F_USB - * - BOARD - * \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 - * garbage collection is enabled. - * \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 - * unused sections is selected. - * \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step5_3.png - */ diff --git a/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step1.png b/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step1.png deleted file mode 100644 index 4f0c26f37..000000000 Binary files a/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step1.png and /dev/null differ diff --git a/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step2.png b/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step2.png deleted file mode 100644 index 6e309ae41..000000000 Binary files a/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step2.png and /dev/null differ diff --git a/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step3.png b/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step3.png deleted file mode 100644 index 8192c9ae8..000000000 Binary files a/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step3.png and /dev/null differ diff --git a/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step4.png b/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step4.png deleted file mode 100644 index 2bb8f5fc8..000000000 Binary files a/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step4.png and /dev/null differ diff --git a/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step5_1.png b/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step5_1.png deleted file mode 100644 index f3a49ba9c..000000000 Binary files a/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step5_1.png and /dev/null differ diff --git a/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step5_2.png b/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step5_2.png deleted file mode 100644 index 078f4ec8d..000000000 Binary files a/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step5_2.png and /dev/null differ diff --git a/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step5_3.png b/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step5_3.png deleted file mode 100644 index 8a8571bd8..000000000 Binary files a/LUFA/DoxygenPages/Images/AS5_AS6_Import/AS5_AS6_Import_Step5_3.png and /dev/null differ diff --git a/LUFA/DoxygenPages/ProgrammingApps.txt b/LUFA/DoxygenPages/ProgrammingApps.txt index 4759ac87a..653b4ad04 100644 --- a/LUFA/DoxygenPages/ProgrammingApps.txt +++ b/LUFA/DoxygenPages/ProgrammingApps.txt @@ -24,7 +24,4 @@ * If you wish to use the DFU bootloader to program in your application, refer to your DFU programmer's documentation. * Atmel provides a free utility called FLIP which is USB AVR compatible, and an open source (Linux compatible) * alternative exists called "dfu-programmer". - * - * \see \ref Page_BuildModule_DFU for information on the LUFA build system DFU module, for automatic DFU bootloader - * programming makefile targets. */ diff --git a/LUFA/doxyfile b/LUFA/doxyfile index 807511023..90b8ca2f7 100644 --- a/LUFA/doxyfile +++ b/LUFA/doxyfile @@ -806,6 +806,7 @@ RECURSIVE = YES EXCLUDE = Documentation/ \ StudioIntegration/ \ + Build/ \ License.txt # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or diff --git a/LUFA/makefile b/LUFA/makefile index 14571ea29..a7f0b1192 100644 --- a/LUFA/makefile +++ b/LUFA/makefile @@ -9,45 +9,32 @@ # Makefile for the LUFA library itself. # --------------------------------------- -LUFA_VERSION_NUM = $(shell grep LUFA_VERSION_STRING $(LUFA_PATH)/Version.h | cut -d'"' -f2) -EXCLUDE_FROM_EXPORT := Documentation DoxygenPages CodeTemplates Build StudioIntegration doxyfile *.tar *.o *.d *.lss *.lst *.hex *.elf *.hex *.eep *.map *.bin +LUFA_VERSION_NUM := $(shell grep LUFA_VERSION_STRING $(LUFA_PATH)/Version.h | cut -d'"' -f2) # Default target - no default action when attempting to build the core directly all: -# Export the library core as a TAR archive for importing into an IDE -export_tar: - @echo Exporting LUFA library to a TAR archive... - @tar -cf LUFA_$(LUFA_VERSION_NUM).tar --directory=. $(EXCLUDE_FROM_EXPORT:%=--exclude=%) * - @tar -cf LUFA_$(LUFA_VERSION_NUM)_Code_Templates.tar CodeTemplates - @echo Export LUFA_$(LUFA_VERSION_NUM).tar complete. - # Display the LUFA version of this library copy version: @echo "LUFA $(LUFA_VERSION_NUM)" -# Check if this is being included from a legacy or non LUFA build system makefile -ifneq ($(LUFA_PATH),) - LUFA_ROOT_PATH = $(patsubst %/,%,$(LUFA_PATH))/LUFA/ - - include $(patsubst %/,%,$(LUFA_PATH))/LUFA/Build/lufa_sources.mk -else - LUFA_BUILD_MODULES += MASTER - LUFA_BUILD_TARGETS += export_tar version +LUFA_PATH := . +ARCH := {AVR8,UC3,XMEGA} +DOXYGEN_OVERRIDE_PARAMS := QUIET=YES PROJECT_NUMBER=$(LUFA_VERSION_NUM) - LUFA_PATH = . - ARCH = {AVR8,UC3,XMEGA} - DOXYGEN_OVERRIDE_PARAMS = QUIET=YES PROJECT_NUMBER=$(LUFA_VERSION_NUM) - - # Remove all object and associated files from the LUFA library core - clean: +# Remove all object and associated files from the LUFA library core +clean: rm -f $(LUFA_SRC_ALL_FILES:%.c=%.o) rm -f $(LUFA_SRC_ALL_FILES:%.c=%.d) rm -f $(LUFA_SRC_ALL_FILES:%.c=%.lst) - include Build/lufa_core.mk - include Build/lufa_sources.mk - include Build/lufa_doxygen.mk -endif +# Include LUFA-specific DMBS extension modules +DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA +include $(DMBS_LUFA_PATH)/lufa-sources.mk + +# Include common DMBS build system modules +DMBS_PATH ?= $(LUFA_PATH)/Build/DMBS/DMBS +include $(DMBS_PATH)/core.mk +include $(DMBS_PATH)/doxygen.mk -.PHONY: all export_tar version clean +.PHONY: all version -- cgit v1.2.3