操作系統:Ubuntu 10.04
交叉編譯器:arm-linux-gcc-4.1.1
一、安裝配置minicom
1、安裝minicom
lingd@ubuntu:~$
sudo apt-get install minicom
2、配置minicom
lingd@ubuntu:~$
sudo minicom -s
出現這樣的配置界面:
+-----[configuration]------+
| Filenames and paths |
| File transfer protocols |
| Serial port setup |
| Modem and dialing |
| Screen and keyboard |
| Save setup as dfl |
| Save setup as.. |
| Exit |
| Exit from Minicom |
+--------------------------+
選擇Serial port setup, 會看到這樣的選項:
+-----------------------------------------------------------------------+
| A - Serial Device : /dev/ttyS0 |
| B - Lockfile Location : /var/lock |
| C - Callin Program : |
| D - Callout Program : |
| E - Bps/Par/Bits : 115200 8N1 |
| F - Hardware Flow Control : No |
| G - Software Flow Control : No |
| |
| Change which setting? |
+-----------------------------------------------------------------------+
輸入前面對應的字母即可進入相應的選項。將選項A的值設置為/dev/ttyS0 表示是串口1,將選項E的值設置為115200,將選項F設置為NO(請根據實際情況配置).
設置默認上傳/下載的目錄,
選擇Filenames and paths , 會看到這樣的選項:
+-----------------------------------------------------------------------+
| A - Download directory : /home/lingd/arm/download |
| B - Upload directory : /home/lingd/arm/upload |
| C - Script directory : |
| D - Script program : runscript |
| E - Kermit program : |
| F - Logging options |
| |
| Change which setting? |
+-----------------------------------------------------------------------+
注意:開發板發送給pc的文件將保存在Download directory所設定的目錄中,而pc要下載到開發板的文件保存在Upload directory所設定的目錄中
設置完成後,
選擇”Save setup as dfl”,保存為默認設置.
然後選擇“Exit”,即可進入Minicom的主界面:
Welcome to minicom 2.4
OPTIONS: I18n
Compiled on Jan 25 2010, 06:49:09.
Port /dev/ttyS0
Press CTRL-A Z for help on special keys
按Ctrl-A,再按z,可以獲取到minicom CTRL-A命令的幫助信息
Welco+-------------------------------------------------------------------+
| Minicom Command Summary |
OPTIO| |
Compi| Commands can be called by CTRL-A <key> |
Port | |
| Main Functions Other Functions |
Press| |
| Dialing directory..D run script (Go)....G | Clear Screen.......C |
| Send files.........S Receive files......R | cOnfigure Minicom..O |
| comm Parameters....P Add linefeed.......A | Suspend minicom....J |
| Capture on/off.....L Hangup.............H | eXit and reset.....X |
| send break.........F initialize Modem...M | Quit with no reset.Q |
| Terminal settings..T run Kermit.........K | Cursor key mode....I |
| lineWrap on/off....W local Echo on/off..E | Help screen........Z |
| Paste file.........Y | scroll Back........B |
| |
| Select function or press Enter for none. |
| |
| Written by Miquel van Smoorenburg 1991-1995 |
| Some additions by Jukka Lahtinen 1997-2000 |
| i18n by Arnaldo Carvalho de Melo 1998 |
+-------------------------------------------------------------------+
CTRL-A Z for help |115200 8N1 | NOR | Minicom 2.4 | VT102 | Offline
其中,我們用CTRL-A s來發送文件給開發板;而用CTRL-A r來接收開發板上的文件
二、為pc安裝lrzsz
lrzsz is a unix communication package providing the XMODEM, YMODEM ZMODEM file transfer protocols.
lingd@ubuntu:~$
sudo apt-get install lrzsz