Technical content and expertise to help jump start your design and get you to production faster.
Start your designDownload our latest development and embedded software solutions.
Expedite time-to-market with our extensive lineup of development kits.
Jump-start your design with proven hardware and software solutions.
Get the latest specifications in our technical documentation library.
Further your technical expertise with online and in-person instruction.
Get comprehensive paid support to fast-track your product development.
Design ideas, demo videos, quality answers. Connect with NXP professionals and other knowledgeable designers ready to help.
Software, documentation, evaluation tools. The resources to build comprehensive solutions and accelerate your time to market.
Access our design resource libraryWe're always looking for passionate and talented people to work with us.
Join our teamThe following instructions will guide you on how to boot the preloaded Android image on the i.MX 8M Evaluation Kit.
Development kit contains:
Figure 1. i.MX8MQuad EVK front
Figure 2. i.MX8MQuad EVK back
The i.MX8MQuad EVK comes with a pre-built NXP Android binary demo image flashed on the eMMC. Without modifying the binary inside, booting from the eMMC provides a default system with certain features for building other applications on top of Android.
To understand more about NXP’s Embedded Linux®, Embedded Android™, or MCUXpresso SDK, continue reading the next sections.
Connect the micro-B end of the supplied USB cable into Debug UART port J1701
. Connect the other end of the cable to a host
computer.
If you are not sure about how to use a terminal application, try one of the following tutorials depending on the operating system of the host machine:
To see the user interface provided with the image binary connect a monitor via the HDMI connector (J1001
).
Click here to see the Boot Switch Setup
Connect the plug of the 12 V power supply to the DC power jack J902
. Power on the EVK board by sliding power switch
SW701
to ON.
Power the board by flipping the switch (SW701
). The
processor starts executing from the on-chip ROM code. With the default boot switch setup, the code reads
the fuses to define the media where it is expected to have a bootable image. After it finds a bootable
image, the U-Boot execution should begin automatically.
Information is printed in the smaller number serial console for the Cortex-A53 (COM9
on Windows as an example and /dev/ttyUSB*
on Linux). If you do not stop the U-Boot
process, it continues to boot the Linux kernel.
During the boot process, the Android logo appears on the HDMI display. Note that the HDMI output resolution is 1080P fixed — to change it, check the Android Documentation.
The Android UI can be seen after the boot process is finished. You can start operating with the mouse.
On the command prompt of the Linux host machine, run the following command to determine the port number:
$ ls /dev/ttyUSB*
The smaller number is for Arm® Cortex®-A53 core and the bigger number is for Arm® Cortex®-M4 core.
Use the following commands to install and run the serial communication program (minicom
as an example):
$ sudo apt-get install minicom
$ sudo minicom /dev/ttyUSB* -s
Figure 3. Minicom Configuration
The FTDI USB-serial chip on i.MX8MQuad enumerates two serial ports. Assume that the ports
are COM9
and COM10
. The smaller numbered port ( COM9
) is for the serial console
communication from Arm® Cortex®-A53 and the larger
numbered port (COM10
) is for
Arm® Cortex®-M4 core. The serial-to-USB drivers are
available at http://www.ftdichip.com/Drivers/VCP.htm.
Note: To determine the port number of the i.MX board virtual COM port, open the Windows device manager and find USB serial Port in Ports (COM and LPT)
Is an open source terminal emulation application. This program displays the information sent from the NXP development platform’s virtual serial port.
COM
port number identified
earlier) to 115200
baud rate,
8
data bits, no parity and
1
stop bit. To do this, go to
Setup → Serial Port and change the
settings.The FTDI USB-serial chip on i.MX8MQuad enumerates two serial ports. Assume that the ports
are COM9
and COM10
. The smaller numbered port ( COM9
) is for the serial console
communication from Arm® Cortex®-A53 and the larger
numbered port (COM10
) is for Arm®
Cortex®-M4. The serial-to-USB drivers are available at http://www.ftdichip.com/Drivers/VCP.htm.
Note: To determine the port number of the i.MX board virtual COM port, open the Windows device manager and find USB serial Port in Ports (COM and LPT)
PuTTY is a popular terminal-emulation application. This program displays the information sent from the NXP development platform’s virtual serial port.
COM
port number that you
determined earlier. Also enter the baud rate, in this case 115200
.COM
port, the terminal window
opens. If the configuration is not correct, PuTTY alerts you.This section is applicable ONLY if attempting to load a Linux operating system on the board.
The i.MX Linux Board Support Package (BSP) is a collection of binary files, source code, and support files that are used to boot an Embedded Linux image on a specific i.MX development platform.
Current releases of Linux binary demo files can be found on the i.MX Linux download page. The Linux User Guide and Linux Reference Manual provide additional information. Additional documentation can be found the i.MX Linux documentation bundle, or under the Linux sections on the i.MX Software and Development Tool.
Before the Linux OS kernel can boot on an i.MX board, the Linux image is copied to a boot device (SD card, eMMC and so on) and the boot switches are set to boot that device.
There are various ways to download the Linux BSP image for different boards and boot devices.
For this getting started guide, only a few methods to transfer the Linux BSP image to an SD card are listed. Experienced Linux developers can explore other options.
Depending on the OS used in the host machine, the way to transfer the Linux BSP image onto an SD card can vary.
Choose an option below for detailed instructions:
A .sdcard
file is a disk image that is flashed
directly into any SD card. This is the simplest way to load all necessary components required to
boot the i.MX8MQuad EVK board. The latest pre-built images for the i.MX8MQuad EVK is available
on the Linux
download page.
The pre-built NXP Linux binary demo image provides a typical system and basic set of features for using and evaluating the processor. Without modifying the system, users can evaluate hardware interfaces, test SoC features, and run userspace applications.
To bring up the board and run Linux, four elements are needed on the boot image:
zImage
).dtb
) for the board
being usedrootfs
) for the
particular Linux imageThe .sdcard
images contain these four elements
in a single file.
When more flexibility is desired, an SD card can be loaded with individual components (boot
loader, kernel, dtb file, and rootfs file) one-by-one or the .sdcard
image is loaded and the individual parts
are overwritten with the specific components.
Once the BSP package is downloaded from the Linux
download page, ensure that a pre-built SD card image built specifically for the
i.MX8MQuad EVK board is in the compressed file. The SD card image is named
.
Note: An SD/MMC card reader is required to copy the SD card disk image into an SD card.**
Connect the SD/MMC card reader with a SD card to your host machine running the Linux OS.
The Linux OS kernel running on the host assigns a device node to the SD/MMC card reader.
To identify the device node assigned to the SD/MMC card, perform the following command in the host computer:
$ cat /proc/partitions
The instructions below will permanently delete existing content on the SD card and are dangerous to your PC if run incorrectly. If you have questions or would like further details, consult the i.MX Linux User Guide.
Run the following command to copy the SD card image to the SD/MMC card. Change /dev/sdX
below to match the one used by the SD
card.
$ sudo dd if=
To setup the partition manually, read 4.3.3 in i.MX Linux User Guide.
To load individual components separately when the full SD card image is not used, refer to 4.3.4-3.4.6 in i.MX Linux User Guide.
With the source code and documentation, the users can customize the Linux image built for the device. For example, add or remove system components.
To build an NXP Linux BSP image, you can obtain the source code from the i.MX CodeAurora repository.
Detailed instructions on how to build an image are available in the Linux User Guide.
As an option, NXP provides a framework to build custom images. The Yocto Project is the framework of choice with NXP professional support to build custom images that are used for booting a Linux kernel, although other methods can be used.
Details on how to set up the Yocto Project go beyond this getting started guide. For details, refer to the NXP Yocto Users Guide.
The Manufacturing Tool, named MFGTool, is NXP tool of choice to load images on i.MX boards from a Windows OS host computer. The MFGTool is used to download images to different devices on i.MX board.
Perform the following steps to flash the board images:
L4.9.88_2.0.0-ga_mfg-tools.tar.gz
file to a
selected location. This file includes two different MFGTool configurations, one with the
rootfs images and one without it. For this tutorial, unzip the mfgtools-with-rootfs.zip
which creates a
directory which is named MFGTool- Dir
in
this example.MFGTool-Dir/Profiles/Linux/OS Firmware/files
path. If there are no files, copy the files from the pre-built images.SW802
(boot mode)
to 01
(from bit 1 to bit 2) to enter flash
mode.Note: There are two USB micro ports in i.MX8MQuad EVK board: USB to UART, USB OTG. The USB to UART can be referenced as debug UART, and the USB OTG can be referenced as USB in the hardware image above. The debug UART can be used to watch the log of the hardware boot processing.
The SD card should be plugged in after the board is powered on.
*.vbs
file according to
the target device as shown in the following table.Target device and boot storage VBS file | *VBS file |
i.MX8MQuad EVK | mfgtool2-yocto-mx8-evk-sdcard-sd2.vbs |
Figure 5. MFGTool interface
The figure below shows flashing in progress, and the status bar shows the flash status. The flash may take one to two minutes depending on the host machine.
Figure 6. MFGTool operation
The figure below shows the tool when the flash is complete.
Figure 7. MFGTool successful flash
SW801
(boot mode) to 1100
and SW802
to 10
to switch the board back to J1601
boot mode.Click here to see the Boot Switch Setup
This section describes the boot process of loading the i.MX8MQuad EVK board with an Embedded Android system image and introduces how to build the software components that create your own system image. For details on building the Android platform, see https://source.android.com/source/building.html
The current release includes Demo Images, Source code and Documentation. These can also be found under Android section of the i.MX Software and Development Tool.
The storage devices on the development system (MMC/SD or NAND) must be programmed with the U-Boot boot loader. The boot process determines which storage device to access based on the switch settings. When the boot loader is loaded and begins execution, the U-Boot environment space is then read to determine how to proceed with the boot process.
The images can come from pre-built release packages or be created from source code. Regardless of how you obtain them, all Android images contain the following components:
U-Boot image: u-boot.imx
boot image: boot.img
Android system root image: system.img
Recovery root image: recovery.img
For more information about the Android BSP refer to the Android User Guide.
Depending on the OS used in the host machine, the way to transfer the Android BSP image onto an SD card can vary.
Choose an option below for detailed instructions:
The pre-built NXP Android demo image provides a default system with certain features for the purpose of evaluation. Without modifying the system, users can perform some basic operations, and interact with the system to test hardware interfaces and develop a software application in the user space.
The pre-built images from the package are categorized by boot device and put in the directory with the device name. The latest pre-built image files can be found in Android section on the i.MX Software and Development Tool, or on the demo images downloader link.
Once you download the pre-built images, the script below can be used to partition an SD card:
$ cd ${MY_ANDROID}/
$ sudo ./device/fsl/common/tools/fsl-sdcard-partition.sh -f imx8mq /dev/sdX
In /dev/sdX
the X
is the disk index from 'a' to 'z'. That may be
different on each computer running Linux OS.
IMPORTANT The minimum SD card size required is 8 GB.
Different SD card sizes require different partition scripts:
If the SD card is 8 GB, use:
$ sudo ./device/fsl/common/tools/fsl-sdcard-partition.sh -f imx8mq /dev/sdX
If the SD card is 16 GB, use:
$ sudo ./device/fsl/common/tools/fsl-sdcard-partition.sh -f imx8mq -c 14 /dev/sdX
If the SD card is 32 GB, use:
$ sudo ./device/fsl/common/tools/fsl-sdcard-partition.sh -f imx8mq -c 28 /dev/sdX
$ umount /dev/sdX
Copy the related boot loader, boot image, system image, recovery image, GPT table image, and vendor image in your current directory.
This script requires to install the simg2img tool on the computer. simg2img is a tool that
converts the sparse system image to raw system image on the Linux OS host computer. The
android-toolsfsutils package includes the simg2img
command for Ubuntu Linux OS.
To build the Android source files a host computer running Linux OS is required. Ubuntu 14.04 (64-bit) version is the most tested OS for the Android NXP BSP Release.
Check whether you have all the necessary packages installed for an Android build. See "Setting up your machine" on the Android website https://source.android.com/source/initializing.html.
In addition to the packages requested on the Android website, refer to Android User Guide to install the additional packages. Which can be found inside the Documentation bundle.
Get the Android source code from Google repo using the manifest and script provided inside the source code package.
$ sudo apt-get install repo
$ source ~/imx-o8.1.0_1.3.0_8mq_ga/imx_android_setup.sh
By default, the imx_android_setup.sh
script will create the
source code build environment in the folder ~/android_build
.
Note: ${MY_ANDROID}
will be
referred as the i.MX Android source code root directory in all i.MX Android release
documentation.
$ export MY_ANDROID=~/android_build
The build configuration command lunch
can be
issued with an argument
strings.
The following is an example on how to build the Android image with user type for the i.MX8MQuad EVK board:
$ cd ~/myandroid
$ source build/envsetup.sh
$ lunch evk_8mq-user
$ make 2>&1 | tee build-log.txt
When the make
command is complete,
the build-log.txt
file contains the execution
output. Check for any errors.
The default configuration in the source code package takes internal eMMC as the boot storage. To change to SD card, refer to Android User’s Guide which can be found inside the Documentation bundle.
There are several additional information on how to build, customize and change the Android source code in the documents present in Documentation bundle.
Download the latest stable files from UUU GitHub page. An extensive tutorial for UUU can be found in https://github.com/NXPmicro/mfgtools/wiki.
Download the Android demo files from NXP.com.
Extract the downloaded file into a know directory.
Copy the file named uuu
from section Download
UUU on Windows into the extracted Android demo directory.
Open Command Prompt and navigate to the extracted Android demo directory
> uuu.exe uuu-android-mx8mm-evk-sd.lst
Insert an SDcard on connector J1701. Turn on the board in serial download mode, uuu starts to copy the images to the board. To put the board in serial download mode follow the instructions on the Boot switch setup section.
When it finishes, turn off the board, and consult Boot switch setup to configure the board to boot from SDcard.
The MCUXpresso Software Development Kit (MCUXpresso SDK) provides comprehensive software source code to be executed in the i.MX8MQuad M4 core. If you do not wish to enable the Cortex-M4 on i.MX8MQuad at this moment you can skip this section.
The MCUXpresso SDK is designed for the development of embedded applications for Cortex-M4 standalone or collaborative use with the A cores. Along with the peripheral drivers, the MCUXpresso SDK provides an extensive and rich set of example applications covering everything from basic peripheral use case examples to demo applications. The MCUXpresso SDK also contains RTOS kernels, and device stack, and various other middleware to support rapid development.
Depending on the OS used in the host machine, the way to build and deploy the demos can vary.
Choose an option below for detailed instructions:
Current releases of the MCUXpresso SDK and source code can be found at https://mcuxpresso.nxp.com/en/welcome.
To download the MCUXpresso SDK for i.MX8MQuad, follow these steps:
Click on “Select Development Board”.
Select evkmimx8mq
under “Select a
Device, Board, or Kit” and click on “Build MCUXpresso SDK” on
the right.
Select “Host OS” as Linux
.
Select “Toolchain/IDE” as GCC Arm Embedded
.
Click on “Select Optional Middleware“, “Select All“ and hit “Save changes“.
Click on “Request Build”.
Wait for the SDK to build and download the package.
Download and run the installer from launchpad.net/gcc-arm-embedded
. This is
the actual toolchain. The toolchain includes the compiler, linker, and so on. The GCC
toolchain should correspond to the latest supported version, as described in the
MCUXpresso SDK Release Notes found in the package already downloaded.
Export the toolchain location as ArmGCC_DIR
.
$ export ArmGCC_DIR=/usr
NoteThe /usr
is the
usual install directory when you apt-get gcc-arm-none-eabi
. Change the
directory if this changes.
Ensure that cmake
is installed:
$ sudo apt-get install cmake
$ sudo apt-get install gcc-arm-none-eabi
Change the directory of the command window to the demo armgcc directory and run the build command:
$
$ ./build_all.sh
There are two project configurations (build targets) supported for each MCUXpresso SDK project:
Debug
Compiler optimization is set to low, and debug information is generated for the executable. This target is selected for development and debug.
Release
Compiler optimization is set to high, and debug information is not generated. This target is selected for final application deployment.
Note: There are script files provided to build both configurations. For
this example, the Debug
target is
built and build_debug.sh
is typed on
the command line. If the Release
target is desired, type build_release.sh
instead.
The previous command generates the debug and release binaries (sdk20-app.bin
). These files are in the
debug and release folders.
sdk20-app.bin
to
the boot partition of the SD card.This section describes how to run applications using an SD card and pre-built U-Boot image for i.MX processor.
Following the steps on the Embedded Linux® tab, prepare an SD card with a pre-built U-Boot + Linux image from Linux BSP package for the i.MX8MQuad processor. If you have already loaded the SD card with a Linux image, you can skip this step.
sdk20-app.bin
) to the FAT
partition of the SD card.J1601
, and on EVK board there is only one SD
slot which is used for boot.Connect the DEBUG UART slot on the board with to the PC through the USB cable. The Windows OS installs the USB driver automatically, and the Ubuntu OS will find the serial devices as well.
See Serial Communication Console setup section in Out of the box for more instructions on serial communication applications.
115200
bit/s, data bits 8
, no parity, and power on the board.Power up the board and stop the boot process by pressing any key before the U-Boot countdown reaches zero. At the U-Boot prompt on the first terminal emulator, type the following commands to U-Boot.
=> fatload mmc 1:1 0x7e0000 sdk20-app.bin
=> bootaux 0x7e0000
These commands copy the image file from the first partition of the SD card into the Cortex-M4’s memory and release the Cortex-M4 from reset.
Current releases of the MCUXpresso SDK and source code can be found at https://mcuxpresso.nxp.com/en/welcome.
To download the MCUXpresso SDK for i.MX8MQuad, follow these steps:
Click on “Select Development Board”.
Select evkmimx8mq
under
“Select a Device, Board, or Kit” and click on “Build
MCUXpresso SDK” on the right.
Select “Host OS” as Linux
.
Select “Toolchain/IDE” as GCC Arm Embedded
.
Click on “Select Optional Middleware”, “Select All” and hit “Save changes”.
Click on “Request Build”.
Wait for the SDK to build and download the package.
Download and run the installer from launchpad.net/gcc-arm-embedded
. This is the
actual toolchain. The toolchain includes the compiler, linker, and so on. The toolchain includes
the compiler, linker, and so on. The GCC toolchain should correspond to the latest supported
version, as described in the MCUXpresso SDK Release Notes found in the package already
downloaded.
The Minimalist GNU for Windows (MinGW) development tools provide a set of tools not dependent on third-party C-Runtime DLLs (such as Cygwin). The build environment used by the MCUXpresso SDK does not utilize the MinGW build tools, but does leverage the base install of both MinGW and MSYS. MSYS provides a basic shell with a Unix-like interface and tools.
Download the latest MinGW mingw-get-setup installer from: https://sourceforge.net/projects/mingw/files/Installer/
Run the installer. The recommended installation path is C:\MinGW
, however, you may install to
any location.
Note: The installation path cannot contain any spaces.
Ensure that the mingw32-base
and msys-base
are selected under Basic
Setup.
Figure 13. MinGW files
Click Apply Changes
in the Installation
menu and follow the
remaining instructions to complete the installation.
Figure 14. Apply changes
Add the appropriate item to the Windows operating system Path environment variable. It
can be found under Control Panel → System and
Security → System → Advanced System
Settings in the Environment Variables… section. The
path is:
Important: Assuming the default installation path, C:\MinGW
, an example is shown below. If
the path is not set correctly, the toolchain does not work.
If you have C:\MinGW\msys\x.x\bin
in
your PATH
variable (as required by
KSDK 1.0.0), remove it to ensure that the new GCC build system works correctly.
Create a new system environment variable and name it ArmGCC_DIR
. The value of this variable
should point to the Arm GCC Embedded tool chain installation path, which, for this
example, is:
C:\Program Files (x86)\GNU Tools Arm Embedded\4.8 2014q3
Reference the installation folder of the GNU Arm GCC Embedded tools for the exact path name of your installation.
Figure 15. Variable name
Download CMake 3.0.x from https://www.cmake.org/cmake/resources/software.html
Before installing CMake, ensure that the option Add CMake to system PATH is selected. It is up to the user to select whether it is installed into the PATH for all users or just the current user. In this example, the assumption is that it is installed for all users.
Figure 16. Install CMake
Note: You may need to reboot your system for the PATH changes to take effect.
Open a GCC Arm Embedded toolchain command window. To launch the window, from the Windows operating system Start menu, go to Programs → GNU Tools Arm Embedded version> and select GCC Command Prompt.
Figure 17. GCC command prompt
Change the directory of the command window to the demo armgcc
directory and run the build
command:
Or double-click on the build_all.bat
file in Explorer to perform the build. The expected output is shown in this figure:
Figure 18. Build result
There are two project configurations (build targets) supported for each MCUXpresso SDK project:
Compiler optimization is set to low, and debug information is generated for the executable. This target should be selected for development and debug.
Compiler optimization is set to high, and debug information is not generated. This target should be selected for final application deployment.
Note: There are script files provided to build both configurations. For
this example, the Debug
target is
built and build_debug.bat
is typed on
the command line. If the Release
target is desired, type build_release.bat
instead.
The previous command generates the debug and release binaries (sdk20-app.bin
). These files are in the
debug and release folders.
sdk20-app.bin
to
the boot partition of the SD card.This section describes how to run applications using an SD card and pre-built U-Boot image for i.MX processor.
sdk20-app.bin
) that you want
to run to the FAT partition of the SD card.J1601
, and on EVK board there is only one SD
slot which is used for boot.Connect the DEBUG UART slot on the board with your PC through the USB cable. The Windows OS installs the USB driver automatically, and the Ubuntu OS will find the serial devices as well.
See Serial Communication Console setup section in Out of the Box for more instructions for serial communication applications.
115200
bps, data bits 8
, no parity, and power on the board.Power up the board and stop the boot process by pressing any key before the U-boot countdown reaches zero. At the U-Boot prompt on the first terminal emulator, type the following commands to U-Boot.
=> fatload mmc 1:1 0x7e0000 sdk20-app.bin
=> bootaux 0x7e0000
These commands copy the MCUXpressoSDK memory image file from the first partition of the SD card into the Cortex-M4’s memory and release the Cortex-M4 from reset.
When working with embedded systems, it is important to bear in mind that the documentation is wide and diverse. It is common to have different levels of documentation. The i.MX8MQuad EVK board has some documents. However, this board’s processor is i.MX8MQuad which is documented with SoC level documents. The BSPs available are documented with the BSP level documents.
Choose an option below for related documents:
In the case of i.MX8MQuad EVK the following documents are available.
Table 4. List of i.MX8MQuad EVK board-related documents
Document | Description |
Board Schematics | The i.MX8MQuad EVK electric schematic files. |
i.MX8MQuad EVK Hardware User Guide | The purpose of this document is to help hardware engineers design and test their imx8mq series processor-based designs. It provides information on board layout recommendations, design checklists to ensure first-pass success, and ways to avoid board bring-up problems. It also provides information on board-level testing and simulation such as using BSDL for board-level testing, using the IBIS model for electrical integrity simulation and more. |
In the case of i.MX8MQuad SoC the following documents are available.
Table 5. List of i.MX8MQuad chip-related documents
Document | Description |
i.MX8MQuad DataSheet | Describes the SoC physical and electrical characteristics, the part number meaning. |
i.MX8MQuad Reference Manual | Lists what the SoC supports, the registers and the memory map. Describes the features, workflow, the boot flow, and the meaning of each register’s bits. |
i.MX8MQuad ERRATA | List the hardware issues for that SoC. It may be an Arm core or an i.MX core issue. It may or may not have a workaround. |
i.MX8MQuad Security Reference Manual | Sing-in to request access to the i.MX8MQuad Security Reference Manual. The link to download is sent in the email. |
For i.MX8MQuad EVK the following BSPs are available.
Each BSP has a set of documents, in the next tables all the BSP documentation is described. The order the documents appear in the table is the recommended read order.
Table 6. i.MX8MQuad EVK BSP Linux documents
Document | Description |
L4.9.88_2.0.0 Doc Bundle | Downloads all the i.MX Linux BSP files listed here as one tarball. |
i.MX Linux Release Notes | If you do not know where to start, start here! It lists the supported boards, the supported features, the packages versions and the known issue list. |
i.MX Linux Users Guide | Describes the steps to download, build and deploy the i.MX Linux BSP. For example, detail how to configure, build, and deploy U-Boot booting from different medias. |
i.MX Yocto Project Users Guide Linux | Describes the steps to download, build, deploy and configure the Yocto Project metadata, and build an image. |
i.MX BSP Porting Guide Linux | Describes the steps to port the i.MX Linux BSP to a custom board or platform. |
i.MX Reference Manual Linux | Describes the i.MX BSP Linux Kernel drivers, features, and how to configure the kernel. It also describes how drivers works. |
i.MX Graphics Users Guide Linux | Describes how to test and configure the GPU for custom use cases. |
Table 7. i.MX8MQuad EVK BSP Android documents
Document | Description |
imx-o8.1.0_1.3.0_8mq_ga Doc Bundle | Downloads all the i.MX Android BSP files listed here as one tarball. |
Android Release Notes | If you do not know where to start, start here! It lists the supported boards, the supported features, the packages version, and the known issue list. |
Android Quick Start Guide | Describes the board, the files in the i.MX Android BSP, how to deploy and foot the images using different displays. |
Android Users Guide | It is the document with instructions on how to set a Linux machine to build Android, how to build, configure, and, deploy the i.MX Android BSP. |
Describes the steps to port the i.MX Android BSP to a custom board or platform; including steps to configure multimedia and display. | |
i.MX Graphics Users Guide Android | Describes how to test and configure the GPU for custom use cases. |
Android Frequently Asked Questions | Lists frequently asked question related to Android. |
With Linux running on the i.MX board, you can evaluate special features that i.MX SoCs provide. This tutorial presents the step-by-step for the following demos.
Choose an option below for detailed instructions:
This example shows how to suspend to low-power modes and resume to normal operation.
# echo enabled > /sys/class/tty/ttymxc0/power/wakeup
# echo mem > /sys/power/state
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.005 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Suspending console(s) (use no_console_suspend to debug)
PM: suspend of devices complete after 637.926 msecs
PM: suspend devices took 0.640 seconds
PM: late suspend of devices complete after 1.966 msecs
PM: noirq suspend of devices complete after 1.864 msecs
Disabling non-boot CPUs ...
PM: noirq resume of devices complete after 1.104 msecs
PM: resume of devices complete after 99.689 msecs
PM: resume devices took 0.110 seconds
Restarting tasks ... done.
Connect your earphone to the Audio Jack on the i.MX8MQuad EVK board.
If your earphone includes a microphone feature (TRRS with four contacts), do not push the microphone jack to the end. Leave one contact ring outside.
# gst-launch-1.0 audiotestsrc ! alsasink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Pipeline is PREROLLED ...
Disabling non-boot CPUs ...
Setting pipeline to PLAYING ...
New clock: GstAudioSinkClock
You should be able to listen a tone on the earphone.
When you are done with the tone, finish the command line by pressing kbd:[Ctrl+C]
This example is very simple. It shows the link between audiotestsrc
and alsasink
.
This example explains how to decode just the audio from a video file. Copy a video file to your /home/root/
on your SD card rootfs partition, boot
the board from the SD card and run the command below:
Note: You can obtain the file used in the example for free from the Big Buck Bunny site.
# gst-launch-1.0 filesrc location=Big_Bucky_Bunny.mov ! qtdemux \
! beepdec ! alsasink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
====== BEEP: 4.0.9 build on Sep 22 2016 18:44:36. ======
file: /usr/lib/imx-mm/audio-codec/wrap/lib_mp3d_wrap_arm12_elinux.so.3
CODEC: BLN_MAD-MMCODECS_MP3D_Arm_02.13.00_CORTEX-A8 build on Apr 10 2014 15:26:15.
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstAudioSinkClock
This example shows the advantages of using CAAM as an encryption offload engine provided by NXP.
As many of the i.MX NXP processors, i.MX8MQuad EVK board. includes the Cryptographic Acceleration And Assurance Module CAAM module that can be used through CryptoDev in order to accelerate by hardware the encryption and decryption process. It is recommended to use this module when working with large amounts of data or in any application where performance is important.
OpenSSL is an open source project that defines the security protocols SSL (Secure Sockets Layer) and TLS (Transport Layer Security). It has a software library that can be used in applications that requires a secure information transmission in order to prevent eavesdropping.
OpenSSL includes a speed command that tests the encryption performance for a desired
encryption algorithm. For this example the algorithm used is the aes-128-cbc
that implements the Advanced Encryption
Standard (AES) encryption algorithm, with a Cipher Block Chaining
(CBC) mode of operation and 128 bits block.
The OpenSSL speed test can be seen using the following command:
# openssl speed -evp aes-128-cbc
Doing aes-128-cbc for 3s on 16 size blocks: 3992233 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 64 size blocks: 1151356 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 256 size blocks: 299139 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 1024 size blocks: 75534 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 8192 size blocks: 9469 aes-128-cbc's in 2.99s
OpenSSL 1.0.2d 9 Jul 2015
built on: reproducible build, date unspecified
options:bn(64,32) rc4(ptr,char) des(idx,cisc,16,long) aes(partial) idea(int) blowfish(ptr)
compiler: arm-poky-linux-gnueabi-gcc -march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=Cortex-A53 --sysroot=/home/bamboo/buM
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes aes-128-cbc 21291.91k 24562.26k 25526.53k 25782.27k 25943.16k
Load the cryptodev
module and run the openssl
command again. This time you should be able
to see that the timing values show the accelerated values. As the block sizes increases, the elapsed
time decreases:
# modprobe cryptodev
cryptodev: driver 1.8 loaded.
root@imx6ulevk:~# openssl speed -evp aes-128-cbc -engine cryptodev
engine "cryptodev" set.
Doing aes-128-cbc for 3s on 16 size blocks: 91936 aes-128-cbc's in 0.14s
Doing aes-128-cbc for 3s on 64 size blocks: 88205 aes-128-cbc's in 0.15s
Doing aes-128-cbc for 3s on 256 size blocks: 70223 aes-128-cbc's in 0.09s
Doing aes-128-cbc for 3s on 1024 size blocks: 50836 aes-128-cbc's in 0.10s
Doing aes-128-cbc for 3s on 8192 size blocks: 11174 aes-128-cbc's in 0.03s
OpenSSL 1.0.2d 9 Jul 2015
built on: reproducible build, date unspecified
options:bn(64,32) rc4(ptr,char) des(idx,cisc,16,long) aes(partial) idea(int) blowfish(ptr)
compiler: arm-poky-linux-gnueabi-gcc -march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=Cortex-A53 --sysroot=/home/bamboo/buM
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes aes-128-cbc 10506.97k 37634.13k 199745.42k 520560.64k 3051246.93k
The encryption algorithms supported by the CryptoDev can be listed by the following command:
# openssl engine cryptodev -c
(cryptodev) BSD cryptodev engine
[RSA, DSA, DH, DES-CBC, DES-EDE3-CBC, AES-128-CBC, AES-192-CBC, AES-256-CBC, hmacWithMD5, hmacWithSH A1, RIPEMD160, MD5, SHA1]
To connect to the Internet on Linux with your i.MX8MQuad EVK follow the steps below:
Connect a Ethernet cable to the board RJ-45 connector.
Boot up the board and wait for the Linux prompt.
On the board, enter the following command:
# ifconfig eth0
Ping any site to corroborate functionality
# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=56 time=9.22 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=56 time=6.13 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=56 time=6.30 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=56 time=9.26 ms
No problem! Your board simply came in the old packaging and has a different out-of-box demo loaded into the flash memory.
You should be seeing the red and green LEDs toggling back and forth. It's OK to move onto the next step when you're ready
Try proceeding to the next steps to get other example applications running on your board. If you still have problems, try contacting us through the NXP Community.
After the MDK tools are installed, Cortex® Microcontroller Software Interface Standard (CMSIS) device packs must be installed to fully support the device from a debug perspective. These packs include things such as memory map information, register definitions and flash programming algorithms. Follow these steps to install the appropriate CMSIS pack.
Open the MDK IDE, which is called µVision. In the IDE, select the "Pack Installer" icon.
In the Devices tab on the left hand side of the dialog box that appears, expand the NXP category. Then expand the KLxx Series category and highlight KL4x by clicking it once.
Note:
This process requires an internet connection to successfully complete.
After the installation finishes, close the Pack Installer window and return to the µVision IDE.
These steps show how to open the demo workspace in µVision, how to build the platform library required by the demo, and how to build the demo application.
Demo workspace files can be found using this path:
The workspace file is named
After the workspace is open, two projects show up: one for the KSDK platform library, and one for the demo. By default, the demo project is selected as the active project.
Make the platform library project the active project since the library is required by the demo application to build. To make the platform library project active, right click on it and select "Set as Active Project". The active project has a black box around the project name. After it is active, the platform library project is highlighted.
There are two project configurations (build targets) supported for each KSDK project:
The tool allows selection of the build target based on the active project, so in order to change the configuration for the platform library it must be the active project. Choose the appropriate build target: "Debug" or "Release" from the drop-down menu.
For this example, select the "ksdk_platform_lib Debug" configuration.
Rebuild the project files by left-clicking the "Rebuild" button, highlighted in red.
The KSDK demo applications are built upon the software building blocks provided in the Kinetis SDK platform library, built in the previous section. If the platform library is not present, the linker displays an error indicating that it cannot find the library. If the platform library binary is not built and present, follow the steps on page 2 to build it. Otherwise, continue with the following steps to build the desired demo application.
If not already done, open the desired demo application workspace in:
The workspace file is named
Make the demo the active project.
To build the demo project, select the "Rebuild" button, highlighted in red.
The build will complete without errors.
The FRDM-KL46Z board comes loaded with the mbed/CMSIS-DAP debug interface from the factory. If you have changed the debug OpenSDA application on your board, visit http://www.nxp.com/opensda for information on updating or restoring your board to the factory state.
Connect the development platform to your PC via USB cable between the "SDAUSB" USB port on the board and the PC USB connector.
Open the terminal application on the PC (such as PuTTY or TeraTerm) and connect to the debug COM port you determined earlier. Configure the terminal with these settings:
After the application is properly built, click the "Download" button to download the application to the target.
After clicking the "Download" button, the application downloads to the target and should be running. To debug the application, click the "Start/Stop Debug Session" button, highlighted in red.
Run the code by clicking the "Run" button to start the application.
The hello_world application is now running and a banner is displayed on the terminal. If this is not the case, check your terminal settings and connections.
Before using KDS IDE with KSDK, the KSDK Eclipse Update must be applied. Without this update, Eclipse cannot generate KSDK-compatible projects.
The steps required for Mac OS are identical to Windows; the only difference is that the IDE looks slightly different.
After installing KDS, check for available updates. Install the Processor Expert 3.0.1 updates from NXP only - do not install any other updates. To check for updates, select “Help” -> “Check for Updates”.
Select "Help" -> "Install New Software".
In the Install New Software dialog box, click the "Add" button in the upper right corner. Then, in the Add Repository dialog, select the "Archive" button.
In the Repository archive dialog box, browse the KSDK install directory
Enter the
Click "Open", and the "OK" button in the Add Repository dialog box.
The KSDK update shows up in the list of the original Install dialogs
Check the box to the left of the KSDK Eclipse update and click the "Next" button in the lower right corner.
Follow the remaining instructions to finish the installation of the update.
After the update is applied, restart KDS for the changes to take effect.
The following instructions were performed using Ubuntu 14.04. These steps may be slightly different for other Linux distributions.
Launch KDS IDE from the command line as the root user. On the command line, use this command, assuming the default KDS IDE install path:
user@ubuntu:~$ sudo /opt/NXP/KDS_x.x.x/eclipse/kinetis-design-studio
The KDS IDE version (shown above as x.x.x) should reflect the version installed on your machine, for example, 3.0.0.
You are prompted to enter the root password.
After installing KDS, check for available updates. Install the Processor Expert 3.0.1 updates from NXP only - do not install any other updates. To check for updates, select “Help” -> “Check for Updates”.
Select "Help" -> "Install New Software"
In the "Install New Software" dialog box, click the "Add" button in the upper right corner. Then, in the "Add Repository" dialog, select "Archive".
In the Repository archive dialog box, browse the KSDK install directory.
Enter the
Click "Open", and "OK" in the "Add Repository" dialog box.
The KSDK update shows up in the list of the original Install dialogs.
Check the box to the left of the KSDK Eclipse update and click the "Next" button in the lower right corner.
Follow the remaining instructions to finish the installation of the update.
After the update is applied, restart the KDS IDE for the changes to take effect.
After KDS IDE restarts, shut down the IDE and restart by launching KDS IDE as the non-root user. To do this, follow the command in step 1, only without the "sudo" command.
These steps show how to open and build the platform library project in KDS IDE. The platform library is required by the demo and does not build without it.
Note:
The steps required for Linux and Mac OS are identical to those for Windows.
Select "File->Import" from the KDS IDE menu. In the window that appears, expand the "General" folder and select "Existing Projects into Workspace". Then, click the "Next" button.
Click the "Browse" button next to the "Select root directory:" option.
Point to the platform library project for the appropriate device, which can be found using this path:
After pointing to the correct directory, your "Import Projects" window should look like the figure below. Click the "Finish" button.
There are two project configurations (build targets) supported for each KSDK project:
Choose the appropriate build target, "Debug" or "Release", by clicking the downward facing arrow next to the hammer icon, as shown below. For this example, select the "Debug" target.
The library starts building after the build target is selected. To rebuild the library in the future, click the hammer icon (assuming the same build target is chosen).
To build a demo application, repeat the steps listed in the "Build the Platform Library" section using a demo application project instead of the platform library project. Demo application projects are located in this folder:
For this example, the path is:
Note:
The steps required for Linux and Mac OS are identical to those for Windows.
The FRDM-KL46Z board comes loaded with the mbed/CMSIS-DAP debug interface from the factory. If you have changed the debug OpenSDA application on your board, visit http://www.nxp.com/opensda for information on updating or restoring your board to the factory state.
Mac users must install the J-Link OpenSDA application in order to use the KDS IDE to download and debug their board.
Connect the development platform to your PC via USB cable between the "SDAUSB" USB port on the board and the PC USB connector.
Open the terminal application on the PC (such as PuTTY or TeraTerm) and connect to the debug COM port you determined earlier. Configure the terminal with these settings:
For Linux OS users only, run the following commands in your terminal. These install libudev onto your system, which is required by KDS IDE to launch the debugger.
user@ubuntu:~$ sudo apt-get install libudev-dev libudev1
user@ubuntu:~$ sudo ln —s /usr/lib/x86_64-linux-gnu/libudev.so /usr/lib/x86_64-linux-gnu/libudev.so.0
Ensure that the debugger configuration is correct for the target you're attempting to connect to. Consult Appendix B for more information about the default debugger application on the various hardware platforms supported by the KSDK.
To check the available debugger configurations, click the small downward arrow next to the green "Debug" button and select "Debug Configurations".
In the Debug Configurations dialog box, select debug configuration that corresponds to the hardware platform you're using. For Windows or Linux users, select is the CMSIS-DAP/DAPLink option under OpenOCD. For Mac users, select J-Link.
After selecting the debugger interface, click the "Debug" button to launch the debugger.
The application is downloaded to the target and automatically run to main():
Start the application by clicking the "Resume" button:
The hello_world application is now running and a banner is displayed on the terminal. If this is not the case, check your terminal settings and connections.
Preparing an SD card with prebuilt U-Boot image from Linux BSP packet for i.MX 6SoloX processor.
Insert the SD card to the PC, and copy the application image (for example hello_world.bin) you want run to the FAT partition of the SD card.
Safely remove the SD card from the PC.
Insert the SD card to the target board. Make sure to use the default boot SD slot and double check the dip switch configuration. The default configuration of the validation board boots from SD1, and on SABRE board there is only one SD slot which is used for boot.
Connect the “DEBUG UART” slot on the board with your PC through the USB cable. The Windows OS installs the USB driver automatically, and the Ubuntu OS will find the serial devices as well.
See Step 3 in Out of the Box for more instructions for serial communication application
Open a second terminal emulator on the i.MX 6SoloX Sabre board's second enumerated serial port. This is the Cortex-M4's serial console. Setting the speed to 115200 bps, data bits 8, no parity, and power on the board.
Load the application image from the SD card to DDR RAM:
fatload mmc 2:1 0x7F8000
Flush cached content to DDR RAM:
dcache flush
Copy Cortex-M4 image from DDR RAM to TCM:
cp.b 0x80000000 0x7F8000 0x8000
Flush cached content to TCM:
dcache flush
Start the Cortex-M4 core from the TCM:
bootaux 0x7F8000
At the U-Boot prompt on the first terminal emulator, type the following commands to U-Boot. This copies the EmbeddedAndroid memory image file from the first partition of the SD card into the Cortex-M4's tightly coupled memory (TCM) and releases the M4 from reset.
Some applications with the names ended by “ddr” or "ocram" in EmbeddedAndroid BSP should be run in DDR or OCRAM. Those ended by "qspi" should boot from external QSPI flash
For more instructions on how to boot from other storage, please read section 6.2 and 6.3 in Getting Started with EmbeddedAndroid BSP for i.MX 6SoloX.
For details, please refer to "3.3 Downloading Board Images" in i.MX Android™ Quick Start Guide
You can connect a USB cable from the debug UART port to the computer and open a serial communication program for for console output.
For details, please refer to 4.2 Manufacutring Tool in i.MX Linux® User's Guide.
You can connect a USB cable from the debug UART port to the computer and open a serial communication program for for console output.
SW801
switch on EMMc boot mode, the board boots from
the EMMc.
The boot modes of the i.MX boards are controlled by the boot configuration boot switches on the board.
Figure 4. Boot switch setup
The following table lists the boot switch settings (which takes priority in boot process) for booting from the EMMc on the i.MX8MQuad EVK board.
Table 1. Booting from EMMc on i.MX8MQuad EVKs
Switch | D1 | D2 | D3 | D4 |
---|---|---|---|---|
SW801 |
OFF | OFF | ON | OFF |
SW802 |
ON | OFF | - | - |