Setup Serial Debugging Tool

Preparation

  • You need a Serial Debugging Tool. In this guide, we will use a USB to TTL Converter.

Connections

Follow these steps to make the correct connections:

  • Connect the Tool Pins to the GPIOs, and check the Tx / Rx Pins once more to ensure that you’ve made correct connections:

    • Tool Pin GND: <—> Pin17 of VIMs’s GPIO
    • Tool Pin TXD: <—> Pin18 of VIMs’s GPIO (Linux_Rx)
    • Tool Pin RXD: <—> Pin19 of VIMs’s GPIO (Linux_Tx)
    • Tool Pin VCC: <—> Pin20 of VIMs’s GPIO
  • Insert the USB-end into your PC.

The connections should look like this:

Image of SerialConnections

Blue color line: Tool Pin TXD, orange color: Tool Pin RXD, black: Tool Pin GND

Another photo for more details (VCC Pin is not necessary):

Image of SerialConnections

Setup Minicom Protocol

Install minicom:

1
$ sudo apt-get install minicom

Add Access Permission:

1
$ sudo usermod -a -G dialout $(whoami)

open minicom

1
$ minicom -D /dev/ttyUSB0 -b 115200

-D to designated device, -b to designated baud rate

1
2
3
4
5
6
7
Welcome to minicom 2.7.1

OPTIONS: I18n
Compiled on Aug 13 2017, 15:25:34.
Port /dev/ttyUSB0, 16:45:10

Press CTRL-A Z for help on special keys

How to use minicom

Ctrl + a or Ctrl + z enter minicom control mode. Keyboard o can enter configuration mode

1
2
3
4
5
6
7
8
9
10
11
+-----[configuration]------+
| Filenames and paths |
| File transfer protocols |
| Serial port setup |
| Modem and dialing |
| Screen and keyboard |
| Save setup as dfl |
| Save setup as.. |
| Exit |
+--------------------------+

Serial port setup option use to set up serial
Save setup as dfl option use to save you configure .

Keyboard q use for exit minicom .

1
2
3
4
+----------------------+
| Leave without reset? |
| Yes No |
+----------------------+

Through the help you can see all the options available to you

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
$ minicom -h
Usage: minicom [OPTION]... [configuration]
A terminal program for Linux and other unix-like systems.

-b, --baudrate : set baudrate (ignore the value from config)
-D, --device : set device name (ignore the value from config)
-s, --setup : enter setup mode
-o, --noinit : do not initialize modem & lockfiles at startup
-m, --metakey : use meta or alt key for commands
-M, --metakey8 : use 8bit meta key for commands
-l, --ansi : literal; assume screen uses non IBM-PC character set
-L, --iso : don't assume screen uses ISO8859
-w, --wrap : Linewrap on
-H, --displayhex : display output in hex
-z, --statline : try to use terminal's status line
-7, --7bit : force 7bit mode
-8, --8bit : force 8bit mode
-c, --color=on/off : ANSI style color usage on or off
-a, --attrib=on/off : use reverse or highlight attributes on or off
-t, --term=TERM : override TERM environment variable
-S, --script=SCRIPT : run SCRIPT at startup
-d, --dial=ENTRY : dial ENTRY from the dialing directory
-p, --ptty=TTYP : connect to pseudo terminal
-C, --capturefile=FILE : start capturing to FILE
-F, --statlinefmt : format of status line
-R, --remotecharset : character set of communication partner
-v, --version : output version information and exit
-h, --help : show help
configuration : configuration file to use

These options can also be specified in the MINICOM environment variable.
This variable is currently unset.
The configuration directory for the access file and the configurations
is compiled to /etc/minicom.

Report bugs to <minicom-devel@lists.alioth.debian.org>.

Tips
  1. If the terminal output contains this line, you might need to type sudo minicom.

    1
    /dev/ttyUSB0: Permission denied
  2. To access U-boot, leave your USB-Serial-Debug tool connected, then press the reset button on your device once. You should see some print-out on your terminal, then quickly press the space-bar or control-c to stop auto-boot. You will see the prompt kvim# when you’ve entered u-boot.

  3. Note that to see the standard “help” commands as listed in the U-Boot Usage Guide, you’ll need to first have a version of Android or Ubuntu installed in your VIM device, from our krescue images.

  4. You can use the U-Boot command line (kvim#), to change your VIM’s default boot logo.bmp, according to the guide, Boot Logo for U-Boot.

See Also