home:mios:core_toolchain:windows
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
home:mios:core_toolchain:windows [2008/12/02 04:59] – Durisian | home:mios:core_toolchain:windows [2008/12/19 17:37] (current) – Tidy-up stryd_one | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Core Toolchain Setup ====== | ||
- | for MIOS application development on Windows | ||
- | \\ | ||
- | ** Don't forget [[http:// | ||
- | | ||
- | \\ | ||
- | \\ | ||
- | **The technical jargon:**\\ | ||
- | This is the //Core Tools// section in a walkthrough on the process of developing [[: | ||
- | on [[http:// | ||
- | primarily in C, utilising the [[http:// | ||
- | [[: | ||
- | The IDE platform used will be [[http:// | ||
- | or [[http:// | ||
- | and the applications will be built | ||
- | for the [[: | ||
- | stuffed with a [[http:// | ||
- | C code will be compiled with [[http:// | ||
- | and assembled with [[http:// | ||
- | using [[http:// | ||
- | and [[http:// | ||
- | For PC emulation for debugging purposes, you may also use [[mios_c_simulator_-_debugger|AC-Sim (AudioCommander' | ||
- | compiled with [[http:// | ||
- | |||
- | **Enough of that.**\\ | ||
- | Please don't be put off by all that mumbo jumbo. If you're totally newbie then this document is also for you :) I've included everything you need to do, step-by-step, | ||
- | |||
- | I hope you find this document helpful, and that you will feel free to make suggestions or criticism or corrections or any kind of modifications as you see fit :) | ||
- | |||
- | \\ | ||
- | \\ | ||
- | |||
- | ====== Preparation ====== | ||
- | |||
- | It is important that you start with a clean installation. We all hate to do this, but you should start by uninstalling any of the following applications first, and then rebooting your PC. | ||
- | |||
- | ====== Windows Utilities ====== | ||
- | |||
- | ===== Sun Java J2SE ===== | ||
- | |||
- | Chances are you already have the Java runtime... I don't recommend upgrading the existing version if you do. | ||
- | * [[http:// | ||
- | * Install with defaults or whatever meets your requirements. I recommend disabling automatic updates. | ||
- | \\ | ||
- | \\ | ||
- | ===== 7zip ===== | ||
- | |||
- | This tool is needed to extract compressed files. If you already have winzip or winrar then you won't need this. I recommend the latest version MSI installer for ease of use. | ||
- | * [[http:// | ||
- | * Install the complete application using the defaults | ||
- | \\ | ||
- | \\ | ||
- | ====== Optional Tools ====== | ||
- | |||
- | ===== Small Device C Compiler (SDCC) ===== | ||
- | |||
- | This tool is required for all applications coded in the C language. If you're not sure, I'd install it - it won't cause any problems either way. | ||
- | * [[http:// | ||
- | This is a point of some contention. If you are new, I would recommend 2.80. Some PIC compiler routines have been improved in later snapshot builds but they can also cause perfectly good code to fail. If you get the snapshot, search for " | ||
- | * Either way, I recommend you download the relevant documentation for SDCC - it will come in handy later! If you are getting v2.80, you can get the manual[[http:// | ||
- | * Install using defaults (Note that this installs the PDF doc as well which can be very useful) | ||
- | |||
- | \\ | ||
- | \\ | ||
- | ====== Required Tools ====== | ||
- | |||
- | ===== MinGW ===== | ||
- | |||
- | MinGW' | ||
- | \\ | ||
- | MinGW also contains GCC which is used to compile the AC-sim simulator. Most people won't need this, and no it does not make a complete midibox on your PC, it is a console application designed for testing algorithms. \\ | ||
- | If you're not sure, you probably don't need it, but installing it now will make the process a little easier. MSYS should always be installed AFTER MinGW (that' | ||
- | |||
- | * [[http:// | ||
- | * Install, taking the ' | ||
- | * When you are prompted to ' | ||
- | * If you do not plan to use AC-Sim, un tick the box at the top labelled "MinGW Base Tools" | ||
- | * Tick the box at the bottom labelled "MinGW make". This is required for the MSYS installation, | ||
- | * Click ' | ||
- | * Click ' | ||
- | |||
- | //If the installer crashes while downloading just keep repeating the above until it completes. (this shouldn' | ||
- | \\ | ||
- | \\ | ||
- | |||
- | ===== MSYS ===== | ||
- | |||
- | MSYS provides us with a POSIX (UNIX style) environment for our Windows PC. This packages includes tools such as make and sed and sh, which are required to correctly run gputils later on. I recommend the latest version, but v1.0.10 has tested OK. | ||
- | If you are going to use MinGW for AC-Sim, ensure that you have installed that completely before performing the MSYS install. See the above step in this document. | ||
- | * [[http:// | ||
- | * Install using the defaults. | ||
- | * When the install is almost complete, you will see a DOS console window open, and you will be prompted: "Do you wish to continue with the post install? [yn ]". Type ' | ||
- | * Next you will be asked: "Do you have MinGW installed? [yn ]" Type ' | ||
- | * If you say yes to this prompt, you will be asked: | ||
- | " | ||
- | Where is your MinGW installation? | ||
- | * If you have followed this document, and you chose to install MinGW, you should type: " | ||
- | * Press Enter, to exit the postinstall script, and click ' | ||
- | |||
- | ==== make upgrade ==== | ||
- | |||
- | Unfortunately there is currently no installer for the required version of make (v3.81). It is downloaded in the MinGW setup aboove, but we must copy it to the correct location. | ||
- | |||
- | * Click ' | ||
- | * Paste in the following command: | ||
- | '' | ||
- | * Click ' | ||
- | \\ | ||
- | \\ | ||
- | |||
- | ===== GNU PIC Utilities (GPUtils) ===== | ||
- | |||
- | * [[https:// | ||
- | * Install the complete application using the ' | ||
- | * When the installer asks you, click ' | ||
- | \\ | ||
- | \\ | ||
- | |||
- | |||
- | |||
- | ===== PATH Environment Variables ===== | ||
- | |||
- | PATH Environment variables take a little bit of attention. \\ | ||
- | \\ | ||
- | First, a bit about what it is: The environment variable ' | ||
- | There are actually two PATH variables, and the User PATH Variable is appended to the System PATH Variable, and each directory in those variables will be searched in order.\\ | ||
- | For our purposes, it is necessary to ensure that the above tools have entries in the PATH, and that they are in the correct order. Usually, there is no need to have user-specific PATH variables, so the following procedure will do away with them, and we will just work with the System PATH for the sake of simplicity: | ||
- | |||
- | * Minimise any open windows so that you can see the desktop. | ||
- | * Right-click on 'My Computer', | ||
- | * Click on the ' | ||
- | * Under System Variables, select the variable ' | ||
- | * Highlight all of the text in there, and hit CTRL+X to cut it out. Click OK. | ||
- | * Click the ' | ||
- | * Hit CTRL+V to paste the System PATH into the empty text file. This is for ease of editing. | ||
- | * Hit ALT+TAB to switch back to the Environment Variables dialog. Under User variables, select the variable ' | ||
- | * Highlight all of the text in there, and hit CTRL+X to cut it out. Click OK. | ||
- | * Hit ALT+TAB to switch back to notepad. | ||
- | * Hit Enter to go to a new line, then hit CTRL+V to paste the user path. | ||
- | |||
- | Now we can work with just the one PATH variable and continue to ensure that the required directories exist in the path in the right order. | ||
- | |||
- | * Add these entries if they don't exist (Entries should be separated by semicolons): | ||
- | * ; | ||
- | * ;C:\Program Files\gputils\bin | ||
- | * ;C:\Program Files\SDCC\bin | ||
- | * ; | ||
- | |||
- | It is STRONGLY recommended to put these directories at the BEGINNING of the PATH Variable! I will show my PATH variables as a demonstration. Your paths may be different, as they will reflect the software installed on your PC - but these will hopefully serve as a good illustration. | ||
- | If you are using an international variant of Windows, then your Program Files directory may have a different name. If so, you can simply replace " | ||
- | \\ | ||
- | \\ | ||
- | System PATH Variable at the start of this step: | ||
- | |||
- | '' | ||
- | \\ | ||
- | \\ | ||
- | User PATH Variable at the Beginning of this step: (Note that only two of the above installations have added their directories to the path) | ||
- | |||
- | '' | ||
- | \\ | ||
- | \\ | ||
- | Combined PATHs pasted into Notepad: (note the System PATH goes first) | ||
- | |||
- | '' | ||
- | \\ | ||
- | \\ | ||
- | Final PATH Variable after adding necessary directories, | ||
- | |||
- | '' | ||
- | |||
- | |||
- | \\ | ||
- | Once you have the path edited correctly: | ||
- | |||
- | * Hit CTRL+A to select the whole line, hit CTRL+C to copy it, then hit ALT+TAB to switch to the Environment Variables dialog again. | ||
- | * Under System Variables, select the variable ' | ||
- | * This should be empty now (remember you cut it out before?). Hit CTRL+V to paste the nicely edited PATH in there. | ||
- | * Click OK. You're done! | ||
- | |||
- | \\ | ||
- | \\ | ||
- | |||
- | NOTE: Win98 users may edit the autoexec.bat file to get the path right. | ||
- | If you have followed the previous installations, | ||
- | |||
- | SET PATH=%PATH%; | ||
- | |||
- | Edit that line to read | ||
- | |||
- | SET PATH=C: | ||
- | |||
- | This should set your path correct, or at least close to correct. :-) | ||
- | |||
- | |||
- | ===== make version check ===== | ||
- | |||
- | Because you are reading this (or editing it) I'll assume that like many of us, you are a geek... and like many of us, you have various compilers for various languages installed. The copy of make we use, could be preceded by other rogue copies of make, and if this happens, like it has to many of us, your app won't compile. | ||
- | |||
- | It may be worth checking this out, it's a quick procedure: | ||
- | |||
- | * Click ' | ||
- | * Type " | ||
- | * Paste in the following command: | ||
- | '' | ||
- | * Hit Enter. You should see the following output: | ||
- | |||
- | < | ||
- | >make --version | ||
- | GNU Make 3.81 | ||
- | Copyright (C) 2006 Free Software Foundation, Inc. | ||
- | This is free software; see the source for copying conditions. | ||
- | There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A | ||
- | PARTICULAR PURPOSE. | ||
- | |||
- | This program built for i386-pc-mingw32 | ||
- | |||
- | > | ||
- | </ | ||
- | |||
- | The first and last lines must be the same as the above. If not, you need to check your PATH environment variable. make should be running from c: | ||
- | |||
- | On at least one occasion, it has been seemingly impossible to bypass another make version - in this case it was the borland make - //Delphi users be aware!!// | ||
- | In this case, the only solution was to supply the full path to make.exe - so anywhere you would type " | ||
- | \\ | ||
- | \\ | ||
- | |||
- | =====MIOS Source Files===== | ||
- | These files are required to compile custom applications prior to release. | ||
- | |||
- | There are 2 methods | ||
- | ====MIOS Base Package==== | ||
- | Download the MIOS Base Package [[http:// | ||
- | |||
- | You need add 2 environment variables to your system. MIOS_PATH and MIOS_BIN_PATH | ||
- | |||
- | Right click 'My Computer' | ||
- | Select ' | ||
- | Go to the ' | ||
- | Click ' | ||
- | Under ' | ||
- | Variable name: MIOS_PATH \\ | ||
- | variable value: <full path to the mios base package folder> eg: C: | ||
- | Click OK \\ | ||
- | add another new system variable \\ | ||
- | Variable name: MIOS_BIN_PATH \\ | ||
- | variable value: <full path to the mios base package ' | ||
- | |||
- | |||
- | ====SVN Repository==== | ||
- | The repository stores all the latest source files. Including demos, examples and applications. | ||
- | |||
- | See the [[http:// | ||
- | |||
- | ===== MIOS Studio ===== | ||
- | |||
- | If you made it this far, you've actually done enough. You can code C or ASM apps in wordpad.exe, | ||
- | //Please note that notepad.exe is not compatible with GPASM.// | ||
- | You should visit [[home: | ||
- | \\ | ||
- | \\ | ||
- | |||
- | ====== Core Tools Complete ====== | ||
- | |||
- | If you'd like to have a more advanced tool set in your hands, please read on to install and configure an IDE. Currently, there is documentation for:\\ | ||
- | [[codeblocks|Code:: | ||
- | [[notepad++|NotePad++]] - An open-source tool suitable for either ASM or C apps, or those that mix both.\\ | ||
- | You may also like to see the documents for the additional tools:\\ | ||
- | [[http:// | ||
- | [[http:// | ||
- | \\ | ||
- | \\ |
home/mios/core_toolchain/windows.1228193989.txt.gz · Last modified: 2008/12/02 04:59 by Durisian