Unable to see Cortex M7 print log in USB2 for verdin-imx8mp

i am working with a Verdin iMX8M Plus module and using the Yocto-based Linux BSP (not Torizon OS). I’m trying to load and run a Cortex-M7 binary (hello_world.bin) from U-Boot, but I’m unable to see any printf output from the application on the serial console.

Here’s what I have done:

Setup:

  • Platform: Verdin iMX8MP
  • OS: Yocto BSP (Toradex Reference Multimedia Image)
  • Cortex-M binary: hello_world.bin compiled from NXP examples (with printf)
  • Copied the binary to /boot/hello_world.bin

In U-Boot Prompt:
Verdin iMX8MP # setenv cm_image “/lib/firmware/hello_world.bin”
Verdin iMX8MP # setenv load_cmd “ext4load mmc 1:2” //sdcard booting
Verdin iMX8MP # setenv cm_isize 20000
Verdin iMX8MP # setenv load_cm_image “${load_cmd} ${loadaddr} ${cm_image}”
Verdin iMX8MP # setenv cm_boot “${load_cm_image}; cp.b ${loadaddr} 0x7e0000 ${cm_isize}; dcache flush; mw.w 0x550ff000 0 64; bootaux 0x7e0000”
Verdin iMX8MP # run cm_boot
17028 bytes read in 43 ms (386.7 KiB/s)

No elf image at address 0x007e0000

Starting auxiliary core stack = 0x20020000, pc = 0x0000048D…

Verdin iMX8MP #

As mentioned in the How to Run Hello World on the Cortex-M | Toradex Developer Center Access ttyUSB2 for cortex-M4/M7 UART.
But i could not see Any Messages on USB2.

Hi, I’m the Toradex AI Assistant.

I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.

Did you like my answer? :+1: :-1:


Hello! Thank you for providing detailed information about your setup and the steps you’ve followed. Let’s review potential causes and solutions for why you’re not seeing any printf output from your Cortex-M7 application on the Verdin iMX8M Plus.


Key Points to Check

1. Correct UART Routing and Peripheral Initialization

The Cortex-M7 core does not share the Linux device tree. By default, its firmware (such as the NXP MCUXpresso SDK examples) initializes a specific UART peripheral (usually UART4 or another) for its debug output. On the Verdin iMX8MP:

  • UART4 is typically routed to ttyUSB2 via the on-board USB-to-UART bridge for M4/M7 output.
  • Make sure your hello_world.bin is configured to use the correct UART instance (typically UART4).

2. Cortex-M7 UART Pinmux

The Cortex-M7 firmware must set up the correct pinmux and UART configuration. If you are using an unmodified MCUXpresso SDK example, check that its “BOARD_DEBUG_UART” or similar macro is set to the correct UART instance for Verdin iMX8MP. If not, you must adapt the board file in your project for UART4 and ensure MCUXpresso correctly routes output.

3. UART Usage Conflict

If Linux (A53) uses the same UART as the Cortex-M7, you won’t see output. Make sure the UART intended for the M7 is not enabled in the Linux device tree. For Verdin iMX8MP, UART4 is dedicated for this purpose and is disabled in the Linux device tree by default for this reason.

4. bootaux Usage and Binary Format

You see the message:

No elf image at address 0x007e0000

when using a .bin file (raw image) with bootaux. This is fine and can be ignored as long as bootaux proceeds to start the core.

5. Physical UART Connection

Double-check your serial connection to ttyUSB2:

  • Use 115200 baud, 8N1, no flow control.
  • Ensure your serial terminal is attached before running the program.
  • Confirm that your carrier board and USB connection are correct.

6. Firmware Output

Place a simple pattern in code near main to toggle a GPIO or loop with delays. This helps verify the Cortex-M7 core is running if you still see no UART output.


Debugging Steps

  1. Review and edit your MCUXpresso firmware:

    • Make sure DEBUG_UART points to UART4 (or the correct instance).
    • Confirm you’re using SDK 2.x for iMX8MP with appropriate board support.
  2. Confirm hardware and Linux device tree setup:

    • UART4 should be disabled in Linux device tree (default Toradex images are set up this way on Verdin iMX8MP; check if you made changes).
  3. Try an unmodified Toradex “hello_world” example:

  4. Check serial settings and logs:

    • Use dmesg after plugging in the USB-to-UART for identification (ttyUSB2).

References


If you review and adjust your firmware to use the correct UART and confirm the connection, you should see output on ttyUSB2. Let me know if you need help editing the MCUXpresso SDK example to use UART4 or further troubleshooting steps!

Best regards,
Toradex AI Assistant.