15AH, San Francisco

California, United States.

Send Your Mail At:

tianyingkejishe@sina.cn

Working Hours

Mon-Sat: 9.30am To 7.00pm

【lx2160】How to dynamically adjust MC log level using restool

Prerequisites: The board should be running Linux and connected to terminal console.

Note: For log level debug support, the restool version should be LSDK-2003-RC1 or above and MC version should be 10.20.0 or above.

To check restool version:

$ root@localhost:~# restool -v
restool LSDK-20.04

To check MC version:

root@localhost:~# restool -m
MC firmware version: 10.24.0

For debugging, use the ls-debug script available in the LSDK rootfs. There is no need to create the debug object.

ls-debug -h 
-h, –helpls-debug help information
-ts, –timestamp=XEnable/Disable timestamp printing, X is ON or OFF
-c, –console=XEnable/Disable printing in UART console, X is ON or OFF
-l, –log=XEnable/Disable printing in DDR log, X is ON or OF
-u, –uart=XSet UART ID of the console, X = [0 – 4], 0 = OFF
-ll, –level=XSet logging level, X = [0 – 5]0: Global1: Debug2: Info3: Warning4: Error5: Critical
-m, mem, –memoryDump information about memory modules available
dpxy.zDump information about MC respective object

For example, to enable logging in console with log level INFO:

$ ls-debug --log=on --console=on --level=2              
dpdbg.0 created
DDR log printing ON
UART console printing ON
Log level set to 2
$ root@localhost:~# ls-debug --memory
Memory dumped information available in MC log/console
$ root@localhost:~# cat `find /dev/ -name "*mc_console"`
[I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN]  Handling command: dprc_get_obj for DPRC 1 on portal id 0
[I, RESMAN]  Handling command: dpdbg_open on DPDBG
[I, RESMAN]  Handling command: dpdbg_dump on DPDBG
[I, DPNI]  Memory info:
[I, DPNI]  MC DDR #1 cacheable memory
[I, DPNI]        Total: 134217728 bytes
[I, DPNI]        Used: 14802708 bytes
[I, DPNI]        Free: 119415020 bytes
[I, DPNI]  MC DDR #1 non-cacheable memory
[I, DPNI]        Total: 50331648 bytes
[I, DPNI]        Used: 27680 bytes
[I, DPNI]        Free: 50303968 bytes
[I, DPNI]  DMEM1 memory
[I, DPNI]        Total: 81920 bytes
[I, DPNI]        Used: 27168 bytes
[I, DPNI]        Free: 54752 bytes
[I, DPNI]  DMEM2 memory
[I, DPNI]        Total: 81920 bytes
[I, DPNI]        Used: 27168 bytes
[I, DPNI]        Free: 54752 bytes
[I, DPNI]  DDR #1 memory
[I, DPNI]        Total: 1610612736 bytes
[I, DPNI]        Used: 143163392 bytes
[I, DPNI]        Free: 1467449344 bytes
[I, DPNI]  PEB memory
[I, DPNI]        Total: 2097152 bytes
[I, DPNI]        Used: 524288 bytes
[I, DPNI]        Free: 1572864 bytes
[I, DPNI]  DP-DDR memory
[I, DPNI]        Total: 4294967296 bytes
[I, DPNI]        Used: 0 bytes
[I, DPNI]        Free: 4294967296 bytes
[I, RESMAN]  Handling command: dpdbg_close on DPDBG
[I, RESMAN]  Handling command: dprc_close for DPRC 1 on portal id 0
[I, RESMAN]  Handling command: dprc_set_irq_mask for DPRC 1 on portal id 0
[I, RESMAN]  Handling command: dprc_set_irq_enable for DPRC 1 on portal id 0
root@localhost:~#
anyShare分享到:
本站的文章和资源来自互联网或者站长的原创,按照 CC BY -NC -SA 3.0 CN协议发布和共享,转载或引用本站文章应遵循相同协议。如果有侵犯版权的资源请尽快联系站长,我们会在24h内删除有争议的资源。欢迎大家多多交流,期待共同学习进步。
stormwind