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

版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/xyfabcde/article/details/73575334

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

在同事中串口工具一般都是使用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 8001ad80
12:13:08:109 CPM_CPAPCR:a9008520
12:13:08:109 CPM_CPMPCR:98000083
12:13:08:109 CPM_CPCCR:9a052210
12:13:08:125 DDRC_DLP:0000f003
12: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 MiB
12:13:08:296 Top of RAM usable for U-Boot at: 82000000
12:13:08:296 Reserving 389k for U-Boot at: 81f9c000
12:13:08:296 Reserving 8320k for malloc() at: 8177c000
12:13:08:296 Reserving 32 Bytes for Board Info at: 8177bfe0
12:13:08:296 Reserving 124 Bytes for Global Data at: 8177bf64
12:13:08:296 Reserving 128k for boot params() at: 8175bf64
12:13:08:312 Stack Pointer at: 8175bf48
12:13:08:312 Now running in RAM - U-Boot at: 81f9c000
12:13:08:312 NAND:  0 MiB
12:13:08:328 --------sfc_rate = 240000000-----------
12:13:08:328 id0=b1
12:13:08:328 id1=48
12:13:08:328 SFC_DEV_STA_RT=0x00000000,
12:13:08:328 sfcnand param num=5
12:13:08:343 read status 0xa0 : 0
12:13:08:359 read status 0xb0 : 10
12:13:08:500 MMC:   
12:13:08:500 
12:13:08:500 NAND read: device 0 offset 0xc0000, size 0x20000
12:13:08:500 =======224:sfc_nand_read:======
12:13:08:515 =======277:sfc_nand_read:======
12:13:08:515  131072 bytes read: OK
12:13:08:515 
12:13:08:515 NAND read: device 0 offset 0xe0000, size 0x20000
12:13:08:515 =======224:sfc_nand_read:======
12:13:08:546 =======277:sfc_nand_read:======
12:13:08:546  131072 bytes read: OK
12:13:08:562 *** Warning - bad CRC, using default environment
12:13:08:562 
12:13:08:562 In:    serial
12:13:08:562 Out:   serial
12:13:08:562 Err:   serial
12: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 0x1000000
12:13:08:578 =======224:sfc_nand_read:======
12:13:10:546 =======277:sfc_nand_read:======
12:13:10:546  16777216 bytes read: OK
12: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 MiB
12:13:10:546    Load Address: 80f00000
12:13:10:546    Entry Point:  80f00000
12:13:10:578    Verifying Checksum ... OK
12:13:10:640    Loading Kernel Image ... OK
12: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 device
12:13:11:281 Starting mdev...



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





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

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


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

展开阅读全文

没有更多推荐了,返回首页