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 is an attempt at making a set of re-usable, modular build make files which
\r
11 * can be referenced in a LUFA powered project, to minimize the amount of code required in an
\r
12 * application makefile. The system is written in GNU Make, and each module is independent of
\r
15 * For details on the prerequisites needed for Linux and Windows machines to be able to use the LUFA
\r
16 * build system, see \ref Sec_CompilingApps_Prerequisites.
\r
18 * To use a LUFA build system module, simply add an include to your project makefile. All user projects
\r
19 * should at a minimum include \ref Page_BuildModule_CORE for base functionality:
\r
21 * include $(LUFA_PATH)/Build/lufa_core.mk
\r
24 * Once included in your project makefile, the associated build module targets will be added to your
\r
25 * project's build makefile targets automatically. To call a build target, run <tt>make {TARGET_NAME}</tt>
\r
26 * from the command line, substituting in the appropriate target name.
\r
28 * \see \ref Sec_ConfiguringApps_AppMakefileParams for a copy of the sample LUFA project makefile.
\r
30 * Each build module may have one or more mandatory parameters (GNU Make variables) which <i>must</i>
\r
31 * be supplied in the project makefile for the module to work, and one or more optional parameters which
\r
32 * may be defined and which will assume a sensible default if not.
\r
34 * \section SSec_BuildSystem_Modules Available Modules
\r
36 * The following modules are included in this LUFA release:
\r
38 * \li \subpage Page_BuildModule_ATPROGRAM - Device Programming
\r
39 * \li \subpage Page_BuildModule_AVRDUDE - Device Programming
\r
40 * \li \subpage Page_BuildModule_BUILD - Compiling/Assembling/Linking
\r
41 * \li \subpage Page_BuildModule_CORE - Core Build System Functions
\r
42 * \li \subpage Page_BuildModule_CPPCHECK - Static Code Analysis
\r
43 * \li \subpage Page_BuildModule_DFU - Device Programming
\r
44 * \li \subpage Page_BuildModule_DOXYGEN - Automated Source Code Documentation
\r
45 * \li \subpage Page_BuildModule_HID - Device Programming
\r
46 * \li \subpage Page_BuildModule_SOURCES - LUFA Module Source Code Variables
\r
48 * If you have problems building using the LUFA build system, see \subpage Page_BuildTroubleshooting for resolution steps.
\r
51 /** \page Page_BuildModule_BUILD The BUILD build module
\r
53 * The BUILD LUFA build system module, providing targets for the compilation,
\r
54 * assembling and linking of an application from source code into binary files
\r
55 * suitable for programming into a target device, using the GCC compiler.
\r
57 * To use this module in your application makefile, add the following code:
\r
59 * include $(LUFA_PATH)/Build/lufa_build.mk
\r
62 * \section SSec_BuildModule_BUILD_Requirements Requirements
\r
63 * This module requires the the architecture appropriate binaries of the GCC compiler are available in your
\r
64 * system's <b>PATH</b> variable. The GCC compiler and associated toolchain is distributed in Atmel AVR Studio
\r
65 * 5.x and Atmel Studio 6.x installation directories, as well as in many third party distribution packages.
\r
67 * \section SSec_BuildModule_BUILD_Targets Targets
\r
71 * <td><tt>size</tt></td>
\r
72 * <td>Display size of the compiled application FLASH and SRAM segments.</td>
\r
75 * <td><tt>symbol-sizes</tt></td>
\r
76 * <td>Display a size-sorted list of symbols from the compiled application, in decimal bytes.</td>
\r
79 * <td><tt>lib</tt></td>
\r
80 * <td>Build and archive all source files into a library A binary file.</td>
\r
83 * <td><tt>all</tt></td>
\r
84 * <td>Build and link the application into ELF debug and HEX binary files.</td>
\r
87 * <td><tt>elf</tt></td>
\r
88 * <td>Build and link the application into an ELF debug file.</td>
\r
91 * <td><tt>bin</tt></td>
\r
92 * <td>Build and link the application and produce a BIN binary file.</td>
\r
95 * <td><tt>hex</tt></td>
\r
96 * <td>Build and link the application and produce HEX and EEP binary files.</td>
\r
99 * <td><tt>lss</tt></td>
\r
100 * <td>Build and link the application and produce a LSS source code/assembly code mixed listing file.</td>
\r
103 * <td><tt>clean</tt></td>
\r
104 * <td>Remove all intermediary files and binary output files.</td>
\r
107 * <td><tt>mostlyclean</tt></td>
\r
108 * <td>Remove all intermediary files but preserve any binary output files.</td>
\r
111 * <td><tt><i><filename></i>.s</tt></td>
\r
112 * <td>Create an assembly listing of a given input C/C++ source file.</td>
\r
116 * \section SSec_BuildModule_BUILD_MandatoryParams Mandatory Parameters
\r
120 * <td><tt>TARGET</tt></td>
\r
121 * <td>Name of the application output file prefix (e.g. <tt>TestApplication</tt>).</td>
\r
124 * <td><tt>ARCH</tt></td>
\r
125 * <td>Architecture of the target processor (see \ref Page_DeviceSupport).</td>
\r
128 * <td><tt>MCU</tt></td>
\r
129 * <td>Name of the Atmel processor model (e.g. <tt>at90usb1287</tt>).</td>
\r
132 * <td><tt>SRC</tt></td>
\r
133 * <td>List of relative or absolute paths to the application C (.c), C++ (.cpp) and Assembly (.S) source files.</td>
\r
136 * <td><tt>F_USB</tt></td>
\r
137 * <td>Speed in Hz of the input clock frequency to the target's USB controller.</td>
\r
140 * <td><tt>LUFA_PATH</tt></td>
\r
141 * <td>Path to the LUFA library core, either relative or absolute (e.g. <tt>../LUFA-000000/LUFA/</tt>).</td>
\r
145 * \section SSec_BuildModule_BUILD_OptionalParams Optional Parameters
\r
149 * <td><tt>BOARD</tt></td>
\r
150 * <td>LUFA board hardware drivers to use (see \ref Page_DeviceSupport).</td>
\r
153 * <td><tt>OPTIMIZATION</tt></td>
\r
154 * <td>Optimization level to use when compiling source files (see GCC manual).</td>
\r
157 * <td><tt>C_STANDARD</tt></td>
\r
158 * <td>Version of the C standard to apply when compiling C++ source files (see GCC manual).</td>
\r
161 * <td><tt>CPP_STANDARD</tt></td>
\r
162 * <td>Version of the C++ standard to apply when compiling C++ source files (see GCC manual).</td>
\r
165 * <td><tt>DEBUG_FORMAT</tt></td>
\r
166 * <td>Format of the debug information to embed in the generated object files (see GCC manual).</td>
\r
169 * <td><tt>DEBUG_LEVEL</tt></td>
\r
170 * <td>Level of the debugging information to embed in the generated object files (see GCC manual).</td>
\r
173 * <td><tt>F_CPU</tt></td>
\r
174 * <td>Speed of the processor CPU clock, in Hz.</td>
\r
177 * <td><tt>C_FLAGS</tt></td>
\r
178 * <td>Flags to pass to the C compiler only, after the automatically generated flags.</td>
\r
181 * <td><tt>CPP_FLAGS</tt></td>
\r
182 * <td>Flags to pass to the C++ compiler only, after the automatically generated flags.</td>
\r
185 * <td><tt>ASM_FLAGS</tt></td>
\r
186 * <td>Flags to pass to the assembler only, after the automatically generated flags.</td>
\r
189 * <td><tt>CC_FLAGS</tt></td>
\r
190 * <td>Common flags to pass to the C/C++ compiler and assembler, after the automatically generated flags.</td>
\r
193 * <td><tt>COMPILER_PATH</tt></td>
\r
194 * <td>Directory where the C/C++ toolchain is located, if not available in the system <tt>PATH</tt>.</td>
\r
197 * <td><tt>LD_FLAGS</tt></td>
\r
198 * <td>Flags to pass to the linker, after the automatically generated flags.</td>
\r
201 * <td><tt>LINKER_RELAXATIONS</tt></td>
\r
202 * <td>Enables or disables linker relaxations when linking the application binary. This can reduce the total size
\r
203 * of the application by replacing full \c CALL instructions with smaller \c RCALL instructions where possible.
\r
204 * \note On some unpatched versions of binutils, this can cause link failures in some circumstances. If you
\r
205 * receive a link error <tt>relocation truncated to fit: R_AVR_13_PCREL</tt>, disable this setting.</td>
\r
208 * <td><tt>OBJDIR</tt></td>
\r
209 * <td>Directory to place the generated object and dependency files. If set to "." the same folder as the source file will be used.
\r
210 * \note When this option is enabled, all source filenames <b>must</b> be unique.</td>
\r
213 * <td><tt>OBJECT_FILES</tt></td>
\r
214 * <td>List of additional object files that should be linked into the resulting binary.</td>
\r
218 * \section SSec_BuildModule_BUILD_ProvidedVariables Module Provided Variables
\r
222 * <td><i>None</i></td>
\r
226 * \section SSec_BuildModule_BUILD_ProvidedMacros Module Provided Macros
\r
230 * <td><i>None</i></td>
\r
235 /** \page Page_BuildModule_CORE The CORE build module
\r
237 * The core LUFA build system module, providing common build system help and information targets.
\r
239 * To use this module in your application makefile, add the following code:
\r
241 * include $(LUFA_PATH)/Build/lufa_core.mk
\r
244 * \section SSec_BuildModule_CORE_Requirements Requirements
\r
245 * This module has no requirements outside a standard *nix shell like environment; the <tt>sh</tt>
\r
246 * shell, GNU <tt>make</tt> and *nix CoreUtils (<tt>echo</tt>, <tt>printf</tt>, etc.).
\r
248 * \section SSec_BuildModule_CORE_Targets Targets
\r
252 * <td><tt>help</tt></td>
\r
253 * <td>Display build system help and configuration information.</td>
\r
256 * <td><tt>list_targets</tt></td>
\r
257 * <td>List all available build targets from the build system.</td>
\r
260 * <td><tt>list_modules</tt></td>
\r
261 * <td>List all available build modules from the build system.</td>
\r
264 * <td><tt>list_mandatory</tt></td>
\r
265 * <td>List all mandatory parameters required by the included modules.</td>
\r
268 * <td><tt>list_optional</tt></td>
\r
269 * <td>List all optional parameters required by the included modules.</td>
\r
272 * <td><tt>list_provided</tt></td>
\r
273 * <td>List all variables provided by the included modules.</td>
\r
276 * <td><tt>list_macros</tt></td>
\r
277 * <td>List all macros provided by the included modules.</td>
\r
281 * \section SSec_BuildModule_CORE_MandatoryParams Mandatory Parameters
\r
285 * <td><i>None</i></td>
\r
289 * \section SSec_BuildModule_CORE_OptionalParams Optional Parameters
\r
293 * <td><i>None</i></td>
\r
297 * \section SSec_BuildModule_CORE_ProvidedVariables Module Provided Variables
\r
301 * <td><i>None</i></td>
\r
305 * \section SSec_BuildModule_CORE_ProvidedMacros Module Provided Macros
\r
309 * <td><i>None</i></td>
\r
314 /** \page Page_BuildModule_ATPROGRAM The ATPROGRAM build module
\r
316 * The ATPROGRAM programming utility LUFA build system module, providing targets to reprogram an
\r
317 * Atmel processor FLASH and EEPROM memories with a project's compiled binary output files.
\r
319 * To use this module in your application makefile, add the following code:
\r
321 * include $(LUFA_PATH)/Build/lufa_atprogram.mk
\r
324 * \section SSec_BuildModule_ATPROGRAM_Requirements Requirements
\r
325 * This module requires the <tt>atprogram.exe</tt> utility to be available in your system's <b>PATH</b>
\r
326 * variable. The <tt>atprogram.exe</tt> utility is distributed in Atmel AVR Studio 5.x and Atmel Studio 6.x
\r
327 * inside the application install folder's "\atbackend" subdirectory.
\r
329 * \section SSec_BuildModule_ATPROGRAM_Targets Targets
\r
333 * <td><tt>atprogram</tt></td>
\r
334 * <td>Program the device FLASH memory with the application's executable data.</td>
\r
337 * <td><tt>atprogram-ee</tt></td>
\r
338 * <td>Program the device EEPROM memory with the application's EEPROM data.</td>
\r
342 * \section SSec_BuildModule_ATPROGRAM_MandatoryParams Mandatory Parameters
\r
346 * <td><tt>MCU</tt></td>
\r
347 * <td>Name of the Atmel processor model (e.g. <tt>at90usb1287</tt>).</td>
\r
350 * <td><tt>TARGET</tt></td>
\r
351 * <td>Name of the application output file prefix (e.g. <tt>TestApplication</tt>).</td>
\r
355 * \section SSec_BuildModule_ATPROGRAM_OptionalParams Optional Parameters
\r
359 * <td><tt>ATPROGRAM_PROGRAMMER</tt></td>
\r
360 * <td>Name of the Atmel programmer or debugger tool to communicate with (e.g. <tt>jtagice3</tt>).</td>
\r
363 * <td><tt>ATPROGRAM_INTERFACE</tt></td>
\r
364 * <td>Name of the programming interface to use when programming the target (e.g. <tt>spi</tt>).</td>
\r
367 * <td><tt>ATPROGRAM_PORT</tt></td>
\r
368 * <td>Name of the communication port to use when when programming with a serially connected tool (e.g. <tt>COM2</tt>).</td>
\r
372 * \section SSec_BuildModule_ATPROGRAM_ProvidedVariables Module Provided Variables
\r
376 * <td><i>None</i></td>
\r
380 * \section SSec_BuildModule_ATPROGRAM_ProvidedMacros Module Provided Macros
\r
384 * <td><i>None</i></td>
\r
389 /** \page Page_BuildModule_AVRDUDE The AVRDUDE build module
\r
391 * The AVRDUDE programming utility LUFA build system module, providing targets to reprogram an
\r
392 * Atmel processor FLASH and EEPROM memories with a project's compiled binary output files.
\r
394 * To use this module in your application makefile, add the following code:
\r
396 * include $(LUFA_PATH)/Build/lufa_avrdude.mk
\r
399 * \section SSec_BuildModule_AVRDUDE_Requirements Requirements
\r
400 * This module requires the <tt>avrdude</tt> utility to be available in your system's <b>PATH</b>
\r
401 * variable. The <tt>avrdude</tt> utility is distributed in the old WinAVR project releases for
\r
402 * Windows (<a>http://winavr.sourceforge.net</a>) or can be installed on *nix systems via the project's
\r
403 * source code (<a>https://savannah.nongnu.org/projects/avrdude</a>) or through the package manager.
\r
405 * \section SSec_BuildModule_AVRDUDE_Targets Targets
\r
409 * <td><tt>avrdude</tt></td>
\r
410 * <td>Program the device FLASH memory with the application's executable data.</td>
\r
413 * <td><tt>avrdude-ee</tt></td>
\r
414 * <td>Program the device EEPROM memory with the application's EEPROM data.</td>
\r
418 * \section SSec_BuildModule_AVRDUDE_MandatoryParams Mandatory Parameters
\r
422 * <td><tt>MCU</tt></td>
\r
423 * <td>Name of the Atmel processor model (e.g. <tt>at90usb1287</tt>).</td>
\r
426 * <td><tt>TARGET</tt></td>
\r
427 * <td>Name of the application output file prefix (e.g. <tt>TestApplication</tt>).</td>
\r
431 * \section SSec_BuildModule_AVRDUDE_OptionalParams Optional Parameters
\r
435 * <td><tt>AVRDUDE_PROGRAMMER</tt></td>
\r
436 * <td>Name of the programmer or debugger tool to communicate with (e.g. <tt>jtagicemkii</tt>).</td>
\r
439 * <td><tt>AVRDUDE_PORT</tt></td>
\r
440 * <td>Name of the communication port to use when when programming with the connected tool (e.g. <tt>COM2</tt>, <tt>/dev/ttyUSB0</tt> or <tt>usb</tt>).</td>
\r
443 * <td><tt>AVRDUDE_FLAGS</tt></td>
\r
444 * <td>Additional flags to pass to avrdude when programming, applied after the automatically generated flags.</td>
\r
448 * \section SSec_BuildModule_AVRDUDE_ProvidedVariables Module Provided Variables
\r
452 * <td><i>None</i></td>
\r
456 * \section SSec_BuildModule_AVRDUDE_ProvidedMacros Module Provided Macros
\r
460 * <td><i>None</i></td>
\r
465 /** \page Page_BuildModule_CPPCHECK The CPPCHECK build module
\r
467 * The CPPCHECK programming utility LUFA build system module, providing targets to statically
\r
468 * analyze C and C++ source code for errors and performance/style issues.
\r
470 * To use this module in your application makefile, add the following code:
\r
472 * include $(LUFA_PATH)/Build/lufa_cppcheck.mk
\r
475 * \section SSec_BuildModule_CPPCHECK_Requirements Requirements
\r
476 * This module requires the <tt>cppcheck</tt> utility to be available in your system's <b>PATH</b>
\r
477 * variable. The <tt>cppcheck</tt> utility is distributed through the project's home page
\r
478 * (<a>http://cppcheck.sourceforge.net</a>) for Windows, and can be installed on *nix systems via
\r
479 * the project's source code or through the package manager.
\r
481 * \section SSec_BuildModule_CPPCHECK_Targets Targets
\r
485 * <td><tt>cppcheck</tt></td>
\r
486 * <td>Statically analyze the project source code for issues.</td>
\r
489 * <td><tt>cppcheck-config</tt></td>
\r
490 * <td>Check the <tt>cppcheck</tt> configuration - scan source code and warn about missing header files and other issues.</td>
\r
494 * \section SSec_BuildModule_CPPCHECK_MandatoryParams Mandatory Parameters
\r
498 * <td><tt>SRC</tt></td>
\r
499 * <td>List of source files to statically analyze.</td>
\r
503 * \section SSec_BuildModule_CPPCHECK_OptionalParams Optional Parameters
\r
507 * <td><tt>CPPCHECK_INCLUDES</tt></td>
\r
508 * <td>Path of extra directories to check when attemting to resolve C/C++ header file includes.</td>
\r
511 * <td><tt>CPPCHECK_EXCLUDES</tt></td>
\r
512 * <td>Paths or path fragments to exclude when analyzing.</td>
\r
515 * <td><tt>CPPCHECK_MSG_TEMPLATE</tt></td>
\r
516 * <td>Output message template to use when printing errors, warnings and information (see <tt>cppcheck</tt> documentation).</td>
\r
519 * <td><tt>CPPCHECK_ENABLE</tt></td>
\r
520 * <td>Analysis rule categories to enable (see <tt>cppcheck</tt> documentation).</td>
\r
523 * <td><tt>CPPCHECK_SUPPRESS</tt></td>
\r
524 * <td>Specific analysis rules to suppress (see <tt>cppcheck</tt> documentation).</td>
\r
527 * <td><tt>CPPCHECK_FAIL_ON_WARNING</tt></td>
\r
528 * <td>Set to <b>Y</b> to fail the analysis job with an error exit code if warnings are found, <b>N</b> to continue without failing.</td>
\r
531 * <td><tt>CPPCHECK_QUIET</tt></td>
\r
532 * <td>Set to <b>Y</b> to suppress all output except warnings and errors, <b>N</b> to show verbose output information.</td>
\r
535 * <td><tt>CPPCHECK_FLAGS</tt></td>
\r
536 * <td>Extra flags to pass to <tt>cppcheck</tt>, after the automatically generated flags.</td>
\r
540 * \section SSec_BuildModule_CPPCHECK_ProvidedVariables Module Provided Variables
\r
544 * <td><i>None</i></td>
\r
548 * \section SSec_BuildModule_CPPCHECK_ProvidedMacros Module Provided Macros
\r
552 * <td><i>None</i></td>
\r
557 /** \page Page_BuildModule_DFU The DFU build module
\r
559 * The DFU programming utility LUFA build system module, providing targets to reprogram an
\r
560 * Atmel processor FLASH and EEPROM memories with a project's compiled binary output files.
\r
561 * This module requires a DFU class bootloader to be running in the target, compatible with
\r
562 * the DFU bootloader protocol as published by Atmel.
\r
564 * To use this module in your application makefile, add the following code:
\r
566 * include $(LUFA_PATH)/Build/lufa_dfu.mk
\r
569 * \section SSec_BuildModule_DFU_Requirements Requirements
\r
570 * This module requires either the <tt>batchisp</tt> utility from Atmel's FLIP utility, or the open
\r
571 * source <tt>dfu-programmer</tt> utility (<a>http://dfu-programmer.sourceforge.net/</a>) to be
\r
572 * available in your system's <b>PATH</b> variable. On *nix systems the <tt>dfu-programmer</tt> utility
\r
573 * can be installed via the project's source code or through the package manager.
\r
575 * \section SSec_BuildModule_DFU_Targets Targets
\r
579 * <td><tt>dfu</tt></td>
\r
580 * <td>Program the device FLASH memory with the application's executable data using <tt>dfu-programmer</tt>.</td>
\r
583 * <td><tt>dfu-ee</tt></td>
\r
584 * <td>Program the device EEPROM memory with the application's EEPROM data using <tt>dfu-programmer</tt>.</td>
\r
587 * <td><tt>flip</tt></td>
\r
588 * <td>Program the device FLASH memory with the application's executable data using <tt>batchisp</tt>.</td>
\r
591 * <td><tt>flip-ee</tt></td>
\r
592 * <td>Program the device EEPROM memory with the application's EEPROM data using <tt>batchisp</tt>.</td>
\r
596 * \section SSec_BuildModule_DFU_MandatoryParams Mandatory Parameters
\r
600 * <td><tt>MCU</tt></td>
\r
601 * <td>Name of the Atmel processor model (e.g. <tt>at90usb1287</tt>).</td>
\r
604 * <td><tt>TARGET</tt></td>
\r
605 * <td>Name of the application output file prefix (e.g. <tt>TestApplication</tt>).</td>
\r
609 * \section SSec_BuildModule_DFU_OptionalParams Optional Parameters
\r
613 * <td><i>None</i></td>
\r
617 * \section SSec_BuildModule_DFU_ProvidedVariables Module Provided Variables
\r
621 * <td><i>None</i></td>
\r
625 * \section SSec_BuildModule_DFU_ProvidedMacros Module Provided Macros
\r
629 * <td><i>None</i></td>
\r
634 /** \page Page_BuildModule_DOXYGEN The DOXYGEN build module
\r
636 * The DOXYGEN code documentation utility LUFA build system module, providing targets to generate
\r
637 * project HTML and other format documentation from a set of source files that include special
\r
638 * Doxygen comments.
\r
640 * To use this module in your application makefile, add the following code:
\r
642 * include $(LUFA_PATH)/Build/lufa_doxygen.mk
\r
645 * \section SSec_BuildModule_DOXYGEN_Requirements Requirements
\r
646 * This module requires the <tt>doxygen</tt> utility from the Doxygen website
\r
647 * (<a>http://www.doxygen.org/</a>) to be available in your system's <b>PATH</b> variable. On *nix
\r
648 * systems the <tt>doxygen</tt> utility can be installed via the project's source code or through
\r
649 * the package manager.
\r
651 * \section SSec_BuildModule_DOXYGEN_Targets Targets
\r
655 * <td><tt>doxygen</tt></td>
\r
656 * <td>Generate project documentation.</td>
\r
659 * <td><tt>doxygen_create</tt></td>
\r
660 * <td>Create a new Doxygen configuration file using the latest template.</td>
\r
663 * <td><tt>doxygen_upgrade</tt></td>
\r
664 * <td>Upgrade an existing Doxygen configuration file to the latest template</td>
\r
668 * \section SSec_BuildModule_DOXYGEN_MandatoryParams Mandatory Parameters
\r
672 * <td><tt>LUFA_PATH</tt></td>
\r
673 * <td>Path to the LUFA library core, either relative or absolute (e.g. <tt>../LUFA-000000/LUFA/</tt>).</td>
\r
677 * \section SSec_BuildModule_DOXYGEN_OptionalParams Optional Parameters
\r
681 * <td><tt>DOXYGEN_CONF</tt></td>
\r
682 * <td>Name and path of the base Doxygen configuration file for the project.</td>
\r
685 * <td><tt>DOXYGEN_FAIL_ON_WARNING</tt></td>
\r
686 * <td>Set to <b>Y</b> to fail the generation with an error exit code if warnings are found other than unsupported configuration parameters, <b>N</b> to continue without failing.</td>
\r
689 * <td><tt>DOXYGEN_OVERRIDE_PARAMS</tt></td>
\r
690 * <td>Extra Doxygen configuration parameters to apply, overriding the corresponding config entry in the project's configuration file (e.g. <tt>QUIET=YES</tt>).</td>
\r
694 * \section SSec_BuildModule_DOXYGEN_ProvidedVariables Module Provided Variables
\r
698 * <td><i>None</i></td>
\r
702 * \section SSec_BuildModule_DOXYGEN_ProvidedMacros Module Provided Macros
\r
706 * <td><i>None</i></td>
\r
711 /** \page Page_BuildModule_HID The HID build module
\r
713 * The HID programming utility LUFA build system module, providing targets to reprogram an
\r
714 * Atmel processor's FLASH memory with a project's compiled binary output file. This module
\r
715 * requires a HID class bootloader to be running in the target, using a protocol compatible
\r
716 * with the PJRC "HalfKay" protocol (<a>http://www.pjrc.com/teensy/halfkay_protocol.html</a>).
\r
718 * To use this module in your application makefile, add the following code:
\r
720 * include $(LUFA_PATH)/Build/lufa_hid.mk
\r
723 * \section SSec_BuildModule_HID_Requirements Requirements
\r
724 * This module requires either the <tt>hid_bootloader_cli</tt> utility from the included LUFA HID
\r
725 * class bootloader API subdirectory, or the <tt>teensy_loader_cli</tt> utility from PJRC
\r
726 * (<a>http://www.pjrc.com/teensy/loader_cli.html</a>) to be available in your system's <b>PATH</b>
\r
729 * \section SSec_BuildModule_HID_Targets Targets
\r
733 * <td><tt>hid</tt></td>
\r
734 * <td>Program the device FLASH memory with the application's executable data using <tt>hid_bootloader_cli</tt>.</td>
\r
737 * <td><tt>hid-ee</tt></td>
\r
738 * <td>Program the device EEPROM memory with the application's EEPROM data using <tt>hid_bootloader_cli</tt> and
\r
739 * a temporary AVR application programmed into the target's FLASH.
\r
740 * \note This will erase the currently loaded application in the target.</td>
\r
743 * <td><tt>teensy</tt></td>
\r
744 * <td>Program the device FLASH memory with the application's executable data using <tt>teensy_loader_cli</tt>.</td>
\r
747 * <td><tt>teensy-ee</tt></td>
\r
748 * <td>Program the device EEPROM memory with the application's EEPROM data using <tt>teensy_loader_cli</tt> and
\r
749 * a temporary AVR application programmed into the target's FLASH.
\r
750 * \note This will erase the currently loaded application in the target.</td>
\r
754 * \section SSec_BuildModule_HID_MandatoryParams Mandatory Parameters
\r
758 * <td><tt>MCU</tt></td>
\r
759 * <td>Name of the Atmel processor model (e.g. <tt>at90usb1287</tt>).</td>
\r
762 * <td><tt>TARGET</tt></td>
\r
763 * <td>Name of the application output file prefix (e.g. <tt>TestApplication</tt>).</td>
\r
767 * \section SSec_BuildModule_HID_OptionalParams Optional Parameters
\r
771 * <td><i>None</i></td>
\r
775 * \section SSec_BuildModule_HID_ProvidedVariables Module Provided Variables
\r
779 * <td><i>None</i></td>
\r
783 * \section SSec_BuildModule_HID_ProvidedMacros Module Provided Macros
\r
787 * <td><i>None</i></td>
\r
792 /** \page Page_BuildModule_SOURCES The SOURCES build module
\r
794 * The SOURCES LUFA build system module, providing variables listing the various LUFA source files
\r
795 * required to be build by a project for a given LUFA module. This module gives a way to reference
\r
796 * LUFA source files symbolically, so that changes to the library structure do not break the library
\r
799 * To use this module in your application makefile, add the following code:
\r
801 * include $(LUFA_PATH)/Build/lufa_sources.mk
\r
804 * \section SSec_BuildModule_SOURCES_Requirements Requirements
\r
807 * \section SSec_BuildModule_SOURCES_Targets Targets
\r
811 * <td><i>None</i></td>
\r
815 * \section SSec_BuildModule_SOURCES_MandatoryParams Mandatory Parameters
\r
819 * <td><tt>LUFA_PATH</tt></td>
\r
820 * <td>Path to the LUFA library core, either relative or absolute (e.g. <tt>../LUFA-000000/LUFA/</tt>).</td>
\r
823 * <td><tt>ARCH</tt></td>
\r
824 * <td>Architecture of the target processor (see \ref Page_DeviceSupport).</td>
\r
828 * \section SSec_BuildModule_SOURCES_OptionalParams Optional Parameters
\r
832 * <td><i>None</i></td>
\r
836 * \section SSec_BuildModule_SOURCES_ProvidedVariables Module Provided Variables
\r
840 * <td><tt>LUFA_SRC_USB</tt></td>
\r
841 * <td>List of LUFA USB driver source files.</td>
\r
844 * <td><tt>LUFA_SRC_USBCLASS</tt></td>
\r
845 * <td>List of LUFA USB Class driver source files.</td>
\r
848 * <td><tt>LUFA_SRC_TEMPERATURE</tt></td>
\r
849 * <td>List of LUFA temperature sensor driver source files.</td>
\r
852 * <td><tt>LUFA_SRC_SERIAL</tt></td>
\r
853 * <td>List of LUFA Serial U(S)ART driver source files.</td>
\r
856 * <td><tt>LUFA_SRC_TWI</tt></td>
\r
857 * <td>List of LUFA TWI driver source files.</td>
\r
860 * <td><tt>LUFA_SRC_PLATFORM</tt></td>
\r
861 * <td>List of LUFA architecture specific platform management source files.</td>
\r
865 * \section SSec_BuildModule_SOURCES_ProvidedMacros Module Provided Macros
\r
869 * <td><i>None</i></td>
\r
874 /** \page Page_BuildTroubleshooting Troubleshooting Information
\r
876 * 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
\r
877 * 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
\r
878 * errors being produced when compilation or other operations are attempted. The table below lists a set of commonly encountered errors and their resolutions.
\r
883 * <th>Resolution</th>
\r
886 * <td>Error "<b><tt>relocation truncated to fit: R_AVR_13_PCREL against symbol <i>{X}</i></tt></b>" shown when compiling.</td>
\r
887 * <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
888 * from other makefiles. Alternatively, make sure you have the latest version of the Atmel Toolchain installed for your system.</td>
\r
891 * <td>Error "<b><tt>error: ld terminated with signal 11 [Segmentation fault]</tt></b>" shown when compiling.</td>
\r
892 * <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
895 * <td>Error "<b><tt>EMERGENCY ABORT: INFINITE RECURSION DETECTED</tt></b>" shown when compiling.</td>
\r
896 * <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
897 * GNU make or other variants of Make causing an infinitely recursive build.</td>
\r
900 * <td>Error "<b><tt>Unsupported architecture "<i>{X}</i>"</tt></b>" shown when compiling.</td>
\r
901 * <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
904 * <td>Error "<b><tt>Makefile <i>{X}</i> value not set</tt></b>" shown when compiling.</td>
\r
905 * <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
906 * build system modules. Define the value in your project makefile and try again.</td>
\r
909 * <td>Error "<b><tt>Makefile <i>{X}</i> option cannot be blank</tt></b>" shown when compiling.</td>
\r
910 * <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
911 * option, an empty value is not allowed. Define the nominated setting to a correct non-blank value and try again.</td>
\r
914 * <td>Error "<b><tt>Makefile <i>{X}</i> option must be Y or N</tt></b>" shown when compiling.</td>
\r
915 * <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
916 * 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
919 * <td>Error "<b><tt>Unknown input source file formats: <i>{X}</i></tt></b>" shown when compiling.</td>
\r
920 * <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
921 * 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
924 * <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
925 * <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
926 * 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
929 * <td>Error "<b><tt>Source file does not exist: <i>{X}</i></tt></b>" shown when compiling.</td>
\r
930 * <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
931 * relative path given in the user project makefile is correct and try again.</td>
\r
934 * <td>Error "<b><tt>Doxygen configuration file <i>{X}</i> does not exist</tt></b>" shown when upgrading a Doxygen configuration file.</td>
\r
935 * <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
936 * 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
940 * <td>Error "<b><tt>avr-gcc: error: unrecognized option '<i>{X}</i>'</tt></b>" shown when compiling.</td>
\r
941 * <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
942 * 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
943 * 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
946 * <td>Error "<b><tt>makefile:{X}: {Y}.mk: No such file or directory</tt></b>" shown when make is invoked.</td>
\r
947 * <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
948 * absolute path to the LUFA library core.</td>
\r
951 * <td>Error "<b><tt>fatal error: LUFAConfig.h: No such file or directory</tt></b>" shown when compiling.</td>
\r
952 * <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
953 * 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
957 * <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
958 * <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
959 * 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
960 * compiler may need to be used to ensure that the bootloader is built within the section size constraints of the target device.</td>
\r
963 * <td>Error "<b><tt>unknown MCU '<i>{X}</i>' specified</tt></b>" shown when compiling.</td>
\r
964 * <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
965 * 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
968 * <td>Error "<b><tt>undefined reference to `<i>{X}</i>'</tt></b>" shown when compiling.</td>
\r
969 * <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
970 * library, you may be missing a LUFA source makefile module (see \ref Page_BuildModule_SOURCES).</td>
\r
974 * For troubleshooting other errors you encounter, please see \ref Sec_ProjectHelp.
\r