3 * This file contains special DoxyGen information for the generation of the main page and other special
\r
4 * documentation pages. It is not a project source file.
\r
7 /** \page Page_BuildSystem The LUFA Build System
\r
9 * \section Sec_BuildSystem_Overview Overview of the LUFA Build System
\r
10 * The LUFA build system was originally an attempt at making a set of
\r
11 * re-usable, modular build make files which could be referenced in a LUFA
\r
12 * powered project, to minimize the amount of code required in an
\r
13 * application makefile.
\r
15 * As it turned out to be fairly generic in nature, it was split out into its
\r
16 * own separate project, called DMBS (<i>Dean's Makefile Build System</i>)
\r
17 * which is released into the public domain. LUFA-specific portions of the
\r
18 * LUFA build system extend DMBS, and provide a universal build system for all
\r
21 * The latest DMBS project information and documentation can be found at:
\r
22 * https://github.com/abcminiuser/dmbs
\r
24 * DMBS is written in GNU Make, and each module is independent of one-another.
\r
26 * LUFA now uses DMBS for its build system, with some LUFA specific extension
\r
29 * If you have problems building using LUFA, see \subpage Page_BuildTroubleshooting for resolution steps.
\r
31 * \li \subpage Page_BuildModule_LUFA_SOURCES - The LUFA SOURCES extension module for DMBS
\r
32 * \li \subpage Page_BuildModule_LUFA_GCC - The LUFA GCC extension module for DMBS
\r
35 /** \page Page_BuildModule_LUFA_SOURCES LUFA SOURCES extension module for DMBS
\r
37 * The LUFA SOURCES extension more for DMBS provides LUFA specific variables
\r
38 * listing the various LUFA source files required to be build by a project for
\r
39 * a given LUFA module. This module gives a way to reference LUFA source files
\r
40 * symbolically, so that changes to the library structure do not break the
\r
43 * To use this module in your application makefile, add the following code:
\r
45 * include $(LUFA_PATH)/Build/LUFA/lufa-sources.mk
\r
48 * \section SSec_BuildModule_LUFA_SOURCES_Requirements Requirements
\r
51 * \section SSec_BuildModule_LUFA_SOURCES_Targets Targets
\r
55 * <td><i>None</i></td>
\r
59 * \section SSec_BuildModule_LUFA_SOURCES_MandatoryParams Mandatory Parameters
\r
63 * <td><tt>LUFA_PATH</tt></td>
\r
64 * <td>Path to the LUFA library core, either relative or absolute (e.g. <tt>../LUFA-000000/LUFA/</tt>).</td>
\r
67 * <td><tt>ARCH</tt></td>
\r
68 * <td>Architecture of the target processor (see \ref Page_DeviceSupport).</td>
\r
72 * \section SSec_BuildModule_LUFA_SOURCES_OptionalParams Optional Parameters
\r
76 * <td><i>None</i></td>
\r
80 * \section SSec_BuildModule_LUFA_SOURCES_ProvidedVariables Module Provided Variables
\r
84 * <td><tt>LUFA_SRC_USB</tt></td>
\r
85 * <td>List of LUFA USB driver source files.</td>
\r
88 * <td><tt>LUFA_SRC_USBCLASS</tt></td>
\r
89 * <td>List of LUFA USB Class driver source files.</td>
\r
92 * <td><tt>LUFA_SRC_TEMPERATURE</tt></td>
\r
93 * <td>List of LUFA temperature sensor driver source files.</td>
\r
96 * <td><tt>LUFA_SRC_SERIAL</tt></td>
\r
97 * <td>List of LUFA Serial U(S)ART driver source files.</td>
\r
100 * <td><tt>LUFA_SRC_TWI</tt></td>
\r
101 * <td>List of LUFA TWI driver source files.</td>
\r
104 * <td><tt>LUFA_SRC_PLATFORM</tt></td>
\r
105 * <td>List of LUFA architecture specific platform management source files.</td>
\r
109 * \section SSec_BuildModule_LUFA_SOURCES_ProvidedMacros Module Provided Macros
\r
113 * <td><i>None</i></td>
\r
118 /** \page Page_BuildModule_LUFA_GCC LUFA GCC extension module for DMBS
\r
120 * The LUFA GCC extension module for the standard DMBS GCC module extends the
\r
121 * latter to support the compilation of LUFA powered projects. It should be
\r
122 * imported into your LUFA powered project makefiles to ensure that the correct
\r
123 * build settings are used for the project's configuration.
\r
125 * To use this module in your application makefile, add the following code:
\r
127 * include $(LUFA_PATH)/Build/LUFA/lufa-gcc.mk
\r
130 * \section SSec_BuildModule_LUFA_GCC_Requirements Requirements
\r
131 * This module should be included in your makefile *after* the DMBS GCC module.
\r
133 * \section SSec_BuildModule_LUFA_GCC_Targets Targets
\r
137 * <td><i>None</i></td>
\r
141 * \section SSec_BuildModule_LUFA_GCC_MandatoryParams Mandatory Parameters
\r
145 * <td><tt>LUFA_PATH</tt></td>
\r
146 * <td>Path to the LUFA library core, either relative or absolute (e.g. <tt>../LUFA-000000/LUFA/</tt>).</td>
\r
150 * \section SSec_BuildModule_LUFA_GCC_OptionalParams Optional Parameters
\r
154 * <td><tt>BOARD</tt></td>
\r
155 * <td>LUFA board hardware drivers to use (see \ref Page_DeviceSupport).</td>
\r
159 * \section SSec_BuildModule_LUFA_GCC_ProvidedVariables Module Provided Variables
\r
163 * <td><i>None</i></td>
\r
167 * \section SSec_BuildModule_LUFA_GCC_ProvidedMacros Module Provided Macros
\r
171 * <td><i>None</i></td>
\r
176 /** \page Page_BuildTroubleshooting Troubleshooting Information
\r
178 * LUFA uses a lot of advanced features of the AVR-GCC compiler, linker, and
\r
179 * surrounding binaries. This can sometimes lead to problems compiling
\r
180 * applications if one of these features is buggy in the version of the tools
\r
181 * used in a build environment. Missing utilities and incorrectly set makefile
\r
182 * configuration options can also result in different errors being produced
\r
183 * when compilation or other operations are attempted. The table below lists a
\r
184 * set of commonly encountered errors and their resolutions.
\r
189 * <th>Resolution</th>
\r
192 * <td>Error "<b><tt>relocation truncated to fit: R_AVR_13_PCREL against symbol <i>{X}</i></tt></b>" shown when compiling.</td>
\r
193 * <td>Try compiling with the setting <tt>LINKER_RELAXATIONS=N</tt> in your LUFA Build System 2.0 makefile, or remove the line <tt>-Wl,--relax</tt>
\r
194 * from other makefiles. Alternatively, make sure you have the latest version of the Atmel Toolchain installed for your system.</td>
\r
197 * <td>Error "<b><tt>error: ld terminated with signal 11 [Segmentation fault]</tt></b>" shown when compiling.</td>
\r
198 * <td>Try compiling with the setting <tt>DEBUG_LEVEL=2</tt> in your LUFA Build System 2.0 makefile, or make sure you are using <tt>binutils</tt> version 2.22 or later.</td>
\r
201 * <td>Error "<b><tt>EMERGENCY ABORT: INFINITE RECURSION DETECTED</tt></b>" shown when compiling.</td>
\r
202 * <td>Make sure you are using an up to date version of GNU Make when compiling. This error is a safety system added to the mid-level makefiles, to prevent an issue with
\r
203 * GNU make or other variants of Make causing an infinitely recursive build.</td>
\r
206 * <td>Error "<b><tt>Unsupported architecture "<i>{X}</i>"</tt></b>" shown when compiling.</td>
\r
207 * <td>Ensure your makefile's <tt>ARCH</tt> setting is set to one of the architecture names (case-sensitive) supported by the version of LUFA you are compiling against.</td>
\r
210 * <td>Error "<b><tt>Makefile <i>{X}</i> value not set</tt></b>" shown when compiling.</td>
\r
211 * <td>The specified Makefile value was not configured in your project's makefile or on the command line, and the nominated setting is required by one or more LUFA
\r
212 * build system modules. Define the value in your project makefile and try again.</td>
\r
215 * <td>Error "<b><tt>Makefile <i>{X}</i> option cannot be blank</tt></b>" shown when compiling.</td>
\r
216 * <td>The specified Makefile value was configured in your project's makefile or on the command line, but was set to an empty value. For the nominated configuration
\r
217 * option, an empty value is not allowed. Define the nominated setting to a correct non-blank value and try again.</td>
\r
220 * <td>Error "<b><tt>Makefile <i>{X}</i> option must be Y or N</tt></b>" shown when compiling.</td>
\r
221 * <td>The specified Makefile value was configured in your project's makefile or on the command line, but was set to a value other than a Y (for "Yes") or "N" (for "No").
\r
222 * This configuration option is required to be one of the aforementioned boolean values, and other values are invalid. Set this option to either Y or N and try again.</td>
\r
225 * <td>Error "<b><tt>Unknown input source file formats: <i>{X}</i></tt></b>" shown when compiling.</td>
\r
226 * <td>The nominated source files, specified in your project's makefile in the <tt>SRC</tt> configuration option, has an extension that the LUFA build system does not
\r
227 * recognise. The file extensions are case sensitive, and must be one of the supported formats (<tt>*.c</tt>, <tt>*.cpp</tt> or <tt>*.S</tt>).</td>
\r
230 * <td>Error "<b><tt>Cannot build with OBJDIR parameter set - one or more object file name is not unique</tt></b>" shown when compiling.</td>
\r
231 * <td>When a project is built with a non-empty <tt>OBJDIR</tt> object directory name set, all input source files must have unique names, excluding extension and path.
\r
232 * This means that input files that are named identically and differ only by their path or extension are invalid when this mode is used.</td>
\r
235 * <td>Error "<b><tt>Source file does not exist: <i>{X}</i></tt></b>" shown when compiling.</td>
\r
236 * <td>The nominated input source file, specified in the user project's <tt>SRC</tt> parameter, could not be found. Ensure the source file exists and the absolute or
\r
237 * relative path given in the user project makefile is correct and try again.</td>
\r
240 * <td>Error "<b><tt>Doxygen configuration file <i>{X}</i> does not exist</tt></b>" shown when upgrading a Doxygen configuration file.</td>
\r
241 * <td>The nominated Doxygen configuration file, specified in the user project's <tt>DOXYGEN_CONF</tt> parameter, could not be found. Ensure the configuration file exists
\r
242 * and the absolute or relative path given in the user project makefile is correct and try again, or run the appropriate makefile target to generate a new configuration
\r
246 * <td>Error "<b><tt>avr-gcc: error: unrecognized option '<i>{X}</i>'</tt></b>" shown when compiling.</td>
\r
247 * <td>An unrecognised option was supplied to the compiler, usually in the <tt>C_FLAGS</tt>, <tt>CPP_FLAGS</tt>, <tt>ASM_FLAGS</tt> or <tt>CC_FLAGS</tt> configuration
\r
248 * options. The nominated compiler switch may be invalid, or unsupported by the version of AVR-GCC on the host system. Remove the unrecognised flag if invalid, or
\r
249 * upgrade to the latest AVR-GCC. If the option is a valid linker option, use the prefix "-Wl," to ensure it is passed to the linker correctly.</td>
\r
252 * <td>Error "<b><tt>makefile:{X}: {Y}.mk: No such file or directory</tt></b>" shown when make is invoked.</td>
\r
253 * <td>The path to the nominated makefile module was incorrect. This usually indicates that the makefile <tt>LUFA_PATH</tt> option is not set to a valid relative or
\r
254 * absolute path to the LUFA library core.</td>
\r
257 * <td>Error "<b><tt>fatal error: LUFAConfig.h: No such file or directory</tt></b>" shown when compiling.</td>
\r
258 * <td>The <tt>USE_LUFA_CONFIG_HEADER</tt> compile time option was set in the user project makefile, but the user supplied <tt>LUFAConfig.h</tt> header could not be
\r
259 * found. Ensure that the directory that contains this configuration file is correctly passed to the compiler via the -I switch in the makefile <tt>CC_FLAGS</tt>
\r
263 * <td>Error "<b><tt>ld.exe: section .apitable_trampolines loaded at <i>{X}</i> overlaps section .text</tt></b>" shown when compiling a bootloader.</td>
\r
264 * <td>The bootloader is compiling too large for the given <tt>FLASH_SIZE_KB</tt> and <tt>BOOT_SECTION_SIZE_KB</tt> parameters set in the bootloader makefile. This
\r
265 * usually indicates that these values are incorrect for the specified device the bootloader is targeting. If these values are correct, a newer version of the
\r
266 * compiler may need to be used to ensure that the bootloader is built within the section size constraints of the target device.</td>
\r
269 * <td>Error "<b><tt>unknown MCU '<i>{X}</i>' specified</tt></b>" shown when compiling.</td>
\r
270 * <td>The specified microcontroller device model name set in the user application's makefile as the <tt>MCU</tt> parameter is incorrect, or unsupported by the
\r
271 * version of the compiler being used. Make sure the model name is correct, or upgrade to the latest Atmel Toolchain to obtain newer device support.</td>
\r
274 * <td>Error "<b><tt>undefined reference to `<i>{X}</i>'</tt></b>" shown when compiling.</td>
\r
275 * <td>This is usually caused by a missing source file in the user application's <tt>SRC</tt> configuration parameter. If the indicated symbol is one from the LUFA
\r
276 * library, you may be missing a LUFA source makefile module (see \ref Page_BuildModule_LUFA_SOURCES).</td>
\r
280 * For troubleshooting other errors you encounter, please see \ref Sec_ProjectHelp.
\r