RepRapDeveloperInstallLinux

From RepRap
Revision as of 00:06, 4 June 2007 by ZachSmith (talk) (version migrated from twiki)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

<noautolink>KiCad</noautolink>

KiCad is the electronic and printed circuit design package that RepRap uses. It's homepage is here. If you are using any of the major linux distrbutions, install it via your usual package manager, i.e. "apt-get install kicad", "emerge kicad", or "rpm --install kicad", as appropriate.

If you need to install from source, follow the directions below:

 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).

KiCad likes to be in /usr/local/kicad, so unpack it there:

    # cd /usr/local
    # tar -xvzf ~/your-id/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/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.


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. For firmware it will ask you what type of project you want (this is because there is a Makefile in the firmware root directory); tell it you want a general project.

(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.

Check that your system has a /usr/tmp directory (the SDCC compiler needs this). If it does not, as the superuser link it as follows:

    # ln -s /usr/tmp /tmp

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.

Please note: RepRap firmware currently uses any sdcc version after 4590. This is true as of February 2007, and more recent firmware may need a more recent version of sdcc. Please check your version of sdcc, and upgrade if appropriate.

Further Note: The version of sdcc source code downloaded by the Makefile,

as of 22 May 2007, is very very old indeed (version 1183). It has a compilation issue with newish GCC compilers. See SDCCVersionInfo for more details.

-- Main.JonathanMarsden - 22 May 2007

Update 29 May 2007: IRC dialogue with SimonMcAuliffe suggests that in fact the older sdcc is the one that "works"

for RepRap. He and I both generated some .hex files and their md5sums all match (i.e. the files are identical). Therefore, Main.AdrianBowyer 's note above about needing a version later than 4590 may well be no longer accurate.

-- Main.JonathanMarsden - 30 May 2007