Can I get debug information on USB?

做~自己de王妃 提交于 2019-12-24 10:35:56

问题


Currently I am working on yocto OS for my project. My question regarding debug. In normal practice the debug information is entertained through serial. I aware about ssh debug. I have two question....

  1. Why normally every device support debug on serial port?
  2. Is there any possible way to get debug through USB PORT(with out using serial to USB converter) in Yocto?

回答1:


  1. Because serial driver can be simple and implementing without interrupts (how Linux kernel console actually does). This is a requirement due to emergency cases when crash log should be sent as much as possible and as full as possible.

  2. You have few options:

    • a) use USB-2-Serial and /dev/ttyUSB0, or
    • b) use USB-2-Ethernet and setup netconsole, or
    • c) (only on newest xHCI hardware with debug capability and with additional code to write) you may enable earlyprintk for USB. Note, it requires special debug cable to be connected (note, blue colored is not the same, you need orange one), or
    • d) USB2 (EHCI) which supports debug capability requires a special device to be connected in between, which is not needed for USB3 (see option c) above).

Variant c) is partially supported in v4.13-rc1 Linux kernel, there is a HOWTO file Documentation/driver-api/usb/usb3-debug-port.rst.



来源:https://stackoverflow.com/questions/45511533/can-i-get-debug-information-on-usb

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!