cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX library compilation toolchain and settings

KMili
Associate III

I want to use latest GCC toolchain and custom build environment (for CI and other reasons) for my project that uses TouchGFX.

Could my GCC toolchain (or my GCC toolchain's version) create different memory layout (than it is compiled in TGFX library) for objects, that are created in my code and passed to TGFX library? For example, it will be very bad when I pass `TextArea txt;` to

void Container::add(Drawable& d)

C/C++ standard does not define memory layout it and it is a compiler implementation detail.

If my toolchain will actually create different object memory layout (for example for TextArea), it will still link perfectly, but that will definitely cause an undefined behaviour.

How can I know that and how can I be sure about correct behaviour?

Some people on StackOverflow said, that I must use same version compiler and its settings as it was used to build touchgfx provided library. Can I somewhere get that information? Did ARM official toolchain https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads was used to build the library?

P. S. TouchGFX library I am reffering to is both of these:

1. <project>\touchgfx\lib\core\cortex_m4f\gcc\libtouchgfx.a

2. <project>\touchgfx\lib\core\cortex_m4f\gcc\libtouchgfx-float-abi-hard.a

1 REPLY 1
Martin KJELDSEN
Chief III

Hi,

You do not need the exact same version, probably, but you're right that there could be some differences. Here's some info from the arm-gcc C++ compiler that we use.

$ arm-none-eabi-g++ -v
Using built-in specs.
COLLECT_GCC=D:\TouchGFX\4.12.3\env\MinGW\msys\1.0\gnu-arm-gcc\bin\arm-none-eabi-g++.exe
COLLECT_LTO_WRAPPER=d:/touchgfx/4.12.3/env/mingw/msys/1.0/gnu-arm-gcc/bin/../lib/gcc/arm-none-eabi/6.3.1/lto-wrapper.exe
Target: arm-none-eabi
Configured with: /tmp/jenkins-GCC-6-buildandreg-223_20170621_1498033910/src/gcc/configure --build=x86_64-linux-gnu --host=i686-w64-mingw32 --target=arm-none-eabi --prefix=/tmp/jenkins-GCC-6-buildandreg-223_20170621_1498033910/install-mingw --libexecdir=/tmp/jenkins-GCC-6-buildandreg-223_20170621_1498033910/install-mingw/lib --infodir=/tmp/jenkins-GCC-6-buildandreg-223_20170621_1498033910/install-mingw/share/doc/gcc-arm-none-eabi/info --mandir=/tmp/jenkins-GCC-6-buildandreg-223_20170621_1498033910/install-mingw/share/doc/gcc-arm-none-eabi/man --htmldir=/tmp/jenkins-GCC-6-buildandreg-223_20170621_1498033910/install-mingw/share/doc/gcc-arm-none-eabi/html --pdfdir=/tmp/jenkins-GCC-6-buildandreg-223_20170621_1498033910/install-mingw/share/doc/gcc-arm-none-eabi/pdf --enable-languages=c,c++ --enable-mingw-wildcard --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads --disable-tls --with-gnu-as --with-gnu-ld --with-headers=yes --with-newlib --with-python-dir=share/gcc-arm-none-eabi --with-sysroot=/tmp/jenkins-GCC-6-buildandreg-223_20170621_1498033910/install-mingw/arm-none-eabi --with-libiconv-prefix=/tmp/jenkins-GCC-6-buildandreg-223_20170621_1498033910/build-mingw/host-libs/usr --with-gmp=/tmp/jenkins-GCC-6-buildandreg-223_20170621_1498033910/build-mingw/host-libs/usr --with-mpfr=/tmp/jenkins-GCC-6-buildandreg-223_20170621_1498033910/build-mingw/host-libs/usr --with-mpc=/tmp/jenkins-GCC-6-buildandreg-223_20170621_1498033910/build-mingw/host-libs/usr --with-isl=/tmp/jenkins-GCC-6-buildandreg-223_20170621_1498033910/build-mingw/host-libs/usr --with-libelf=/tmp/jenkins-GCC-6-buildandreg-223_20170621_1498033910/build-mingw/host-libs/usr --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-pkgversion='GNU Tools for ARM Embedded Processors 6-2017-q2-update' --with-multilib-list=rmprofile
Thread model: single
gcc version 6.3.1 20170620 (release) [ARM/embedded-6-branch revision 249437] (GNU Tools for ARM Embedded Processors 6-2017-q2-update)

 /Martin