secureCRT 日志保存并记录每条记录的时间

来源:互联网 发布:mips linux gnu gcc 编辑:程序博客网 时间:2024/05/18 00:03

对于嵌入式工程师来说,和设备交互是工作中必不可少的事。

在同事中串口工具一般都是使用secureCRT 和Xshel  ,具体那个好在此不做讨论。我觉得都很好,看个人喜好。


对于嵌入式系统工程师来说,系统的启动时间是个重要指标。因此能够准确测量系统每个模块所用时间尤其重要。


下面介绍一下在使用secureCRT过程中一个很好用的技巧,保存每条记录并打印记录的时间


先看看保存日志的效果

12:13:08:109 # 12:13:08:109 U-Boot SPL 2013.07-svn77 (Jun 22 2017 - 12:07:46)12:13:08:109 ERROR EPC 8001ad8012:13:08:109 CPM_CPAPCR:a900852012:13:08:109 CPM_CPMPCR:9800008312:13:08:109 CPM_CPCCR:9a05221012:13:08:125 DDRC_DLP:0000f00312:13:08:296 12:13:08:296 12:13:08:296 U-Boot 2013.07-svn77 (Jun 22 2017 - 12:07:46)12:13:08:296 12:13:08:296 Board: Phoenix (Ingenic XBurst X1000 SoC)12:13:08:296 DRAM:  32 MiB12:13:08:296 Top of RAM usable for U-Boot at: 8200000012:13:08:296 Reserving 389k for U-Boot at: 81f9c00012:13:08:296 Reserving 8320k for malloc() at: 8177c00012:13:08:296 Reserving 32 Bytes for Board Info at: 8177bfe012:13:08:296 Reserving 124 Bytes for Global Data at: 8177bf6412:13:08:296 Reserving 128k for boot params() at: 8175bf6412:13:08:312 Stack Pointer at: 8175bf4812:13:08:312 Now running in RAM - U-Boot at: 81f9c00012:13:08:312 NAND:  0 MiB12:13:08:328 --------sfc_rate = 240000000-----------12:13:08:328 id0=b112:13:08:328 id1=4812:13:08:328 SFC_DEV_STA_RT=0x00000000,12:13:08:328 sfcnand param num=512:13:08:343 read status 0xa0 : 012:13:08:359 read status 0xb0 : 1012:13:08:500 MMC:   12:13:08:500 12:13:08:500 NAND read: device 0 offset 0xc0000, size 0x2000012:13:08:500 =======224:sfc_nand_read:======12:13:08:515 =======277:sfc_nand_read:======12:13:08:515  131072 bytes read: OK12:13:08:515 12:13:08:515 NAND read: device 0 offset 0xe0000, size 0x2000012:13:08:515 =======224:sfc_nand_read:======12:13:08:546 =======277:sfc_nand_read:======12:13:08:546  131072 bytes read: OK12:13:08:562 *** Warning - bad CRC, using default environment12:13:08:562 12:13:08:562 In:    serial12:13:08:562 Out:   serial12:13:08:562 Err:   serial12:13:08:562 Net:   No ethernet found.12:13:08:562 Hit any key to stop autoboot:  0 12:13:08:562 12:13:08:578 NAND read: device 0 offset 0x100000, size 0x100000012:13:08:578 =======224:sfc_nand_read:======12:13:10:546 =======277:sfc_nand_read:======12:13:10:546  16777216 bytes read: OK12:13:10:546 ## Booting kernel from Legacy Image at 80600000 ...12:13:10:546    Image Name:   Linux-3.0.8+12:13:10:546    Image Type:   MIPS Linux Kernel Image (uncompressed)12:13:10:546    Data Size:    2531328 Bytes = 2.4 MiB12:13:10:546    Load Address: 80f0000012:13:10:546    Entry Point:  80f0000012:13:10:578    Verifying Checksum ... OK12:13:10:640    Loading Kernel Image ... OK12:13:10:640 12:13:10:640 Starting kernel ...12:13:10:640 12:13:10:640 Uncompressing Linux...12:13:10:968 Ok, booting the kernel.12:13:11:281 mount: mounting devpts on /dev/pts failed: No such device12:13:11:281 Starting mdev...



以上是Linux启动过程中保存的log日志,嵌入式系统工程师是否很兴奋。启动的每个过程都有时间。怎么做的?





打开secureCRT   工具栏的《选项》--《回话选项》就弹出上图。点击《日志文件》--《在每行》中添加     %h:%m:%s:%t  确定

此时配置已经完毕。下一步 工具栏  《文件》---选中《会话位置》,选择log日志存放位置。


重启系统之后,再断开串口链接查看日志

原创粉丝点击