一、安装配置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
三、交叉编译lrzsz并下载到开发板上
1、下载lrzsz源码包
到http://download.chinaunix.net/download/0007000/6293.shtml,下一个lrzsz的tar包,
2、解压缩后,到解压目录中执行./configure
lingd@ubuntu:~/arm$ tar -zxf lrzsz-0.12.20.tar.gz 
lingd@ubuntu:~/arm$ cd lrzsz-0.12.20/
lingd@ubuntu:~/arm/lrzsz-0.12.20$ ./configure 
creating cache ./config.cache
checking for a BSD compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... yes
checking for working aclocal... missing
checking for working autoconf... missing
checking for working automake... missing
checking for working autoheader... missing
checking for working makeinfo... missing
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking how to run the C preprocessor... gcc -E
checking whether gcc needs -traditional... no
checking for ranlib... ranlib
checking for POSIXized ISC... no
checking for AIX... no
checking for minix/config.h... no
checking for gcc option to accept ANSI C... none needed
checking for function prototypes... yes
checking for working const... yes
checking for inline... inline
checking for syslog in -lsocket... no
checking for syslog in -lbe... no
checking for gethostbyname in -lnsl... yes
checking for ANSI C header files... yes
checking for fcntl.h... yes
checking for limits.h... yes
checking for sys/ioctl.h... yes
checking for sys/time.h... yes
checking for unistd.h... yes
checking for sys/times.h... yes
checking for termios.h... yes
checking for sys/termios.h... yes
checking for termio.h... yes
checking for sys/termio.h... no
checking for sgtty.h... yes
checking for termios.h... (cached) yes
checking for sys/termios.h... (cached) yes
checking for termio.h... (cached) yes
checking for sys/termio.h... (cached) no
checking for sgtty.h... (cached) yes
checking for sys/mman.h... yes
checking for utime.h... yes
checking for syslog.h... yes
checking for sys/syslog.h... yes
checking for sys/param.h... yes
checking for sys/select.h... yes
checking for strings.h... yes
checking for arpa/inet.h... yes
checking for size_t... yes
checking for mode_t... yes
checking for off_t... yes
checking for speed_t... yes
checking for st_rdev in struct stat... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether sys/time.h and sys/select.h may both be included... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for errno declaration... yes
checking whether setvbuf arguments are reversed... no
checking return type of signal handlers... void
checking for unistd.h... (cached) yes
checking for getpagesize... yes
checking for working mmap... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for gettimeofday... yes
checking for settimeofday... yes
checking for strchr... yes
checking for memcpy... yes
checking for select... yes
checking for vprintf... yes
checking for times... yes
checking for rdchk... no
checking for utime... yes
checking for syslog... yes
checking for siginterrupt... yes
checking for mkdir... yes
checking for mktime... yes
checking for strerror... yes
checking for strstr... yes
checking for strdup... yes
checking for strtoul... yes
checking for strtol... yes
checking for strpbrk... yes
checking for stpcpy... yes
checking for strftime... yes
checking for vasprintf... yes
checking for getopt_long... yes
checking for ftime... yes
checking that ftime works correctly... yes
checking for timezone variable... yes
checking for LOG_UUCP... yes
checking for argz.h... yes
checking for limits.h... (cached) yes
checking for locale.h... yes
checking for nl_types.h... yes
checking for malloc.h... yes
checking for string.h... yes
checking for unistd.h... (cached) yes
checking for values.h... yes
checking for sys/param.h... (cached) yes
checking for getcwd... yes
checking for munmap... yes
checking for putenv... yes
checking for setenv... yes
checking for setlocale... yes
checking for strchr... (cached) yes
checking for strcasecmp... yes
checking for __argz_count... yes
checking for __argz_stringify... yes
checking for __argz_next... yes
checking for LC_MESSAGES... yes
checking whether NLS is requested... yes
checking whether included gettext is requested... no
checking for libintl.h... yes
checking for gettext in libc... yes
checking for msgfmt... /usr/bin/msgfmt
checking for dcgettext... yes
checking for gmsgfmt... /usr/bin/msgfmt
checking for xgettext... /usr/bin/xgettext
checking for catalogs to be installed...  de
updating cache ./config.cache
creating ./config.status
creating Makefile
creating intl/Makefile
creating lib/Makefile
creating testsuite/Makefile
creating man/Makefile
creating po/Makefile.in
creating src/Makefile
creating debian/rules
creating Specfile
creating systype
creating src/lrzszbug
creating config.h
3、修改Makefile
有三个Makefile需要修改,分别是~/arm/lrzsz-0.12.20/Makefile、~/arm/lrzsz-0.12.20/lib/Makefile、~/arm/lrzsz-0.12.20/src/Makefile
lingd@ubuntu:~/arm/lrzsz-0.12.20$ vi Makefile
lingd@ubuntu:~/arm/lrzsz-0.12.20$ vi lib/Makefile
lingd@ubuntu:~/arm/lrzsz-0.12.20$ vi src/Makefile
将这三个Makefile中的所有gcc替代成你开发板所需要的交叉编译器,如arm-linux-gcc
即:
CC = gcc
CPP = gcc -E
都改成
CC = arm-linux-gcc
CPP = arm-linux-gcc -E
4、编译
lingd@ubuntu:~/arm/lrzsz-0.12.20$ make
在lrzsz-0.12.20/src目录下会生成两个可执行文件lsz、lrz(或者sz、rz),把它们下载到开发板linux系统的/bin目录下。
lingd@ubuntu:~/arm/lrzsz-0.12.20$ cd src
lingd@ubuntu:~/arm/lrzsz-0.12.20/src$ ls
ansi2knr.1  lrz          lsyslog.o    Makefile.in  tcp.o      zm.o
ansi2knr.c  lrz.c        lsz          protname.c   timing.c   zmodem.h
canit.c     lrz.o        lsz.c        protname.o   timing.h   zperr.c
canit.o     lrzszbug     lsz.o        rbsb.c       timing.o   zperr.o
crctab.c    lrzszbug.in  Makefile     rbsb.o       zglobal.h  zreadline.c
crctab.o    lsyslog.c    Makefile.am  tcp.c        zm.c       zreadline.o
四、测试
1、开发板-->PC机
在开发板上输入 lsz filename,然后会出现一个传输界面,传输完成后可以在你设置的默认下载目录Download directory里找到这个文件。
2、PC机-->开发板
在开发板上先进入/tmp 目录,然后输入lrz。
# cd /tmp
# lrz                                                                         
�z waiting to receive.**B0100000023be50
按Ctrl-A,再按s,选择zmoden,会出现一个选择文件的界面,选择你要传输的文件(按一下空格键选择目录,按两下空格键进入目录),回车后出现一个传输界面,传输完成后,便可以在开发板的/tmp目录下找到这个文件了。
 
转自:http://www.cnblogs.com/wanqieddy/archive/2011/07/14/2106087.html

JZ2440开发笔记(2)——minicom的安装和配置使用【转】的更多相关文章

  1. HBase学习笔记之HBase的安装和配置

    HBase学习笔记之HBase的安装和配置 我是为了调研和验证hbase的bulkload功能,才安装hbase,学习hbase的.为了快速的验证bulkload功能,我安装了一个节点的hadoop集 ...

  2. [Openwrt 项目开发笔记]:PHP+Nginx安装(七)

    [Openwrt项目开发笔记]系列文章传送门:http://www.cnblogs.com/double-win/p/3888399.html 正文: 在上一节中,我们已经搭建了MySQL数据库了,因 ...

  3. minicom的安装与配置

    分类: LINUX     如果项目中使用的bootloader为 u-boot,那么在用minicom向目标板传送kernel时 会发生一些错误.故若您使用的是u-boot,建议您使用kermit, ...

  4. PHP开发环境&amp;MySQL下载安装及配置流程

    PHP开发环境&MySQL下载安装及配置流程 因工作须要,从0開始学PHP,前几天看完视频教程后開始搞开发环境,到今天才好.这里把安装配置流程梳理一下分享出来. 一.概述 要搭建一个开发环境无 ...

  5. Android开发入门——Andoird Studio的安装与配置

    Android的开发离不开Java,仍然需要对Java进行安装与配置,所以我写了上一篇文章,Java的安装与配置. 开始进行Android Studio的安装与配置. 一.进行配置Java,如果电脑里 ...

  6. Git学习笔记(1)——安装,配置,创建库,文件添加到库

    初次接触git,为了记忆深刻,把学习的简单流程记录下来. 本文记录了Git在Ubuntu上的安装,配置,以及创建版本库和往库中添加文件的过程. 1.Git的安装:(Ubuntu-Linux非常友好的安 ...

  7. AM335X开发板学习系列——环境搭建(vbox虚拟机ubuntu14.04下minicom的安装和配置)

    这个系列是我学习AM335X的总结. 1. ubuntu虚拟机的USB设备,选择启用usbserial 2. ubuntu虚拟机的网络,采用桥接模式,以保证开发板和ubuntu虚拟机能互相ping通 ...

  8. Vue 新手学习笔记:vue-element-admin 之安装,配置及入门开发

    所属专栏: Vue 开发学习进步 说实话都是逼出来的,对于前端没干过ES6都不会的人,vue视频也就看了基础的一些但没办法,接下来做微服务架构,前端就用 vue,这块你负责....说多了都是泪,脚手架 ...

  9. JZ2440开发笔记(9)——位置无关代码设计【转】

    b MAIN 和 ldr pc,=MAIN 的区别(谈到代码位置无关性) 看bootloader的时候经常看到这两种写法,不太明白区别,网上查了查.其实看了之后还是一头雾水? 其中,2和3 似乎是一个 ...

随机推荐

  1. js清空web用户控件的值

    假设你的用户控件里面有: <asp:DropDownList ID="DropDownList1" runat="server"> <asp: ...

  2. android xml产生和解析

    public static void writeToXml(Map<String, Object> map,Writer writer) throws Exception, Illegal ...

  3. js 框架都有哪几种(转载)

    目前来看,js框架以及一些开发包和库类有如下几个,Dojo .Scriptaculous .Prototype .yui-ext .Jquery .Mochikit.mootools .moo.fxD ...

  4. PS学习笔记

    PS学习笔记 常用快捷键 快捷键 功能 Ctrl+T 自由变换 Ctrl+Alt+Shift+T 复制图层+再次变换 Alt+Del 以前景色填充 Ctrl+Del 以背景色填充 Ctrl+I 反相 ...

  5. 使用pdb调试python

    python pdb调试 python -m pdb myscript.py #注意这会重启myscript.py,这样启动的话,代码每一行都是一个节点 也可以在程序中这么设置断点: import p ...

  6. STL容器的本质

    http://blog.sina.com.cn/s/blog_4d3a41f40100eof0.html 最近在学习unordered_map里面的散列函数和相等函数怎么写.学习过程中看到了一个好帖子 ...

  7. 2014年度辛星css教程夏季版第七节

    本小节我们研究浮动的问题,浮动使得布局更加灵活,虽然我们前面也有关于布局的讲解,但是它们提供的内容还是太有限了,要想获得更强大的布局,还必须使用浮动才能完成更灵活的布局. ***********浮动* ...

  8. Windows操作系统常用快捷键

    复制:ctrl+c       剪切:ctrl+x      粘贴:ctrl+v       全选:ctrl+a         撤消:ctrl+z      保存:ctrl+s 运行:win+r   ...

  9. 一步步学习ASP.NET MVC3 (4)——Razor(2)

    请注明转载地址:http://www.cnblogs.com/arhat 在上一章,我们介绍了Razor的一些基本语法,从Razor中我们可以出ASP.NET MVC的视图引擎给我们带来的便利,但是同 ...

  10. NUTCH Exception in thread "Thread-12751" java.lang.OutOfMemoryError: PermGen space

    转载自 :http://greemranqq.iteye.com/blog/1705867转载自:http://www.cnblogs.com/xwdreamer/archive/2011/11/21 ...