對于嵌入式工程師來說,和裝置互動是工作中必不可少的事。
在同僚中序列槽工具一般都是使用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 U-Boot 2013.07-svn77 (Jun 22 2017 - 12:07:46)
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: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 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日志存放位置。
重新開機系統之後,再斷開序列槽連結檢視日志