I set the eclipse IDE with the with the toolchain5.7.0 for yocto
The goal is work with the GPIO and I try to compile the sketch
(even if a snippet for torizon-samples)
The code is compiled properly without error but when I move the executable file on coilibri module
it shows the above mentioned error.
It seems that a wrong platform library (e.g. x64?) is used by the compiler
Does somebody faced up this issue?
You may check architecture of your binary file with
readelf -h your_binary
Eclipse seems ignoring environment-setup* script.
For Yocto SDK you may follow instructions like these. Instead of Yocto ADT plugin for older? luna
you may use newer Yocto SDK plugins. The rest of setup is the same like in instructions. I used this plugin url
http://downloads.yoctoproject.org/releases/eclipse-plugin/2.6.1/oxygen/ with Eclipse 2022-06.
Hi Edward first of all thank you for your kind feedback.
The architecture get by readelf on my comiled indicates “Machine: ARM”
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: DYN (Shared object file)
Entry point address: 0x5dd
Start of program headers: 52 (bytes into file)
Start of section headers: 10432 (bytes into file)
Flags: 0x5000400, Version5 EABI, hard-float ABI
Size of this header: 52 (bytes)
Size of program headers: 32 (bytes)
Number of program headers: 9
Size of section headers: 40 (bytes)
Number of section headers: 37
Section header string table index: 36
it seems ok.
Anyway I try to follow the NXP linked indications:
I currently work on last release of BPS which is 5.6.0 and the toolchain created for IMX7 is
So I install the plugin 2.6.1 as you mentioned
than create a new YOCTO project SDK autools with GNU autotools toolchain setting in the preferences
Toolchain Root Location
Target architecture is the armv7at2hf-neon-tdx-linux-gnueabi
Than called “Reconfigure the project”
and try to build but it arises errors due these issues:
Missing PROG arm-tdx-linux-gnueabi-dlltool
Missing PROG arm-tdx-linux-gnueabi-mt
Missing PROG dlltool
What I did wrong?
Hm, yes, readelf reports valid imx7 image. In my case something makes Eclipse ignoring env settings from environment-setup-*.
Perhaps libgpiod.so isn’t included in your image. I think inclusion of
packagegroup-tdx-cli in IMAGE_INSTALL makes libgpio installed. It is included by default in minimal image.
Regarding Yocto SDK setting, I’m puzzled again. For me it worked from from first try. Here’s screenshot from Eclipse->Window->preferences with sdk installed to ~/edward/tdx-sdk:
Did you check libgpiod is present on root FS?
~# ls /usr/lib/libgp*
The settings is ok
however I cant’ compile a snippet managing GPIO with this method (eclipse plug in)
is declarated without error but methods are not reconigned
and another strange thing is that the project load x86_64 libraries (??)
The previous settings works however thanks to your suggestion I found out
that libgpiod.so.2 is not present into /usr/lib/ is not present on the rootfs indeed!
As you mentioned it is (should be) included by default in minimal image
Could you explain me better about
I think inclusion of
packagegroup-tdx-cli in IMAGE_INSTALL makes libgpio installed "
How do it exactly?
First of all regarding SDK and linking to static libgpiod.a.
Your build/conf/local.conf should include, else building SDK won’t populate *.a files.
SDKIMAGE_FEATURES = “dev-pkgs dbg-pkgs staticdev-pkgs”
Yet another “time saver” from Yocto, you need to
./configure --enable-static when building libgpiod. To do so you may add in your appropriate layer folder libgpiod_%.bbappend with this.
EXTRA_OECONF_append = " --enable-static"
Perhaps it can be done via some conf file, I’m not sure.
re-bitbake populate_sdk and reinstall SDK.
You need to add in your project settings to LDFLAGS -lgpiod here
scroll to LDFLAGS string and add -lgpiod.
Of course libgpiod should be in the list of packages to populate.
Regarding IMAGE_INSTALL. Well, somehow you build your custom image indeed, isn’t it? Your image.bb file should include string IMAGE_INSTALL, which tells Yocto which packages to populate to target. For example the same setting for Toradex minimal image is here:
You may build this image with
bitbake tdx-reference-minimal-image and this image must include ligpiod*.so
Edit: missing step 3
Edit2: Regarding x64-x86 in Eclipse. I see the same, but image build correctly with includes from SDK. I think Yocto plugin doesn’t provide Eclipse parses them from right include folders.