Install the custom Toolchain
Download and install the toolchain rpm
sudo alien ~/Downloads/<toolchain-name>.rpm
sudo dpkg -i ./<toolchain-name>.deb
Locate the arm compiler
sudo find / -iname arm-*-gnueabihf-g++ 2>/dev/null
Go to the Projects Tab on the left pane.
Click on the Manage Kit buttons.
If you want use your custom compiler and debugger etc then you have to create a manual kit.
A kit is a set of tools like compiler, QtVersion (qmake), debugger, device etc.
Before you can create a manual kit, you have to create place holders for your custom compiler, debugger etc.
Go tot the Qt Version Tab and select manual. Then click on Add button.
Here we are trying to specify the qmake binary we are going to use for the project.
In my case my qmake is located (comes from installation of the toolchain) at the below location:
So in the add wizard I navigate to the above location and select qmake binary.
Qt automatically detects it as Qt Version 5.11.2. In the Kit section we are going to refer to this in near future.
Next we have to choose our own custom C++ compiler.
In my case my C++11 compiler is located (comes from the toolchain installation) at the below location
Now, click on the Manual → C++ and click the Add button to start adding your own custom g++ compiler to the list.
This will ask you to provide a name to the custom compiler, give a name, e.g. “G++ for ATOM”, any other string you like.
Put the absolute path of the g++ binary which you want to add under the Compiler path:
In the ABI, select arm-linux-generic-elf-32bit, leave the rest as default.
Apply, ok. Now you have your custom compiler in the list.
Go to the debugger tab.
Click on the Manual and Add.
Provide a suitable name, “ATOM GDB for Cortex A9”.
Specify the absolute path in the Path.
In the Devices specify the details of the device where you want to run your generated binaries.
Now go back to the Kits tab.
Click on Add.
Provide a name for your custom Kit, e.g. ATOM.
In the Device Type, select Generic Linux Device.
In Device, select your own device, e.g. Custom Atom Device.
Compiler: C++: select your own created compiler from the drop down list.
Debugger: select the one you created previously.
Qt Version: select your own Qt Version as created previously.
Additional build arguments
Under Build & Run on the left hand panel, select the Build Option.
This will show you a loads of option on the right hand pane.
For our project we need to set the environment variable PRODUCT=ATOM.
To add this, click on the Details button along side qmake command under Build & Run.
This will look like below:
In the Additional Argument section specify, PRODUCT=ATOM.
Now, save it and try compiling your code. Make sure you clean it before giving it a try.