第一、vxworks下 pci转串口卡调试

1.网上查看是否有显示pci设备的函数,查到pciDeviceShow

2.在vxworks help中输pciDeviceShow,可以看到

pciConfigShow
NAME
pciConfigShow - Show routines of PCI bus(IO mapped) library


ROUTINES


pciDeviceShow( ) - print information about PCI devices
pciHeaderShow( ) - print a header of the specified PCI device
pciFindDeviceShow( ) - find a device by deviceId, then print an information.
pciFindClassShow( ) - find a device by 24-bit class code
pciConfigStatusWordShow( ) - show the decoded value of the status word
pciConfigCmdWordShow( ) - show the decoded value of the command word
pciConfigFuncShow( ) - show configuration details about a function
pciConfigTopoShow( ) - show PCI topology

3.在vxworks输pciDeviceShow

4.仔细分析发现vxbNs16550Sio.c 文件的pcie卡信息

#define UART_VENDOR_MOSCHP_SIO  0x9710
#define UART_DEVID_MOSCHP_SIO 0x9901

5.修改pcie卡信息为

#define UART_VENDOR_MOSCHP_SIO  0x9710
#define UART_DEVID_MOSCHP_SIO 0x9912

6.运行通过

第二、 Linux 下pci转串口卡调试

lspci

Logo

更多推荐