Run TouchGFX SDL2 Simulator on Yocto Linux
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-07-26 8:18 AM
Hi There,
I have a unusual question. We would like to use TouchGFX to design a simple GUI for a Yocto SOM Board an tried to cross compile a trial project. Compiling fails at linking because the touchgfx library libtouchgfx.a is not compatible.
So my question is. Has anyone tried something like this? Is it not recommended because of some reasons?
Kind Regards
Lukas
- Labels:
-
OpenSTLinux
-
TouchGFX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-07-26 10:49 AM
Designer not work under linux then for what simulator? Why not direct debug onboard?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-07-26 10:49 PM
What do you mean with debug onboard? The generated designer code compiles and runs perfectly under linux: Prerequisites | TouchGFX Documentation.
The problem is that I cannot cross compile it for Yocto, so I cannot debug or run the code on the SOM board. @TouchGFX Team did you ever do something like this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-07-26 11:41 PM
and yocto must be x64.
$ readelf -a Middlewares/ST/touchgfx/lib/linux/libtouchgfx.a |head -n 20
File: libtouchgfx.a(AbstractPartition.o)
ELF Header:
Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: REL (Relocatable file)
Machine: Advanced Micro Devices X86-64
Version: 0x1
Entry point address: 0x0
Start of program headers: 0 (bytes into file)
Start of section headers: 4320 (bytes into file)
Flags: 0x0
Size of this header: 64 (bytes)
Size of program headers: 0 (bytes)
Number of program headers: 0
Size of section headers: 64 (bytes)
Number of section headers: 23
Section header string table index: 20
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-07-27 8:22 AM
Thanks for the quick answer. I did check the library and got the same output as you. I do take this library but when I compile with:
x86_64-fslcsdk-linux/usr/bin/aarch64-fslc-linux/aarch64-fslc-linux-g++
I get these linking errors:
.../libexec/aarch64-fslc-linux/gcc/aarch64-fslc-linux/9.3.0/real-ld: cannot find -ltouchgfx
../libexec/aarch64-fslc-linux/gcc/aarch64-fslc-linux/9.3.0/real-ld: cannot find -lSDL2
../libexec/aarch64-fslc-linux/gcc/aarch64-fslc-linux/9.3.0/real-ld: cannot find -lSDL2_image
../libexec/aarch64-fslc-linux/gcc/aarch64-fslc-linux/9.3.0/real-ld: skipping incompatible touchgfx/3rdparty/libjpeg/lib/linux/libjpeg.a when searching for -ljpeg
I dont get why it should not be compatible. Any ideas?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-07-27 9:11 AM
first 3 is about bad path to library search
last skipp is for libjpeg.a why mut check yuo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-07-27 11:25 PM
You are right, but I forgot to post the most important warning:
../libexec/aarch64-fslc-linux/gcc/aarch64-fslc-linux/9.3.0/real-ld: skipping incompatible touchgfx/lib/linux/libtouchgfx.a when searching for -ltouchgfx
This is not because of wrong path, it skipps the library because of compatibility. Do you have any idea if this can be fixed?
If I compare the readelf of a successfully compiled program for yocto I see one diffecence to the touchgfx:
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: DYN (Shared object file)
Machine: AArch64
Version: 0x1
Entry point address: 0x9a0
The Machine Type is AArch64. Does that cause the incompatibility?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-07-28 12:24 AM
But you build with aarch = ARM64 ( if your yocto is on ARM ok ) but then you need lib for ARM64
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-07-28 1:49 AM
Yes I need the touchgfx library for AARCH64. Is it possible to get this from @Touchgfx Team?
