如何使用vxWorks调试代理进行内核前调试?
vxWorks 文档指出:
WDB代理本身独立于目标操作系统:它 通过虚拟功能运行时附加到运行时操作系统服务 界面。 WDB代理可以在VxWorks运行之前执行(如 将 BSP 移植到新板的早期阶段)。”
如何在 vxWorks 内核运行之前使用调试代理?
The vxWorks documentation states:
The WDB agent itself is independent of the target operating system: it
attaches to run-time OS services through a virtual-function run-time
interface. The WDB agent can execute before VxWorks is running (as in
the early stages of porting a BSP to a new board)."
How can I use the debug agent before the vxWorks kernel is running?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先,为了能够使用代理执行内核前调试,您必须有一个可用于调试的串行端口。 该串行端口必须初始化并发挥作用,因为它将成为调试通道。
开始调试的时间是有限制的。 基于 WDB 的调试将在第一个硬件初始化函数运行 (sysHwInit) 之后和正确的内核初始化 (kernelInit) 之前开始。
根据所使用的 vxWorks 版本,有不同的方法可以实现此结果。
基于 Workbench 的 vxWorks 构建
在内核配置工具中,您必须选择以下组件:
根据您选择组件的顺序,您可能会收到来自 Workbench 的投诉因为某些组件是互斥的(您不能使用具有预内核调试功能的 WDB END 驱动程序)。 上面的顺序应该没问题。
命令行构建
编辑config.h文件,并选择以下选项:
当使用这些选项编译vxWorks时,它将执行硬件初始化的第一阶段,然后挂起,等待调试代理在主机上运行以连接到目标。
此时,您可以执行调试、单步执行等...
First, in order to be able to use the agent to perform pre-kernel debugging, you must have a serial port available for debugging. This serial port has to be initialized and functional as it will be the debug channel.
There is a limitation on how early you can start debugging. WDB based debugging will start after the first hardware initialization function runs (sysHwInit) and before the kernel initialization proper (kernelInit).
Depending on the version of vxWorks being used, there are different ways to achieve this result.
Workbench-based vxWorks builds
In the kernel configuration tool, you must select the following components:
Depending on the order you select components, you might get complaints from workbench because some components are mutually exclusive (you can't have WDB END driver with pre-kernel debugging). The order above should be ok.
Command-line builds
Edit the config.h file, and select the following options:
When vxWorks is compiled with those options, it will perform perform the first phase of hardware initialization and then suspend, waiting for the debug agent running on the host to connect to the target.
At that point, you can perform debugging, single step, etc...