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

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

在同事中串口工具一般都是使用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日志存放位置。

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

  • 2
    点赞
  • 17
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Eric_Xi_BJ

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值