Project

General

Profile

Eclipse Application

Added by Brady Heater 6 days ago

What is the best was to set up an environment preferable eclipse to build an application.


Replies (2)

RE: Eclipse Application - Added by Mike Fiorenza 6 days ago

Hi Brady,

In order to build an ARM application for the Agilex 5 on your PC you first need to obtain a toolchain so that you can cross compile the application. The ARM toolchains can be found here: https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads. We recommend downloading version 11.2-2022.02 as that is the latest we have tested with, however, newer releases should work as well. Under the download tab for the appropriate version there are downloads for both Windows or Linux, therefore, pick the appropriate install for your Host OS and the toolchain you'd want is the AArch64 GNU/Linux target (aarch64-none-linux-gnu) variant.

Once you have installed the toolchain, you can start a new project in eclipse and select a C/C++ project where in the toolchain section you select Cross GCC. When it asks you to configure the Cross GCC Command you would give it the path to the installed toolchain's bin directory and the prefix would be aarch64-none-linux-gnu.

From here you would use eclipse as you normally would to add your application source files (or example hello world) and when ready to compile you would build the project. Eclipse should then use the toolchain to compile the source files and produce a compiled output binary.

This cross-compiled output binary can then be copied onto the SD card (e.g. /home/root/) of the Agilex 5 and then could be ran directly on the Agilex5 running something like the following on the serial console /home/root/application_binary. If your application has any output text, like "Hello World", this would be printed to the console directly after executing the binary.

If you run into issues executing the binary on the Agilex 5, I would check the binary with the file command. (e.g. file /home/root/application_binary) and the command should return ELF 64-bit ... ARM aarch64 if cross compiled correctly. If the output contains x86_64, then the application was not correctly cross compiled but instead compiled for your Host PC.

- Mike

RE: Eclipse Application - Added by Brady Heater 3 days ago

Thank you this is very helpful, What is the best was to debug that you recommend?

    (1-2/2)
    Go to top
    Add picture from clipboard (Maximum size: 1 GB)