How to Setting Serial debug tools for MarsBoard RK3066

From wiki
Revision as of 07:56, 15 March 2014 by AVRman (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This page describe how to set up and debug the MarsBoard via serial console.

Contents

Requirement

  • MarsBoard
  • Micro USB cable
  • PC/Desktop running Windows/Linux/Mac OS

Connect the Micro USB cable to MarsBoard Debug port

Set up on the PC

Windows

Here we use putty as an example to show us how to set the serial debug tools.

Double click the Putty.exe, you will see the interface like:

Serial debug 0.png

Select the Serial, Fill the Serial line with the right serial port,and the Speed with 115200

Serial debug 2.png

You can get the serial port here:

Serial debug 1.png

Finish setting , Click Open the putty will work

Serial debug 3.png

Linux

For connecting UART/Serial console on Linux, the picocom utility is very handy to use in a Terminal session. You can also use PuTTY for this purpose.

picocom

If you are using Ubuntu, you need to add the current user into group dialout, then close your session and relogin to make changes effective immediately:

 sudo adduser $USER dialout
 gnome-session-quit

Install picocom:

 sudo apt-get install picocom

Open connection to serial line, using 115200 bauds:

 picocom /dev/ttyUSB0 -b 115200 -e w

Note: Escape character is set to 'w', you have to press Ctrl-w Ctrl-x to quit.

PuTTY

Here we still use PuTTY as an example. when start PuTTY firstly you will see this interface:

Serial debug linux 0.png

Select the Serial, Fill the Serial line with the right serial port,and the Speed with 115200

Serial debug linux 1.png

How to get the serial port .First cat /proc/tty/drivers, to make sure is there driver support(marsboard board is connected with pc via USB so the device name should be usbserial)

Serial debug linux 2.png

Here we find the line

usbserial            /dev/ttyUSB   188 0-253 serial  

which tell us the driver is ok, then cd /dev/ to confirm whether is there device named ttyUSB* . you can unplug and then plug the usb to get the right device.

Serial debug linux 3.png

Finish setting, Click Open the putty will work!

Serial debug linux 4.png


Note:

1、Under Ubuntu If you got the following error – “Unable to open connection to: Unable to open serial port“. To fix it, add the current user to the “dialout” user group , logout and login to take effect, detail:

 http://jesin.tk/fix-serial-port-permission-denied-errors-linux/ 

Mac OS X

  1. Use Homebrew package manager to install picocom, then use picocom to dialog with Debug UART/Serial Console.
   brew install picocom
   picocom /dev/tty.usbserial -b 115200 -e w

Note: Type Ctrl-w Ctrl-x to exit session.


blog comments powered by Disqus

Personal tools