A few months ago a new friend gave to me an Intel Edison board to play =)
When I got back home I mounted the board and start to configure. Download from Intel the environment necessary to programming using Node.Js and others frameworks.
Since the Intel XDK environment is too heavy, and I like to use QtCreator, I will configure the Cross-Compile environment to use QtCreator like my editor. I will try in the future write Qt Applications and run them on the Edison, but that is a subject for an another post.
So in the Intel Forum, I found a tutorial in how to build the cross-platform environment for QtCreator on your machine to build apps for the board. Is a tutorial from 2015, but I will replicate in my way. =)
For this tutorial I assuming that you know what is: QtCreator, CMake, GDB, and ssh access.
You need to download the Cross Compiling tool from the Intel site, you can find the list of operational systems and the right SDK Tools here.
Extract the files in your personal folder. And execute the script to install the libraries.
This is the same error that I found when I was trying to install the package of Intel Edison board in Arduino IDE. Is a parameter that isn’t written like +111 anymore. You need to open the script file and change it to /111.
After that run the script again: sudo ./install_script.sh
I didn’t execute the script in sudo mode. And that made all the installation in my local folder. That would be a problem if I delete the folder for example.
Even running the script in sudo mode, didn’t installed the files in the right folders. Apparently don’t have any settings to install in /opt/poky-Edison.
After one hour testing, me and a friend of mine conclude that the install script is awful. It has an environment variable to the default folder:
And the target dir is empty: target_sdk_dir=””
In the line 61 it sets: target_sdk_dir=$(pwd)
To run some commands that use others files in the i686 folders. So if I change, to the DEFAULT_INSTALL_DIR, it brokes and the scripts end with an error.
In any other place in the script, have an attribution of the DEFAULT_INSTALL_DIR in the target_sdk_dir.
I don’t have much knowledge with Shell Script to fix the install script. So I will leave like that and hope that I don’t delete this folder for some reason.
If you want to check the script click here.
Now you need to open QtCreator. After that go in Tools -> Options -> Devices
Click Add… to add a new device. Select the option of a New Generic Linux Device:
After that configure you need to configure the access for your Edison:
Click to finish the Wizard, and QtCreator will try to open an ssh connection to your Edison. If return Success, you are set up, else you need to discover the issue and solve it. =)
Now you need to add a new Kit in QtCreator, this Kit will lead to you to compile the source code to your Intel Edison.
Go to Tools -> Options -> Build and Run
Open the Tab Compilers.
You need to add a new GCC compiler for the Intel Edison device, so you need to search where on your system the file:
In my case is here: “/home/lays/Downloads/i686/sysroots/x86_64-pokysdk-linux/usr/bin/i586-poky-linux/i685-poky-linux-g++”
Now you need to set up the Kit, go to the tab Kits, and click to add a new Kit.
Set the Sysroot path to:
On the Device Type you will choose the Generic Linux Device, and on the Device option bellow should appear your Edison automatically.
You need to setup the Cmake Tool because is the tool that will manage the Cross Compile and the project.
Select the Qt version for None.
Well, click Ok and now you finish your setup of your Kit for the Edison board.
Now we need to setup one CMake Configuration file to tell the Edison what’s need to be done. Were put the deploy files, what compile, flags to use, and so on.
You can name the file to Edison.cmake, this file can be general for any project that you want to do. But if you need something more specific you need to edit for your necessity.
You can access my version of the Edison.cmake here.
Well, now you only need to create a new project, using a CMakeLists.txt to make the library and build control adding this flag:
#This is where all the settings to compile for the Edison are stored.
Now you have all your environment for Cross Compile projects to your Intel Edison from your QtCreator.
If you need more info, you can access the base post here.
In the next post, I will make my test, and maybe include some Qt code and see what happens. But for now…
That’s all folks!