RepRapMicrosoftSoftware

From RepRap
Revision as of 15:57, 8 January 2007 by EdSells (talk) (version migrated from twiki)
Jump to: navigation, search

Downloading and installing the RepRap software under Microsoft Windows XP **UNDER DEVELOPMENT - Cribbed of Adrian's Linux Instructions**

RepRap uses a large number of open-source software packages for development, and quite a few when it runs. This page describes how to download and set up all the RepRap software for a standard Microsoft Windows XP platform.

Note that for many of these installations you will need administrative rights.

Where does stuff go?

It is convention to install programs, when asked into Program Files on the main hard drive (usually C:).

It is also recommended that you keep any downloaded installation files in a single folder somewhere.


Java

RepRap's controlling software is written in Java, and also the Art of Illusion design package for three dimensional objects uses it, so we need a Java development environment. The following method of getting one should be clean, in that it is easy to separate it from any Java that you already have on your system.

Java run-time environment (JRE)

Click here and download the "J2SE JRE". Choose the Windows Offline Installation, Multi-language option. After downloading, run the installation file and follow the on-screen instructions.

Eclipse: the Java development platform

Next you need the Eclipse Java development platform. This allows you to open and edit the RepRap software. Click here and download the "Eclipse SDK". After downloading, open the zip file. There should be a folder inside saying eclipse. Copy this folder to program files (extracting it from the zip folder).

Next, run Eclipse by opening the extracted Eclipse folder and double clicking on the Eclipse icon (you may want to copy a shortcut to your desktop).

This should produce a start-up window, then ask you if you want to create a workspace in your home directory (say yes), then give you the development platform window.

Subclipse: version control under Java

All of RepRap is maintained under the Subversion version-control system. This allows easy updating of source code, and also roll-back to previous versions should that be needed. The section of Subversion that works in Eclipse is called Subclipse. It installs itself from within Eclipse, and instructions for doing that are available from this link.

As the superuser (Subclipse needs to install files on your sustem), run eclipse:

    # eclipse

follow the instructions on that Subclipse webpage, then close eclipse.

Note that if you are behind a firewall or use an HTTP proxy server you may need to configure Eclipse so that it knows about that before you install Subclipse. In Eclipse go to the menu: Window -> Preferences -> Install/update and enter the location of the HTTP proxy machine on your network and its port number (usually 3128, but check with your network manager if you are not sure about this). If you are a private individual on broadband you should have a direct connection and this won't be needed.

The RepRap Java programs

Now (finally...) you can download part of the RepRap project - all the RepRap Java source code.

As you (not the superuser) run eclipse.

In Eclipse go to the menu: Window -> Open Perspective -> Other... and you will get a menu containing (among other things) SVN Repository Exploring. Select that and click on OK. It should open a window called SVN Repository. Right mouse click in that window and select New -> Repository location.

Type the URL for the RepRap project at SourceForge:

https://reprap.svn.sourceforge.net/svnroot/reprap/trunk

You may be asked to accept an encryption signature, and it will then enter the main part of the RepRap project in the SVN Repository window.

If you open this (the little triangle on the left) you will see all the sections of the RepRap project. Select reprap then host, right-mouse-click, and select checkout. It will ask you if you want to put this in Reprap in your main workspace (say yes), and it will then download all the RepRap software for driving the RepRap machine from your computer as a host.

Top right in the Eclipse window is a tag that says SVN (this is telling you that you are using Subversion at the moment) and a >> symbol. Click on that >> symbol and select Java. This takes you back to the Java language view, in which you should now have installed the RepRap host software. Open it up; the source code is under src. Explore...

You still can't run the RepRap software yet because you haven't got...

3D graphics in Java

The host RepRap software uses three-dimensional graphics to allow you to interact with the RepRap machine, so you need a copy of Java3D to permit that to work. Click on that link and download the appropraite file for your machine into your home directory; for Linux on a PC that file will be called something like java3d-1_4_0_01-linux-i586.bin. Then, as the superuser, move the file to your Java directory, cd to the Java run-time environment directory, then run the downloaded file:

    # cd /usr/local/Java
    # mv ~your-id/java3d-1_4_0_01-linux-i586.bin .
    # chmod +x java3d-1_4_0_01-linux-i586.bin
    # cd j2re1.4.2_13
    # ../java3d-1_4_0_01-linux-i586.bin

This will add extra files to your Java lib directory where Eclipse will be able to find them.

Now you can run the RepRap software. As you, not the superuser, open Eclipse, open the RepRap project, go to src -> org.reprap and right-mouse-click on Main.java. Select Run as -> Java application. This should open a window that looks like this:

This is a representation of the build-base of the RepRap machine. You will load objects to be made here, move them to where you want them built, then build them.

For the moment experiment with the tilt, zoom and pan controls (left, middle and right mouse buttons respectively).

Annoyingly, if you have an Nvidia graphics card on your system, a bug in the Nvidia drivers may become aparent here, and the software will give a Java exception rather than giving you graphics. To fix that, see here.

USB and serial-port communications from Java

The host computer (that is, the computer on which you're installing all this stuff) talks to the RepRap machine using either an RS232 serial port (/dev/ttyS0 or /dev/ttyS1 on most machines) or via a USB-to-serial converter (/dev/ttyUSB0). Most laptops and some desktop PCs don't have a serial interface, so - if you have one of those - you will need to buy such a converter; they normally only cost a few pounds. (RepRap 2.0 "Mendel" will be driven directly via USB.)

Java, therefore, needs to know how to talk to these interfaces. There is a Java API that implements this. Go back to the Sun Java site at the Java Communication API page, and go to download at the bottom. Slightly tediously, you need to register with Sun to do this, but it is free. Once you have done that and (Surprise!) accepted the licence yet again, download the file, which will be called something like comm3.0_u1_linux.zip. Move that to your Java directory and unzip it:

    # cd /usr/local/Java
    # mv ~your-id/comm3.0_u1_linux.zip .
    # unzip comm3.0_u1_linux.zip

This will create a directory call commapi and unpack a load of files into it.

We only need four of them:

    commapi/jar/comm.jar
    commapi/lib/libLinuxSerialParallel.so
    commapi/lib/libLinuxSerialParallel_g.so
    commapi/docs/javax.comm.properties

Copy them to the appropriate places in your Java run-time environment:

    # cp commapi/jar/comm.jar j2re1.4.2_13/lib/ext/
    # cp commapi/lib/* j2re1.4.2_13/lib/i386/
    # cp commapi/docs/javax.comm.properties j2re1.4.2_13/lib/

Finally, ordinary users may not have access to the serial port(s) on your machine. So type:

    # chmod 666 /dev/tty?

to give everyone read and write permissions on these ports.

Some paranoid Linux distributions (I think Red Hat is one) look at these permissions and reset them to the defaults on boot, so you may have to create a start-up script to redo that.

Art of Illusion

RepRap uses Art of Illusion as a 3D design tool. Click on that link and go to downloads then to Linux. Download Art of Illusion into a file in your home directory (you will be redirected to a choice of mirror sites; as before choose one geographically close; the file will be called something like aoi231.zip), and then download the Linux Launcher directly from the AoI download page (it will be called something like AoILinuxLauncher.zip, and for some reason it is very slow to download).

As the superuser make a directory to put AoI in, move it there, and unzip it:

    # cd /usr/local
    # mkdir <noautolink>AoI</noautolink>
    # cd <noautolink>AoI</noautolink>
    # mv ~your-id/aoi231.zip .
    # mv ~your-id/AoILinuxLauncher.zip .
    # unzip aoi231.zip

This will create a directory called something like ArtOfIllusion231 and put a load of files in it. Move to that directory and unzip the launcher:

    # cd <noautolink>ArtOfIllusion231</noautolink>
    # unzip ../AoILinuxLauncher.zip

As with Eclipse, AoI likes to be in its own directory when it is run. So create a shell script:

    # cd /usr/local/bin
    # cat > aoi
    #!/bin/sh
    cd /usr/local/AoI/ArtOfIllusion231
    ./aoi.sh

Finish with <CTRL> C on a new line and set the permissions of the resulting file:

    # chmod 755 aoi

RepRap uses a number of additional scripts in AoI, so you need to run it in order to download them too. You must do this as the superuser so that AoI can install these scripts on your machine. Run it:

    # aoi

and go to the Tools -> Scripts and Plugins Manager menu. Select the Install tab. (Note that if you are behind a firewall you may first have to click on the Setup... button and enter details of your http proxy.) AoI will scan for scripts and plugins. Click Select all and then on Install selected files. AoI will get all the available plugins and enhancements and install them on your system.

If you want to use AoI to design or modify parts for your RepRap machine to make (and that's the whole point...) then you may care to look at this RepRap page on using it for engineering design.

<noautolink>KiCad</noautolink>

KiCad is the electronic and printed circuit design package that RepRap uses. It's homepage is here. Select site iut (http) under Download and get the gzipped tarball (it will be called something like kicad-2006-08-28.tgz, depending on the date and version of the release).

Make a directory for it, move it, and unpack it:

    # cd /usr/local
    # mkdir <noautolink>KiCad</noautolink>
    # cd <noautolink>KiCad</noautolink>
    # mv ~your-id/kicad-2006-08-28.tgz .
    # tar -xvzf kicad-2006-08-28.tgz

Once again you need to create a script to run it:

    # cd /usr/local/bin
    # cat > kicad
    #!/bin/sh
    cd /usr/local/KiCad/kicad/linux
    ./kicad

Finish with <CTRL> C on a new line and set the permissions of the resulting file:

    # chmod 755 kicad

As you, not the superuser, run KiCad by typing kicad at the command prompt. You should get a small window with the default circuit and pcb (called noname) ready to edit. Close the window.


Picp, Gpicp and <noautolink>PiKdev</noautolink>

Picp and Gpicp are a couple of small utilities for dealing with PIC programming, and so it's useful to have them. Click on that link and download the files:

    picp-0.6.8.tar.gz
    gpicp-0.1.1.tar.gz

(as usual, the numbers may differ if the version has been updated). As the superuser, make a directory for them, and install them:

    # cd /usr/local
    # mkdir PIC
    # cd PIC
    # mv ~your-id/picp-0.6.8.tar.gz .
    # mv ~your-id/gpicp-0.1.1.tar.gz .
    # tar -xvzf picp-0.6.8.tar.gz
    # tar -xvzf gpicp-0.1.1.tar.gz

This will create directories picp-0.6.8 and gpicp-0.1.1 and put the files in them. To build them do:

    # cd picp-0.6.8
    # make
    # make install
    # cd ../gpicp-0.1.1
    # make
    # make install

To test them, as you (not the superuser) type:

    $ gpicp

You should get a window containing a table of hexadecimal zeros (what will be programmed into the PIC) with a menu bar across the top.

<noautolink>PiKdev</noautolink> is another suport package for the PIC microcontroller. The homepage is here. Follow the Download link on that page and the installation instructions for your platform. Here's what I did under Debian as the superuser after downloading the distribution (a tarball called something like pikdev-0.9.2-1.tar.gz). Start by moving the download to your PIC directory and unpacking it:

    # cd /usr/local/PIC
    # mv ~your-id/pikdev-0.9.2-1.tar.gz .
    # tar -xvzf pikdev-0.9.2-1.tar.gz

This will create a sub-directory called pikdev-0.9.2-1. Move to that, configure the package, make it, and install it. Note the non-obvious configure command for Debian (and Ubuntu) Linux; other distributions are more straightforward (see the PiKdev installation page on the website).

    # cd pikdev-0.9.2-1
    # ./configure --prefix=/usr --with-qt-dir=/usr/share/qt3 --with-qt-includes=/usr/include/qt3 --with-qt-libraries=/usr/lib/qt3 --with-extra-libs=/usr/lib/kde3 --enable-libsuffix=
    # make
    # make install

Now as you (not the superuser) type

    $ pikdev

This should open the <noautolink>PiKdev</noautolink> window. It may complain about lack of permission on your serial and/or parallel ports, in which case do what it says...

The rest of RepRap

You have already downloaded the host Java files. Now you need to get the rest:

    mechanics
    electronics
    firmware

These are pretty self-explanatory: mechanics contains all the mechanical design files of the RepRap machine; when you copy your machine or make spare parts for it, it is the files in here that you will load into your RepRap machine and build; electronics contains all the KiCad files for the electronic circuits in RepRap, together with printed circuit designs; firmware contains all the C code that is loaded into the PIC controllers in the RepRap machine.

As you, not the superuser, run Eclipse. Go to the >> symbol top right and select SVN Repository Exploring. Open the RepRap repository at <noautolink>SourceForge</noautolink> and right-mouse-click on mechanics and select Checkout. A menu will appear. Select the Checkout as a project in the workspace button, leave the Project Name (which should be mechanics) unchanged, and select Finish. Do the same for electronics and firmware. (There is also a miscellaneous folder where we put stuff that we want to keep, but that is not part of the distribution. By all means download that too if you want, but you don't need it.)

You will now have four directories in your space (in ASCII alphabetical order):

    ~your-id/workspace/Reprap
    ~your-id/workspace/electronics
    ~your-id/workspace/firmware
    ~your-id/workspace/mechanics

Go back to Java (the >> symbol top right) and you should see the four projects listed. Only the Reprap [trunk/reprap/host] project contains Java, of course, but you can use Eclipse to explore the files in the others.

Finally, as you not the superuser, go to the firmware folder and make the PIC firmware:

    $ cd ~/workspace/firmware
    $ make

The first time you do this the Makefile will download the correct version of the Small Device C Compiler (SDCC), build it, and then use it to compile all the RepRap C code to go in the PICs. This takes quite a while. Subsequently it'll not bother with the SDCC download and build, of course.

Congratulations! You now have the entire RepRap project on your computer plus all the software needed to build it, to run it, and to modify it.

-- Main.AdrianBowyer - 30 Oct 2006



-- Main.AdrianBowyer - 30 Oct 2006