Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / IoT

Getting Started with Eclipse on Intel® IoT Platforms

5.00/5 (1 vote)
19 Feb 2015CPOL5 min read 7.7K  
This guide explains how to connect to your Intel IoT Platform using the Eclipse IDE on Windows*, OS X*, or Linux*.

This article is for our sponsors at CodeProject. These articles are intended to provide you with information on products and services that we consider useful and of value to developers

Get access to the new Intel® IoT Developer Kit, a complete hardware and software solution that allows developers to create exciting new solutions with the Intel® Galileo and Intel® Edison boards. Visit the Intel® Developer Zone for IoT.

Overview

The Intel® IoT Developer Kit (dev kit) lets you create and test applications on Intel® IoT platforms. It helps you write applications in C and C++ languages and provides two libraries, specially designed for Intel IoT dev kit:

  • MRAA is a low-level library that offers a translation from the general purpose input/output (GPIO) interfaces to the pins available on Intel® Galileo and Intel® Edison boards.
  • UPM is a repository of sensors written in C++ and uses the MRAA library.

This guide explains how to connect to your Intel IoT Platform using the Eclipse IDE on Windows*, OS X*, or Linux*. It walks you through the IDE setup and getting the onboard LED to blink.

Requirements

Image 2

Figure 1. 7-Zip Installation Wizard

Install Intel® IoT Dev Kit IDE

  • Windows:

    7-Zip supports extended path names, which some files in the compressed file have, so only use 7-Zip software to extract the installer file.
    1. Install 7Zip (Windows only)
      • Download the 7-Zip software from http://www.7-zip.org/download.html.
      • Right-click on the downloaded executable and select Run as administrator.
      • Click Next and follow the instructions in the installation wizard (Figure 1).
    2. Download the Eclipse IDE installer file for Windows.
    3. Using 7zip, extract the installer file. Right-click the installer file and select Extract here.

Image 3

  • OS X:
    1. Download the Eclipse IDE installer file for OS X. Extract the installer file, as follows:
      • Open a new Terminal window.
      • Navigate to the directory that contains iotdk-ide-mac.tar.bz2.
      • Type tar -jxvf iotdk-ide-mac.tar.bz2 to extract the tar.bz2 file.

Note: If you see a message that says "devkit-launcher can’t be opened because it is from an unidentified developer", right-click the file and select Open with. Select the Terminal app. In the dialog box that opens, click Open.

Launch Eclipse

  1. Once the file is extracted, navigate to the directory you created in the steps above: iotdk-ide-win, iotdk-ide-linux, or iotdk-ide-mac.
  2. Double-click devkit-launcher.bat to launch the Eclipse* integrated development environment (Figure 2).

Note: Using the batch file (instead of the Eclipse executable) will launch Eclipse with all the necessary environment settings. Use devkit-launcher.bat to launch Eclipse every time.

Image 4

Figure 2. Eclipse integrated development environment

Note: Using the batch file (instead of the Eclipse executable) will launch Eclipse with all the necessary environment settings. Use devkit-launcher.bat to launch Eclipse every time.

The end result should look like this:
Image 5

Connect the Eclipse IDE to your board

  1. To connect to your Intel Edison or Intel Galileo board, configure Eclipse with your board’s IP address.

    Image 6
  2. Click the Remote System Explorer tab in the top right corner of the Eclipse screen.
  3. Select Edison or Galileo on the top-left side, depending on your Intel IoT device.
  4. A menu of settings opens in the lower-left side. Replace the entry for Host name with the IP address of your Intel board.

Run a sample application

The version of Eclipse distributed with the developer kit has some built-in example projects. Execute a simple one to test for proper connection.

Image 7

  1. Click the C/C++ tab on the top right corner.
  2. In the Project Explorer panel, right-click 4_cpp_onboard_LED_blink. This particular example blinks an LED on the IoT board.
  3. Select Build Project. This compiles and builds the project.

    Image 8
  4. Click the dropdown menu on the Run icon.
  5. Select 4_cpp_onboard_LED_blinkDebug. The Enter Password dialog box opens.
  6. Type root in the User ID field, then click OK.
    Image 9

  7. The following authentication warning will appear only once. Click Yes to proceed.

    Image 10

    Note (Intel® Edison only): If you are having problems connecting, try running the following commands in a terminal on your Intel IoT platform (to set up the terminal, refer to Step 1 – Setup Hardware in the Getting Started Section of the Getting Started Home – Edison page.
    #ifconfig usb0 down<br />
    	#ifconfig wlan0 down<br />
    	#ifconfig wlan0 up
  8. Look at your board for a blinking light

Intel Galileo Gen1

A green LED should be blinking in the bottom-left corner.

Image 11

Intel Galileo Gen2

A green LED located near the USB port should be blinking.

Image 12

Intel Edison

The LED located near the center of the board should be blinking.

Image 13

Next Steps

You have now successfully gotten your Edison board to blink its on-board LED using the Eclipse IDE. Explore the capabilities of the Eclipse* IDE:

Troubleshooting

  • If you have any issues or questions, visit the Intel IoT Forum to post your questions and look for solutions.

Resources

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)