• Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
HomepcDuinoSome knowledge about pcDuino serial debugging (fou ...
Previous Next

Some knowledge about pcDuino serial debugging (four)

Posted by: Alvin Jin , February 27, 2014

[vc_row][vc_column width=”1/1″][vc_tour][vc_tab title=”What PCDuino debug serial port can do ?” tab_id=”1393557251-1-28″][vc_column_text]Do not think  the serial pcDuino can  only easily use to tap instruction . There are a lot of very powerful features  waiting for us to discover, of course, we need a key to open the world. man: a powerful online help tools, if you have some qusestions about  instructions ,you can answer man.

Installation man tool sudo apt-get install man

sb1

After the installation is completed ,you can command on man, and it will tell you what parameters the command is doing, such as:

@man ls

sb2

(If you do not want to see man help document , you can press Ctrl + z quit!)

If you wouldn’t like to view English version, you can now install the Chinese version of the man helped , install as follows:

sudo apt-get install manpages-zh

sb3

Modify / etc / manpath.config file:

ubuntu@ubuntu:~/Desktop$ vi /etc/manpath.config

# manpath.config

#

# This file is used by the man-db package to configure the man and cat paths.

# It is also used to provide a manpath for those without one by examining

# their PATH environment variable. For details see the manpath(5) man page.

#

# Lines beginning with `#’ are comments and are ignored. Any combination of

# tabs or spaces may be used as `whitespace’ separators.

#

# There are three mappings allowed in this file:

# ——————————————————–

# MANDATORY_MANPATH                     manpath_element

# MANPATH_MAP           path_element    manpath_element

# MANDB_MAP             global_manpath  [relative_catpath]

#———————————————————

# every automatically generated MANPATH includes these fields

#

#MANDATORY_MANPATH                      /usr/src/pvm3/man

#

MANDATORY_MANPATH                       /usr/man

MANDATORY_MANPATH                       /usr/share/man

MANDATORY_MANPATH                       /usr/local/share/man

#———————————————————

# set up PATH to MANPATH mapping

# ie. what man tree holds man pages for what binary directory.

#

#               *PATH*        ->        *MANPATH*

#

MANPATH_MAP     /bin                    /usr/share/man

MANPATH_MAP     /usr/bin                /usr/share/man

MANPATH_MAP     /sbin                   /usr/share/man

MANPATH_MAP     /usr/sbin               /usr/share/man

MANPATH_MAP     /usr/local/bin          /usr/local/man

MANPATH_MAP     /usr/local/bin          /usr/local/share/man

MANPATH_MAP     /usr/local/sbin         /usr/local/man

MANPATH_MAP     /usr/local/sbin         /usr/local/share/man

MANPATH_MAP     /usr/X11R6/bin          /usr/X11R6/man

MANPATH_MAP     /usr/bin/X11            /usr/X11R6/man

MANPATH_MAP     /usr/games              /usr/share/man

MANPATH_MAP     /opt/bin                /opt/man

MANPATH_MAP     /opt/sbin               /opt/man

改成:

# manpath.config

#

# This file is used by the man-db package to configure the man and cat paths.

# It is also used to provide a manpath for those without one by examining

# their PATH environment variable. For details see the manpath(5) man page.

#

# Lines beginning with `#’ are comments and are ignored. Any combination of

# tabs or spaces may be used as `whitespace’ separators.

#

# There are three mappings allowed in this file:

# ——————————————————–

# MANDATORY_MANPATH                     manpath_element

# MANPATH_MAP           path_element    manpath_element

# MANDB_MAP             global_manpath  [relative_catpath]

#———————————————————

# every automatically generated MANPATH includes these fields

#

#MANDATORY_MANPATH                      /usr/src/pvm3/man

#

MANDATORY_MANPATH                       /usr/man/zh_CN

MANDATORY_MANPATH                       /usr/share/man/zh_CN

MANDATORY_MANPATH                       /usr/local/share/man/zh_CN

#———————————————————

# set up PATH to MANPATH mapping

# ie. what man tree holds man pages for what binary directory.

#

#               *PATH*        ->        *MANPATH*

#

MANPATH_MAP     /bin                    /usr/share/man/zh_CN

MANPATH_MAP     /usr/bin                /usr/share/man/zh_CN

MANPATH_MAP     /sbin                   /usr/share/man/zh_CN

MANPATH_MAP     /usr/sbin               /usr/share/man/zh_CN

MANPATH_MAP     /usr/local/bin          /usr/local/man/zh_CN

MANPATH_MAP     /usr/local/bin          /usr/local/share/man/zh_CN

MANPATH_MAP     /usr/local/sbin         /usr/local/man/zh_CN

MANPATH_MAP     /usr/local/sbin         /usr/local/share/man/zh_CN

MANPATH_MAP     /usr/X11R6/bin          /usr/X11R6/man/zh_CN

MANPATH_MAP     /usr/bin/X11            /usr/X11R6/man/zh_CN

MANPATH_MAP     /usr/games              /usr/share/man/zh_CN

MANPATH_MAP     /opt/bin                /opt/man/zh_CN

MANPATH_MAP     /opt/sbin               /opt/man/zh_CN[/vc_column_text][/vc_tab][vc_tab title=”Chinese version of MAN display garbled,how to do?” tab_id=”1393557251-2-91″][vc_column_text]After modifying the instruction , have a try, man ls:

sb4

Chinese code are wrong, need to modify secureCRT parameter , as shown in figure:

“option”-》“Session Options …”

sb5

Choose “appearance” – “character encoding to choose” utf-8 “, click “ok”.

sb6

man Is one more time , as shown in figure:

sb7

The Chinese man is OK, now you can do something else. Install a vim editor

ubuntu@ubuntu:~/Desktop$ sudo apt-get install vim

After the installation is finished writing a c code, ubuntu @ ubuntu: ~ / Desktop $ sudo vim test.c
After entering the vim editor ,press letter “i” indicates insert mode,

Write down the following code:

sb8

After writing press “Esc” to exit insert mode, enter: wq (save and exit), enter gcc test.c (press the Tab key to incomplete filename);

sb9

The desktop gcc compiler to generate a a.out file, execute a.out,

ubuntu@ubuntu:~/Desktop$ sudo ./a.out

The result is as below:

fff[/vc_column_text][/vc_tab][/vc_tour][/vc_column][/vc_row]

Tags: pcDuino

Share!
Tweet

Alvin Jin

About the author

Leave a Reply Cancel reply

You must be logged in to post a comment.

Category

  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors