Missing ttyUSB Ports for Cortex M4 with Verdin iMX8M Mini

Dear Toradex Support Team,

I hope this email finds you well. I am writing to seek your assistance regarding an issue I am facing with the Cortex M4 on the Verdin iMX8M Mini module.

According to the instructions provided, after connecting a USB cable to the debug port X66,

image
I connected to the board by using COM13 via PUTTY

I should be able to see four ttyUSB ports on my Linux side by running the command ls /dev/ | grep ttyUSB*.

image

However, I have encountered a problem where no ttyUSB ports are being detected.

I have verified the connection between the Verdin development board and the host machine, ensuring that the USB cable is properly connected. Despite my efforts, I have been unable to resolve the issue on my own.

I would greatly appreciate your guidance in troubleshooting this matter. Could you please provide me with any suggestions or steps to follow in order to identify and resolve the problem? Alos, I have attached the output of dmesg. Recently, I installed TorizonCore 6, but there were no changes made to the Device Tree (DT).

dmesg.txt (59.6 KB)

torizon@verdin-imx8mm-07219476:/$ sudo ostree admin status
Password:

  • torizon 47a0ef4bfec4a8407b7f4244829fd35380a033560bdd83f24a369b9c0c2e77e4.0
    Version: 6.2.0+build.2-tcbuilder.20230419205206
    origin refspec: torizon

Thank you very much for your attention to this matter. I look forward to your prompt assistance and resolution.

Best regards,
Mehrdad

Hi @Mehrdad !

This would be right when running this command on your Linux Host, after connecting the Verdin Development Board or Dahlia to your Host. You don’t even need to power it on to check for the ttyUSB* interfaces. On Yavia, there will be only 2 ttyUSB interfaces on your Linux Host.

But, from the image you shared, you are running this command on your Target (the Verdin module). Your target will not show the ttyUSB devices.

On Windows, seems like only 2 out of 4 Verdin Development Board ttyUSB are shown. And I am not aware of the cause of this.

PS: As far as I know, the steps we have for Cortex-M development were made for Linux (e.g.: High performance, low power Embedded Computing Systems | Toradex Developer Center). If you are going to develop on Windows, you might need to tweak some parts of the workflow.

Best regards,

Hi @henrique.tx

Thanks for your help!

I am in the step[ EXT4LOAD Loading Method] and I am using TorizonCore and placed your binary inside /var folder,


torizon@verdin-imx8mm-07219476:/var$ ls
cache  hello_world.bin  lib  lock  log  rootdirs  run  sota  spool  tmp  usrlocal  volatile

How do I do step 3 Could you please explain it how to use U-Boot console?

  1. Set up the loading command (load_cmd) with the ext4load command. As the loading procedure may be slightly different accordingly to the SoM, select it from the tabs below and follow the instructions:

setenv load_cmd “ext4load mmc 0:1”

Thanks for your time.
Best regards,
Mehrdad

Hi @Mehrdad !

In the documentation you referred to, there is an information specifically about it:

Did you try it?

Best regards,

Hi @henrique.tx ,

Using scp, I copied the binary file to the var directory. How do I load the image?


torizon@verdin-imx8mm-07219476:/var$ ls
cache            lib   log       run   spool  usrlocal
hello_world.bin  lock  rootdirs  sota  tmp    volatile

How do I load the image?

Can you tell me where I should run the following commands? I don’t have an SD card and I used the scp command, and it is already in the var directory.

> setenv m4image "/ostree/deploy/torizon/var/hello_world.bin"

> setenv m4image_size 15000


the link for using U-Boot is not working,

Best regards,
Mehrdad

Hi @Mehrdad !

Thanks for reporting the issue with the link. I will bring this up internally.

The answer to this question is in the same documentation you are following. And I highlighted it in my last message. You can follow it.

You should run this on the U-Boot prompt.

Let us know if you have an issue following it.

Best regards,

Hi @henrique.tx ,

Can you please provide an explanation and guide me on how to reach this U-Boot? Afterward, I’ll be able to use the “setenv” command and execute the commands.

Thanks for your time.

Best regards,
Mehrdad

Hi @Mehrdad !

I am sorry. I didn’t understand that this is what you needed.

This is the article explaining how to reach U-Boot’s prompt: U-Boot | Toradex Developer Center. This link will soon be fixed in the High performance, low power Embedded Computing Systems | Toradex Developer Center article.

You will mainly need access to the debug serial of the module. You will open a terminal into it (using applications like Putty, Minicom, Picocom, GTKTerm, etc) and keep pressing any key on this terminal as early as possible during the module’s boot. You will be dropped into the U-Boot’s prompt.

Let us know how it goes for you :slight_smile:

Best regards,

hi @henrique.tx

The page that you send is related to Yocto BSP and I am using TorizonCore

You will mainly need access to the debug serial of the module. You will open a terminal into it (using applications like Putty, Minicom, Picocom, GTKTerm, etc) and keep pressing any key on this terminal as early as possible during the module’s boot. You will be dropped into the U-Boot’s prompt.

and also this info,


and another useful info:

I am sorry. I didn’t understand that this is what you needed.

Sorry for the bad explanation :frowning: , the problem lies in my inability to access ttyUSB1_2_3_4 through minicom or other software. When I connect a USB Type-C cable to connector X66, I am presented with two COM ports, but unfortunately, the debugging port is non-functional.

  • COM12 is intended for communicating with the M4 and should be used for debugging purposes. Unfortunately, I am unable to execute commands through Putty or access it through minicom.

  • COM13 serves as the UART3 connection, allowing me to monitor the Linux side. It is utilized for communication with U-Boot and Linux and I can use that.

I have two development boards, and both of them have the same behavior.

Best regards,
Mehrdad

Please keep in mind that TorizonCore is built on top of Toradex’s BSP (also available as Yocto/OpenEmbedded layers). You should be able to follow the referred U-Boot article to access its prompt through serial.

This is the same serial interface (in your case, COM13) that you will use to access U-Boot’s prompt.

You won’t be able to use Cortex-M’s serial terminal as a common shell (e.g. Linux’s terminal). It doesn’t have this capability unless you implement it yourself for your use, but I guess this is not what you want to develop. You will be able to get Cortex-M’s messages once you load firmware into it that prints messages on its debug UART.

Best regards,

Hi @Mehrdad !

Do you have any updates regarding this topic?

Best regards,

Hi @henrique.tx ,
Thank you for helping me. I’m currently in the EXT4LOAD Loading Method section. I used COM13, copied the binary file into the var directory, and ran the image loading command, but I encountered an error.

torizon@verdin-imx8mm-07219476:/var$ setenv load_cmd "ext4load mmc 0:1"
-sh: setenv: command not found

I used the export command to set environment variables, is it okay?
As far as I understand, setenv is specific to U-Boot and sets variables in the U-Boot environment, while export is used in a Linux shell environment to define variables in the current shell session’s environment.

torizon@verdin-imx8mm-07219476:/var$ export load_cmd="ext4load mmc 0:1"
torizon@verdin-imx8mm-07219476:/var$ export m4image="/ostree/deploy/torizon/var/hello_world.bin"
torizon@verdin-imx8mm-07219476:/var$ export m4image_size=15000
torizon@verdin-imx8mm-07219476:/var$ export loadm4image="${load_cmd} ${loadaddr} ${m4image}"
torizon@verdin-imx8mm-07219476:/var$ export m4boot="${loadm4image}; cp.b ${loadaddr} 0x7e0000 ${m4image_size}; dcache flush; bootaux 0x7e0000"```
torizon@verdin-imx8mm-07219476:/var$ printenv
SHELL=/bin/sh
CT_TAG_KIOSK_MODE_BROWSER=2
CT_TAG_QT5_WAYLAND=2
CT_TAG_DEBIAN=2-bullseye
CT_TAG_WAYLAND_BASE_VIVANTE=2
EDITOR=vi
PWD=/var
LOGNAME=torizon
XDG_SESSION_TYPE=tty
CT_TAG_CHROMIUM=2
CT_TAG_RT_TESTS=2
m4boot=ext4load mmc 0:1  /ostree/deploy/torizon/var/hello_world.bin; cp.b  0x7e0000 15000; dcache flush; bootaux 0x7e0000
LS_OPTIONS=--color=auto
CT_TAG_DEV_TOOLS=2
MOTD_SHOWN=pam
HOME=/home/torizon
CT_TAG_QT5_WAYLAND_EXAMPLES=2
LANG=C
CT_TAG_WESTON_VIVANTE=2
load_cmd=ext4load mmc 0:1
MACHINE=verdin-imx8mm
CT_TAG_GRAPHICS_TESTS_VIVANTE=2
CT_TAG_STRESS_TESTS=2
XDG_SESSION_CLASS=user
TERM=linux
m4image=/ostree/deploy/torizon/var/hello_world.bin
USER=torizon
CT_TAG_KIOSK_MODE_BROWSER_VIVANTE=2
CT_TAG_GRAPHICS_TESTS=2
CT_TAG_DEBIAN_SHELL=2
SHLVL=1
CT_TAG_DOCKER_COMPOSE=2
CT_TAG_PORTAINER_DEMO=2
XDG_SESSION_ID=c2
CT_TAG_KIOSK_MODE_BROWSER_X11=2
XDG_RUNTIME_DIR=/run/user/1000
PS1=\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$
CT_TAG_TORIZONCORE_BUILDER=2
CT_TAG_WAYLAND_BASE=2
HUSHLOGIN=FALSE
CT_TAG_COG=2
PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/sbin:/usr/sbin:/sbin
DOCKER_CONFIG=/etc/docker
CT_TAG_WESTON=2
CT_TAG_WESTON_TOUCH_CALIBRATOR=2
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
MAIL=/var/spool/mail/torizon
CT_TAG_QT5_WAYLAND_VIVANTE=2
CT_TAG_CHROMIUM_X11=2
CT_TAG_QT5_WAYLAND_EXAMPLES_VIVANTE=2
loadm4image=ext4load mmc 0:1  /ostree/deploy/torizon/var/hello_world.bin
OLDPWD=/
m4image_size=15000
_=/usr/bin/printenv
torizon@verdin-imx8mm-07219476:/var$ ls
cache            lib   log       run   spool  usrlocal
hello_world.bin  lock  rootdirs  sota  tmp    volatile
torizon@verdin-imx8mm-07219476:/var$ lsblk
NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
mmcblk0      179:0    0 14.8G  0 disk
`-mmcblk0p1  179:1    0 14.8G  0 part /var
                                      /usr
                                      /boot
                                      /
                                      /sysroot
mmcblk0boot0 179:32   0 31.5M  1 disk
mmcblk0boot1 179:64   0 31.5M  1 disk
zram0        253:0    0    0B  0 disk
torizon@verdin-imx8mm-07219476:/var$ setenv load_cmd "ext4load mmc 0:1"
-sh: setenv: command not found


torizon@verdin-imx8mm-07219476:/var$ printenv m4boot
ext4load mmc 0:1  /ostree/deploy/torizon/var/hello_world.bin; cp.b  0x7e0000 15000; dcache flush; bootaux 0x7e0000

Best regards,
Mehrdad

Hi @Mehrdad !

Sorry for the delay to answer you in this thread.

You were trying to create the variables on Linux. You must create them on U-Boot.

To learn more about U-Boot and accessing its console, please refer to the following article:

Best regards,

1 Like