Install Development Tools.docx

(47 KB) Pobierz

 

 

Steps for First Time Setup

1. Install Development Tools

Windows

On Windows, you'll need Cygwin, a Java JDK, and ant.

Cygwin is downloadable from http://www.cygwin.com/ or specifically: http://www.cygwin.com/setup.exe

Of the packages, begin with the defaults, and add:

·         git - used for version control

·         make, gcc-mingw, and g++ - used to build arduino.exe (this will also pull in gcc-core)

·         perl - use this version, activestate or other distros have trouble

·         unzip, zip - for dealing with archives

Included in the defaults, but make sure:

·         coreutils (or textutils), gzip, tar

Not required but useful:

·         openssh - command line ssh client

·         nano - handy/simple text editor

And be sure to leave the option selected for 'unix line endings'

Download and install ant. Add the apache-ant-xxx\bin directory to your path.

Download and install a Java JDK and point the JAVA_HOME environment variable to its root directory. An error message that reads "Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre6\lib\tools.jar" means you need to set JAVA_HOME to your JDK (not JRE) installation.

Mac OS X

On Mac OS X, install Apple's Developer Tools and git.

Linux

On Linux, you need the Sun Java SDK, avr-gcc, avr-g++, avr-libc, make, ant, and git.

2. Grab the code from GitHub

this grabs the code as an anonymous user.

# grab the code, it'll take a while
git clone git://github.com/arduino/Arduino.git
# (maybe even a long while for you dialup and international folks)

3. Build It

Use the command line.

cd /path/to/arduino/build
ant

# if everything went well, you'll have no errors. (feel free to make
# suggestions for things to include here for common problems)

# then to run it
ant run

# each time you make a change, use ant to build the thing
# and run to get it up and running.

Updating to the Latest Version

Each time you want to update to latest version from svn:

cd /path/to/arduino
git pull
git update

If new folders have been added, or you're gettin odd errors, use:

ant clean

 

Comment by safety...@gmail.com, Jan 2, 2009

When building (e.g., make.sh), there will be several errors displayed when the OS is unable to copy some of the subversion directories. These can be ignored.

Comment by safety...@gmail.com, Jan 2, 2009

Note on windows that the slashes are incorrect; yes, they are always trying to be 'different' ;) --- the correct line should be:

cd \path\to\arduino\build\windows

Comment by safety...@gmail.com, Jan 2, 2009

Here is a problem one might encounter when running under Ubuntu:

ERROR MESSAGE: java.io.IOException: Cannot run program "avr-gcc": java.io.IOException: error=2, No such file or directory

SOLUTION: sudo apt-get install gcc-avr avr-libc (see https://developer.berlios.de/bugs/?func=detailbug&bug_id=14728&group_id=3590)

Comment by HauntedM...@gmail.com, Jan 10, 2009

(Ubuntu Linux 64) With the default file permissions you get from svn, you may encounter errors like these:

cp: cannot create regular file `work/hardware/tools/.svn/format': Permission denied

Just run the build as sudo, or do chmods as appropriate.

Comment by david.huard, Jan 19, 2009

I've run into a couple of problems with the installation on Ubuntu Ibex on 64 bits.

First, I needed to install two additional packages: sudo apt-get install ia32-libs librxtx-java

Then, I had to select the Sun java implementation: sudo update-alternatives --config java

Then, after calling sudo make.sh, I set myself as the owner of all the files (sudo chown -R me`).

Finally, I removed the serial library and replaced it with the library provided by librxtx: cp /usr/lib/librxtxSerial.so work/lib/

HTH

Comment by james_b_...@yahoo.com, Oct 22, 2009

I may have hosed up a step somewhere trying to build under XP, but I had to manually unzip jre.zip to a java directory into \arduino\build\windows\work. This may have been caused by trying to do a make before I included zip and unzip in cygwin.

Comment by theinscr...@gmail.com, Jan 13, 2010

@safetycap the slashes for windows are not incorrect. You are running under Cygwin and Cygwin uses the standard unix slash.

Comment by Per.Al...@gmail.com, Jan 27, 2010

Using windows 7 I had serious issues with the Arduino interface under 0017, where a top left section of the IDE would get repeated side-by-side and in several rows. It made the IDE useless to say the least.

Compiling under Windows 7 (32-bit)cygwin. worked fine, following the guide above, with these comments;

Used the setup.exe from cygwin.com to install cygwin basics. Could not find out how to install seperate needed packages, so ran setup.exe again and clicked on "All - default", so it became "All - install" and all the packages of the complete cygwin was downloaded (several hundred mega bytes - as warned on the cygwin web site - actually cygwin grew from abt. 500Mb HD space to now useing 4.8Gb HD space) so this took a couple of hours, and had to be restarted a couple of times. But now its ALL available!

The svn download worked just fine. Compiled just fine. Had to: chmod +x run.sh to make it run, but now the Arduino IDE looks like it does when I run 0017 under a Linux boot. And I have to start Arduino from the cygwin command window, sort of just like I have to under Linux. So far so good.

Comment by Per.Al...@gmail.com, Jan 27, 2010

I needed Teensy-0017 to integrate with 0018, wich it wouldn't. But by copying the JAVA folder from 0018 to 0017, the IDE interface seems to have been mended, and I still have Teensy installers available in 0017. Here is me hoping it will work stable now!?

Comment by henri.gu...@free.fr, Apr 16, 2010

I have a suggestion for the next arduino's IDE version. Just to change "code.getPrettyName()" (in the line 364 of EditorHeader?.java file) by "code.getFileName()" to have an access to files with same name but differents extensions.

Comment by jimbee.1...@gmail.com, May 10, 2010

@Per.Alvin, Same here w/ Vista

Comment by rjwier...@gmail.com, Jun 4, 2010

Im getting building errors from, launch4j:

launch4j? Compiling resources launch4j? Het systeem kan het opgegeven bestand niet vinden. launch4j? Er is een fout opgetreden tijdens het verwerken van: C:\Documents. launch4j? Het systeem kan het opgegeven bestand niet vinden. launch4j? Er is een fout opgetreden tijdens het verwerken van: and. launch4j? Het systeem kan het opgegeven pad niet vinden. launch4j? C:\cygwin\home\SuperCow??\arduino\build\windows\launcher\launch4j\bin\

windres.exe: no resources

BUILD FAILED C:\cygwin\home\SuperCow??\arduino\build\build.xml:29: The following error occurred

while executing this line:

C:\cygwin\home\SuperCow??\arduino\build\build.xml:403: net.sf.launch4j.BuilderExce?? ption: net.sf.launch4j.ExecException??: Exec failed(1): [Ljava.lang.String;@149f04 1

It seems to go to "document and settings", why? there is nothing there to find cygwin is installed @ c:\cygwin java sdk @ programfiles and ant aswell

Comment by mike.zaf...@gmail.com, Aug 15, 2010

@rjwiersma, I had the same problem, identically, it turned out that running the ant command from within a cygwin screen was the problem. On XP, from the start menu, press Run... , enter cmd then press enter, now your in a DOS type screen, navigate to the build directory and simply type ant and enter.

Comment by david.fo...@gmail.com, Sep 11, 2010

When I try "ant run" I get the following error. The arduino file is there, I can run it as ./arduino if I cd to the linux/work directory first.

BUILD FAILED /root/development/arduino/arduino-read-only/build/build.xml:33: The following error occurred while executing this line: /root/development/arduino/arduino-read-only/build/build.xml:318: Execute failed: java.io.IOException: Cannot run program "linux/work/arduino" (in directory "/root/development/arduino/arduino-read-only/build/linux/work"): java.io.IOException: error=2, No such file or directory

Comment by bugrao...@gmail.com, Sep 14, 2010

@david.fowler same problem although i've installed avr-gcc and avr-libc. Any solutions so far?

Comment by schne...@gmail.com, Sep 22, 2010

Same problem here as david.fowler, I am running Slackware64 13.1. There is an arduino executable created in the linux/work directory but it gives errors when executed. There isn't a 64bit version on the download page for the latest version and this could be why. I have yet to get the arduino software working on a 64bit linux OS after a year of trying.

Comment by vmb...@gmail.com, Sep 28, 2010

Hi, the linux 64 bit problem is due to a 32 bit version of librxtxserial.so. I downloaded http://rxtx.qbang.org/pub/rxtx/rxtx-2.2pre2-bins.zip and copied the librxtxserial.so and RXTXcomm.jar to the arduino/build/linux/work/lib folder. The IDE now loads though it does warn about an RXTX version mismatch. I haven't actually tried connecting an arduino yet though.

Comment by bluesquall, Sep 30, 2010

similar/same problem to david.fowler, schnee72, vmburd

Ubuntu 10.04 32bit svn rev: 1096 my arduino executable loads fine from ~/Repos/arduino/build/linux/work running `ant' in ~/Repos/...

Zgłoś jeśli naruszono regulamin