Installing the MCU SDK

This section contains steps to install the MCU SDK on your system. See the appropriate link below:

Once you have installed the MCU SDK, the next steps are to run the MCU SDK version of Eclipse* and copy the MCU SDK scripts onto your board, detailed in the following sections:

Example of an empty workspace

Prerequisites

Installing the MCU SDK on a Windows* system

This section contains steps to install the MCU SDK on a Windows system.

  1. Download the SDK installation package from the Intel® Edison Board Software Downloads page.
  2. Extract the installation package. The folder where you extract the MCU SDK files is also your installation folder. Do not select a location that has spaces in the folder path name, such as Program Files or My Documents.
  3. In the extracted folder, double-click setup.bat. Wait for the extraction process to finish.

    Double-click setup.bat and wait for the extraction process to finish.

  4. When the User Account Control dialog box opens, click Yes to continue the installation. Click Next. The Cygwin Setup window opens.

    When the Cygwin Setup dialog box opens, click Next.

  5. Select Install from Internet and click Next.

    Select Install from Internet and click Next.

  6. On the Choose Install Directory page, click Next.

    On the Choose Install Directory page, click Next.

  7. On the Select Local Package Directory page, click Next.

    On the Select Local Package Directory page, click Next.

  8. Under Select Your Internet Connection, select the appropriate internet connection settings and click Next.

    Select the appropriate internet connection settings and click Next.

  9. From the Available Download Sites list, choose a mirror site to download the Cygwin* tools from.

    If no sites are listed, copy the URL of a mirror site from the following location: https://cygwin.com/mirrors.html. Copy and paste the URL in the User URL field, then click Add.
  10. Click Next.

    Choose a download site to download cygwin tools from.

  11. If a "Current ini file is from a newer version of setup-x86.exe" message is displayed, your installation files contain an older version of the Cygwin setup program. Exit the installer, then download and run the latest Cygwin setup program by doing the following:

    "The current ini file is from a newer version of setup-x86.exe" message
    1. Download the latest version of the installer from the following location: http://www.cygwin.com/setup-x86.exe
    2. In your MCU SDK installation folder, open the cygwin folder. Replace the existing setup-x86.exe file with the newer version you just downloaded.

      Replace the existing setup-x86.exe file with the newest version.

    3. Exit the Cygwin installer, if it is still open. Navigate back to your installation folder and double-click cygwin_setup.bat. Repeat the appropriate steps above to install Cygwin with your new installer.
  12. Click Next.

    On the Select Packages page, click Next.

  13. Click Next.

    On the Resolving Dependencies page, click Next.

  14. Under Create Icons, do the following:
    1. Clear the Create icon on Desktop check box.
    2. Clear the Add icon to Start Menu check box.
    3. Click Finish.

    Clear the check boxes and click Finish.
  15. Next, download the appropriate JRE installation package for your system, as listed in the table below. The JRE installation packages can be found in the following location: http://www.oracle.com/technetwork/java/javase/downloads/jre7-downloads-1880261.html

    Be sure to download the Java SE Runtime Environment 7u75 version of the JRE.

    If you have this version of the MCU SDK... Download this version of the JRE
    Windows32 Windows x86
    Windows64 Windows x64
  16. Double-click the JRE installation package, then follow the on-screen instructions to install the JRE.

    Download and install the JRE.

  17. Once you have finished installing the JRE, click the Start menu, then right-click Computer. Select Properties.
  18. Click Advanced System Settings. Navigate to the Advanced System Properties and click Environment Variables.

    Navigate to the Advanced System Properties and click Environment Variables.

  19. Under System variables, click New.

    Under System variables, click New.

  20. In the Variable name field, type JRE_HOME. In the Variable value field, type the location where you installed Java (for example, C:\Program Files\Java\jre7). Click OK.

    Create the JRE_HOME system variable.

  21. Click OK to create your variable.
  22. Click OK to apply your changes.
  23. Continue with the steps in the Running Eclipse section.
Cygwin version 1.7.34 includes changes in Windows account management that may lead to a delay of more than 20 seconds on some network configurations. To minimize this delay, do the following:
  1. Navigate to MCU_SDK_ROOT\cygwin\bin, where MCU_SDK_ROOT is your MCU SDK installation folder.
  2. Double-click mintty.exe. Based on your network environment, it may take up to 30 seconds to open a new Cygwin window.

    Example of an open Cygwin window
  3. Enter the following commands to generate the passwd and group files:

    ./mkpasswd.exe -c > /etc/passwd
    ./mkgroup.exe -c > /etc/group


    Generate the passwd and group files.
  4. In MCU_SDK_ROOT\cygwin\etc, open the nsswitch.conf file in a simple text editor. Edit the passwd and group settings, as follows: 
            #       /etc/nsswitch.conf 
            … 
            # db_shell: cygwin desc 
            # db_gecos: cygwin desc 
            passwd: files 
            group: files 
    
  5. Close the Cygwin window.
  6. Double-click the mintty.exe file to verify that the amount of time required to open a new Cygwin window has decreased.

Installing the MCU SDK on a Mac* OS X* system

For a Mac OS X system, follow these steps:

  1. Download the MCU SDK installation package from the Intel® Edison Board Software Downloads page, then extract the contents of the package. 
  2. Download and install the Java installation package from the following location: https://support.apple.com/kb/DL1572?locale=en_US.
  3. Continue with the steps in the Running Eclipse section below.

Installing the MCU SDK on a Linux* system

For a Linux system, follow these steps:

  1. Download the MCU SDK installation package from the Intel® Edison Board Software Downloads page, then extract the contents of the package.
  2. Download and install the JRE installation package corresponding to your system. Be sure to download the Java SE Runtime Environment 7u75 version: http://www.oracle.com/technetwork/java/javase/downloads/jre7-downloads-1880261.html

    If you have this version of the MCU SDK... Download this version of the JRE
    Linux32 Linux x84
    Linux64 Linux x64
     
  3. Define the environment variable JRE_HOME as the folder path where you installed the JRE.
  4. Add export JRE_HOME=/[your_JRE_installation_dir]/jre1.7.0_75 to the .bashrc file in your home directory, then reboot your terminal.
  5. Continue with the steps in the Running Eclipse section below.

Running Eclipse

Now you are ready to run Eclipse.

Prerequisites

  • Your board should be connected to your system in the same local network.
  • For systems with Linux or Mac OS X, be sure to set your host network IP address to 192.168.2.1 and your subnet mask to 255.255.255.0.

  1. Navigate to your MCU SDK installation folder, then do one of the following:
    • For Windows: Double-click mcusdk.exe.
    • For Mac OS X and Linux: Click mcusdk.
  2. The MCU SDK Launcher opens. Click Launch. It may take some time to load the appropriate Eclipse modules.

    Click Launch to continue.

  3. The first time you run Eclipse, a welcome page is displayed. Close the welcome page to view your workspace.

Loading the MCU SDK scripts onto your board

The MCU SDK includes scripts (.sh f files) to set up the GPIO configuration for the Arduino expansion board, disable PWM management, and more. These scripts are necessary to control PWM ports, read the value of an I2C device, and more. This section contains steps to copy the scripts to your board. For more information about the available scripts and download links, see the MCU Development Guide.

  1. Navigate to MCU_SDK_HOME/cygwin/home/username, where MCU_SDK_HOME is your MCU SDK installation folder and username is your user name. Copy the .sh files into this location.
  2. Navigate to MCU_SDK_HOME/cygwin/bin/. Double-click mintty.exe to run it. A Cygwin window opens.
  3. To copy the scripts onto your board, enter the command:

    scp ~/*.sh root@192.168.2.15:~

  4. If prompted to continue connecting, type yes and press Enter. All the MCU SDK scripts are copied to your board.

    Copy the script files to your board.

  5. Make your scripts executable by entering the command:

    ssh root@192.168.2.15 "chmod +x ~/*.sh "

Configure your MCU launching service to run scripts automatically (optional)

You can have MCU SDK scripts run automatically when you reboot your board. Scripts run in this manner do not have to be rerun each time you reboot your board manually. To automatically run one or more scripts, do the following:

  1. In a serial communication session with your board, open the mcu_fw_loader.sh file using a text editor such as vi.

    vi /etc/intel_mcu/mcu_fw_loader.sh

  2. For each script that you want to run, type /folderpath/scriptname.sh, where folderpath is the location where the script is stored and scriptname is the name of the script, as shown in the example below. Each script should be on its own line. Be sure to include any required arguments for running the script.
    For example, the following file is configured to run init_i2c8.sh and init_DIG.sh:
    #!/bin/sh
    #author: JiuJin Hong (jiujinx.hong@intel.com)
    if [ ! -d "/sys/devices/platform/intel_mcu" ];then
            exit
    fi
    
    if [ ! -f "/lib/firmware/intel_mcu.bin" ];then
            exit
    fi
    
    /home/root/init_i2c8.sh
    /home/root/init_DIG.sh -o 7 -d output
    
    echo "on" > /sys/devices/pci0000\:00/0000\:00\:17.0/power/control
    echo "load mcu app" > /sys/devices/platform/intel_mcu/control
    
For more complete information about compiler optimizations, see our Optimization Notice.