Home  >  Edison  >  SDK

Remote developing for Edison

Remote development using Qt Creator

You may have come to this section looking for Arduino development support. This existed for the original Intel Edison-Arduino, but support for that has been dropped and recreating it seems to be a lot of work.

However, a much better development environment can be setup based on current Linux IDE’s. In the following we will describe setting up Qt Creator, but similar setups can be done using other FOSS IDE’s like KDevelop/Eclipse/Code:Blocks.

What is remote development?

With remote development you build you executable on your (much more powerful) host, upload it to the remote Edison and use your local debugger to control your now remote application.

To do this you need:

  1. An SDK locally, supplying headers and lib’s that are available on the remote Edison.
  2. The SDK supplies compilers, linker. debugger as well. When you use just the SDK for command line development that is just fine (see the previous section). However, if you use an IDE it might be easier to use the already configured tool chain and just tweak it to produce Edison (Yocto) compatible binaries. This is done by changing compiler flags.
  3. Then tell the IDE how/where to upload the binary.
  4. And if needed how to remote debug (using gdbserver).

Setting up Qt Creator

1 Create a new project

Qt Creator start screen

Select Other or Non-Qt project Project type

2 Setting up the Device and Tool chain

We need to set up the remote (under Devices) and the tool chains for Desktop and Edison (called Kits). Devices

The kits consist of compiler, debugger, cmake. The auto detected ones should be just fine. Compiler

Debuggers

CMake

Setting up the Kit

Kits

Select this one in a new browser Tab to see the details. Kits settings In particular:

  • The device type is Generic Linux Device.
  • The Device is your remote Edison defined earlier.
  • Tools are the standard detected ones.
  • Sysroot must point to the corei7-64-poky-linux sysroot provided by the SDK.
  • Finally, the environment variables must be changed.

Here I just modified CFLAGS and LDFLAGS. Inspiration can be found in the environment-setup-corei7-64-poky-linux.

Environment

Setting up Build and Run

If all went well the Build settings should be fine as they are. Build

The Run settings need some help: Run In particular:

  • Override deployment data so the system knows where to find and put the remote executable.
  • Upload either via SFTP or rsync.
  • For remote executing set the Run configuration.

Switching between targets, re-building

When switching target from Desktop to Edison or back, clear the Cmake Configuration and Run CMake again from the Build menu.

Also, when changing compiler flags Clean the Project and Rebuild the project from the Build menu.

Developing

After getting the configuration right development can be done same as for a local development. In fact the local debugger gdb communicates with the remote gdbserver behind the screens.

Of course the advantage of remote development is that while the actual hardware is available for interfacing, the tools are available on the development machine through a GUI.

Debug screen