QT Setup for Poky on SAMA5D3

All design tool related questions: compiler, assembler, linker. Embedded programming questions: assembler, C code.

Moderator: nferre

sephers2
Posts: 5
Joined: Mon Mar 05, 2018 12:28 am

QT Setup for Poky on SAMA5D3

Mon Mar 12, 2018 12:29 am

Hi,

I'm trying to get QT Creator set up to be able to work with the SAMA5D36-EK but I'm having a bit of difficulty.

I have compiled Poky for the SAMA5D36 as per this tutorial, and have managed to get the board running Linux and am able to SSH in across the local network. I also generated the QT-Embedded SDK with the following command:

Code: Select all

bitbake -c populate_sdk atmel-qt5-demo-image
After this I set up the environmental variables:

Code: Select all

source environment-setup-cortexa5hf-vfp-poky-linux-gnueabi
and using:

Code: Select all

export | less >> ~/output.txt
I was able to get the environmental variables that can be added to the QT creator kit:

Code: Select all

AR="arm-poky-linux-gnueabi-ar"
ARCH="arm"
AS="arm-poky-linux-gnueabi-as "
CC="arm-poky-linux-gnueabi-gcc  -march=armv7-a -marm -mfpu=vfp  -mfloat-abi=hard -mcpu=cortex-a5 --sysroot=/opt/poky-atmel/2.2.3/sysroots/cortexa5hf-vfp-poky-linux-gnueabi"
CCACHE_PATH="/opt/poky-atmel/2.2.3/sysroots/x86_64-pokysdk-linux/usr/bin:/opt/poky-atmel/2.2.3/sysroots/x86_64-pokysdk-linux/usr/bin/../x86_64-pokysdk-linux/bin:/opt/poky-atmel/2.2.3/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi:/opt/poky-atmel/2.2.3/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-uclibc:/opt/poky-atmel/2.2.3/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-musl:/opt/poky-atmel/2.2.3/sysroots/x86_64-pokysdk-linux/usr/bin:/opt/poky-atmel/2.2.3/sysroots/x86_64-pokysdk-linux/usr/bin/../x86_64-pokysdk-linux/bin:/opt/poky-atmel/2.2.3/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi:/opt/poky-atmel/2.2.3/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-uclibc:/opt/poky-atmel/2.2.3/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-musl:"
CFLAGS=" -O2 -pipe -g -feliminate-unused-debug-types "
CLUTTER_IM_MODULE="xim"
COMPIZ_BIN_PATH="/usr/bin/"
COMPIZ_CONFIG_PROFILE="ubuntu"
CONFIGURE_FLAGS="--target=arm-poky-linux-gnueabi --host=arm-poky-linux-gnueabi --build=x86_64-linux --with-libtool-sysroot=/opt/poky-atmel/2.2.3/sysroots/cortexa5hf-vfp-poky-linux-gnueabi"
CONFIG_SITE="/opt/poky-atmel/2.2.3/site-config-cortexa5hf-vfp-poky-linux-gnueabi"
CPP="arm-poky-linux-gnueabi-gcc -E  -march=armv7-a -marm -mfpu=vfp  -mfloat-abi=hard -mcpu=cortex-a5 --sysroot=/opt/poky-atmel/2.2.3/sysroots/cortexa5hf-vfp-poky-linux-gnueabi"
CPPFLAGS=""
CROSS_COMPILE="arm-poky-linux-gnueabi-"
CXX="arm-poky-linux-gnueabi-g++  -march=armv7-a -marm -mfpu=vfp  -mfloat-abi=hard -mcpu=cortex-a5 --sysroot=/opt/poky-atmel/2.2.3/sysroots/cortexa5hf-vfp-poky-linux-gnueabi"
CXXFLAGS=" -O2 -pipe -g -feliminate-unused-debug-types "
DBUS_SESSION_BUS_ADDRESS="unix:abstract=/tmp/dbus-81yu6mCV5h"
DEFAULTS_PATH="/usr/share/gconf/ubuntu.default.path"
DESKTOP_SESSION="ubuntu"
DISPLAY=":0"
GDB="arm-poky-linux-gnueabi-gdb"
GDMSESSION="ubuntu"
GDM_LANG="en_GB"
GNOME_DESKTOP_SESSION_ID="this-is-deprecated"
GNOME_KEYRING_CONTROL=""
GNOME_KEYRING_PID=""
GPG_AGENT_INFO="/home/george/.gnupg/S.gpg-agent:0:1"
GTK2_MODULES="overlay-scrollbar"
GTK_IM_MODULE="ibus"
GTK_MODULES="gail:atk-bridge:unity-gtk-module"
HOME="/home/george"
IM_CONFIG_PHASE="1"
INSTANCE=""
JOB="unity-settings-daemon"
KCFLAGS="--sysroot=/opt/poky-atmel/2.2.3/sysroots/cortexa5hf-vfp-poky-linux-gnueabi"
LANG="en_GB.UTF-8"
LANGUAGE="en_GB:en"
LD="arm-poky-linux-gnueabi-ld  --sysroot=/opt/poky-atmel/2.2.3/sysroots/cortexa5hf-vfp-poky-linux-gnueabi"
LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed"
LESSCLOSE="/usr/bin/lesspipe %s %s"
LESSOPEN="| /usr/bin/lesspipe %s"
LIBGL_ALWAYS_SOFTWARE="1"
LOGNAME="george"
LS_COLORS="rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:"
M4="m4"
MANDATORY_PATH="/usr/share/gconf/ubuntu.mandatory.path"
NM="arm-poky-linux-gnueabi-nm"
OBJCOPY="arm-poky-linux-gnueabi-objcopy"
OBJDUMP="arm-poky-linux-gnueabi-objdump"
OECORE_ACLOCAL_OPTS="-I /opt/poky-atmel/2.2.3/sysroots/x86_64-pokysdk-linux/usr/share/aclocal"
OECORE_DISTRO_VERSION="2.2.3"
OECORE_NATIVE_SYSROOT="/opt/poky-atmel/2.2.3/sysroots/x86_64-pokysdk-linux"
OECORE_SDK_VERSION="2.2.3"
OECORE_TARGET_SYSROOT="/opt/poky-atmel/2.2.3/sysroots/cortexa5hf-vfp-poky-linux-gnueabi"
OE_QMAKE_AR="arm-poky-linux-gnueabi-ar"
OE_QMAKE_CC="arm-poky-linux-gnueabi-gcc  -march=armv7-a -marm -mfpu=vfp  -mfloat-abi=hard -mcpu=cortex-a5 --sysroot=/opt/poky-atmel/2.2.3/sysroots/cortexa5hf-vfp-poky-linux-gnueabi"
OE_QMAKE_CFLAGS=" -O2 -pipe -g -feliminate-unused-debug-types "
OE_QMAKE_CXX="arm-poky-linux-gnueabi-g++  -march=armv7-a -marm -mfpu=vfp  -mfloat-abi=hard -mcpu=cortex-a5 --sysroot=/opt/poky-atmel/2.2.3/sysroots/cortexa5hf-vfp-poky-linux-gnueabi"
OE_QMAKE_CXXFLAGS=" -O2 -pipe -g -feliminate-unused-debug-types "
OE_QMAKE_INCDIR_QT="/opt/poky-atmel/2.2.3/sysroots/cortexa5hf-vfp-poky-linux-gnueabi/usr/include/qt5"
OE_QMAKE_LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed"
OE_QMAKE_LIBDIR_QT="/opt/poky-atmel/2.2.3/sysroots/cortexa5hf-vfp-poky-linux-gnueabi/usr/lib"
OE_QMAKE_LINK="arm-poky-linux-gnueabi-g++  -march=armv7-a -marm -mfpu=vfp  -mfloat-abi=hard -mcpu=cortex-a5 --sysroot=/opt/poky-atmel/2.2.3/sysroots/cortexa5hf-vfp-poky-linux-gnueabi"
OE_QMAKE_MOC="/opt/poky-atmel/2.2.3/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/moc"
OE_QMAKE_PATH_HOST_BINS="/opt/poky-atmel/2.2.3/sysroots/x86_64-pokysdk-linux/usr/bin/qt5"
OE_QMAKE_QDBUSCPP2XML="/opt/poky-atmel/2.2.3/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qdbuscpp2xml"
OE_QMAKE_QDBUSXML2CPP="/opt/poky-atmel/2.2.3/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qdbusxml2cpp"
OE_QMAKE_QT_CONFIG="/opt/poky-atmel/2.2.3/sysroots/cortexa5hf-vfp-poky-linux-gnueabi/usr/lib/qt5/mkspecs/qconfig.pri"
OE_QMAKE_RCC="/opt/poky-atmel/2.2.3/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/rcc"
OE_QMAKE_UIC="/opt/poky-atmel/2.2.3/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/uic"
OLDPWD="/home/george"
PATH="/opt/poky-atmel/2.2.3/sysroots/x86_64-pokysdk-linux/usr/bin/qt5:/opt/poky-atmel/2.2.3/sysroots/x86_64-pokysdk-linux/usr/bin:/opt/poky-atmel/2.2.3/sysroots/x86_64-pokysdk-linux/usr/sbin:/opt/poky-atmel/2.2.3/sysroots/x86_64-pokysdk-linux/bin:/opt/poky-atmel/2.2.3/sysroots/x86_64-pokysdk-linux/sbin:/opt/poky-atmel/2.2.3/sysroots/x86_64-pokysdk-linux/usr/bin/../x86_64-pokysdk-linux/bin:/opt/poky-atmel/2.2.3/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi:/opt/poky-atmel/2.2.3/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-uclibc:/opt/poky-atmel/2.2.3/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-musl:/opt/poky-atmel/2.2.3/sysroots/x86_64-pokysdk-linux/usr/bin/qt5:/opt/poky-atmel/2.2.3/sysroots/x86_64-pokysdk-linux/usr/bin:/opt/poky-atmel/2.2.3/sysroots/x86_64-pokysdk-linux/usr/sbin:/opt/poky-atmel/2.2.3/sysroots/x86_64-pokysdk-linux/bin:/opt/poky-atmel/2.2.3/sysroots/x86_64-pokysdk-linux/sbin:/opt/poky-atmel/2.2.3/sysroots/x86_64-pokysdk-linux/usr/bin/../x86_64-pokysdk-linux/bin:/opt/poky-atmel/2.2.3/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi:/opt/poky-atmel/2.2.3/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-uclibc:/opt/poky-atmel/2.2.3/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-musl:/home/george/bin:/home/george/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
PKG_CONFIG_PATH="/opt/poky-atmel/2.2.3/sysroots/cortexa5hf-vfp-poky-linux-gnueabi/usr/lib/pkgconfig:/opt/poky-atmel/2.2.3/sysroots/cortexa5hf-vfp-poky-linux-gnueabi/usr/share/pkgconfig"
PKG_CONFIG_SYSROOT_DIR="/opt/poky-atmel/2.2.3/sysroots/cortexa5hf-vfp-poky-linux-gnueabi"
PWD="/opt/poky-atmel/2.2.3"
QMAKESPEC="/opt/poky-atmel/2.2.3/sysroots/cortexa5hf-vfp-poky-linux-gnueabi/usr/lib/qt5/mkspecs/linux-oe-g++"
QT4_IM_MODULE="xim"
QT_ACCESSIBILITY="1"
QT_CONF_PATH="/opt/poky-atmel/2.2.3/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qt.conf"
QT_IM_MODULE="ibus"
QT_LINUX_ACCESSIBILITY_ALWAYS_ON="1"
QT_QPA_PLATFORMTHEME="appmenu-qt5"
RANLIB="arm-poky-linux-gnueabi-ranlib"
SDKTARGETSYSROOT="/opt/poky-atmel/2.2.3/sysroots/cortexa5hf-vfp-poky-linux-gnueabi"
SESSION="ubuntu"
SESSIONTYPE="gnome-session"
SHELL="/bin/bash"
SHLVL="1"
SSH_AUTH_SOCK="/run/user/1000/keyring/ssh"
STRIP="arm-poky-linux-gnueabi-strip"
TARGET_PREFIX="arm-poky-linux-gnueabi-"
TERM="xterm-256color"
UNITY_DEFAULT_PROFILE="unity-lowgfx"
UNITY_HAS_3D_SUPPORT="false"
UPSTART_EVENTS="xsession started"
UPSTART_INSTANCE=""
UPSTART_JOB="unity7"
UPSTART_SESSION="unix:abstract=/com/ubuntu/upstart-session/1000/4860"
USER="george"
VTE_VERSION="4205"
WINDOWID="73400330"
XAUTHORITY="/home/george/.Xauthority"
XDG_CONFIG_DIRS="/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg"
XDG_CURRENT_DESKTOP="Unity"
XDG_DATA_DIRS="/usr/share/ubuntu:/usr/share/gnome:/usr/local/share:/usr/share:/var/lib/snapd/desktop"
XDG_GREETER_DATA_DIR="/var/lib/lightdm-data/george"
XDG_MENU_PREFIX="gnome-"
XDG_RUNTIME_DIR="/run/user/1000"
XDG_SEAT="seat0"
XDG_SEAT_PATH="/org/freedesktop/DisplayManager/Seat0"
XDG_SESSION_DESKTOP="ubuntu"
XDG_SESSION_ID="c3"
XDG_SESSION_PATH="/org/freedesktop/DisplayManager/Session1"
XDG_SESSION_TYPE="x11"
XDG_VTNR="7"
XMODIFIERS="@im=ibus"
I then used this tutorial to setup the devices, compilers (C & C++), debugger and QT version.

In short:
  • my device connects fine so no problem there
  • sysroot = /opt/poky-atmel/2.2.3/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi
  • Compiler (C, GCC): /opt/poky-atmel/2.2.3/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc
  • Compiler (C++, GCC): /opt/poky-atmel/2.2.3/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++
  • Environment: as above
  • Debugger (GDB ARM): /opt/poky-atmel/2.2.3/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gdb
  • QT Version - qmake location: /opt/poky-atmel/2.2.3/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qmake
  • QT mkspec: none
  • CMake: none

But when I try to compile a new blank project, I get the error:

Code: Select all

Cannot run compiler '"arm-poky-linux-gnueabi-g++  -march=armv7-a -marm -mfpu=vfp  -mfloat-abi=hard -mcpu=cortex-a5 --sysroot=/opt/poky-atmel/2.2.3/sysroots/cortexa5hf-vfp-poky-linux-gnueabi"'. Maybe you forgot to setup the environment?
But I believe my environment was set up correctly so I'm obviously missing something here.

I'd really appreciate any insights.

Return to “Development Tools”

Who is online

Users browsing this forum: No registered users and 3 guests