Table of Contents Preface 1 Software Resource 2 Deploy Development Environment 3 Build Linux System 3.1 U-Boot 1.4.1 3.2 Linux Kernel 1.4.2 3.3 Build Filesystem 1.4.3 3.3.1 Yocto build Linux system 1.4.3.1 3.3.2 Yocto build SDK package 1.4.3.2 4 Linux Application Development 4.1 Test LCD 1.5.1 4.2 Test TouchPanel...
Page 3
MYD-Y6ULX Linux Development Guide This document introduce the MYD-Y6ULX development board about Linux compile and deploy, interface usage on baseboard, Qt application development etc. Version History Version Description Date V1.0 Initialize version 2017.10.09 V1.1 Add MYD-Y6UL board 2018.01.15 Hardware Version...
1 Software Resource MYD-Y6ULX series boards support the Linux kernel version 4.1.15, and provided with rich hardware resource and software resource. Below is MYD-Y6ULX software resource table: Categary Name Description Source Bootloader U-boot u-boot.imx will boot chip to work Linux kernel Linux 4.1.15 Based on official version imx_4.1.15_2.0.0_ga Driver...
2 Deploy Development Environment You need to install the Linux Operation System on your host PC.Recommend to use the Ubuntu 16.04 64bit distribution, and connect the network.Next steps we will install some packages from internet. Connect development board with PC 1.
Page 6
Below example intall the toolchain into '/opt/myir-imx6ulx-fb/4.1.15-2.0.1' directory. $ ./myir-imx-fb-glibc-x86_64-fsl-image-qt5-cortexa7hf-neon-toolchain-4.1.15-2.0.1.sh Freescale i.MX Release Distro SDK installer version 4.1.15-2.0.1 ================================================================ Enter target directory for SDK (default: /opt/myir-imx-fb/4.1.15-2.0.1): /opt/myir-imx6ulx-fb/4.1.15-2.0.1 Do You are about to install the SDK to "/opt/myir-imx6ulx-fb/4.1.15-2.0.1". Proceed[Y/n]? Y [sudo] password for kevinchen: Extracting SDK..........................done Setting it up...done...
3 Build Linux System This chapter introduces how to build components of Linux system. The MYD-Y6ULX includes below parts: U-Boot: First level bootloader. Linux Kernel: Linux kernel 4.1.15 and drivers suit for MYD-Y6ULX board. Yocto: An open source collaboration project that provides templates, tools and methods to help you create custom Linux-based system for embedded products regardless of the hardware architecture.
3.1 Compiling U-Boot Enter Bootloader directory, extract U-boot source tar source package: cd $DEV_ROOT/04-Source tar -xvf MYiR-iMX-uboot.tar.gz cd MYiR-iMX-uboot Compiling: make distclean make <config> make The option value is different boot mode. The MYD-Y6ULX supports two boot modes. Boot Mode...
3.2 Linux Kernel Enter Kernel directory, extract it: cd $DEV_ROOT/04-Source tar -xvf MYiR-iMX-Linux.tar.gz cd MYiR-iMX-Linux Compiling: make distclean make myd_y6ulx_defconfig make zImage dtbs When the compilation is done, the kernel image file zImage is generated in the 'arch/arm/boot' directory, and the DTB file is generated in the 'arch/arm/boot/dts' directory.
3.3 Build File System The Linux platform has many open source tools to build filesystem.These tools has some features to help developer build filesystem more easier in system build or customize it.Recently, some are more populator Buildroot, Yocto, OpenEmbedded etc.The Yocto project support more powerful and system method to build a linux system to suit your product.
Init Yocto build directory Use script by NXP supported, create a build directory, and Yocto will build all under it. The MACHINE has two value, "myd-y6ull14x14" and "myd-y6ul14x14". cd fsl-release-bsp DISTRO=myir-imx-fb MACHINE=myd-y6ull14x14 source fsl-setup-release.sh -b build tree conf/ conf/ ├── bblayers.conf ├──...
Page 12
-rwxr-xr-x 2 kevinchen kevinchen 395K Oct 11 16:01 u-boot-nand-2016.03-r0.imx -rwxr-xr-x 2 kevinchen kevinchen 343K Oct 11 16:01 u-boot-sd-2016.03-r0.imx lrwxrwxrwx 1 kevinchen kevinchen 51 Oct 11 16:47 zImage -> zImage--4.1.15-r0-myd-y6ull14x14-20171011084447.bin -rw-r--r-- 2 kevinchen kevinchen 6.2M Oct 11 16:47 zImage--4.1.15-r0-myd-y6ull14x14-20171011084447.bin -rw-r--r-- 2 kevinchen kevinchen 37K Oct 11 16:47 zImage--4.1.15-r0-myd-y6ull-gpmi-weim-20171011084447.dtb lrwxrwxrwx 1 kevinchen kevinchen 51 Oct 11 16:47 zImage-myd-y6ull14x14.bin ->...
".host.manifest" is a list of host install packages. The ".target.manifest" is a list of target device installed packages.The file "myir-imx6ulx-fb-glibc-x86_64-fsl-image- qt5-cortexa7hf-neon-toolchain-4.1.15-2.0.1.sh" is SDK toolchain. It can be distributed and installed to other Linux system and compile program to target device.
Before use, you need use Yocto SDK toolchain to compile all the example code, and copy to the development board directory. Compile example program Load the toolchain environment to current shell, and check the gcc version to verify environment correct. $source /opt/myir-imx6ulx-fb/4.1.15-2.0.1/environment-setup-\ cortexa7hf-neon-poky-linux-gnueabi $arm-poky-linux-gnueabi-gcc --version $arm-poky-linux-gnueabi-gcc --version arm-poky-linux-gnueabi-gcc (GCC) 5.3.0...
4.1 Test LCD This example demonstrates the operation of the FrameBuffer of Linux, enabling color and color grid testing.You need connect the LCD to MYD-Y6ULX board LCD interface(J3). We have three kinds LCD with touch panel.The MY-TFT043RV2 is default on. Model Descritpion MY-TFT070CV2...
4.2 Test TouchPanel This example shows you how to test the touch panel on LCD screen module. The MYD-Y6ULX supports capacitive and resistive type.You need follow 4.1 to install the LCD module. You can use ts_calibrate and ts_test command to test your LCD and touch panel are working.The "TSLIB_TSDEVICE" point the touch device node, capacitive and resistive has different device node.
Page 18
4.3 Ethernet This example uses the TCP/IP socket API to implement a simple C/S structure of the program. Copy the executable program arm_client to the development board, pc_server copy to the PC, the development board and PC access network. The MYD-Y6ULX has two ethernet interfaces, CN1 and CN2. Configure IP of PC machine and run server program: $ sudo ifconfig eth0 192.168.1.111 $ ./pc_server...
4.4 Test GPIO-KEY This example demonstrates how to read key state and key values in Linux user space. After running the gpio_key program, press or release the K3 key, the debug serial port will output the relevant status information. Press "Ctrl-C" to end the program. Run the program on board: # ./gpio_key /dev/input/event2 Hit any key on board ..
4.5 Test GPIO-LED This example demonstrates using the Linux system API to operate LED(D30) light on and off. After running the program, D30 flash alternately. Press "Ctrl-C" to end the program. # ./gpio_led /sys/class/leds/user/brightness...
4.6 Test USB Host Connect the USB flash disk to USB HOST(J6) interface, will output detection device information. At the same time, use this storage device to mount the Linux system under its read and write. # usb 1-2: USB disconnect, device number 6 usb 1-2: new high-speed USB device number 7 using atmel-ehci usb 1-2: New USB device found, idVendor=0bda, idProduct=0316 usb 1-2: New USB device strings: Mfr=1, Product=2,...
4.7 Test USB Device This example shows how to use USB device mode through the Micro USB interface(J26) on board.It will attach a specified file or device as a Gadget device. It works as a storage device connected to the HOST device. Operation steps on board: #mkfs.vfat /dev/ram1 #modprobe g_mass_storage file=/dev/ram1 removable=1 \...
Software Copy and run the program on MYD-Y6ULX Linux system.Below is MYD-Y6ULX as the sender: # ./rs485_write -d /dev/ttymxc3 -b 4800 -e 1 SEND[20]: 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14...
MYD-Y6ULX board have a RS232 interface(J10.9 for RS232-TX, J10.10 for RS232-RX).You need connect the TXD,RXD signal wire to another RS232 device or USB to RS232 converter. Software Copy and run the program on MYD-Y6ULX Linux system.Below is MYD-Y6ULX as the sender: # ./uart_test -d /dev/ttymxc1 -b 115200 /dev/ttymxc1 RECV 10 total...
4.10 Test CAN Bus This example demonstrates the use of the Linux API, which uses the CAN bus interface on the development board to send and receive data. Copy can_send and can_receive to the development board. Hareware MYD-Y6ULX board has a CAN bus interface(J10.6 for CAN-L, J10.7 for CAN-H).You need connect the H, L data signal to another CAN device or USB to CAN converter. Software Configure the CAN0 bitrate is 50kbps and enable it.
4.11 Test Audio This example demonstrates the development onboard audio interface using the arecord/aplay program in Linux systems. Hareware Connect LINE IN(J5) interface on the MYB-6ULX board, PC Audio-Out via a 3.5mm AUX cable HEADPHONE(J4) connect your headerphone or speaker Software The PC plays the audio file and execute arecord command on board.It will recored data and save to test.wav file.You can use "ctrl + c"...
4.12 Test Camera MYD-Y6ULX board has an 8-bit parallel camera interface(J9).It can connects camera module of MY-CAM011B model.The module and board connects with FPC wire. Attention: Please do not insert other camera model, this operation maybe damage the board or camera module. This example program use an open source software uvc_stream.It supports show video in web from camera capture.
4.13 Test WiFi Attention: The WiFi of carrier board only for NAND version of board. The MYD-Y6ULX board has a WiFi module (J11).It's supports Client mode. Hardware Connective Use SMA interface of wireless antenna connect with J11 position of board. Client Mode The Client mode means WiFi module as client device connect to your route or other AccessPoint device.
4.14 Test 4G LTE The MYD-Y6ULX board support LTE module through PCI-E slot with USB data line.Currently, the MYD-Y6ULX boards only support EC20 model from Quectl. Attention: The module not default accessory part.You need buy it from MYiR. Hardware Install Quectl EC20 module into PCI-E slot(U12).
5 QT application development Qt is the faster, smarter way to create innovative devices, modern UIs & applications for multiple screens. Cross-platform software development at its best. The MYD- Y6ULX uses Qt 5.6.2 version. In Qt application development, it is recommended to use QtCreator IDE.It can be developed Qt application more easier, automated cross- compiler for the development board of the ARM architecture.
In order to QtCreator use Yocto SDK, we need add environment to QtCreator, modify the file "/opt/qtcreator-4.1.0/bin/qtcreator.sh". Add below command before the line "#! /bin/sh": $ vi /opt/qtcreator-4.1.0/bin/qtcreator.sh source /opt/myir-imx6ulx-fb/4.1.15-2.0.1/environment-setup-cortexa7hf-neon-poky-linux-gnueabi #! /bin/sh # Use this script if you add paths to LD_LIBRARY_PATH # that contain libraries that conflict with the # libraries that Qt Creator depends on.
The second step, and then select the "Qt Version" tab, click the right side of the "Add ...", will pop up qmake path selection dialog box.In this case, qmake file path is "/opt/myir-imx6ulx-fb/4.1.15-2.0.1/sysroots/x86_64-pokysdk-linux/usr/bin/qt5", and choose "qmake" file. click the "Open" button then change "Version name" is "Qt % {Qt:Version} (MYDY6ulx-qt5)".After that click "Apply"...
Page 33
5.3 Test Qt application In order to test previous configure is correct, we support a Qt example.You just open, config and compile it. The first step, in the menu bar, select "File" -> "Open File or Project", in the open dialog box, browse and select "hellowrold" example project, choose "helloworld.pro" file, click "Open"...
6 System update MYD-Y6ULX series board provides two methods to update system to NAND flash of board, USB and SD card. USB method: Using NXP MfgTool tool to burn files into flash on download mode of chip. SD Card method: Using updatable SD image to write files into flash.
6.1 USB Update Method Install tool The NXP provide a manufacture tool called MfgTool, we use MfgTool 2.7.0 version.The MfgTool suppors Windows and Linux system.It is located in directory "03- Tools/ManufactoryTool" of resource package.You can copy and extract it to your work directory. The MYD-Y6ULX series board support NAND and eMMC flash.The MfgTool also support it on each vbs file.
Page 36
6.2 SD Card Update The sdcard image file needs special tool to write Micro SD storage card.The linux user can directly use dd command.The windows user need "Win32ImageWriter" tool. MYD-Y6ULX series boards provide two sdcard file.It's path in directory 02-Images. Fiile Name Description myd-y6ull-update-nand-base-20171026011019.rootfs.sdcard.gz...
Page 37
Boot bit Status Bit1 Bit2 Bit3 Bit4 Use USB to TTL cable connect to Debug port(JP1), configure your serial terminal software.Use USB Micro B cable as power plug into USB OTG port(J7) on board(or use DC adapter plug into J1 interface).You can view update progress in serial terminal software. Also, you can view the LED(D12) to get the current update state.In updating is flashing.The update success is light on, the update fail is light off.
Delivery Time MYIR will always keep a certain stock for its regular products. If your order quantity is less than the amount of inventory, the delivery time would be within three days; if your order quantity is greater than the number of inventory, the delivery time would be always four to six weeks. If for any urgent delivery, we can negotiate with customer and try to supply the goods in advance.
Page 39
Shipping cost During the warranty period, the shipping cost which delivered to MYIR should be responsible by user; MYIR will pay for the return shipping cost to users when the product is repaired. If the warranty period is expired, all the shipping cost will be responsible by users.
Need help?
Do you have a question about the MYD-Y6ULX Linux and is the answer not in the manual?
Questions and answers