upload
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
Ce dépôt est archivé. Vous pouvez voir les fichiers et le cloner, mais vous ne pouvez pas pousser ni ouvrir de ticket/demande d'ajout.

BuildSystem.txt 38KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975
  1. /** \file
  2. *
  3. * This file contains special DoxyGen information for the generation of the main page and other special
  4. * documentation pages. It is not a project source file.
  5. */
  6. /** \page Page_BuildSystem The LUFA Build System
  7. *
  8. * \section Sec_BuildSystem_Overview Overview of the LUFA Build System
  9. * The LUFA build system is an attempt at making a set of re-usable, modular build make files which
  10. * can be referenced in a LUFA powered project, to minimize the amount of code required in an
  11. * application makefile. The system is written in GNU Make, and each module is independent of
  12. * one-another.
  13. *
  14. * For details on the prerequisites needed for Linux and Windows machines to be able to use the LUFA
  15. * build system, see \ref Sec_CompilingApps_Prerequisites.
  16. *
  17. * To use a LUFA build system module, simply add an include to your project makefile. All user projects
  18. * should at a minimum include \ref Page_BuildModule_CORE for base functionality:
  19. * \code
  20. * include $(LUFA_PATH)/Build/lufa_core.mk
  21. * \endcode
  22. *
  23. * Once included in your project makefile, the associated build module targets will be added to your
  24. * project's build makefile targets automatically. To call a build target, run <tt>make {TARGET_NAME}</tt>
  25. * from the command line, substituting in the appropriate target name.
  26. *
  27. * \see \ref Sec_ConfiguringApps_AppMakefileParams for a copy of the sample LUFA project makefile.
  28. *
  29. * Each build module may have one or more mandatory parameters (GNU Make variables) which <i>must</i>
  30. * be supplied in the project makefile for the module to work, and one or more optional parameters which
  31. * may be defined and which will assume a sensible default if not.
  32. *
  33. * \section SSec_BuildSystem_Modules Available Modules
  34. *
  35. * The following modules are included in this LUFA release:
  36. *
  37. * \li \subpage Page_BuildModule_ATPROGRAM - Device Programming
  38. * \li \subpage Page_BuildModule_AVRDUDE - Device Programming
  39. * \li \subpage Page_BuildModule_BUILD - Compiling/Assembling/Linking
  40. * \li \subpage Page_BuildModule_CORE - Core Build System Functions
  41. * \li \subpage Page_BuildModule_CPPCHECK - Static Code Analysis
  42. * \li \subpage Page_BuildModule_DFU - Device Programming
  43. * \li \subpage Page_BuildModule_DOXYGEN - Automated Source Code Documentation
  44. * \li \subpage Page_BuildModule_HID - Device Programming
  45. * \li \subpage Page_BuildModule_SOURCES - LUFA Module Source Code Variables
  46. *
  47. * If you have problems building using the LUFA build system, see \subpage Page_BuildTroubleshooting for resolution steps.
  48. */
  49. /** \page Page_BuildModule_BUILD The BUILD build module
  50. *
  51. * The BUILD LUFA build system module, providing targets for the compilation,
  52. * assembling and linking of an application from source code into binary files
  53. * suitable for programming into a target device, using the GCC compiler.
  54. *
  55. * To use this module in your application makefile, add the following code:
  56. * \code
  57. * include $(LUFA_PATH)/Build/lufa_build.mk
  58. * \endcode
  59. *
  60. * \section SSec_BuildModule_BUILD_Requirements Requirements
  61. * This module requires the the architecture appropriate binaries of the GCC compiler are available in your
  62. * system's <b>PATH</b> variable. The GCC compiler and associated toolchain is distributed in Atmel AVR Studio
  63. * 5.x and Atmel Studio 6.x installation directories, as well as in many third party distribution packages.
  64. *
  65. * \section SSec_BuildModule_BUILD_Targets Targets
  66. *
  67. * <table>
  68. * <tr>
  69. * <td><tt>size</tt></td>
  70. * <td>Display size of the compiled application FLASH and SRAM segments.</td>
  71. * </tr>
  72. * <tr>
  73. * <td><tt>symbol-sizes</tt></td>
  74. * <td>Display a size-sorted list of symbols from the compiled application, in decimal bytes.</td>
  75. * </tr>
  76. * <tr>
  77. * <td><tt>lib</tt></td>
  78. * <td>Build and archive all source files into a library A binary file.</td>
  79. * </tr>
  80. * <tr>
  81. * <td><tt>all</tt></td>
  82. * <td>Build and link the application into ELF debug and HEX binary files.</td>
  83. * </tr>
  84. * <tr>
  85. * <td><tt>elf</tt></td>
  86. * <td>Build and link the application into an ELF debug file.</td>
  87. * </tr>
  88. * <tr>
  89. * <td><tt>bin</tt></td>
  90. * <td>Build and link the application and produce a BIN binary file.</td>
  91. * </tr>
  92. * <tr>
  93. * <td><tt>hex</tt></td>
  94. * <td>Build and link the application and produce HEX and EEP binary files.</td>
  95. * </tr>
  96. * <tr>
  97. * <td><tt>lss</tt></td>
  98. * <td>Build and link the application and produce a LSS source code/assembly code mixed listing file.</td>
  99. * </tr>
  100. * <tr>
  101. * <td><tt>clean</tt></td>
  102. * <td>Remove all intermediary files and binary output files.</td>
  103. * </tr>
  104. * <tr>
  105. * <td><tt>mostlyclean</tt></td>
  106. * <td>Remove all intermediary files but preserve any binary output files.</td>
  107. * </tr>
  108. * <tr>
  109. * <td><tt><i>&lt;filename&gt;</i>.s</tt></td>
  110. * <td>Create an assembly listing of a given input C/C++ source file.</td>
  111. * </tr>
  112. * </table>
  113. *
  114. * \section SSec_BuildModule_BUILD_MandatoryParams Mandatory Parameters
  115. *
  116. * <table>
  117. * <tr>
  118. * <td><tt>TARGET</tt></td>
  119. * <td>Name of the application output file prefix (e.g. <tt>TestApplication</tt>).</td>
  120. * </tr>
  121. * <tr>
  122. * <td><tt>ARCH</tt></td>
  123. * <td>Architecture of the target processor (see \ref Page_DeviceSupport).</td>
  124. * </tr>
  125. * <tr>
  126. * <td><tt>MCU</tt></td>
  127. * <td>Name of the Atmel processor model (e.g. <tt>at90usb1287</tt>).</td>
  128. * </tr>
  129. * <tr>
  130. * <td><tt>SRC</tt></td>
  131. * <td>List of relative or absolute paths to the application C (.c), C++ (.cpp) and Assembly (.S) source files.</td>
  132. * </tr>
  133. * <tr>
  134. * <td><tt>F_USB</tt></td>
  135. * <td>Speed in Hz of the input clock frequency to the target's USB controller.</td>
  136. * </tr>
  137. * <tr>
  138. * <td><tt>LUFA_PATH</tt></td>
  139. * <td>Path to the LUFA library core, either relative or absolute (e.g. <tt>../LUFA-000000/LUFA/</tt>).</td>
  140. * </tr>
  141. * </table>
  142. *
  143. * \section SSec_BuildModule_BUILD_OptionalParams Optional Parameters
  144. *
  145. * <table>
  146. * <tr>
  147. * <td><tt>BOARD</tt></td>
  148. * <td>LUFA board hardware drivers to use (see \ref Page_DeviceSupport).</td>
  149. * </tr>
  150. * <tr>
  151. * <td><tt>OPTIMIZATION</tt></td>
  152. * <td>Optimization level to use when compiling source files (see GCC manual).</td>
  153. * </tr>
  154. * <tr>
  155. * <td><tt>C_STANDARD</tt></td>
  156. * <td>Version of the C standard to apply when compiling C++ source files (see GCC manual).</td>
  157. * </tr>
  158. * <tr>
  159. * <td><tt>CPP_STANDARD</tt></td>
  160. * <td>Version of the C++ standard to apply when compiling C++ source files (see GCC manual).</td>
  161. * </tr>
  162. * <tr>
  163. * <td><tt>DEBUG_FORMAT</tt></td>
  164. * <td>Format of the debug information to embed in the generated object files (see GCC manual).</td>
  165. * </tr>
  166. * <tr>
  167. * <td><tt>DEBUG_LEVEL</tt></td>
  168. * <td>Level of the debugging information to embed in the generated object files (see GCC manual).</td>
  169. * </tr>
  170. * <tr>
  171. * <td><tt>F_CPU</tt></td>
  172. * <td>Speed of the processor CPU clock, in Hz.</td>
  173. * </tr>
  174. * <tr>
  175. * <td><tt>C_FLAGS</tt></td>
  176. * <td>Flags to pass to the C compiler only, after the automatically generated flags.</td>
  177. * </tr>
  178. * <tr>
  179. * <td><tt>CPP_FLAGS</tt></td>
  180. * <td>Flags to pass to the C++ compiler only, after the automatically generated flags.</td>
  181. * </tr>
  182. * <tr>
  183. * <td><tt>ASM_FLAGS</tt></td>
  184. * <td>Flags to pass to the assembler only, after the automatically generated flags.</td>
  185. * </tr>
  186. * <tr>
  187. * <td><tt>CC_FLAGS</tt></td>
  188. * <td>Common flags to pass to the C/C++ compiler and assembler, after the automatically generated flags.</td>
  189. * </tr>
  190. * <tr>
  191. * <td><tt>COMPILER_PATH</tt></td>
  192. * <td>Directory where the C/C++ toolchain is located, if not available in the system <tt>PATH</tt>.</td>
  193. * </tr>
  194. * <tr>
  195. * <td><tt>LD_FLAGS</tt></td>
  196. * <td>Flags to pass to the linker, after the automatically generated flags.</td>
  197. * </tr>
  198. * <tr>
  199. * <td><tt>LINKER_RELAXATIONS</tt></td>
  200. * <td>Enables or disables linker relaxations when linking the application binary. This can reduce the total size
  201. * of the application by replacing full \c CALL instructions with smaller \c RCALL instructions where possible.
  202. * \note On some unpatched versions of binutils, this can cause link failures in some circumstances. If you
  203. * receive a link error <tt>relocation truncated to fit: R_AVR_13_PCREL</tt>, disable this setting.</td>
  204. * </tr>
  205. * <tr>
  206. * <td><tt>OBJDIR</tt></td>
  207. * <td>Directory to place the generated object and dependency files. If set to "." the same folder as the source file will be used.
  208. * \note When this option is enabled, all source filenames <b>must</b> be unique.</td>
  209. * </tr>
  210. * <tr>
  211. * <td><tt>OBJECT_FILES</tt></td>
  212. * <td>List of additional object files that should be linked into the resulting binary.</td>
  213. * </tr>
  214. * </table>
  215. *
  216. * \section SSec_BuildModule_BUILD_ProvidedVariables Module Provided Variables
  217. *
  218. * <table>
  219. * <tr>
  220. * <td><i>None</i></td>
  221. * </tr>
  222. * </table>
  223. *
  224. * \section SSec_BuildModule_BUILD_ProvidedMacros Module Provided Macros
  225. *
  226. * <table>
  227. * <tr>
  228. * <td><i>None</i></td>
  229. * </tr>
  230. * </table>
  231. */
  232. /** \page Page_BuildModule_CORE The CORE build module
  233. *
  234. * The core LUFA build system module, providing common build system help and information targets.
  235. *
  236. * To use this module in your application makefile, add the following code:
  237. * \code
  238. * include $(LUFA_PATH)/Build/lufa_core.mk
  239. * \endcode
  240. *
  241. * \section SSec_BuildModule_CORE_Requirements Requirements
  242. * This module has no requirements outside a standard *nix shell like environment; the <tt>sh</tt>
  243. * shell, GNU <tt>make</tt> and *nix CoreUtils (<tt>echo</tt>, <tt>printf</tt>, etc.).
  244. *
  245. * \section SSec_BuildModule_CORE_Targets Targets
  246. *
  247. * <table>
  248. * <tr>
  249. * <td><tt>help</tt></td>
  250. * <td>Display build system help and configuration information.</td>
  251. * </tr>
  252. * <tr>
  253. * <td><tt>list_targets</tt></td>
  254. * <td>List all available build targets from the build system.</td>
  255. * </tr>
  256. * <tr>
  257. * <td><tt>list_modules</tt></td>
  258. * <td>List all available build modules from the build system.</td>
  259. * </tr>
  260. * <tr>
  261. * <td><tt>list_mandatory</tt></td>
  262. * <td>List all mandatory parameters required by the included modules.</td>
  263. * </tr>
  264. * <tr>
  265. * <td><tt>list_optional</tt></td>
  266. * <td>List all optional parameters required by the included modules.</td>
  267. * </tr>
  268. * <tr>
  269. * <td><tt>list_provided</tt></td>
  270. * <td>List all variables provided by the included modules.</td>
  271. * </tr>
  272. * <tr>
  273. * <td><tt>list_macros</tt></td>
  274. * <td>List all macros provided by the included modules.</td>
  275. * </tr>
  276. * </table>
  277. *
  278. * \section SSec_BuildModule_CORE_MandatoryParams Mandatory Parameters
  279. *
  280. * <table>
  281. * <tr>
  282. * <td><i>None</i></td>
  283. * </tr>
  284. * </table>
  285. *
  286. * \section SSec_BuildModule_CORE_OptionalParams Optional Parameters
  287. *
  288. * <table>
  289. * <tr>
  290. * <td><i>None</i></td>
  291. * </tr>
  292. * </table>
  293. *
  294. * \section SSec_BuildModule_CORE_ProvidedVariables Module Provided Variables
  295. *
  296. * <table>
  297. * <tr>
  298. * <td><i>None</i></td>
  299. * </tr>
  300. * </table>
  301. *
  302. * \section SSec_BuildModule_CORE_ProvidedMacros Module Provided Macros
  303. *
  304. * <table>
  305. * <tr>
  306. * <td><i>None</i></td>
  307. * </tr>
  308. * </table>
  309. */
  310. /** \page Page_BuildModule_ATPROGRAM The ATPROGRAM build module
  311. *
  312. * The ATPROGRAM programming utility LUFA build system module, providing targets to reprogram an
  313. * Atmel processor FLASH and EEPROM memories with a project's compiled binary output files.
  314. *
  315. * To use this module in your application makefile, add the following code:
  316. * \code
  317. * include $(LUFA_PATH)/Build/lufa_atprogram.mk
  318. * \endcode
  319. *
  320. * \section SSec_BuildModule_ATPROGRAM_Requirements Requirements
  321. * This module requires the <tt>atprogram.exe</tt> utility to be available in your system's <b>PATH</b>
  322. * variable. The <tt>atprogram.exe</tt> utility is distributed in Atmel AVR Studio 5.x and Atmel Studio 6.x
  323. * inside the application install folder's "\atbackend" subdirectory.
  324. *
  325. * \section SSec_BuildModule_ATPROGRAM_Targets Targets
  326. *
  327. * <table>
  328. * <tr>
  329. * <td><tt>atprogram</tt></td>
  330. * <td>Program the device FLASH memory with the application's executable data.</td>
  331. * </tr>
  332. * <tr>
  333. * <td><tt>atprogram-ee</tt></td>
  334. * <td>Program the device EEPROM memory with the application's EEPROM data.</td>
  335. * </tr>
  336. * </table>
  337. *
  338. * \section SSec_BuildModule_ATPROGRAM_MandatoryParams Mandatory Parameters
  339. *
  340. * <table>
  341. * <tr>
  342. * <td><tt>MCU</tt></td>
  343. * <td>Name of the Atmel processor model (e.g. <tt>at90usb1287</tt>).</td>
  344. * </tr>
  345. * <tr>
  346. * <td><tt>TARGET</tt></td>
  347. * <td>Name of the application output file prefix (e.g. <tt>TestApplication</tt>).</td>
  348. * </tr>
  349. * </table>
  350. *
  351. * \section SSec_BuildModule_ATPROGRAM_OptionalParams Optional Parameters
  352. *
  353. * <table>
  354. * <tr>
  355. * <td><tt>ATPROGRAM_PROGRAMMER</tt></td>
  356. * <td>Name of the Atmel programmer or debugger tool to communicate with (e.g. <tt>jtagice3</tt>).</td>
  357. * </tr>
  358. * <tr>
  359. * <td><tt>ATPROGRAM_INTERFACE</tt></td>
  360. * <td>Name of the programming interface to use when programming the target (e.g. <tt>spi</tt>).</td>
  361. * </tr>
  362. * <tr>
  363. * <td><tt>ATPROGRAM_PORT</tt></td>
  364. * <td>Name of the communication port to use when when programming with a serially connected tool (e.g. <tt>COM2</tt>).</td>
  365. * </tr>
  366. * </table>
  367. *
  368. * \section SSec_BuildModule_ATPROGRAM_ProvidedVariables Module Provided Variables
  369. *
  370. * <table>
  371. * <tr>
  372. * <td><i>None</i></td>
  373. * </tr>
  374. * </table>
  375. *
  376. * \section SSec_BuildModule_ATPROGRAM_ProvidedMacros Module Provided Macros
  377. *
  378. * <table>
  379. * <tr>
  380. * <td><i>None</i></td>
  381. * </tr>
  382. * </table>
  383. */
  384. /** \page Page_BuildModule_AVRDUDE The AVRDUDE build module
  385. *
  386. * The AVRDUDE programming utility LUFA build system module, providing targets to reprogram an
  387. * Atmel processor FLASH and EEPROM memories with a project's compiled binary output files.
  388. *
  389. * To use this module in your application makefile, add the following code:
  390. * \code
  391. * include $(LUFA_PATH)/Build/lufa_avrdude.mk
  392. * \endcode
  393. *
  394. * \section SSec_BuildModule_AVRDUDE_Requirements Requirements
  395. * This module requires the <tt>avrdude</tt> utility to be available in your system's <b>PATH</b>
  396. * variable. The <tt>avrdude</tt> utility is distributed in the old WinAVR project releases for
  397. * Windows (<a>http://winavr.sourceforge.net</a>) or can be installed on *nix systems via the project's
  398. * source code (<a>https://savannah.nongnu.org/projects/avrdude</a>) or through the package manager.
  399. *
  400. * \section SSec_BuildModule_AVRDUDE_Targets Targets
  401. *
  402. * <table>
  403. * <tr>
  404. * <td><tt>avrdude</tt></td>
  405. * <td>Program the device FLASH memory with the application's executable data.</td>
  406. * </tr>
  407. * <tr>
  408. * <td><tt>avrdude-ee</tt></td>
  409. * <td>Program the device EEPROM memory with the application's EEPROM data.</td>
  410. * </tr>
  411. * </table>
  412. *
  413. * \section SSec_BuildModule_AVRDUDE_MandatoryParams Mandatory Parameters
  414. *
  415. * <table>
  416. * <tr>
  417. * <td><tt>MCU</tt></td>
  418. * <td>Name of the Atmel processor model (e.g. <tt>at90usb1287</tt>).</td>
  419. * </tr>
  420. * <tr>
  421. * <td><tt>TARGET</tt></td>
  422. * <td>Name of the application output file prefix (e.g. <tt>TestApplication</tt>).</td>
  423. * </tr>
  424. * </table>
  425. *
  426. * \section SSec_BuildModule_AVRDUDE_OptionalParams Optional Parameters
  427. *
  428. * <table>
  429. * <tr>
  430. * <td><tt>AVRDUDE_PROGRAMMER</tt></td>
  431. * <td>Name of the programmer or debugger tool to communicate with (e.g. <tt>jtagicemkii</tt>).</td>
  432. * </tr>
  433. * <tr>
  434. * <td><tt>AVRDUDE_PORT</tt></td>
  435. * <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>
  436. * </tr>
  437. * <tr>
  438. * <td><tt>AVRDUDE_FLAGS</tt></td>
  439. * <td>Additional flags to pass to avrdude when programming, applied after the automatically generated flags.</td>
  440. * </tr>
  441. * </table>
  442. *
  443. * \section SSec_BuildModule_AVRDUDE_ProvidedVariables Module Provided Variables
  444. *
  445. * <table>
  446. * <tr>
  447. * <td><i>None</i></td>
  448. * </tr>
  449. * </table>
  450. *
  451. * \section SSec_BuildModule_AVRDUDE_ProvidedMacros Module Provided Macros
  452. *
  453. * <table>
  454. * <tr>
  455. * <td><i>None</i></td>
  456. * </tr>
  457. * </table>
  458. */
  459. /** \page Page_BuildModule_CPPCHECK The CPPCHECK build module
  460. *
  461. * The CPPCHECK programming utility LUFA build system module, providing targets to statically
  462. * analyze C and C++ source code for errors and performance/style issues.
  463. *
  464. * To use this module in your application makefile, add the following code:
  465. * \code
  466. * include $(LUFA_PATH)/Build/lufa_cppcheck.mk
  467. * \endcode
  468. *
  469. * \section SSec_BuildModule_CPPCHECK_Requirements Requirements
  470. * This module requires the <tt>cppcheck</tt> utility to be available in your system's <b>PATH</b>
  471. * variable. The <tt>cppcheck</tt> utility is distributed through the project's home page
  472. * (<a>http://cppcheck.sourceforge.net</a>) for Windows, and can be installed on *nix systems via
  473. * the project's source code or through the package manager.
  474. *
  475. * \section SSec_BuildModule_CPPCHECK_Targets Targets
  476. *
  477. * <table>
  478. * <tr>
  479. * <td><tt>cppcheck</tt></td>
  480. * <td>Statically analyze the project source code for issues.</td>
  481. * </tr>
  482. * <tr>
  483. * <td><tt>cppcheck-config</tt></td>
  484. * <td>Check the <tt>cppcheck</tt> configuration - scan source code and warn about missing header files and other issues.</td>
  485. * </tr>
  486. * </table>
  487. *
  488. * \section SSec_BuildModule_CPPCHECK_MandatoryParams Mandatory Parameters
  489. *
  490. * <table>
  491. * <tr>
  492. * <td><tt>SRC</tt></td>
  493. * <td>List of source files to statically analyze.</td>
  494. * </tr>
  495. * </table>
  496. *
  497. * \section SSec_BuildModule_CPPCHECK_OptionalParams Optional Parameters
  498. *
  499. * <table>
  500. * <tr>
  501. * <td><tt>CPPCHECK_INCLUDES</tt></td>
  502. * <td>Path of extra directories to check when attemting to resolve C/C++ header file includes.</td>
  503. * </tr>
  504. * <tr>
  505. * <td><tt>CPPCHECK_EXCLUDES</tt></td>
  506. * <td>Paths or path fragments to exclude when analyzing.</td>
  507. * </tr>
  508. * <tr>
  509. * <td><tt>CPPCHECK_MSG_TEMPLATE</tt></td>
  510. * <td>Output message template to use when printing errors, warnings and information (see <tt>cppcheck</tt> documentation).</td>
  511. * </tr>
  512. * <tr>
  513. * <td><tt>CPPCHECK_ENABLE</tt></td>
  514. * <td>Analysis rule categories to enable (see <tt>cppcheck</tt> documentation).</td>
  515. * </tr>
  516. * <tr>
  517. * <td><tt>CPPCHECK_SUPPRESS</tt></td>
  518. * <td>Specific analysis rules to suppress (see <tt>cppcheck</tt> documentation).</td>
  519. * </tr>
  520. * <tr>
  521. * <td><tt>CPPCHECK_FAIL_ON_WARNING</tt></td>
  522. * <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>
  523. * </tr>
  524. * <tr>
  525. * <td><tt>CPPCHECK_QUIET</tt></td>
  526. * <td>Set to <b>Y</b> to suppress all output except warnings and errors, <b>N</b> to show verbose output information.</td>
  527. * </tr>
  528. * <tr>
  529. * <td><tt>CPPCHECK_FLAGS</tt></td>
  530. * <td>Extra flags to pass to <tt>cppcheck</tt>, after the automatically generated flags.</td>
  531. * </tr>
  532. * </table>
  533. *
  534. * \section SSec_BuildModule_CPPCHECK_ProvidedVariables Module Provided Variables
  535. *
  536. * <table>
  537. * <tr>
  538. * <td><i>None</i></td>
  539. * </tr>
  540. * </table>
  541. *
  542. * \section SSec_BuildModule_CPPCHECK_ProvidedMacros Module Provided Macros
  543. *
  544. * <table>
  545. * <tr>
  546. * <td><i>None</i></td>
  547. * </tr>
  548. * </table>
  549. */
  550. /** \page Page_BuildModule_DFU The DFU build module
  551. *
  552. * The DFU programming utility LUFA build system module, providing targets to reprogram an
  553. * Atmel processor FLASH and EEPROM memories with a project's compiled binary output files.
  554. * This module requires a DFU class bootloader to be running in the target, compatible with
  555. * the DFU bootloader protocol as published by Atmel.
  556. *
  557. * To use this module in your application makefile, add the following code:
  558. * \code
  559. * include $(LUFA_PATH)/Build/lufa_dfu.mk
  560. * \endcode
  561. *
  562. * \section SSec_BuildModule_DFU_Requirements Requirements
  563. * This module requires either the <tt>batchisp</tt> utility from Atmel's FLIP utility, or the open
  564. * source <tt>dfu-programmer</tt> utility (<a>http://dfu-programmer.sourceforge.net/</a>) to be
  565. * available in your system's <b>PATH</b> variable. On *nix systems the <tt>dfu-programmer</tt> utility
  566. * can be installed via the project's source code or through the package manager.
  567. *
  568. * \section SSec_BuildModule_DFU_Targets Targets
  569. *
  570. * <table>
  571. * <tr>
  572. * <td><tt>dfu</tt></td>
  573. * <td>Program the device FLASH memory with the application's executable data using <tt>dfu-programmer</tt>.</td>
  574. * </tr>
  575. * <tr>
  576. * <td><tt>dfu-ee</tt></td>
  577. * <td>Program the device EEPROM memory with the application's EEPROM data using <tt>dfu-programmer</tt>.</td>
  578. * </tr>
  579. * <tr>
  580. * <td><tt>flip</tt></td>
  581. * <td>Program the device FLASH memory with the application's executable data using <tt>batchisp</tt>.</td>
  582. * </tr>
  583. * <tr>
  584. * <td><tt>flip-ee</tt></td>
  585. * <td>Program the device EEPROM memory with the application's EEPROM data using <tt>batchisp</tt>.</td>
  586. * </tr>
  587. * </table>
  588. *
  589. * \section SSec_BuildModule_DFU_MandatoryParams Mandatory Parameters
  590. *
  591. * <table>
  592. * <tr>
  593. * <td><tt>MCU</tt></td>
  594. * <td>Name of the Atmel processor model (e.g. <tt>at90usb1287</tt>).</td>
  595. * </tr>
  596. * <tr>
  597. * <td><tt>TARGET</tt></td>
  598. * <td>Name of the application output file prefix (e.g. <tt>TestApplication</tt>).</td>
  599. * </tr>
  600. * </table>
  601. *
  602. * \section SSec_BuildModule_DFU_OptionalParams Optional Parameters
  603. *
  604. * <table>
  605. * <tr>
  606. * <td><i>None</i></td>
  607. * </tr>
  608. * </table>
  609. *
  610. * \section SSec_BuildModule_DFU_ProvidedVariables Module Provided Variables
  611. *
  612. * <table>
  613. * <tr>
  614. * <td><i>None</i></td>
  615. * </tr>
  616. * </table>
  617. *
  618. * \section SSec_BuildModule_DFU_ProvidedMacros Module Provided Macros
  619. *
  620. * <table>
  621. * <tr>
  622. * <td><i>None</i></td>
  623. * </tr>
  624. * </table>
  625. */
  626. /** \page Page_BuildModule_DOXYGEN The DOXYGEN build module
  627. *
  628. * The DOXYGEN code documentation utility LUFA build system module, providing targets to generate
  629. * project HTML and other format documentation from a set of source files that include special
  630. * Doxygen comments.
  631. *
  632. * To use this module in your application makefile, add the following code:
  633. * \code
  634. * include $(LUFA_PATH)/Build/lufa_doxygen.mk
  635. * \endcode
  636. *
  637. * \section SSec_BuildModule_DOXYGEN_Requirements Requirements
  638. * This module requires the <tt>doxygen</tt> utility from the Doxygen website
  639. * (<a>http://www.doxygen.org/</a>) to be available in your system's <b>PATH</b> variable. On *nix
  640. * systems the <tt>doxygen</tt> utility can be installed via the project's source code or through
  641. * the package manager.
  642. *
  643. * \section SSec_BuildModule_DOXYGEN_Targets Targets
  644. *
  645. * <table>
  646. * <tr>
  647. * <td><tt>doxygen</tt></td>
  648. * <td>Generate project documentation.</td>
  649. * </tr>
  650. * <tr>
  651. * <td><tt>doxygen_create</tt></td>
  652. * <td>Create a new Doxygen configuration file using the latest template.</td>
  653. * </tr>
  654. * <tr>
  655. * <td><tt>doxygen_upgrade</tt></td>
  656. * <td>Upgrade an existing Doxygen configuration file to the latest template</td>
  657. * </tr>
  658. * </table>
  659. *
  660. * \section SSec_BuildModule_DOXYGEN_MandatoryParams Mandatory Parameters
  661. *
  662. * <table>
  663. * <tr>
  664. * <td><tt>LUFA_PATH</tt></td>
  665. * <td>Path to the LUFA library core, either relative or absolute (e.g. <tt>../LUFA-000000/LUFA/</tt>).</td>
  666. * </tr>
  667. * </table>
  668. *
  669. * \section SSec_BuildModule_DOXYGEN_OptionalParams Optional Parameters
  670. *
  671. * <table>
  672. * <tr>
  673. * <td><tt>DOXYGEN_CONF</tt></td>
  674. * <td>Name and path of the base Doxygen configuration file for the project.</td>
  675. * </tr>
  676. * <tr>
  677. * <td><tt>DOXYGEN_FAIL_ON_WARNING</tt></td>
  678. * <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>
  679. * </tr>
  680. * <tr>
  681. * <td><tt>DOXYGEN_OVERRIDE_PARAMS</tt></td>
  682. * <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>
  683. * </tr>
  684. * </table>
  685. *
  686. * \section SSec_BuildModule_DOXYGEN_ProvidedVariables Module Provided Variables
  687. *
  688. * <table>
  689. * <tr>
  690. * <td><i>None</i></td>
  691. * </tr>
  692. * </table>
  693. *
  694. * \section SSec_BuildModule_DOXYGEN_ProvidedMacros Module Provided Macros
  695. *
  696. * <table>
  697. * <tr>
  698. * <td><i>None</i></td>
  699. * </tr>
  700. * </table>
  701. */
  702. /** \page Page_BuildModule_HID The HID build module
  703. *
  704. * The HID programming utility LUFA build system module, providing targets to reprogram an
  705. * Atmel processor's FLASH memory with a project's compiled binary output file. This module
  706. * requires a HID class bootloader to be running in the target, using a protocol compatible
  707. * with the PJRC "HalfKay" protocol (<a>http://www.pjrc.com/teensy/halfkay_protocol.html</a>).
  708. *
  709. * To use this module in your application makefile, add the following code:
  710. * \code
  711. * include $(LUFA_PATH)/Build/lufa_hid.mk
  712. * \endcode
  713. *
  714. * \section SSec_BuildModule_HID_Requirements Requirements
  715. * This module requires either the <tt>hid_bootloader_cli</tt> utility from the included LUFA HID
  716. * class bootloader API subdirectory, or the <tt>teensy_loader_cli</tt> utility from PJRC
  717. * (<a>http://www.pjrc.com/teensy/loader_cli.html</a>) to be available in your system's <b>PATH</b>
  718. * variable.
  719. *
  720. * \section SSec_BuildModule_HID_Targets Targets
  721. *
  722. * <table>
  723. * <tr>
  724. * <td><tt>hid</tt></td>
  725. * <td>Program the device FLASH memory with the application's executable data using <tt>hid_bootloader_cli</tt>.</td>
  726. * </tr>
  727. * <tr>
  728. * <td><tt>hid-ee</tt></td>
  729. * <td>Program the device EEPROM memory with the application's EEPROM data using <tt>hid_bootloader_cli</tt> and
  730. * a temporary AVR application programmed into the target's FLASH.
  731. * \note This will erase the currently loaded application in the target.</td>
  732. * </tr>
  733. * <tr>
  734. * <td><tt>teensy</tt></td>
  735. * <td>Program the device FLASH memory with the application's executable data using <tt>teensy_loader_cli</tt>.</td>
  736. * </tr>
  737. * <tr>
  738. * <td><tt>teensy-ee</tt></td>
  739. * <td>Program the device EEPROM memory with the application's EEPROM data using <tt>teensy_loader_cli</tt> and
  740. * a temporary AVR application programmed into the target's FLASH.
  741. * \note This will erase the currently loaded application in the target.</td>
  742. * </tr>
  743. * </table>
  744. *
  745. * \section SSec_BuildModule_HID_MandatoryParams Mandatory Parameters
  746. *
  747. * <table>
  748. * <tr>
  749. * <td><tt>MCU</tt></td>
  750. * <td>Name of the Atmel processor model (e.g. <tt>at90usb1287</tt>).</td>
  751. * </tr>
  752. * <tr>
  753. * <td><tt>TARGET</tt></td>
  754. * <td>Name of the application output file prefix (e.g. <tt>TestApplication</tt>).</td>
  755. * </tr>
  756. * </table>
  757. *
  758. * \section SSec_BuildModule_HID_OptionalParams Optional Parameters
  759. *
  760. * <table>
  761. * <tr>
  762. * <td><i>None</i></td>
  763. * </tr>
  764. * </table>
  765. *
  766. * \section SSec_BuildModule_HID_ProvidedVariables Module Provided Variables
  767. *
  768. * <table>
  769. * <tr>
  770. * <td><i>None</i></td>
  771. * </tr>
  772. * </table>
  773. *
  774. * \section SSec_BuildModule_HID_ProvidedMacros Module Provided Macros
  775. *
  776. * <table>
  777. * <tr>
  778. * <td><i>None</i></td>
  779. * </tr>
  780. * </table>
  781. */
  782. /** \page Page_BuildModule_SOURCES The SOURCES build module
  783. *
  784. * The SOURCES LUFA build system module, providing variables listing the various LUFA source files
  785. * required to be build by a project for a given LUFA module. This module gives a way to reference
  786. * LUFA source files symbolically, so that changes to the library structure do not break the library
  787. * makefile.
  788. *
  789. * To use this module in your application makefile, add the following code:
  790. * \code
  791. * include $(LUFA_PATH)/Build/lufa_sources.mk
  792. * \endcode
  793. *
  794. * \section SSec_BuildModule_SOURCES_Requirements Requirements
  795. * None.
  796. *
  797. * \section SSec_BuildModule_SOURCES_Targets Targets
  798. *
  799. * <table>
  800. * <tr>
  801. * <td><i>None</i></td>
  802. * </tr>
  803. * </table>
  804. *
  805. * \section SSec_BuildModule_SOURCES_MandatoryParams Mandatory Parameters
  806. *
  807. * <table>
  808. * <tr>
  809. * <td><tt>LUFA_PATH</tt></td>
  810. * <td>Path to the LUFA library core, either relative or absolute (e.g. <tt>../LUFA-000000/LUFA/</tt>).</td>
  811. * </tr>
  812. * <tr>
  813. * <td><tt>ARCH</tt></td>
  814. * <td>Architecture of the target processor (see \ref Page_DeviceSupport).</td>
  815. * </tr>
  816. * </table>
  817. *
  818. * \section SSec_BuildModule_SOURCES_OptionalParams Optional Parameters
  819. *
  820. * <table>
  821. * <tr>
  822. * <td><i>None</i></td>
  823. * </tr>
  824. * </table>
  825. *
  826. * \section SSec_BuildModule_SOURCES_ProvidedVariables Module Provided Variables
  827. *
  828. * <table>
  829. * <tr>
  830. * <td><tt>LUFA_SRC_USB</tt></td>
  831. * <td>List of LUFA USB driver source files.</td>
  832. * </tr>
  833. * <tr>
  834. * <td><tt>LUFA_SRC_USBCLASS</tt></td>
  835. * <td>List of LUFA USB Class driver source files.</td>
  836. * </tr>
  837. * <tr>
  838. * <td><tt>LUFA_SRC_TEMPERATURE</tt></td>
  839. * <td>List of LUFA temperature sensor driver source files.</td>
  840. * </tr>
  841. * <tr>
  842. * <td><tt>LUFA_SRC_SERIAL</tt></td>
  843. * <td>List of LUFA Serial U(S)ART driver source files.</td>
  844. * </tr>
  845. * <tr>
  846. * <td><tt>LUFA_SRC_TWI</tt></td>
  847. * <td>List of LUFA TWI driver source files.</td>
  848. * </tr>
  849. * <tr>
  850. * <td><tt>LUFA_SRC_PLATFORM</tt></td>
  851. * <td>List of LUFA architecture specific platform management source files.</td>
  852. * </tr>
  853. * </table>
  854. *
  855. * \section SSec_BuildModule_SOURCES_ProvidedMacros Module Provided Macros
  856. *
  857. * <table>
  858. * <tr>
  859. * <td><i>None</i></td>
  860. * </tr>
  861. * </table>
  862. */
  863. /** \page Page_BuildTroubleshooting Troubleshooting Information
  864. *
  865. * 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
  866. * 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
  867. * errors being produced when compilation or other operations are attempted. The table below lists a set of commonly encountered errors and their resolutions.
  868. *
  869. * <table>
  870. * <tr>
  871. * <th>Problem</th>
  872. * <th>Resolution</th>
  873. * </tr>
  874. * <tr>
  875. * <td>Error &quot;<b><tt>relocation truncated to fit: R_AVR_13_PCREL against symbol <i>{X}</i></tt></b>&quot; shown when compiling.</td>
  876. * <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>
  877. * from other makefiles. Alternatively, make sure you have the latest version of the Atmel Toolchain installed for your system.</td>
  878. * </tr>
  879. * <tr>
  880. * <td>Error &quot;<b><tt>error: ld terminated with signal 11 [Segmentation fault]</tt></b>&quot; shown when compiling.</td>
  881. * <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>
  882. * </tr>
  883. * <tr>
  884. * <td>Error &quot;<b><tt>EMERGENCY ABORT: INFINITE RECURSION DETECTED</tt></b>&quot; shown when compiling.</td>
  885. * <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
  886. * GNU make or other variants of Make causing an infinitely recursive build.</td>
  887. * </tr>
  888. * <tr>
  889. * <td>Error &quot;<b><tt>Unsupported architecture &quot;<i>{X}</i>&quot;</tt></b>&quot; shown when compiling.</td>
  890. * <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>
  891. * </tr>
  892. * <tr>
  893. * <td>Error &quot;<b><tt>Makefile <i>{X}</i> value not set</tt></b>&quot; shown when compiling.</td>
  894. * <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
  895. * build system modules. Define the value in your project makefile and try again.</td>
  896. * </tr>
  897. * <tr>
  898. * <td>Error &quot;<b><tt>Makefile <i>{X}</i> option cannot be blank</tt></b>&quot; shown when compiling.</td>
  899. * <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
  900. * option, an empty value is not allowed. Define the nominated setting to a correct non-blank value and try again.</td>
  901. * </tr>
  902. * <tr>
  903. * <td>Error &quot;<b><tt>Makefile <i>{X}</i> option must be Y or N</tt></b>&quot; shown when compiling.</td>
  904. * <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").
  905. * 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>
  906. * </tr>
  907. * <tr>
  908. * <td>Error &quot;<b><tt>Unknown input source file formats: <i>{X}</i></tt></b>&quot; shown when compiling.</td>
  909. * <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
  910. * 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>
  911. * </tr>
  912. * <tr>
  913. * <td>Error &quot;<b><tt>Cannot build with OBJDIR parameter set - one or more object file name is not unique</tt></b>&quot; shown when compiling.</td>
  914. * <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.
  915. * 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>
  916. * </tr>
  917. * <tr>
  918. * <td>Error &quot;<b><tt>Source file does not exist: <i>{X}</i></tt></b>&quot; shown when compiling.</td>
  919. * <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
  920. * relative path given in the user project makefile is correct and try again.</td>
  921. * </tr>
  922. * <tr>
  923. * <td>Error &quot;<b><tt>Doxygen configuration file <i>{X}</i> does not exist</tt></b>&quot; shown when upgrading a Doxygen configuration file.</td>
  924. * <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
  925. * 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
  926. * file.</td>
  927. * </tr>
  928. * <tr>
  929. * <td>Error &quot;<b><tt>avr-gcc: error: unrecognized option '<i>{X}</i>'</tt></b>&quot; shown when compiling.</td>
  930. * <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
  931. * 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
  932. * 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>
  933. * </tr>
  934. * <tr>
  935. * <td>Error &quot;<b><tt>makefile:{X}: {Y}.mk: No such file or directory</tt></b>&quot; shown when make is invoked.</td>
  936. * <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
  937. * absolute path to the LUFA library core.</td>
  938. * </tr>
  939. * <tr>
  940. * <td>Error &quot;<b><tt>fatal error: LUFAConfig.h: No such file or directory</tt></b>&quot; shown when compiling.</td>
  941. * <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
  942. * 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>
  943. * parameter.</td>
  944. * </tr>
  945. * <tr>
  946. * <td>Error &quot;<b><tt>ld.exe: section .apitable_trampolines loaded at <i>{X}</i> overlaps section .text</tt></b>&quot; shown when compiling a bootloader.</td>
  947. * <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
  948. * 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
  949. * compiler may need to be used to ensure that the bootloader is built within the section size constraints of the target device.</td>
  950. * </tr>
  951. * <tr>
  952. * <td>Error &quot;<b><tt>unknown MCU '<i>{X}</i>' specified</tt></b>&quot; shown when compiling.</td>
  953. * <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
  954. * 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>
  955. * </tr>
  956. * <tr>
  957. * <td>Error &quot;<b><tt>undefined reference to `<i>{X}</i>'</tt></b>&quot; shown when compiling.</td>
  958. * <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
  959. * library, you may be missing a LUFA source makefile module (see \ref Page_BuildModule_SOURCES).</td>
  960. * </tr>
  961. * </table>
  962. *
  963. * For troubleshooting other errors you encounter, please see \ref Sec_ProjectHelp.
  964. */