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.
Prerequisites
- BSP built according to Quickstart BSP Instructions
- Windows 10/11 or Ubuntu 22.04 and above
Prepare Host System
Set up Workspace
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
Compile the Demo
Remove old builds if necessary
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
The final build is located in ~/build/hello_world_cm7.xxx.
Run the Demo
Using U-Boot on the target
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.