Project

General

Profile

Eclipse Arduino » History » Version 4

Joseph Foley, 2012-09-16 02:44
Getting AVR and eclipse working in linux: permission issues

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