1. Home
  2. Docs
  3. OS Manuals
  4. Cortex-A7
  5. Linux + QT5

Linux + QT5

Chipsee IMX6UL LinuxQT5 User Manual

Rev 1.0


Revision Date Author Description
1.0 2018-3-12 Madi Initial

Supported Board


Supported Prebuilt Images

prebuilt-xxxx-20180312.tar.gz and later

System Features

Feature Comment
Kernel Kernel version: 3.14.52
Bootloader Uboot 2015.04
System Linux+QT5
Python Python version: 2.7.9
Qt Qt version: 5.5.1
Desktop matchbox
user/password root/root

1. Prepare

1.1. Hardware

• Chipsee Industrial Embedded Computer
• 6V ~ 36V Power Adapter (7”) / 15V ~ 36V Power Adapter(10” and other bigger size)
• USB to serial cable or other serial debug cable
• TF Card( at least 4GB)

You need prepare Power Adapter by yourself. 7” product nee 6V ~ 36V Power Adapter,10”and other bigger size product need 15V ~ 36V Power Adapter. USB to serial cable is used to debug the chipsee Industrial Embedded Computer. TF card is used to make bootable card and reflash the system.

1.2. Software

• Prebuilt Images Package
• Xshell or other terminal emulation software
• Cross-toolchain
• VNC-Viewer

You can use the Prebuilt Images Package to reflash the system. You can find it in DVD/Ubuntu14.04/Prebuilt directory. You can use Xshell to debug Chipsee Industrial Embedded Computer in Windows. You can use VNC-Viewer to remote control Chipsee Industrial Embedded over Ethernet. The cross-toolchain can compile program for Chipsee Embedded Computer.

2. Debug

This document use Xshell to debug Chipsee Industrial Embedded Computer, you also can use other tools, like SecureCRT and Minicom.

2.1. Serial Debug

You can reference CAN+RS485+RS232 Connector in Chipsee_UxEC-Manual – V1.0.pdf(such as 7” Chipsee_U7EC-Manual – V1.0.pdf)to understand the serial ports of Computer, the debug serial port of Chipsee Industrial Embedded Computer is the first RS232 port, need use RS232_1_TXD,RS232_1_RXD,GND.
Please reference How_To_Connect_Board_By_Serial.pdf to connect your PC and Chipsee Industrial Embedded Computer over Serial cable. Setting the Xshell like figure 2-1 and figure 2-2.

Figure 2-1 Add Session

Figure 2-2 Session Properties

Figure 2-3 Serial Debug

2.2. SSH Debug

Connect Chipsee Industrial Embedded Computer to Internet, get the ip address. Then config Xshell or use ssh tool in Linux PC directly.
We will introduce Xshell ssh debug. First we need add one new session, like figure 2-1. Second we need setting the session like figure 2-4.

Figure 2-4 SSH Setting

Figure 2-5 SSH Debug

2.3. VNC Debug

You can use VNC-Viewer in Windows to control Chipsee Industrial Embedded Computer over Ethernet. Just click X11VNC icon to enable the X11VNC. Like Figure 2-6.

Figure 2-6 X11VNC Enable

Use VNC-Viewer in Windows to control it over Ethernet. Like figure 2-7, 2-8, 2-9.

Figure 2-7 Vnc-Viewer Connect

Figure 2-8 authentications

Figure 2-9 VNC Desktop

3. Downloading images

3.1. Booting switch configuration

Chipsee Industrial Embedded Computer support SD boot and eMMC boot, like Figure 3-1. If you want to reflash the system, you can use TF Card.

Figure 3-1 Boot Mode

3.2. Prebuilt file package

You can get the prebuilt file package from DVD/Linux+QT5/Prebuilt. Like prebuilt-cs10600u070v1-emmc-20171222.tar.gz, the package has follow contents. Like table 3-1.

Table 3-1 Prebuilt file package

Contents Comment
boot/imx6q-eisd.dtb TF Card boot dtb file
boot/u-boot-sd.imx TF Card boot bootloader
boot/zImage TF Card boot kernel file
boot/logo.bmp TF Card boot logo file
filesystem/rootfs-emmc-flasher.tar.bz2 TF Card boot rootfs
mksdcard.sh Shell tools to make bootable TF Card
README Simple Guide
S1.jpg Boot Switch Config Figure
emmc-flash/emmc/rootfs.tar.bz2 rootfs in target emmc
emmc-flash/emmc/u-boot-emmc.imx bootloader in target emmc
emmc-flash/emmc/zImage kernel file in target emmc
emmc-flash/emmc/zImage_framebuffer kernel file with framebuffer
emmc-flash/emmc/imx6q-eisd.dtb dtb file in target emmc
emmc-flash/emmc/imx6q-eisd.dtb_framebuffer dtb file with framebuffer
emmc-flash/emmc/logo.bmp logo file in eMMC
emmc-flash/mkemmc.sh shell tools to download images to eMMC

3.3. Downloading images with TF Card

The prebuilt file package has one shell tool to help you to make one bootable TF Card in Linux Platform. Then use the TF Card to download images. It’s one another quick and easy way to downloading images.
• Copy prebuilt file to linux environment, like ubuntu1404.
• Insert TF card in ubuntu1404, check the device node, such as /dev/sdc.
• Untar prebuilt package. And do follow command.

$ sudo ./mksdcard.sh --device /dev/sdc

• Now you get one bootable TF card, insert it in chipsee board, change the switch S1 to TF card boot mode, you can reference 3.1 Booting switch configuration.
• Power on, then the following image will be seen, indicating you have downloaded the image in emmc.
>>>>>>> eMMC Flashing Completed <<<<<<<
• Power off and switch S1 to eMMC boot mode, you can reference 3.1 Booting switch configuration.

4. System Resource

4.1. TF Card/USB

The TF card and USB storage support hot plug. They will be automatically mounted on run/media/mmcblk0p*, like figure 4-1, TF card and USB does not support the NTFS, however, you need it formatted into FAT32.

Figure 4-1 TF Card

4.2. Network

This system uses a Networking service to control Ethernet and use wpa_supplicant to control the WIFI network.

4.2.1. Wired Ethernet

You can get the IP address from the following application, like in figure 4-2 and figure 4-3:

Figure 4-2 Ethernet

Figure 4-3 Ethernet Information

4.2.2. WIFI

You can config the WIFI in the following way:

• Config WIFI by GUI
Click the terminal on the desktop and use the following command to generate network config information, then replace the information in /etc/wpa_supplicant.conf, like figure 4-4, SSID is Chipsee, WIFI Password is 1chipsee234567890.

# wpa_passphrase “Chipsee” “1chipsee234567890”

Figure 4-4 WIFI Config File

Open the WIFI Icon on the desktop, then Click on the “Enable” button, wait a few minutes. You know the WiFi is working when you see the “WIFI Enabled!” message, like in the figure 4-5.

Figure 4-5 WIFI Enable

Config WIFI by command
Use the following command to enable WIFI first.

# wifienable.sh

List available network and remove default if exist

# wpa_cli list_network

# wpa_cli remove_network

# wpa_cli scan

# wpa_cli scan_result // get latest scan results

# wpa_cli ap_scan 1

Add a new network and list added network

# wpa_cli add_network

# wpa_cli list_network

Set SSID/Password/key management

# wpa_cli set_network 0 ssid ‘“Chipsee”’

# wpa_cli set_network 0 key_mgmt WPA-PSK

# wpa_cli set_network 0 psk ‘”1chipsee234567890”’

Enable the network 0

# wpa_cli select_network 0

Save config

# wpa_cli save_config

Enable WIFI again

# wifienable.sh

4.3. Sound

• You can use the following command to record sound. The -d parameter indicate interrupt after # seconds, follow is 18 seconds

$ sudo  arecord  -N  -M  -r  44100  -f  S16_LE  -c  2  -d  18  test.wav

• You can use the following command to playback the recorded sound above.

$ sudo  aplay  -N  -M  test.wav

• You also can use the QT Test Application to record and playback audio. The QT Test Application is HT in the desktop, like in figure4-6 and figure 4-7, you can click on the “Audio” button to playback audio directly. You can also click on the “Record” button to record one 18 seconds audio, then the application will playback it automaticly.

Figure 4-6 Hardware Test

Figure 4-7 Audio Test

4.4. Serial Port

There are 5 serial ports, 2 RS232, 3 RS485. For the device node in system, please reference the table 4-1:

Table 4-1 serial port device node

Ports Device Node
RS232_1 /dev/ttymxc0
RS232_2 /dev/ttymxc1
RS485_3 /dev/ttymxc2
RS485_4 /dev/ttymxc3
RS485_5 /dev/ttymxc4

You can test the serial port by using the HT_Serial Application in the desktop, like in figure 4-8:

Figure 4-8 HT_Serial Test

Figure 4-9 HT_Serial Test

4.6. CAN

There are two-channel CAN buses, the system has integrated the CAN units. You can use them to test CAN, you also can use the HT application to test them. But you must add one 120ohm resistor between CAN_H and CAN_L on one of the two boards. Like in figure 4-10:

Figure 4-10 CAN Connect

Here is an example how to test CAN by using can units:
• Set the bit-rate to 50Kbits/sec with triple sampling using the following command

# ip  link  set  can0  type  can  bitrate  50000  triple-sampling  on
# canconfig  can0  bitrate  50000  ctrlmode  triple-sampling  on

• Bring up the device using the command

# ip  link  set  can0  up
# canconfig  can0  start

• Transfer packets
a. Transmit 8 bytes with standard packet id number as 0x10

# cansend  can0  -i  0x10  0x11  0x22  0x33  0x44  0x55  0x66  0x77  0x88

b. Transmit 8 bytes with extended packet id number as 0x800

# cansend  can0  -i  0x800  0x11  0x22  0x33  0x44  0x55  0x66  0x77  0x88 -e

c. Transmit 20 packets of 8 bytes each with same extended packet id number as 0xFFFFF

# cansend  can0  -i  0xFFFFF  0x11  0x22  0x33  0x44  0x55  0x66  0x77  0x88 -e  --loop=20

• Bring down the device

# ip  link  set  can0  down
# canconfig  can0  stop

Use the HT application to test CAN. You need use two Chipsee boards to test it. Connect two boards like in figure 4-10, and select the CAN port “can0” or “can1” at the same time, then click “Canstart” at the same time on both boards. The CAN part in the HT application is like in figure 4-11:

Figure 4-11 CAN

4.6. GPIO

There are 8 GPIOs, check the GPIO chapter in Chipsee_U7EC-Manual – V1.0.pdf to know the detail port define. You also can check the following table 4-2

Table 4-2 CS10600F070 – V1.0 P23 Port

Pin Number Definition
1 VDD_24v
3 /dev/chipsee-gpio1(out)
4 /dev/chipsee-gpio2(out)
5 /dev/chipsee-gpio3(out)
6 /dev/chipsee-gpio4(out)
7 /dev/chipsee-gpio5(in)
8 /dev/chipsee-gpio6(in)
9 /dev/chipsee-gpio7(in)
10 /dev/chipsee-gpio8(in)

Use the following command to test GPIO easily:
• Set GPIO1 high

# echo 1 > /dev/chipsee-gpio1

• Set GPIO2 low

# echo 0 > /dev/chipsee-gpio2

• Check GPIO5 vlue

# cat /dev/chipsee-gpio5

You also can use the GPIO part of the HT application to test the GPIO. Before you test, you need to connect the output gpio and input gpio, like pin 3 — pin 7 / pin 4 — pin8 / pin 5 — pin9 / pin6 — pin10. Don’t forget to give outside power to the pin 1 and pin2. You can use the outside 24V input power. Then click “SetAllHigh” or “SetAllLow” to check the right light status. You also can set output gpio high or low respectively. Then check the right input gpio status. Like in figure 4-12:

Figure 4-12 GPIO Test

4.7. Buzzer

Control the buzzer easily, with the following command:
• Enable the buzzer

# echo 1 >/dev/buzzer

• Disable the buzzer

# echo 0 >/dev/buzzer

You also can use the HT application to test it, like in figure 4-13:

Figure 4-13 Buzzer

5. Development

In this chapter, you will learn how to set up QT development environment, and develop the first QT application on CS10600U070-v1.0.

5.1. Set Environment

5.1.1. Download and install QT5.5.1

Download qt-opensource-linux-x64-5.5.1.run or qt-opensource-linux-x86-5.5.1.run from http://download.qt.io/archive/qt/5.5/5.5.1/ and install it on Ubuntu1404 system. Such as you install it in /home/<user>/program directory.

5.1.2. Install IMX6UL SDK

Get the SDK from DVD/Linux+QT5/Tools/fsl-imx-x11-glibc-x86_64-meta-toolchain-qt5-cortexa7hf-vfp-neon-toolchain-3.14.52-1.1.1.sh. Install it like this:

# chmod +x fsl-imx-x11-glibc-x86_64-meta-toolchain-qt5-cortexa7hf-vfp-neon-toolchain-3.14.52-1.1.1.sh
# ./ fsl-imx-x11-glibc-x86_64-meta-toolchain-qt5-cortexa7hf-vfp-neon-toolchain-3.14.52-1.1.1.sh

The default install directory is /opt/fsl-imx-x11/3.14.52-1.1.1, you can install it in this directory, you also can use another directory.
Use the following command to test it:

# source /opt/fsl-imx-x11/3.14.52-1.1.1/ environment-setup-cortexa7hf-vfp-neon-poky-linux-gnueabi
# echo ${CC}

5.1.3. Setting Qtcreator

If you installed qt-opensource-linux-x64-5.5.1.run, the Qtcreator will be installed automatically.
Before open QtCreator, you need to add the following in the first line of /home//program/Qt5.5.1/Tools/QtCreator/bin/qtcreator.sh like figure 5-1:

source /opt/fsl-imx-x11/3.14.52-1.1.1/ environment-setup-cortexa7hf-vfp-neon-poky-linux-gnueabi

Figure 5-1

Use the following command to open the Qtcreator.

# /home//program/Qt5.5.1/Tools/QtCreator/bin/qtcreator.sh

Open the QtCreator Options, Tools -> Options -> Build & Run, Set the Debuggers/Compilers/Qt Versions/Kits like figure 5-2/5-3/5-4/5-5:

Figure 5-2 Debuggers

Figure 5-3 Compilers

Figure 5-4 Qt Versions

Figure 5-5 Kits

5.2. HelloWorld

Use the QtCreator to New one Qt Widgets Application, the name is HelloWorld. Like in figure 5-6:

Figure 5-6 Qt Widgets Application

Select IMX kits, like figure 5-7:

Figure 5-7 Kit Selection

Use QMainWindow as the Base class, like in figure 5-8.

Figure 5-8 Base Class

Click “Design” to add one label widget, like in figure 5-9:

Figure 5-9 Add Label Widget

Click “Build” to build, like in figure 5-10:

Figure 5-10

Copy the Helloworld to the /home/root/ directory, use the following command to run it:

# export DISPLAY=:0.0
# ./HelloWorld

You can get the HelloWorld from /home/leave/build-HelloWorld-imx-Debug directory, but your directory is not same as ours.

7. Q&A

In this chapter, you can learn how to set up the QT development environment, and develop the first QT application on Chipsee Boards.

7.1. How to Change psplashs

7.1.1. Install IMX SDK and some Packages

Reference 6.1.2 Install SDK to install IMX SDK and install some recommends packages:

$ sudo  apt-get  install  autoconf  libgdk-pixbuf2.0-dev

7.1.2. Generate psplash for your own

Get psplash.tar.gz from DVD/Linux+QT5/Tools/ and extract it

$ sudo tar zxvf psplash.tar.gz

Prepare a PNG file, such as chipsee.png

$ sudo cp chipsee.png psplash/
$ sudo cd psplash

Setting environment

$ source /opt/fsl-imx-x11/3.14.52-1.1.1/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi

Generate header file and modify the psplash.c, then config and mak:

$ ./make-image-header.sh chipsee.png POKY  //you will find a new file named chipsee-img.h
$ vi psplash.c  // replace the header file name (psplash-poky-img.h) in psplash.c with chipsee-img.h
$ ./autogen.sh
$ make  // you will generate the file psplash

Then you will find the file psplash, replace the one in rootfs /usr/bin/psplash. Reboot your board you will find you have change the psplash.
You can remove the file in rootfs /etc/init.d/psplash.sh to disable it.
If you want to rotate the psplash screen, just do the following in the system:

# echo 180 > /etc/rotation   // rotate  180  angle
# echo 0 > /etc/rotation	    // reset to default.
Was this article helpful to you? Yes 4 No