TQMa8MPxS - YOCTO Linux BSP documentation


This guide describes how to prepare, build and run a Cortex-M7 MCUXpresso hello world demo on STKa8MPxS with Windows and Linux.

Unless otherwise specified, the commands apply to both operating systems.

On Windows Host

On Linux Host

Go to the root workspace directory and then clone the Git Repository:

git clone https://github.com/tq-systems/mcuxsdk-examples-tq.git

Install necessary dependencies for the SDK:

pip install ninja jsonschema cmake west
pip install -r mcuxsdk-examples-tq/scripts/requirements.txt

Initialize the workspace

west init --local mcuxsdk-examples-tq 
west update

Note: If the installed commands (e.g. west) are not recognized, their location needs to be added to PATH first.

For Windows, add the following to the system environment:
C:/Users/<Username>/AppData/Roaming/Python/Python3x/Scripts

For Linux, execute:
export PATH=$PATH:$HOME/.local/bin

Remove old builds if necessary

On Windows Host

On Linux Host


Build the demo

west build mcuxsdk-examples-tq/_boards/tqma8mpxs-mb-smarc-2/examples/demo_apps/hello_world --board tqma8mpxs-mb-smarc-2 -Dcore_id=cm7 -DBINARY_DIR=mcuxsdk-examples-tq/build -DCUSTOM_BOARD_ROOT="mcuxsdk-examples-tq/_boards" --config=debug --pristine

Build configuration and parameters:

The final build is located in ~/build/hello_world_cm7.xxx.

To run the hello world demo from U-Boot of the TQMa8MPxS, copy it into the SD-Card or use a USB flash drive.

Before starting the demo, connect a Micro-USB cable to X20 and a USB-to-RS232 cable to X40 of MB-SMARC-2 and open these two ports in a serial terminal. The first port will show the output of the Cortex-A53 and the second will show the demo output from the Cortex-M7.

In U-Boot, execute the commands below:

# when loading from usb
usb start
load usb 0:1 0x48000000 hello_world_cm7.bin
# or when loading from SD
fatload mmc 1:1 0x48000000 hello_world_cm7.bin
cp.b 0x48000000 0x7e0000 20000
bootaux 0x7e0000

Now, the Cortex-M7 terminal should print hello world.. Furthermore, any given character on the terminal is processed by the Cortex-M7 and gets echoed back to the terminal.

For debugging, hardware modifications on the SoM are needed. Debugging is currently not supported by default.