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:

1) 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

2) Insert the USB-end into your PC.

The connections should look like this:

Image of SerialConnections

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

Image of SerialConnections

Setup Kermit Protocol(C-Kermit)

Install c-kermit:

$ sudo apt-get install ckermit

Add Access Permission:

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

Add the following contents into ~/.kermrc to finish the setup:

Use nano, $ nano ~/.kermrc to create a new .kermrc file. Then copy-paste the contents below.

set line /dev/ttyUSB0
set speed 115200
set carrier-watch off
set handshake none
set flow-control none
robust
set file type bin
set file name lit
set rec pack 1000
set send pack 1000
set window 5
c

After you’re done copy-pasting, save and exit nano.

Run command kermit to launch C-Kermit

Ensure that you have made the correct connections. If everything went well, you’ll see the following:

$ kermit
Connecting to /dev/ttyUSB0, speed 115200
Escape character: Ctrl-\ (ASCII 28, FS): enabled
Type the escape character followed by C to get back,
or followed by ? to see other options.
----------------------------------------------------
GXL:BL1:9ac50e:a1974b;FEAT:ADFC318C;POC:3;RCY:0;EMMC:0;READ:0;0.0;CHK:0;
TE: 116640

...

Tips:

  1. If the terminal output contains this line, you might need to check the previous step Add Access Permission.

    /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, and then you’ll have access to U-boot.

See Also: