Home

Using the GCC toolchain for Mulle SW development.

image

Contents

1. Figure 5 Installation test Terminal Mac OS X No targets specified and no makefile found Stop S m32c elf gcec v Using built in specs Target Configured with home scrizt i586 mingw32msvuc m32c elf qcc 4 4 1 configure ho st 1586 mingw32msuc target m32c elf prefix C i586 mingw32msuc with newli b with gmp home scrizt i586 mingw32msuvc m32c elf i586 mingw32msuc tmp inst with mpf r home scrizt i586 mingw32msuvc m32c elf 1586 mingw32msuc tmp inst ena ble languages c c t Thread model single gcc version 4 4 1 CGCG Figure 6 Installation test MSYS Windows XP If any other message appears your installation may be incomplete The system can probably not locate the correct executables Check the environment variables by typing SPATH If the path to the executables are not displayed add them as described above 2 USAGE Edit the Mulle code in your favorite code editor or IDE Open MinGW Shell or a Terminal window and change to the directory of the current project Type make clean to remove old executables and object files Type make all to recompile the code and create a mot file downloadable to the Mulle Using GCC for Mulle SW Development 5 9 2011 02 13 See the document Mulle Expansion Board User Manual on how to download the compiled code to the Mulle Platform 3 SET UP ECLIPSE OPTIONAL D
2. Settings Task Repository Configuration _Default Active lt Manage Configurations Builder Builder type _ External builder P _ Use default build command Build command make Makefile generation _ Generate Makefiles automatically v Expand Env Variable Refs in Makefiles Build location workspace_loc test Build directory Restore Defaults Apply Con GD Figure 7 Eclipse Project properties Mac OS X Under Windows XP in order to work with your toolchain the build command must be set to mingw32 make and configuration GCC selected as shown in Figure 8 Properties for test type filter text C C Build Resource Builders C C Build Build Variables Discovery Options Environment Settings Tool Chain Editor C C General Project References Run Debug Settings Task Repository Task Tags validation Configuration MinGW GCC v Builder Settings Behaviour Builder Builder type External builder C Use default build command Build command mingw32 make Makefile generation C Generate Makefiles automatically Expand Env variable Refs in Makefiles Build location Build directory workspace_loc test File system Restore Defaults Apply Figure 8 Eclipse Project Properties Windows XP Using GCC for Mulle SW Development 7 9 2011 02 13 Go on and click En
3. thereafter your systems paths No spaces should be used 3 1 ADD MAKE TARGETS On the right hand side of the eclipse window in the Make Targets tab go to the Applications source folder right click on the project and select New In the dialog Figure 10 choose a name for the target e g All As make target type Makefile all Create another target named Clean with the make target f Makefile clean 4 e g Mulle_ Demo Using GCC for Mulle SW Development 8 9 2011 02 13 BOF Create Make Target Target name All Make Target _ Same as the target name Make target f Makefile all Build Command vi Use builder settings Build command make Build Settings v Stop on first build error v Run all project builders ee Figure 10 Eclipse create new make target dialogue It could also be a good idea to uncheck the option Build Automatically inthe Project menu of the Eclipse window Doubleclick the make target the green circle in order to build the selected project Using GCC for Mulle SW Development 9 9 2011 02 13
4. S Basic System Figure 1 MinGW installation http sourceforge net projects mingw files Automated 20MinGW 20Installer mingw get inst mingw get inst 20110211 mingw get inst 20110211 exe download Using GCC for Mulle SW Development 2 9 2011 02 13 Next extract the contents of the archives m32c elf binutils and gcc to a suitable folder In this example they are extracted to C Dev Util A folder named i586 mingw32msvc will be created in the chosen directory When asked if you want to replace the existing file lLibiberty a choose yes After installation a few system variables have to be added in Windows Open System Properties the Advanced tab and click on Environment Variables shown in Figure 2 System Properties System Restore Automatic Updates Remote General Computer Name Hardware You must be logged on as an Administrator to make most of these changes Performance Visual effects processor scheduling memory usage and virtual memory Settings User Profiles Desktop settings related to your logon Settings Startup and Recovery System startup system failure and debugging information Settings Environment Variables Error Reporting Figure 2 System properties Find and select the System Variable PATH and click Edit see Figure 3 Add to the text already displayed in Value the location of the gcc compiler directory in ou
5. Using the GCC toolchain for Mulle SW development Tested on Windows XP and Mac OS X Snow Leopard 2011 Eistec AB All rights reserved Subject to change without prior notice Document version 4 00 1 ENVIRONMENT SETUP LI NECESSARY FILES First download the following components e For Windows MinGW and the MSYS environment from MinGW including make available at http www mingw org Choose the GUI installer e Eistec s precompiled GCC compiler for M16C consisting of two compressed archives These archives are available at Eistec s home page http www eistec se software php For Windows XP download m32c elf binutils 2 19 i1586 mingw32msvc tar bz2 m32c elf gcc 4 4 1 i586 mingw32msvc tar bz2 Furthermore a rar utility is necessary in order to decompress the archives WinRAR is recommended while WinZIP is known NOT to work with these files For Mac OS X download m32c elf gcc 4 4 3 OSX 10 6 2 i586 tar bz2 1 2 INSTALLATION AND SETUP UNDER WINDOWS XP Begin by launching the MinGW installer Choose Download latest repository catalogues Install in C MinGW as set by default Be sure to include MSYS Basic System as shown in Figure 1 below M Setup MinGW Get Select Components Choose which optional components of MinGW to install the C compiler is always installed Fortran Compiler C ObjC Compiler Ada Compiler MSS Basic System C MinGW Developer Toolkit Includes MS
6. ownload and install the Eclipse IDE for C C development Open the Eclipse IDE and create a new empty C project Makefile Project empty in the wizard If any Makefile or c file is created delete them Right click on the project folder and choose Import In the wizard select General gt File System then next Browse to the base directory of the Mulle SW project you want to import and select it Tick the box in front of the base directory in order to import all files The makefiles in the project then specifies the compiler and linker to be m32c elf gcc Import all four parts of the Mulle Software i e Applications Library lwBT and IwIP Whether to place them in the same project or not is optional In this guide they are four different projects Right click on the Applications project folder and choose Properties in the context menu Click the C C Build label Make sure that the Generate Makefiles automatically and Use default build command checkbuttons are unchecked Build command should be make when using Mac OS X see Figure 7 http www eclipse org downloads ie Applications Library lwBT IlwIP respectively Using GCC for Mulle SW Development 6 9 2011 02 13 _ type filter text Resource Builders Y C C Build Build Variables Discovery Options Environment Settings Tool Chain Editor XLC C Compiler gt C C General Project References Refactoring History Run Debug
7. r case C Dev Util i586 mingw32msvc bin Also add the path to MinGW i e C MinGW bin Environment Variables User variables for Johan Variable Value TEMP C Documents and Settings Johan Local TMP C Documents and Settings JohaniLocal System variables variable C WINDOWSisystem32 C WINDOWS COM EXE BAT CMD VBS VBE J5 PROCESSOR_A x66 PROCESSOR_ID x86 Family 6 Model 13 Stepping 8 Genu PROCESSOR_LE 6 Mi e Coe Figure 3 Environment Variables Using GCC for Mulle SW Development 3 9 2011 02 13 1 3 INSTALLATION AND SETUP UNDER MAC OS X First install Xcode available on your Mac OS X installation DVD or at developer apple com mac Make sure to check UNIX Development as shown in Figure 4 AAA Installera Xcode Anpassad installation p Mac HD Paketnamn Plats tg rd Storlek V Essentials Jj Developer Installera 1 72 GB Introduktion C System Tools Hoppa ver 57 MB V UNIX Development installera 798 1 MB C Documentation Hoppa ver OK C Mac OS X 10 4 Hoppa ver 0K som a Aterstar 78 72 GB 3 A t p Optional content to allow command line development from the boot volume Installs a duplicate of the GCC compiler and O command line tools included with the core Xcode developer tools package into the boot volume It also installs header files A libraries and other resources for developing soft
8. vironment under the label C C Build Choose to add a new variable Name the variable PATH and enter the path to the m32c elf gcc compiler Also make sure that the Append variables to native environment radiobutton is active before clicking OK See Figure 9 AO Resource Builders C C Build Build Variables Discovery Options Settings Tool Chain Editor XL C C Compiler C C General Project References Refactoring History Run Debug Settings Task Repository Properties for Applications Environment Q v Configuration Debug Active B Manage Configurations aamennat ana Environment variables to set a Variable Value Origin Volumes JN Avionics Dev BUILD SYSTEM Select D Volumes JN Avionics Dev BUILD SYSTEM Edit SS Delete ee Undefine an Append variables to native environment O Replace native environment with specified one Restore Defaults Apply 5 LL N Figure 9 Adding the PATH variable to environment IMPORTANT Sometimes Eclipse rearranges the paths and introduces a semicolon which does not work as separator If compiling does not work i e an error message is produced saying make m32c elf gcc No such file or directory this is likely to have happened In this case edit the PATH variable as above and make sure that the path to the m32c elf bin directory is stated first followed by a colon and
9. ware using Mac v Ms Figure 4 Xcode installation Next double click the gcc archive downloaded in chapter 1 1 to unpack it Move to any directory of your choice In this guide we put it in Library The path to the compiler must be added to your PATH variable Open a terminal window and type echo export PATH Library opt m32c elf bin SPATH gt gt profile exactly as above where Library is where you have put the unpacked archive Quit the Terminal application for the changes to take effect before continuing chapter 1 4 1 4 CHECK YOUR INSTALLATION Open the Terminal window on Mac or the MinGW shell from the Start menu on Windows XP A shortcut to this file can be created on the desktop Type make The text in Figure 5 Mac or Figure 6 Windows should appear Type m32c elf gcc v The text in Figure 5 Mac or Figure 6 Windows should appear Using GCC for Mulle SW Development 4 9 2011 02 13 AOO Terminal bash 80x24 Last login Sat May 22 21 12 05 on ttys000 Johan Nymans MacBook jnyman make make No targets specified and no makefile found Stop Johan Nymans MacBook jnyman m32c elf acc v Using built in specs Target m32c elf Configured with aqcc 4 4 3 configure target m32c elf enable werror no p refix opt m32c elf with local prefix opt m32c elf enable lLangquages c c Thread model single gcc version 4 4 3 GCC Johan Nymans MacBook jnyman

Download Pdf Manuals

image

Related Search

Related Contents

iDRAC7 Networking and Improved Remote Access  Manual Técnico 2011  取扱説明書 - ビートソニック  インフレータブルゴムボート 65056 取扱説明書  Manual de usuario del software YTWine  KM-6330 プリンタオプション使用説明書 <機能編  estado de mato grosso poder judiciário tribunal de justiça  Corsair SP120 Quiet Edition Single Pack  Office 135 / 135pro Bedienungsanleitung Ascotel - osi  MODE D`EMPLOI GRUNENWALD (complète)  

Copyright © All rights reserved.
Failed to retrieve file