Installing Eclipse
Installing Eclipse
- Download and extract the latest version of Eclipse Classic for your platform from http://www.eclipse.org.
- Install a recent AVR Toolchain. Windows users should use MHV AVR Tools, as should Linux users if their distro does not include GCC-4.6.
- Install Doxygen
Running Eclipse for the first time
- Download and extract workspace.7z from the bottom of this page. This will give you an Eclipse workspace that is preconfigured with extensive syntax highlighting.
- Launch Eclipse, and select your new workspace
- Extract the eclipse-updatesites.7z archive from the bottom of this page
- We will now be installing the following Eclipse plugins:
- AnyEdit Tools - cleans up whitespace on save
- Eclox - provides Doxygen parsing
- MultiClipboard - provides support for multiple clipboard
- Click on "Help", "Install New Software"
- Click on "Available Software Sites", "Import", then select the ecliipse-updatesites.xml you extracted earlier
- Exit and restart Eclipse
- Click on "Help", "Install New Software"
- Select the "Anyedit" update site, "Eclipse-3.5-3.7 Plugins", and install "AnyEditTools". Restart when prompted
- Click on "Help", "Install New Software"
- Select the "AVR Eclipse" update site, then "AVR Eclipse Plugin". Restart when prompted
- Click on "Window", "Preferences", "AVR', "Paths" and configure your AVR toolchain. If you are using MHV AVR Tools, you should set up the following custom paths (examples are for a 64 bit Windows install):
- Click on "Help", "Install New Software"
- Select the "Eclox" update site, then Eclox". Restart when prompted
- Click on "Help", "Install New Software"
- Select the "Multi Clipboard" update site, then Multi Clipboard. Restart when prompted
Importing MHVLib
- Using git, clone the MHVLib repository to a local disk: git clone http://git.makehackvoid.com/mhvlib.git
- Windows users should consider installing TortoiseGit, which provides Explorer integration
- The git repository is updated more often than releases are uploaded, but you can also download a release from the MHVLib page.
- In Eclipse, select File, Import, General, Existing Projects into Workspace, then browse to your MHVLib directory and import all the projects found
- Eclipse will spend a minute or two indexing all the code, then you are ready to compile
- Select all the projects in Project Explorer (or just the projects you care about), right click and select "Build Configurations", "Set Active", "ATmega328P_20MHz" (for the MHVBoard), or whatever is suitable for your target platform
Building MHVLib
- Right click on "mhvlib" in "Project Explorer", then select "Build Configurations", "Set Active", and choose the build configuration you need. MHVBoard R2/R7 users should choose ATmega328p-20MHz
- Right click on "mhvlib" and select "Build Project"
- The same procedure can be used to build any of the tutorial projects
Uploading to the Microcontroller
- Build your project (see above)
- Right click on the project in "Project Explorer", select "Properties", "AVR", "AVRDude" and select a programmer configuration from the Programmer tab (not the configuration selection on top, which allows you to have multiple configs, we use this to support different microcontrollers)
- You can create a new programmer configuration by selecting "New", and filling out the details from the table below. The supplied workspace already has a few common programmers setups added
- If you are using an MHVBoard (or other bootloader that needs an explicit reset), reset your device
- Right click on the project in "Project Explorer", select "AVR", "Upload Project to Target Device"
| Name | Programmer | Speed | Port |
|---|---|---|---|
| MHVBoard R2/R7 | usbasp | blank | blank |
|
Optiboot Arduino Mini w/ ATmega328 |
stk500 | 115,200 | |
|
Arduino Uno Arduino Ethernet |
Arduino | 115,200 | <your serial port> |
|
Arduino Duemilanove w/ ATmega328 Arduino Nano w/ ATmega328 Arduino Mega Arduino Fio Lilypad Arduino w/ ATmega328 Arduino Pro/Pro Mini w/ ATmega328 |
Arduino | 57,600 | |
|
Arduino Duemilanove w/ ATmega168, Diecimila Arduino Nano w/ ATmega168 Arduino Mini w/ ATmega168 Arduino BT Lilypad Arduino w/ ATmega168 Arduino Pro/Pro Mini w/ ATmega168 Arduino NG |
Arduino | 19,200 | |
| Arduino Mega 2560/ Mega ADK | stk500v2 | 115,200 |
Updating MHVLib
- To fetch the latest version of MHVLib from the git repository, issue a "git pull" in the mhvlib directory
Useful Information
- Keyboard shortcuts can be configured in Windows, Preferences, General, Keys
- Syntax highlighting can be configured in Windows, Preferences, C/C++, Editor, Syntax Coloring
| Attachment | Size |
|---|---|
| eclipse-updatesites.7z | 479 bytes |
| workspace.7z | 667.77 KB |


