The i.MX 8QuadXPlus Multisensory Enablement Kit (MEK) is a NXP development platform based on Cortex A-35 + Cortex-M4 cores. Built with high-level integration to support graphics, video, image processing, audio, and voice functions, the i.MX 8X processor family is ideal for safety-certifiable and efficient performance requirements.
This tutorial shows how to enable the Cortex-M4 using the MCUXpresso SDK package and loading the binary from the network.
NOTE: It is also possible to load the Cortex-M4 image from the SCFW using the imx-mkimage utility. Please see next blog posts for this tutorial.
Setting up the machine
NOTE: This shows the procedure for a Linux environment. For the Windows OS, please see the Getting Started documentation on the SDK package.
Install cmake on the host machine:
$ sudo apt-get install cmake
Download the armgcc toolchain from here :https://launchpad.net/gcc-arm-embedded/5.0/5-2016-q2-update/+download/gcc-arm-none-eabi-5_4-2016q2-20160622-linux.tar.bz2 and export the location as ARMGCC_DIR:
$ export ARMGCC_DIR=<your_path_to_arm_gcc>/gcc-arm-none-eabi-5_4-2016q2/
NOTE: The ARMGCC_DIR variable needs to be exported on the terminal used for compilation.
To setup the TFTP server on the host machine, follow the first two sections on this blog post https://imxdev.gitlab.io/tutorial/How_to_boot_Kernel_and_File_System_from_the_network/
(Configuring your Host PC for TFTP and Configuring your Host PC for NFS).
Downloading the SDKPermalink
Download the MCUXpresso SDK following these steps:
Click on “Select Development Board”;
Select MEK-MIMX8QX under “Select a Device, Board, or Kit” and click on “Build MCUXpresso SDK” on the right;
Select “Host OS” as Linux and “Toolchain/IDE” as GCC ARM Embedded;
Add “FreeRTOS” and all the wanted Middleware and hit “Request Build”;
Wait for the SDK to build and download the package.
Building the image
All demos and code examples available on the SDK package are located in the directory <<SDK_dir>>/boards/mekmimx8qx/. This tutorial shows how to build and flash the hello_world demo but similar procedures can be applied for any example (demo, driver, multicore, etc) on the SDK.
To build the demo, enter the armgcc folder under the demo directory and make sure that the ARMGCC_DIR variable is set correctly.
$ cd ~/SDK_2.3.0_MEK-MIMX8QX/boards/mekmimx8qx/demo_apps/hello_world/armgcc
$ export ARMGCC_DIR=<your_path_to_arm_gcc>/gcc-arm-none-eabi-5_4-2016q2/
Run the build_release.sh script to build the code.
NOTE: If needed, give the script execution permission by running chmod +x build_release.sh.
This generates the M4 binary (hello_world.bin) under the release folder. Copy this image to the /tftpboot/ directory on the host PC.
NOTE: This procedure shows how to build the M4 image that runs on TCM. To run the image from DDR, use the build_ddr_release.sh script to build the binary under the ddr_release folder.
Flashing the image
Open two serial consoles, one for /dev/ttyUSB0 for Cortex-A35 to boot Linux, and one for /dev/ttyUSB1 for Cortex-M4 to boot the SDK image.
On the A35 console, with a SD Card with U-Boot, stop the booting process and enter the following commands to load the M4 binary to TCM:
=> setenv serverip <ip_from_host_pc>
=> tftp 0x88000000 hello_world.bin
=> dcache flush
=> bootaux 0x88000000
Then the M4 core will load the image to the /dev/ttyUSB1 console.
The i.MX 6UltraLite EVK kernel release includes the parallel camera OV5640 support by default. However, depending on the base board revision, this camera might require the SCH700-27820 adapter below:
According to the following image, the FX12B-40P-0.4SV connector layout was changed in the RevC, giving the possibility to use the OV5640 directly:
Rev B in the left and Rev C in the right, which does not need the adapter
So, if you are using a base board older than Rev C, plug in the camera with the adapter and connect the other end of the adapter to the board.
In order to use the parallel OV5640 camera, it’s necessary to set up the environment variable below on U-Boot, independent of the base board revision:
=> setenv fdt_file ‘imx6ul-14x14-evk-csi.dtb’
Follow the GStreamer pipeline example to test the camera connection:
$ gst-launch-1.0 v4l2src device=/dev/video1 ! video/x-raw,width=640,height=480 ! autovideosink
This test was done using the kernel BSP release 5.10.35v.
This section describes some advanced topics and tips to get high experiences in camera use cases in the i.MX 8 boards
The i.MX 8QM MEK includes the use of the dual MIPI-CSI interfaces and two MX8XMIPI4CAM2 in combination with eight MCIMXCAMERA1MP daughter cards connected to them. For this, change the DTB file to fsl-imx8qm-mek-8cam.dtb and boot the board.
Figure 1. Show i.MX 8QM MEK 8 cameras example.
Multiple cameras output In order to use more than one camera at the same time displayed in the same monitor output, boot the board and enter with the following command line to get the cameras ids: $ v4l2-ctl --list-devices It will result in something similar to the image below:
Figure 2. v4l2-ctl results
According to the image, mxc-isi found and set four cameras to /dev/video0, video1, video2, and video3. So we can build the GStreamer pipeline below changing it as required:
$ gst-launch-1.0 -v imxcompositor_g2d name=comp \ sink_0::xpos=0 sink_0::ypos=0 sink_0::width=640 sink_0::height=480 \ sink_1::xpos=0 sink_1::ypos=480 sink_1::width=640 sink_1::height=480 \ sink_2::xpos=640 sink_2::ypos=0 sink_2::width=640 sink_2::height=480 \ sink_3::xpos=640 sink_3::ypos=480 sink_3::width=640 sink_3::height=480 \ ! video/x-raw,format=RGB16 ! waylandsink \ v4l2src device=/dev/video0 ! video/x-raw,width=640,height=480 ! comp.sink_0 \ v4l2src device=/dev/video1 ! video/x-raw,width=640,height=480 ! comp.sink_1 \ v4l2src device=/dev/video2 ! video/x-raw,width=640,height=480 ! comp.sink_2 \ v4l2src device=/dev/video3 ! video/x-raw,width=640,height=480 ! comp.sink_3
This pipeline enables the user to set up more than one camera to the same screen using the imxcompositor_g2d for it. This is the unique solution available to create an interface over Weston/Wayland interface, i.e., in i.MX 8 devices we need to use GPU to create interfaces GUI. This pipeline results in the image below:
Figure 3. GStreamer 4 cameras output
It is just an example and you are encouraged to change it for other camera use cases, such as the eight cameras supported by the i.MX 8QM MEK.
Learn about Freescale's latest Kinetis and i.MX devices plus view the roadmap offerings. Presented by Dong Sun Presented at DwF Kinetis MCUs Based on ARM® Technology - Guangzhou - June 10, 2015 Session ID: APF-INS-T1013
Automotive and Connected Car Cost Efficient Solutions with Freescale Microcontollers for Automotive Applications Design, Software and Services Device Tree Made Easy Smart Home and Buildings Wireless and Connected Home of the Future Smart Industry Freescale's View of the Internet of Tomorrow Smart Networks Speed Your Time to Market by Leveraging Freescale’s Software, Tools and Professional Services for QorIQ Development Layerscape Use Cases Freescale Recommendations for Avionic and Defense Applications
The session will introduce Kinetis MCUs for supporting Thread and embedded platform as well as provide Alljoyn, HomeKit services through MQX. Presented by James Huang Presented at DwF Taipei - May 7, 2015 Session ID: APF-SHB-T1454
This session will give an overview on Freescale ARM microcontrollers and product series roadmap for Kinetis MCUs based on ARM® Cortex®-M4 / M+ and i.MX applications processors based on Cortex-A8 and Cortex-A9. The session will also introduce Freescale segment focus on Kinetis MCUs, such as KM, KM and KV series. Presented by James Huang Presented at DwF Taipei - May 7, 2015 Session ID: APF-IND-T1453
Design, Software and Services Bootloader Solution for Kinetis MCUs Insight and Innovation Total Sensor Hub and Fusion Solution Smart Home and Buildings Share Design Experience Using i.MX Applications Processors based on ARM® Cortex®-A7 and Cortex-A9 Cores Freescale IoT Solutions - Taipei Freescale Wireless Charging Technology Smart Industry Freescale ARM® Microcontroller Overview Analog Product Introduction Including PMIC, SBC and PowerPC Smart Networks Wireless MCU Product Update QorIQ WLAN Wave-2 EAP Solution Update
Lecture including a live demo, showing how to develop multimedia application for i.MX applications processors, taking advantages of the hardware multimedia accelerators of the i.MX SoC. Presented by Daniele DallAcqua Presented at DwF Istanbul - May 12, 2015 Session ID: EUF-DES-T1474
Freescale is the best positioned silicon maker for the Internet of Tomorrow. This session is all about how Freescale sees the mechanics of the IOT. Attend this session and see what runs under the hood! Presented by Massimo Bonazzi Presented at DwF Istanbul and Ankara - May 12 and 14, 2015 Session ID: EUF-IND-T1463
This session will introduce the i.MX series product for Automotive application, such as roadmap, production feature, etc. It will also include i.MX automotive solutions, such as Surround View, Virtual Cluster, etc. Presented at DwF MCU Solutions - Zhengzhou - 31 March 2015 Session ID: APF-ACC-T0990
Learn about Freescale's latest Kinetis and i.MX devices plus view the roadmap offerings. Presented by James Huang Presented at DwF Kinetis MCUs Based on ARM® Technology - Tianjin - 19 March 2015 Session ID: APF-INS-T1013
This session will introduce i.MX 6 series hardware design reference board and will walk through the i.MX 6 series SDP schematic. The session will also introduce hardware design consideration including the hardware checking list to facilitate the hardware design and development. Additionally i.MX6D/Q/DL/Solo power design and how to use DDR calibration will be covered. At the end of session, will share the experience of i.MX 6 hardware bring up. Presented at DwF Kinetis MCUs Based on ARM® Technology - Tianjin - 19 March 2015 Session ID: APF-DES-T1023
This session will show how to obtain i.MX technical information from Freescale's website and also give an overview on i.MX 6 series SoC features, including IPU, VPU, GPU, and corresponding i.MX 6 series hardware design reference boards. The session will also show how to use Android® BSP for i.MX 6 series processors KK4.4.2_1.0.0-ga, i.MX 6 series for Linux® BSP fsl-yocto-3.10.17_1.0.0-ga and manufacturing tools. At the end of this session, we will do a few case studies on i.MX 6 series, i.e. multiple camera capturing, dashboard demo, multi-panel display. Presented at DwF Kinetis MCUs Based on ARM® Technology - Tianjin - 19 March 2015 Session ID: APF-DES-T1021
ARM Processors i.MX 2014 Archives Kinetis Power Architecture Processors QorIQ Analog and Power Management RF Sensors 2014 Archives Wireless Connectivity 2014 Archives Medical and Healthcare 2014 Archives Additional Courses Material