Setting Up Eclipse for Cross-Compiling Application on Udoo

Udoo is a fantastic small form-factor platform containing strong Freescale processor along with strongest Arduino Due controller. Freescale Dual/Quad core processor might have enough power to develop entry level applications and compile them on target. Yet if you are developing something complicated or you are used to separate your target from development machine (as I do), you will find it useful to cross-compile your code on x86 and deploy it on Udoo.

1. Prerequisites

  • I suggest to use latest Ubuntu 12.04 read-to-go image that you can get from Udoo downloads page
  • This tutorial is based on Eclipse Kepler (or later) installed on Ubuntu

1. Installing Toolchain

  • Download cross-compiler from here or here.
  • Untar it somewhere

2. Configuring Eclipse project

  • Start create C++ Project Wizard
  • Select C++ Project-> Executable, with “Cross GCC” toolchain -> Next
  • Mark Debug and Release configurations and click Advanced Settings
  • Under C/C++ Build->Settings
    • Add toolchain included path (“<Path to>/ arm-fsl-linux-gnueabi/arm-fsl-linux-gnueabi/include”) to Cross GCC Compiler->Includes->Include paths and to Cross G++ Compiler->Includes->Include paths
    • Add toolchain lib path (“<Path to>/ arm-fsl-linux-gnueabi/lib/gcc”) to Cross G++ Linker->Libraries->Library search path
    Set path to bin directory in toolchain you downloaded (<Path to>/arm-fsl-linux-gnueabi/bin) in “cross compiler path” field Set “arm-fsl-linux-gnueabi-” in Cross compiler prefix field Finish the wizard and build the solution

    3. Configuring deployment

    • Connect Udoo to your PC with ethernet cable (directly or through Switch). I guess you can also use wireless connection
    • Configure IP addressing and check that you can connect to Udoo SSH server from your host.
    • If you only want to download your executable to Udoo, you can use SCP:
    •  If you are looking for configuring remote debugging through Eclipse continue to the next Section

    4. Eclipse remote debugging

    • Install gdbserver on Udoo
      • Make sure it has internet connection
      Configure remote connection
      • Open Remote System Explorer (Window -> Open Perspective -> Other)
      • Right Click on Remote Explorer -> New Connection
      • Select Linux -> Next
      • Enter your Udoo IP address and “Udoo” on Connection Name -> Next
      • Select “ssh.files” -> Next
      • Select processes.shell.Linux -> Next
      • Select ssh.shells -> Next
      • Select ssh.terminals -> Finish
      • Right click on new Udoo connection and select Properties
      • Click on Host and make sure you have “ubuntu” as Default User Id (if not change it)
      • Make sure that your connection works by expending “Udoo” and browsing remote Processes (you will need to enter password and store SSH hash key)
      Configure remote debugger
      • Open Run->Debug Configurations…
      • Double click on C/C++ Remote Application
      • Select “Udoo” in “Main” tab->Connect dropdown
      • Fill “Remote Absolute File Path for C/C++ Application” (you can browse remote directory tree as well)
      • Click on “Debugger tab” and select debugger from our Toolchain (<path to>/arm-fsl-linux-gnueabi/bin/arm-fsl-linux-gnueabi-gdb)
      • Apply
      Click on Debug

      You can use this configuration for debugging or running on target (it will handle the download to target automatically).

      read more

Udoo – Quad-core 1GHz ARM side by side with Arduino Due for $135

Udoo

Few days ago I received my Udoo, another Kickstarter project, which I think is one of the most successful system-on-chip boards for DIY since Arduino Uno.

It contains Dual or Quad core Freescale i.MX 6 ARM clocked to 1GHz along with Atmel SAM3X8E (which is the same chip on 84Mhz Arduino Due).

Some cool features are:

  • Wifi / 1G etherenet / USB host or slave / SATA connector are on board
  • Arduino Due shield can be used as is
  • GPIOs available on “Arduino” headers can be drived by Freescale or Arduino
  • Can run Linux/Android (head or headless)
  • Arduino sketches can be loaded from internal Linux or externally
  • All for $135 (or $115 for dual core)

read more