WORK IN PROGRESS {{template>en:templates:tabs_yocto_bootstrap|product_type="Embedded module"|lang="intern"|mod_name="tqma8xx"|mod_name_head="TQMa8Xx"|mod_arch="arm"|bsp_name="linux"|build_system="yocto"|build_system_head="YOCTO"|bsp_name_head="Linux"}} ===== Generate QSPI bootstream ===== By default only the SD bootstream will be generated ===== SSH connection on STKa8Xx ===== Please keep in mind that the following instructions focus on simplicity, not on security. For the sake of simplicity password authentification can be used for SSH. === Setup Yocto build environment === The OpenSSH sftp server is not installed into the image by default, add the following to your local.conf to install it. IMAGE_INSTALL_append = “openssh-sftp-server” === Setup on Target === To setup a password for the default user root, execute the command **passwd root** and set your password. === Modify SSH configuration === Uncomment the following options in **/etc/ssh/sshd_config** to allow that the user root can authenticate with a password on the STKa8Xx. PermitRootLogin yes PasswordAuthentication yes \\ ===== Setup Qt Creator with Yocto build environment ===== ==== Building Yocto SDK ==== Building the toolchain requires a Yocto build environment configured for meta-tq or ci-meta-tq The setup of the build environment is described on the corresponding Yocto quickstart of the module. The meta-qt5 Yocto layer has to be added to the Yocto build environment when using meta-tq After the Yocto build environment the SDK can be built by the following command: bitbake meta-toolchain-qt5 \\ Building meta-toolchain-qt5 may take several hours, depending on your hardware configuration ==== Installing Yocto SDK ==== After building meta-toolchain-qt5 the SDK file is located in the following path of the build directory **tmp/deploy/sdk/fsl-imx-wayland-glibc-x86_64-meta-toolchain-qt5-aarch64-toolchain-4.14-sumo.sh** Execute the *sh file to install the SDK, the default path is set to **/opt/fsl-imx-wayland/4.14-sumo** ==== Set Up Qt Creator ==== Download [[https://download.qt.io/archive/qt/5.10/5.10.1/qt-opensource-linux-x64-5.10.1.run|Qt Opensource 5.10.1]]\\ After downloading make the Qt installer file executable and run the Qt installer. Follow the installation wizard instructions.\\ The next step is to add the environment setup of the Yocto SDK to the first line (above the shebang) of the file qtcreator.sh script.\\ If the install location has not been changed the qtcreator.sh is located in **~/Qt5.10.1/Tools/QtCreator/bin/qtcreator.sh** source /opt/fsl-imx-wayland/4.14-sumo/environment-setup-aarch64-poky-linux ==== Run Qt Creator ==== change to the directory where the qtcreator.sh file is located and execute the following command: sudo sh qtcreator.sh If qtcreator.sh returns source: not found, before sudo sh qtcreator.sh, enter sudo dpkg-reconfigure dash and choose no. ==== Configure Qt creator ==== === Setup SSH connection === - Go to **Tools > Options > Devices** - Click **Add > Generic Linux Device > Start Wizard** - Change the name to "STKa8Xx" and set up the connection. {{:en:general_information:yocto_qt_ssh.png?nolink&800|}} Click Test to test the network connection of the target device. === Add compiler === - Go to **Tools > Options > Build & Run> click Compilers** - Click **Add** and select **GCC** - Change Name to **TQMa8Xx** - Set **Compiler path** to /opt/fsl-imx-wayland/4.14-sumo/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++ - Set the following values for **ABI** from the dropdwon menus: ^ processor architecture ^ operating system ^ OS flavor ^ binary format ^ system architecture ^ | arm | linux | generic | elf | 64bit | {{:en:general_information:yocto_qt_compiler.png?nolink&800|}} === Add new Cross Compiled Qt Version === - Click **Qt Versions** on the **Build & Run** panel - Click **Add** - Locate the qmake file in /opt/fsl-imx-wayland/4.14-sumo/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qmake If the qmake file has been auto-detected by Qt Creator qmake has not to be added manually. {{:en:general_information:yocto_qt_qmake.png?nolink&800|}} === Add new Kit === - Click on **Kits** in the **Build & Run** panel - Click **Add** and set the following: **Name** STKa8Xx\\ **Device Type** Generic Linux Device\\ **Device** STKaXx (default for Generic Linux)\\ **Sysroot** /opt/fsl-wayland/4.14-sumo/sysroots/aarch64-poky-linux\\ **Compiler** STKa8Xx\\ **Qt version** Qt 5.10.1\\ {{:en:general_information:yocto_qt_kit.png?nolink&800|}} ==== Hello World Application ==== * Open **File** menu and click **New Project** * Select **Qt Console Application** * Specify the location for the project and name it hello_world * Select the Kit STKa8Xx * Edit main.cpp #include #include #include using namespace std; int main(int argc, char *argv[]) { QCoreApplication a(argc,argv); cout<<"Hello World"< ===== Starterkit Interfaces and Functions ===== {{template>en:templates:howto:audio|description="The microphone is not supported with the current BSP version."|microphone="X8"|linein="X9"|lineout="X10"|mbname="MBa8Xx"}} {{template>en:templates:howto:buttons|description="There are two GPIO buttons on the MBa8Xx. They are bound to the gpio-keys driver, and can be tested with the evtest tool."|image="{{ :en:arm:tqma8xx:linux:yocto:tqma8xx_gpio-button.png?nolink&400 \|}}"|device="/dev/input/event1"|test="evtest /dev/input/event1"}} {{template>en:templates:howto:can|dipdescription="DIP switches SW1 and SW2 are used to configure the CAN interfaces CAN0 and CAN1."|dip1="SWx-1"|dip2="SWx-2"|image="{{ :en:arm:tqma8xx:linux:yocto:tqma8xx_can_loopback.png?nolink&400 \|}}"}} {{template>en:templates:howto:dvfs|}} {{template>en:templates:howto:ethernet|description="The STKa8Xx Starterkit provides two Gigabit Ethernet interfaces."|ubootdescription="In U-Boot eth0 is configured as default interface. The IP configuration can be done statically or by a DHCP server in the network."|linuxdescription="Both Ethernet interfaces are activated and configured by systemd-network. The configuration files for the interfaces are located in /lib/systemd/network/ these configuration files can be altered to customize the default interface configuration."}} {{template>en:templates:howto:gpu|}} {{template>en:templates:howto:i2c|module="tqma8xx"|mod_arch="arm"|ubooti2c="1"|linuxi2c="16"}} {{template>en:templates:howto:lvds|starterkit="STKa8Xx"|description="**Note:** With MBa8Xx only one control interface for backlight is available (X22)."|example="'' (e.g. ''setenv fdt_file imx8qxp-mba8xx-lvds0-tm070jvhg33.dtb'')"}} {{template>en:templates:howto:rtc|}} {{template>en:templates:howto:spi|mbname="MBa8Xx"|amountspi="three"}} {{template>en:templates:howto:temperature|description="There are two temperature sensors located on the STKa8Xx, you can read them with the following commands:"}} {{template>en:templates:howto:usb|}} {{template>en:templates:howto:userled|description="The MBa8Xx has two user controllable LEDs, the behavior of these LEDs can be selected by several triggers."|image="{{ :en:arm:tqma8xx:linux:yocto:mba8xx_user_led.png?nolink&300 \|}}"|location="/sys/devices/platform/gpio-leds/leds/"|example="/sys/class/leds/ledb/trigger"}}