upload
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

ExportingLibrary.txt 6.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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_ExportingLibrary Exporting the Library for IDE Use
  7. *
  8. * While LUFA was designed to allow for easy compilation in a makefile driven environment,
  9. * it is possible to export the library into a form suitable for drop-in use inside of an
  10. * IDE.
  11. *
  12. * \note <b>LUFA is also available as a native Atmel Studio 6.1 extension</b>, which integrates LUFA into
  13. * Atmel Studio including all demos and projects. If you are running Atmel Studio 6.1 or later, the
  14. * below instructions are not required; download and install the native LUFA extension from the
  15. * <a href="http://gallery.atmel.com">Atmel Gallery</a> instead.
  16. *
  17. * \section Sec_LibraryExport Exporting the Library
  18. * An export of the library is at its most basic, a direct copy of the main "LUFA" source folder from the
  19. * root download folder; this contains the library core which can be re-used within external projects.
  20. * However, as many IDEs attempt to automatically compile all included source files, it is necessary to
  21. * exclude some directories and files from the library core export to allow for easier integration into
  22. * an IDE project.
  23. *
  24. * \subsection SSec_ManualExport Manual Export
  25. * To manually export the library core, copy over the main LUFA library folder from the LUFA root directory,
  26. * renaming as desired. Within the library core folder, the following directories should be removed or
  27. * excluded from your IDE import:
  28. * - Documentation/
  29. * - DoxygenPages/
  30. * - CodeTemplates/
  31. * - StudioIntegration/
  32. *
  33. * If required, files from the CodeTemplates/ subdirectory may be copied to your IDE project as needed.
  34. *
  35. * The resulting copy of the library may then be imported into your chosen IDE according to the instructions
  36. * shown in \ref Sec_LibraryImport.
  37. *
  38. * \subsection SSec_AutomaticExport Automatic Export
  39. * If desired, the steps indicated in \ref SSec_ManualExport may be automatically performed, by running the
  40. * command <b><code>make export_tar</code></b> from the command line. This will generate two .tar files in the
  41. * current directory, named <code>LUFA_YYMMDD.tar</code> and <code>LUFA_YYMMDD_Code_Templates.tar</code> (where
  42. * "YYMMDD" is the version of the library being exported). The first archive contains the exported LUFA core
  43. * with the non-required files removed, while the second contains an archived copy of the code template files
  44. * for the current LUFA version.
  45. *
  46. * The resulting archived copy of the library may then be extracted to your chosen IDE project source directory
  47. * and imported according to the instructions shown in \ref Sec_LibraryImport.
  48. *
  49. * \section Sec_LibraryImport Importing the Library
  50. * An exported copy of the library may be imported wholesale into an IDE project, if the instructions detailed
  51. * in \ref Sec_LibraryExport are followed.
  52. *
  53. * Specific instructions for importing an exported version of LUFA into various IDEs are listed below.
  54. *
  55. * \subsection SSec_AS56_Import Importing into AVRStudio 5.x/Atmel Studio 6.0
  56. * To import LUFA into a new or existing project, the following steps must be followed.
  57. *
  58. * \subsubsection SSSec_AS56_Import_Step1 Copy over the exported library
  59. * Copy over the exported library archive created via the steps listed in \ref Sec_LibraryExport to your AS5/AS6
  60. * project directory.
  61. *
  62. * \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step1.png
  63. *
  64. * \subsubsection SSSec_AS56_Import_Step2 Extract exported library
  65. * Extract out the contents of the archive to a new folder. This may be any name you wish, however keep in mind
  66. * that this name will need to be referenced within your user application under most circumstances. It is
  67. * suggested that this folder be named "LUFA", or "LUFA" followed by the version string for easy reference.
  68. *
  69. * \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step2.png
  70. *
  71. * \subsubsection SSSec_AS56_Import_Step3 Add the library files
  72. * Open your AVRStudio 5/Atmel Studio 6 project. From the "Solution Explorer" pane, click the "Show All Files"
  73. * button on the toolbar to display ghosted icons of files and folders located in the project source directory
  74. * that are not currently added to the project.
  75. *
  76. * \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step3.png
  77. *
  78. * Right-click the ghosted version of the extracted LUFA export folder in the Solution Explorer pane, and
  79. * choose the "Add to Project" option from the context menu. This will add the entire LUFA source tree to the
  80. * current project.
  81. *
  82. * \subsubsection SSSec_AS56_Import_Step4 Open Project Toolchain Properties
  83. * In the Solution Explorer pane, click the project node, and press the "Properties" button in the toolbar to
  84. * open the Project Properties window. This window allows you to configure the various project global compiler,
  85. * assembler and linker options.
  86. *
  87. * \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step4.png
  88. *
  89. * Click the "Toolchain" tab on the left side of the Project Properties window.
  90. *
  91. * \subsubsection SSSec_AS56_Import_Step5 Configure Project Toolchain Properties
  92. *
  93. * In the GNU C Compiler section, open the "Symbols" page. Click the "Add Item" button to the top-right of the
  94. * "Defined Symbols" section to add new symbols.
  95. *
  96. * At a minimum, you will need to define the following symbols (for more information on these symbols, see
  97. * \ref Page_ConfiguringApps):
  98. * - ARCH
  99. * - F_CPU
  100. * - F_USB
  101. * - BOARD
  102. * \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step5_1.png
  103. *
  104. * Next, open the GNU C Compiler section's "Optimization" page. Ensure that the option to prepare functions for
  105. * garbage collection is enabled.
  106. * \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step5_2.png
  107. *
  108. * Finally, in the GNU C Linker section, open the "Optimization" page. Ensure that the option to garbage collect
  109. * unused sections is selected.
  110. * \image html Images/AS5_AS6_Import/AS5_AS6_Import_Step5_3.png
  111. */