Running MQX on the i.MX 6SoloX SOM Print


This application note explains how to build and run a sample MQX application ("Hello, world" to the serial console) on the Cortex-M4 core of the i.MX 6SoloX SOM.

Run the following step-wise procedure in order to build the MQX application for the i.MX 6SoloX SOM:

  • On the Linux development host, activate the i.MX 6SoloX cross-build environment as described in Installing and activating cross development environment:
  • [sasha_d@ocean linux-imx6sx-2.3.0]$ . ACTIVATE.sh

  • Download and install the GNU ARM Embedded v2014q1 toolchain from https://emcraft.com/products/685#software:

    $ sudo tar jxf gcc-arm-none-eabi-4_8-2014q1-20140314-linux.tar.bz2 -C \
    /usr/local

  • Build the MQX BSP and PSP libraries:
  • $ cd $INSTALL_ROOT/target/mqx-4.1-imx6sx/mqx/build/make/bsp_emcraft_imx6sx_som/
    $ ./build_gcc_arm.sh
    $ cd $INSTALL_ROOT/target/mqx-4.1-imx6sx/mqx/build/make/psp_emcraft_imx6sx_som/
    $ ./build_gcc_arm.sh

  • Build the hello sample application:
  • $ cd $INSTALL_ROOT/target/mqx-4.1-imx6sx/mqx/examples/hello/build/make/hello_emcraft_imx6sx_som/
    $ ./build_gcc_arm.sh

  • Generate the MQX binary file (.bin) for loading to the Cortex-M4 from U-Boot:
  • $ $MQX_TOOLCHAIN_DIR/bin/arm-none-eabi-objcopy -O binary $INSTALL_ROOT/target/mqx-4.1-imx6sx/mqx/examples/hello/build/make/hello_emcraft_imx6sx_som/gcc_arm/ram_debug/hello_emcraft_imx6sx_som.elf $INSTALL_ROOT/target/mqx-4.1-imx6sx/mqx/examples/hello/build/make/hello_emcraft_imx6sx_som/gcc_arm/ram_debug/hello_emcraft_imx6sx_som.bin

The following session is an illustration of how MQX can be booted to the Cortex-M4 from the U-Boot:

  • From the U-Boot command line interface, download the MQX binary image from a TFTP server to OCRAM:
  • SLX-SOM U-Boot > tftpboot 00900000 hello_emcraft_imx6sx_som.bin
    Using FEC device
    TFTP from server 192.168.0.1; our IP address is 192.168.0.66
    Filename 'hello_emcraft_imx6sx_som.bin'.
    Load address: 0x900000
    Loading: ####
    160.2 KiB/s
    done
    Bytes transferred = 57024 (dec0 hex)
    SLX-SOM U-Boot >

  • Run the MQX application from OCRAM:
  • SLX-SOM U-Boot > bootaux 00900000
    ## Starting auxiliary core at 0x00900000 ...
    SLX-SOM U-Boot >

The application will print Hello World on the MQX console. The MQX console is available as the second UART interface that appears on a development host when the SLX-SOM-BSB board is connected to the host via the P3 USB connector. In other words, one of the interfaces is the U-boot/Linux console (on which the above U-Boot commands must be issued) and the other is the MQX console. The MQX console is configured for 115200, 8 bit with no flow control in MQX.