我可以在USB上获得调试信息吗? [英] Can I get debug information on USB?

查看:120
本文介绍了我可以在USB上获得调试信息吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前,我正在为我的项目开发yocto OS.我关于调试的问题.通常情况下,调试信息是通过串行方式接收的.我知道ssh调试.我有两个问题.

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. 为什么通常每个设备都支持在串行端口上调试?
  2. 在Yocto中,是否有可能通过USB PORT(无需使用串行到USB转换器)进行调试?

推荐答案

  1. 因为串行驱动程序很简单,并且实现时没有中断(Linux内核控制台实际上是如何工作的).由于紧急情况,必须发送崩溃日志并使其尽可能完整,因此这是一项要求.

  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.

您有几种选择:

  • a)使用USB-2-Serial和/dev/ttyUSB0,或
  • b)使用USB-2-以太网并设置netconsole,或者
  • c)(仅在最新的具有调试功能的xHCI硬件 且需要编写其他代码)上,您可以为USB启用 earlyprintk . 注意,它需要 special
  • 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).

变体c)在v4.13-rc1 Linux内核中部分受支持,其中有一个

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

这篇关于我可以在USB上获得调试信息吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆