MCIMX7SABRE: SABRE Board for Smart Devices Based on the i.MX 7Dual Applications Processors

1. Out of the Box

The following section describes the steps to boot the i.MX7Dual Sabre.

Development Kit Contains:

  • i.MX7Dual Sabre board for smart devices
  • USB cable (micro-B to standard-A)
  • Cable -Assembly, USB 3.0 Type-A Male, USB micro-B Male, Shielded, 1m
  • 5V/5A universal power supply
  • Quick Start Guide
  • 8 GB SD Card with bootable operating system demonstration image

1.1 Get Familiar with the Board

Figure 1. i.MX7Dual Sabre front

Figure 2. i.MX7Dual Sabre back

1.2 Insert the SD Card (SD1/J6)

The kit includes an SD card with a pre-built NXP Linux binary demo image. Without modifying the binary inside the SD card, booting from this SD card provides a default system with certain features for building other applications on top of Linux. The software is described in the following sections.

1.3 Connect USB Debug Cable

Connect the micro-B end of the supplied USB cable into Debug UART port J11. 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:

Linux

Linux Logo

Windows

TeraTerm Logo

Windows

Putty Logo

Connect the HDMI cable

To see the user interface provided with the SD card image binary connect a monitor via the HDMI connector (J9).

1.5 Boot Switch Setup

Click here to see the Boot Switch Setup

1.6 Connect Power Supply

Connect the 5V power supply cable to the 5V DC power jack (J1).

Power the board by flipping the switch (SW1). 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 on the SD card, the U-Boot execution should begin automatically.

nformation is printed in the smaller number serial console for the Cortex-A7 (COM9 on Windows as an example and /dev/ttyUSB* on Linux). If you don not stop the U-Boot process, it continues to boot the Linux kernel.

On Windows as an example

1.7 Congratulations! Linux® has booted!

Once Linux is booted, login using the user name root and no password.

Tip: To proceed to U-Boot, press any key before the value of the U-Boot environment variable, bootdelay, decreases and before it times out (default 3 seconds). If you stop the U-Boot process, you can run the following command to continue with the Linux boot process:

# boot



Embedded Linux®

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.

2.1 Overview

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:



Embedded Android

This section describes the boot process of loading the i.MX7Dual Sabre 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.

3.1 Overview

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:



FreeRTOS

This section describes how to load FreeRTOS for i.MX7Dual. FreeRTOS is an optional Real-Time Operating System (RTOS) which NXP uses to enable the Cortex-M cores in some of our products. Enabling the Cortex-M cores is an optional step. If you do not wish to enable the Cortex-M4 on i.MX7Dual at this moment you can skip this section.

The FreeRTOS BSP for i.MX7Dual is a suite of robust peripheral drivers and multicore communication mechanism designed to simplify and accelerate application development on the i.MX7Dual Processor.

Included in the FreeRTOS BSP for i.MX7Dual is full source code under a permissive open-source license for all demos, examples, middleware, and peripheral driver software.

4.1 Overview

The FreeRTOS BSP for i.MX7Dual consists of the following runtime software components written in C:

  • Arm® Cortex Microcontroller Software Interface Standard (CMSIS) Core, DSP standard libraries, and CMSIS-compliant device header files which provide direct access to the peripheral registers and bits.
  • A set of peripheral drivers that provides a simple, stateless driver with an API encapsulating register access of the peripheral.
  • A multicore communication mechanism (RPMsg) to decrease the developing difficulty of multicore communication.
  • A FreeRTOS operating system to provide an event triggered preemptive scheduling RTOS.

The demos/examples in FreeRTOS BSP are built for on-chip Tightly Coupled Memory (TCM) in the Arm Cortex-M4 core.

4.2 Download NXP FreeRTOS source and demos

Current releases of the NXP FreeRTOS BSP and source code can be found on the links below. There is option to download a self-extract installer that can be used on Windows OS, or a tarball for installation on Linux OS.

There are four main areas under the install directory of the FreeRTOS BSP tree used to provide the full source code for each demo application:

  • The examples folder contains all demos/examples source code and board configuration files. All 21 applications are cataloged by board name.
  • The middleware folder contains the source code of all the middleware used by demos and examples. The open source multicore communication stack – RPMsg is included in the middleware folder.
  • The platform folder contains the source code for the primary components including CMSIS header files, peripheral drivers, startup, utilities, and linker files.
  • The rtos folder contains the source code of market leading RTOS – FreeRTOS OS.

The FreeRTOS BSP comes with rich demo applications and driver examples. To see what’s available, browse the BSP examples folder and select the i.MX7Dual Sabre board
(<install_dir>/examples/imx7d_sdb_m4/demo_apps/<demo_application_name>/).

To learn more about demo applications or driver examples, open the FreeRTOS i.MX7Dual Demo Application User’s Guide, located in <install_dir>/doc.

If one or more of the demo applications or driver examples sounds interesting, you’re probably wanting to know how you can build and debug yourself. The Getting Started Guide with FreeRTOS BSP provides easy, step-by-step instructions on how to configure, build, and debug demos for all toolchains supported by the BSP.

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:

4.5 Run applications using U-Boot

This section describes how to run applications using an SD card using pre-built U-Boot image for i.MX processor.

  1. Prepare an SD card with a pre-built U-Boot + Linux image from Linux BSP package for the i.MX7Dual processor following the steps on the Embedded Linux® tab. If you have already loaded your SD card with a Linux image you can skip this step.
  2. Insert the SD card to the your host computer (Linux or Windows), and copy the application image (for example hello_world.bin) that you want run to the FAT partition of the SD card.
  3. Safely remove the SD card from the PC.
  4. Insert the SD card to the target board. Make sure to use the default boot SD slot and double check the Boot Switch Setup. The default configuration of the validation board boots from SD1/J6, and on Sabre board there is only one SD slot which is used for boot.
  5. 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.

  6. Open a second terminal emulator on the i.MX7Dual Sabre board’s second enumerated serial port. This is the Cortex-M4’s serial console. Set the speed to 115200 bps, data bits 8, no parity, and power on the board.
  7. 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 2:1 0x7F8000 <hello_world>.bin

    • => dcache flush

    • => bootaux 0x7F8000

These commands copy the FreeRTOS memory image file from the first partition of the SD card into the Cortex-M4’s memory and releases the Cortex-M4 from reset.

Some applications with the names ended by ddr or ocram in FreeRTOS BSP should be run in DDR or OCRAM. Those ended by qspi should boot from external QSPI flash.

For additional instructions on how to boot from other storage, read section 6.2 and 6.3 in Getting Started with FreeRTOS found inside the package downloaded in section Download NXP FreeRTOS source and demos.

4.6 Example Demo

Demo and example applications are provided to demonstrate peripheral drivers, FreeRTOS kernel, RPMsg usage and to highlight the main features of the i.MX7Dual processor.

The FreeRTOS BSP provides two types of software applications:

  • Demos: Applications intended to highlight key functions of the Arm® Cortex®-M4 Core in i.MX7Dual SoC, focusing on a particular use case on FreeRTOS OS.
  • Examples: Simple applications intended to concisely illustrate how to use the peripheral drivers of the FreeRTOS BSP in the bare metal environment.

4.6.1 Cortex-M4 standalone sensor demo:

The Sensor Demo i.MX7Dual is a simple demonstration program that uses the FreeRTOS and a set of drivers provided by NXP. It can get the current gravitational acceleration, temperature, altitude and magnetic field strength of the board. The purpose of this demo is to show how to use the I2C driver as a Master to communicate with other I2C Slaves.

In the second terminal emulator for Cortex-M4, you should see text indicating the sensor example is running (e.g., below). Choose one of the sensor demos and affect the given sensor by moving the board or moving something magnetic near it.

-------------- iMX7D SDB on board sensor example --------------

Please select the sensor demo you want to run:
[1].FXAS21002 3-axes Gyro sensor
[2].FXOS8700 6-axes Acc+Mag sensor
[3].MPL3115 Pressure sensor



5.1 Explore the documentation

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.MX7Dual Sabre board has some documents. However, this board’s processor is i.MX7Dual which is documented with SoC level documents. The BSPs available are documented with the BSP level documents.

Choose an option below for related documents:

5.1.1 Board documentation

In the case of i.MX7Dual Sabre the following documents are available.

Table 4. List of i.MX7Dual Sabre board-related documents

Document Description
Board Schematics The i.MX7Dual Sabre electric schematic files.
i.MX7Dual Sabre Hardware User Guide The purpose of this document is to help hardware engineers design and test their imx7d 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 boardlevel testing, using the IBIS model for electrical integrity simulation and more.

5.2 Key features in Linux BSP

With Linux running on the i.MX board, you can evaluate special features that i.MX SoCs provide. This tutorial present the step-by-step for the following demos.

Choose an option below for detailed instructions:

5.2.1 Power management

This example shows how to suspend to low-power modes and resuming to normal operation.

  • Enter the command below in order to enable serial TTY as a wake up source for the board:

    # echo enabled > /sys/class/tty/ttymxc0/power/wakeup

  • Enter the command below to enter Suspend-To-RAM mode:

    # 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)

  • Press any key on the keyboard to wake up the board. The following messages should appear on terminal:

    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.