Resizing the debug console terminal

Difficulty Levels: Advanced
Date added: July 3, 2018
Affected Products: EDM-IMX7 , EDM1-CF-IMX6 , EDM1-CF-IMX6SX , EDM1-IMX6UL , EDM2-IMX6PLUS , PICO-IMX6 , PICO-IMX6UL , PICO-IMX6UL-NAND , PICO-IMX6UL-NOR , PICO-IMX7 , PICO-IMX8M , TAM-3517 , TAO-3530 , TC-0700 , TC-0710 , TC-1010 , TDM-3730 , TEK3-IMX6 , TEK3-IMX6UL , TEP-0500-IMX6UL , TEP-0500-IMX7 , TEP-0700-IMX6UL , TEP-0700-IMX7 , TEP-1010-IMX6 , TEP-1560-IMX6 , THB-3517 , TWP-1010-IMX6 , TWP-1560-IMX6 , WANDPI-8M , WBDUAL , WBQUAD , WBSOLO


This guide explains how the size of a debug console terminal can be increased from the default 80 times 25 characters.

Introduction and Background

The terminal in the debug console often defaults it size to 80 times 25 characters. This is the traditional terminal size,
chosen to match the size of 1970s punch cards. Modern text terminal windows can support much larger “resolutions”.
Doing so will not only give better overview it can also reduce some of the annoying issues bash has with line wrapping.

While it sounds simple, it is not, since there are surprisingly many layers involved:

  • Topmost we have an (X11) text terminal emulator, such as xterm. This is typically running on the client PC that connects to the board using a serial debug console.
  • Inside the X11 terminal application, a local terminal is mapped.
  • Inside the local terminal, there is a localshell running.
  • Inside the local shell, a terminal emulator (such as minicom) is running.
  • The local terminal emulator connects to the remote terminal on the board using a serial line.
  • Inside the remote terminal, there is a remote shell running.

To succesfully have a larger than 80×25 debug console, the change has to be present in all-of-the above.


The steps that are really needed can vary a little becauses of differences of what applications are used for the layers above.
There often can be signalling between them, so a change in one changes the size parameters in some of the others (like when you
resize the terminal window (change in Xorg/X11), the terminal inside the window gets the changes automatically, and then signals
the shell inside.

In the example here we set the debug console terminal size to 140×50 characters.

So in the debug console issue the following commands
% stty -F /dev/tty cols 140
% stty -F /dev/tty rows 50
% reset
This should set things right on the remote unit. Sometimes these changes are not enough, but a resizing of the local terminal window (X11) often helps.

In the worst case you also need to apply the same stty commands on the remote debug port, i.e:
# stty -F /dev/ttymxc0 cols 140
# stty -F /dev/ttymxc0 rows 50
% reset
where ttymxc0 corresponds to the debug console on the remote system.

Such simple things can be so complicated.

Stay up to date with all the latest TechNexion news...

Sign-up for our Newsletter