First download Eclipse package and extract it to /home/<user>/eclipse.
For the correct execution of Eclipse with the OSELAS toolchain you have to create two files in your home folder
1. setup_tqma6x
PATH=PATH:/path/to/your/OSELAS.Toolchain<version>/<cross compiler name>/gcc-<version>-glibc-<version>-binutils-<version>-kernel-<version>-sanitized/bin export CROSS_COMPILE=<cross compiler name>
PATH=$PATH:/opt/OSELAS.Toolchain-2013.12.2/arm-v7a-linux-gnueabihf/gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.12-sanitized/bin export CROSS_COMPILE=arm-v7a-linux-gnueabihf-
2. eclipse_tqma6x
#!/bin/bash source ~/setup_tqma6x cd ~/eclipse ./eclipse &
Select File → New → C Project to create a new project
Enter a name for the new project in the C Project window (in this case : example_1). Select Empty Project as project type and check Cross GCC in the Toolchains section.
Click the Next button
In the following window make sure that both configurations Debug and Release are checked, then click on Next.
In the next window you have to set the Cross compiler prefix and Cross compiler path.
Finally click on Finish, now the environment for our new project is created.
First, a source file for new project must be created. Select File→New→Source File To create the source file.
enter a name for the Source file in the popup window (including file extension). In this case the Source file is named “hello.c”
Once the source file has been generated, it can be filled with code. This tutorial covers a simple “Hello World” application.
As final step before compiling, we use two variables within the project. Select example_1 with a right click, then select Properties from the context menu.
In the popup window expand the menu item C/C++ Build and select Settings.
The variables Prefix and Path in the Cross Settings must be set. For this tutorial:
The configuration can be selected from the dropdown menu in the upper part of the window. After the variables have been set for both configurations, click the OK button.
Click the button Build All (marked with a red frame in the picture) to compile the project. You can watch the compiling process in the central lower part of the main window over the Console tab (marked with a blue frame in the picture).
To compile source code that refers to to the kernel header, you have to add a variable in your project to let the compiler know where to find these resources. Open the project properties to set the variable (right click on the project → Properties). Open C/C++ General / Path and Symbols section, enter the tab Includes and choose GNU C in the Languages section.
An entry must be added in the Include directories section to refer to the kernel: Click on the Add button, then enter the path that refers to it in the popup window . In this tutorial:
/home/tq/workspace/BSPs/TQMa6x-BSP-REV.0104/platform-MBa6x/sysroot-target/kernel-headers/include
Additional paths can be added to include packet header or libraries. In this tutorial:
RSE (Remote System CSR-Tool Explorer) is used to establish a connection to the target, which in this case is a TQMa6Q. Go to Window → Show view → Other… to add the window for the RSE, then choose Connections and in the dropdown menu Connections.
Click on the Connection icon (marked with a red frame in the picture below) to add a new connection.
Choose the remote type in the new window. In the case of this tutorial SSH then click on Next
Set the connection parameter in the next window and click Finish.
Open the debugger Run → Debug Configurations
a new C/C++ remote application must be created by right clicking on C/C++ Remote Application then choose New
Now we have to set:
Name: Name for the C/C++ debug application
C/C++ Application: click Search Project and select the debug build from your project
Project: select the project you want to debug
Connection: choose the Connection that was created earlier in this tutorial.
Remote Absolute File Path for C/C: enter the target path where the application will be copied to and executed from.
Commands to execute before application: use this to launch a gdb server on the target before debugging.
Select the Debugger tab from Debug Configurations main window. Now we have to set the GDB debugger , which in this tutorial is arm-v7a-linux-gdb.
Switch to Shared Libraries tab inside the Debugger tab and add the path to the libraries in your system. In this tutorial opt/OSELAS.Toolchain-2013.12.2/arm-v7a-linux-gnueabihf/gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.12-sanitized/arm-v7a-linux-gnueabihf/lib.
Finally click Apply and then Debug