The i.MX8M Mini CPU includes a Cortex-M4 low-power processor that features a single ARMĀ® Cortex-M4 processor. The Cortex-M4 processor is a highly efficient, high-performance, embedded processor that features low interrupt latency, low-cost debug, and has backwards compatibility with existing Cortex-M profile processors. The processor has an in-order superscalar pipeline that can execute dual instructions, including load/load and load/store instruction pairs.


The Cortex-M4 on the i.MX8M Mini CPU includes the following features:

  • Arm Cortex-M4 CPU Processor

    • 16 KB L1 instruction cache

    • 16 KB L1 data cache

    • 256 KB tightly coupled memory (TCM)

  • Low-power standby mode

  • IoT features including Weave

  • Manage IR or wireless remote

Messaging Unit (MU) Features

The processors communicate through the Messaging Unit (MU), which enables two processors within the SoC to communicate and coordinate by passing messages (e.g. data, status, and control). The MU also enables one processor to signal the other processor using interrupts.

The MU includes the following features:

  • Messaging control by interrupts or by polling.

  • Processor B can take Processor A out of low-power mode by asserting one of the twelve interrupts to Processor A, and vice versa.

  • Symmetrical processor interfaces, with each side supporting the following:

    • Four general-purpose interrupt requests reflected to the other side.

    • Three general-purpose flags reflected to the other side.

    • Four receive registers with maskable interrupt.

    • Four transmit registers with maskable interrupt.

Debug console UART

The Cortex-M4 can use UART4 as debug console. While UART4 is being used by the Cortex-M4, it is not available for the Cortex-A53.

On the ConnectCore 8M Mini Development Kit, UART4 is routed to the XBee socket via 0-ohm resistors.

UART4 multiplexing on the DVK

If you are not going to use the XBee socket, you can remove resistors R152 and R154 and populate 0-ohm resistors R151 and R153. This hardware change routes UART4 lines to connector J17 (at TTL level) and to the FTDI chip, making the UART available at the micro USB connector J16, in parallel with the system console. Once you have connected the Cortex-M4 UART to the FTDI chip, open another serial terminal application for this second serial device, setting the speed to 115200 bps, 8 data bits, 1 stop bit (115200, 8N1), no parity.

Pre-built demo applications

You can find several pre-built demo applications for the Cortex-M4 in the deploy images directory of your Digi Embedded Yocto project.

Cortex-M4 demo application Description


Prints "Hello World!" on the Cortex-M4 debug console. (See Debug console UART.)


Demo of FreeRTOS running a ping-pong communication between Cortex-M4 and Cortex-A53.


Demo of FreeRTOS that prints on the console the received messages.


Audio demo for NXP EVK.

Download the SDK and toolchain

NXP offers an SDK that facilitates firmware development for the Cortex-M4 core. The SDK provides examples that demonstrate how to access the peripherals available on this subsystem.

You may need to register for an account on the NXP website.
  1. Go to

  2. On the left sidebar, click Select Board.

  3. Select Boards > i.MX > EVK-MIMX8MM.

  4. Click Build MCUXpresso SDK.

  5. Select your Toolchain/IDE and your Host OS.

  6. Click Download SDK.

You must also download the toolchain to build your firmware application:

  1. Go to

  2. Select the latest supported version for your operating system, as described in the MCUXpresso SDK Release Notes.

Install the SDK and toolchain

  1. Decompress the SDK in a directory of your choice:

    $ tar -xvf <SDK_VER>_EVK-MIMX8MM.tar.gz -C <sdk-install-path>
  2. Decompress the toolchain in a directory of your choice:

    $ tar -xvf gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2 -C <toolchain-install-path>

Build the "Hello World" demo application

  1. Export the variable ARMGCC_DIR with the absolute path to the GCC ARM Embedded toolchain.

    $ export ARMGCC_DIR=<toolchain-install-path>/gcc-arm-none-eabi-9-2019-q4-major
  2. Add the toolchain bin folder to the system $PATH

    $ export PATH=$PATH:$ARMGCC_DIR/bin
  3. Build the hello_world application.

    $ cd <sdk-install-path>/boards/evkmimx8mm/demo_apps/hello_world/armgcc
    $ ./

    Find the artifacts in the debug/release directory.

Transfer and run the demo application

  1. Boot your device and stop in the U-Boot console.

  2. Transfer the application to RAM, for example via TFTP:

    => tftp $loadaddr <m4_firmware.bin>
    TFTP from server; our IP address is
    Filename 'm4_firmware.bin'.
    Load address: 0x40480000
    Loading: #
              1.6 MiB/s
    Bytes transferred = 6528 (1980 hex)

    where <m4_firmware.bin> is the binary filename.

  3. Transfer the firmware to the Cortex-M4 memory:

    => cp.b $loadaddr 0x7e0000 $filesize
  4. Use the bootaux command to run the application on the Cortex-M4:

    => bootaux 0x7e0000
    ## Starting auxiliary core stack = 0x20020000, pc = 0x00000305...

Auto-run the firmware on every boot

The Cortex-M4 doesn’t have ROM memory. To instruct the Cortex-M4 to run an application every time the device boots, you must store the application on the eMMC and modify U-Boot’s default bootcmd to load the firmware to RAM and run it on the Cortex-M4 before booting the operating system.

To store the application on the linux partition:

=> updatefile linux tftp <m4_firmware.bin>

To auto-run the firmware application when the device is powered up:

=> setenv boot_cortexm "load mmc 0:1 ${loadaddr} <m4_firmware.bin>; cp.b ${loadaddr} 0x7e0000 ${filesize}; bootaux 0x7e0000"
=> setenv bootcmd "run boot_cortexm; ${bootcmd}"
=> saveenv