问题
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....
- Why normally every device support debug on serial port?
- Is there any possible way to get debug through USB PORT(with out using serial to USB converter) in Yocto?
回答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.
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).
- a) use USB-2-Serial and
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