From 6a3a5f40da35524fc3bf9ad8dc3fcc8655b4392b Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Sat, 2 Jun 2012 14:10:02 +0000 Subject: Update library documentation on the standard LUFA makefile template configuration. --- LUFA/DoxygenPages/ConfiguringApps.txt | 46 ++++++++++++++++++++--------------- LUFA/DoxygenPages/KnownIssues.txt | 2 ++ LUFA/makefile | 8 ++++-- 3 files changed, 35 insertions(+), 21 deletions(-) (limited to 'LUFA') diff --git a/LUFA/DoxygenPages/ConfiguringApps.txt b/LUFA/DoxygenPages/ConfiguringApps.txt index 6caf185c1..1c9833421 100644 --- a/LUFA/DoxygenPages/ConfiguringApps.txt +++ b/LUFA/DoxygenPages/ConfiguringApps.txt @@ -25,9 +25,12 @@ * - BOARD, the target board hardware * - F_CPU, the target CPU master clock frequency, after any prescaling * - F_USB, the target raw input clock to the USB module of the processor - * - CDEFS, the C preprocessor defines which configure options the source code - * - LUFA_PATH, the path to the LUFA library source code - * - LUFA_OPTS, the compile time LUFA options which configure the library features + * - OPTIMIZATION, the level of optimization to compile with + * - TARGET, the name of the target output binary and other files + * - SRC, the list of source files to compile/assemble/link + * - LUFA_PATH, the path to the LUFA library core source code + * - CC_FLAGS, the common command line flags to pass to the C/C++ compiler, assembler and linker + * - LD_FLAGS, the command line flags to pass to the linker * * These values should be changed to reflect the build hardware. * @@ -66,24 +69,29 @@ * This parameter indicates the raw input clock frequency to the USB module within the microcontroller in Hz. This may be very different on some platforms * to the main CPU clock or other peripheral/bus clocks. * - * \section Sec_CDEFS The CDEFS Parameter - * Many applications have features which can be controlled by the defining of specially named preprocessor tokens at the point of compilation - for example, - * an application might use a compile time token to turn on or off optional or mutually exclusive portions of code. Preprocessor tokens can be - * defined here by listing each one with the -D command line switch, and each token can optionally be defined to a specific value. When defined in the - * project makefile, these behave as if they were defined in every source file via a normal preprocessor define statement. + * \section Sec_OPTIMIZATION The OPTIMIZATION Parameter + * This parameter indicates the level of optimization to use when compiling the application. This will allow you to compile with an optimization level + * supported by GCC, from 0 (no optimization) to 3 (fastest runtime optimization) or s (smallest size). * - * Most applications will actually have multiple CDEF lines, which are concatenated together with the "+=" operator. This ensures that large - * numbers of configuration options remain readable by splitting up groups of options into separate lines. + * \section Sec_TARGET The TARGET Parameter + * This parameter indicates the application target name, which is used as the base filename for the build binary and debugging files. This will be the + * name of the output files once linked together into the final application, ready to load into the target. + * + * \section Sec_SRC The SRC Parameter + * This parameter indicates the source files used to compile the application, as a list of C (*.c), C++ (*.cpp) and Assembly (*.S) files. Note that + * all assembly files must end in a capital .S extension, as lowercase .s files are reserved for GCC intermediate files. * * \section Sec_LUFA_PATH The LUFA_PATH Parameter * As each LUFA program requires the LUFA library source code to compile correctly, the application must know where the LUFA library is located. This - * value specifies the path to the LUFA library base relative to the path of the project makefile. - * - * \section Sec_LUFA_OPTS The LUFA_OPTS Parameter - * This value is similar to the CDEFS parameter listed elsewhere -- indeed, it is simply a convenient place to group LUFA related tokens away from the - * application's compile time tokens. Normally, these options do not need to be altered to allow an application to compile and run correctly on a - * different board or microcontroller to the current configuration - if the options are incorrect, then the demo is most likely incompatible with the chosen - * microcontroller model and cannot be made to function through the altering of the makefile settings alone (or at all). Settings such as the USB mode - * (device, host or both), the USB interface speed and other LUFA configuration options can be set here - see \ref Page_TokenSummary documentation for details - * on the available LUFA compile time configuration options. + * value specifies the path to the LUFA library core. This path may be relative or absolute, however note than even under Windows based systems the + * forward-slash (/) path seperator must be used. + * + * \section Sec_CC_FLAGS The CC_FLAGS Parameter + * This parameter lists the compiler flags passed to the C/C++ compiler, the assembler and the linker. These are used as-is directly to GCC and thus + * must match GCC's command line options as given in the GCC manual. This variable may be used to define tokens directly on the command line, enable or + * disable warnings, adjust the target-specific tuning parameters or other options. + * + * \section Sec_LD_FLAGS The LD_FLAGS Parameter + * This parameter lists the linker flags passed exclusively to the linker. These are used as-is directly to GCC and thus must match GCC's command line + * linker options as given in the GCC manual. This variable may be used to create or relocate custom data sections, or enable linker specific behaviors. */ diff --git a/LUFA/DoxygenPages/KnownIssues.txt b/LUFA/DoxygenPages/KnownIssues.txt index 9b648144b..5ce7d6c14 100644 --- a/LUFA/DoxygenPages/KnownIssues.txt +++ b/LUFA/DoxygenPages/KnownIssues.txt @@ -36,5 +36,7 @@ * as the makefile itself. * - The LUFA library is not watchdog aware, and thus timeouts are possible if short periods are used * and a lengthy USB operation is initiated. + * - Build System + * - No known issues. */ diff --git a/LUFA/makefile b/LUFA/makefile index 3fbf7ac36..8129befdf 100644 --- a/LUFA/makefile +++ b/LUFA/makefile @@ -27,8 +27,11 @@ ifneq ($(LUFA_PATH),) LUFA_ROOT_PATH = $(LUFA_PATH)/LUFA/ include $(LUFA_PATH)/LUFA/Build/lufa.sources.in else - LUFA_PATH = . - ARCH = {AVR8,UC3,XMEGA} + LUFA_BUILD_MODULES += LIBCORE + LUFA_BUILD_TARGETS += export_tar version + + LUFA_PATH = . + ARCH = {AVR8,UC3,XMEGA} all: @@ -37,6 +40,7 @@ else rm -f $(LUFA_SRC_ALL_FILES:%.c=%.lst) # Include LUFA build script makefiles + include Build/lufa.core.in include Build/lufa.sources.in include Build/lufa.doxygen.in endif -- cgit v1.2.3