Anleitung für Eclipse Setup nach: http://gnuarmeclipse.livius.net/blog/ http://gnuarmeclipse.livius.net/blog/install/ 1. Luna 4.4 Eclipse IDE for C/C++ Developers https://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/luna/R/eclipse-cpp-luna-R-win32-x86_64.zip 2. GNU ARM PlugIn: In the Eclipse menu: Help ? Install New Software… a. in the Install window, click the Add… button (on future updates, just select the URL in the Work with: combo) b. fill in Name: with GNU ARM Eclipse Plug-ins c. fill in Location: with http://gnuarmeclipse.sourceforge.net/updates d. click the OK button 3. Set Workspace Preferences: gnuarmeclipse.livius.net/blog/plugins-install/blog/workspace-preferences/ 4. Toolchain: GNU Tools for ARM Embedded Processors GCC ARM Embedded 4.8-2014-q2-update https://launchpad.net/gcc-arm-embedded/4.8/4.8-2014-q2-update/+download/gcc-arm-none-eabi-4_8-2014q2-20140609-win32.exe Wichtig: Toolchain NICHT zum PATH hinzufügen! 5. Build tools (make & rm) on Windows https://sourceforge.net/projects/gnuarmeclipse/files/Miscellaneous/ Since most toolchains are defined with the standard POSIX names for these two programs, rename them without the cs- prefix. Next add the path where these programs are located to the Eclipse Environment definitions. Insert the new path in front of the existing path. Im Projekt: Properties -> C/C++ Build auf „Internal builder“ stellen! Konnte pitchus Projekt nicht richtig importieren, da es mit anderen Versionen von Eclipse/PlugIns/Toolchain erstellt wurde. Neues Projekt angelegt und die Einstellungen aus dem .cproject Übernommen. Dazu habe ich einen neuen Worspace angelegt und ein neues C Projekt erzeugt: - Projektnamen eingeben - Project type: Empty Project - Toolchains: Cross ARM GCC - "next" - Im nächsten Screen einfach "next" - Toolchain path setzen und "finish" - per Drag'n'Drop alle Dateien inkl. Unterordnern (exklusiv dem Ordner .settings und den Dateien .cproject und .project) in den Eclipse Project Explorer koieren (ich habe die Dateien in den workspace kopieren lassen...) - Im Project Explorer Rechtsklick auf den Projektnamen: Properties -> C/C++ Build -> Environment PATH auf Replace native environment… Pfad zu make&rm als erstes, dann noch Pfad zum \bin Ordner der Toolchain: Bei mir sieht es so aus: C:\GNU Tools ARM Embedded\Cross Build Tools\;C:\GNU Tools ARM Embedded\4.8 2014q2\bin Restlichen Einstellungen bei: Properties -> C/C++ Build auf „Internal builder“ stellen! Properties -> C/C++ Build -> Settings Karteireiter Tool Settings: • Target Processor: - ARM family: cortex-m4 - Architecture: Toolchain default - Instruction Set: Thumb - Endianness: Toolchain defualt - Float ABI: FP instuctions (hard) - FPU txpe: fpv4-sp-d16 • Optimization - Level: -O2 - nur den ersten Haken bei message length gesetzt • Warnings - nur haken bei enable all common warnings (-Wall) • Debugging - level: -g3 - format: dwarf-2 • Cross ARM C Compiler - Preprocessor: Defined Symbols -D (kann per copy und paste in das Feld eingefügt werden!) USE_STDPERIPH_DRIVER USE_FULL_ASSERT USE_ULPI_PHY STM32F4XX USE_USB_OTG_FS HSE_VALUE=8000000 - Includes: (kann per copy und paste in das Feld eingefügt werden! mit den Anführungszeichen) "${workspace_loc:/${ProjName}}" "${workspace_loc:/${ProjName}/CMSIS}" "${workspace_loc:/${ProjName}/CMSIS/Include}" "${workspace_loc:/${ProjName}/STM32F4xx_StdPeriph_Driver}" "${workspace_loc:/${ProjName}/STM32F4xx_StdPeriph_Driver/inc}" "${workspace_loc:/${ProjName}/usb_vcp}" "${workspace_loc:/${ProjName}/usb_vcp/usb_cdc_lolevel}" - Optimization: GNU ISO C11 - Miscellaneous: Hake bei Generate assembler listing • Cross ARM C Linker - General: Pfad zum Linkerskript einfügen: "${workspace_loc:/${ProjName}/stm32f407_flash.ld}" - Libraries: (-l) m c Karteireiter Toolchains: - Karteireiter Build Steps - Pre-Bild Steps: (zeigt die Compilerversion bei jedem Kompiliervorgang) ${cross_prefix}${cross_c}${cross_suffix} --version Alles mit Apply und OK bestätigen. Nun sollte das Projekt kompilieren. used by pitchu (aus dem .cproject zusammengesucht und oben eingestellt): -DUSE_STDPERIPH_DRIVER -DUSE_FULL_ASSERT -DUSE_ULPI_PHY -DSTM32F4XX -DUSE_USB_OTG_FS -DHSE_VALUE=8000000 -I..jede Menge Includes... -O2 -Wall -Wa,-adhlns="$@.lst" -c -fmessage-length=0 -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -g3 -gdwarf-2 Wichtig war die Einstellung Linker -> Libraries –lm –lc (also in dem Feld in Eclipse nur m und c hinzufügen). (für sinf() wird die math lib gebraucht) Und das Linkerscript aus dem Projektordner unter Linker -> General hinzufügen.