Project

General

Profile

Setting up Eclipse for Arduino » History » Version 3

Joseph Foley, 2012-01-10 13:41
CDT link

1 1 Joseph Foley
h1. Setting up Eclipse for Arduino
2
3 2 Joseph Foley
h2. Installing Eclipse and AVR-GCC
4
5
# Install a Java JRE (or SDK if you need it for other things)
6 3 Joseph Foley
## http://java.com
7 2 Joseph Foley
# Follow the directions on the "Eclipse":http://www.eclipse.org website to install Eclipse for C/C++
8 1 Joseph Foley
## http://www.eclipse.org/downloads/moreinfo/c.php
9 3 Joseph Foley
## If you already have a different flavor installed, you need to install the CDT configuration
10
## http://eclipse.org/cdt/
11 2 Joseph Foley
# Winstall WinAVR http://winavr.sourceforge.net/
12
13
h2. Eclipse plugins 
14
15
Start eclipse before continuing.
16
17
h3. Subversive (for SVN)
18
19
# MenuBar "Help" > Install New Software...
20
# Look at "Work with:" dropdown
21
# Pick Helios or Indigo
22
# The listing underneath should show a category "Collaboration".  Expand it.
23
# Check the box next to "Subversive SVN Team Provider (Incubation)".  If there are multiple, pick the latest version.
24
# Click Finish
25
# Answer all of the following menus which are mostly licensing.
26
# Restart eclipse
27
28
h3. Setting up SVN in eclipse
29
30
# Click on the View icon in the bottom left corner.  (It should look like a tiny window with a +)
31
# Click on "Other..."
32
# In the "Show View" window, expand SVN
33
## Now Choose SVN Repositories
34
# More dialogs will ask what kind of SVN Connector to install.  Choose the pure java version SVNKit with the latest version number.  !!!DO NOT CHOOSE JAVAHL!!!!
35
# Restart eclipse
36
# Click on "Other..."
37
# In the "Show View" window, expand SVN
38
## Now Choose SVN Repositories.  A Tab should appear "SVN Repositories"
39
# In the SVN Repositories tab
40
## Click on the yellow cylinder with a green +.  DO NOT CLICK ON THE ONE THAT SAYS SVN!
41
## The window "New Repository Location" should appear
42
## Type in the project URL in the URL: field.  This is https://projects.cs.ru.is/svn/mechatronics1-2011
43
## Under Authentication, fill in the User: and Password:
44
## click on Finish
45
# A yellow cylinder with "https://projects.cs.ru.is/svn/mechatronics1-2011" should appear
46
# Expand it and see if the files in our project appear
47
48
49
h3. eclipse-avr
50
51
# MenuBar "Help" > Install New Software...
52
# Click on "Add"
53
## Name: AVR Eclipse plugin
54
## Location: http://avr-eclipse.sourceforge.net/updatesite
55
## Click "OK"
56
# Make sure that it is selected under "Work with:"
57
# "CDT Optional features" should show up in the listing.  Expand it.
58
# Check "AVR Eclipse Plugin"
59
# Click Finish
60
# Answer all of the following menus which are mostly licensing.
61
# Restart eclipse
62
63
64
65
h2. Installing the ArduinoTemplate 
66
67
68 1 Joseph Foley
# Use the ArduinoTemplate in Libraries.  
69
# SVN copy the directory to your project and rename it
70
# Check out the new project
71
# Rename the project in the project explorer
72
# Check in the rename
73
74
Note, even with this template you will need to setup the AVRDUDE
75
programmer at least once
76 2 Joseph Foley
77
# Right click on the project and select "Properties"
78
# Expand the AVR section on the left
79
# Click on "Target Hardware"
80
## For the Arduino UNO, MCU type is ATmega328P
81
## For the Arduino Mega 256, MCU type is ATmega2561
82
## Both: The MCU Clock frequency is 16 000 000
83
# Click on "AVRDude" on the left
84
# Make sure "Programmer" tab is selected
85
# In the "Programmer configuration" are
86
# Click on New...  
87
## Configuration name: "Arduino UNO"
88
## Description: "Arduino UNO on port PORT"  Put your
89 1 Joseph Foley
	 portname instead of PORT.  This is something like COM3 on
90
	 windows and /dev/ttyUSB0 on linux
91 2 Joseph Foley
## Programmer Hardware (-c): choose Arduino
92
## Override default port: choose the port that the Arduino is
93 1 Joseph Foley
	 attached to
94 2 Joseph Foley
## Click on "OK"
95
# You may have to do this for multiple ports if the
96 1 Joseph Foley
Arduino keeps changing which one it uses
97 2 Joseph Foley
#  Click on "Apply"