MfgTool Error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MfgTool Error

5,038 Views
gage08
Contributor I

Hello,

I am running into an error when attempting to run the manufacturing tool on my laptop.  The dialog box that appears indicates that there is a runtime error in the Microsoft Visual C++ Runtime Library.

This error appears regardless of what version of the manufacturing tool I am using.  I have tried running version 1.6.2.032 and version 1.6.2.042.  I initially tried uninstalling and reinstalling the Microsoft Visual C++ 2008 Redistributable (Runtime Libraries) but the error still appears.  I then downloaded the source files for MfgTool version 1.6.2.048.  Initially I was having the same problem as above when running the tool in Debug.  I was able to make a change so that now the program loads, but when I select the Options menu and the Configuration… menu item and the MfgTool-Configuration window appears I select the USB Ports tab.   An unhandled exception then occurs indicating exception at 0x76ee15de in MfgTool.exe:0xC0000005: Access violation reading location 0x00000024.

I have traced the issue down to the following code in the UsbController.cpp file that makes a call to DeviceIoControl:

success     = DeviceIoControl(hController, IOCTL_USB_GET_ROOT_HUB_NAME,
                              &unicodeName, sizeof(unicodeName), &unicodeName,
                              sizeof(unicodeName), &bytesReturned, NULL);

The first three times that this function is called it seems to work fine, and the unicodeName structure contains what appear to be valid values.  A value of 1 is also returned, but the fourth time this is called DeviceIoControl returns a value of 0, and the unicodeName structure appears to contain garbage.  A
call to GetLastError returns a value of 1.  According to Windows system error code documentation an error code of 1 is ERROR_INVALID_FUNCTION.  From my understanding this is due to using a CTL_CODE that is not supported in the driver.  The description of the driver being called is: USB-IF xHCI USB Host Controller.  I don’t see this as an installed device driver on my laptop when looking at device manager.  The laptop I have is a DELL Latitude E6530.

Has anyone experienced this problem before?  The manufacturing tool works on all of the other laptops here in the building, but I am the only
one I know of with a latptop this new.

Thanks,

Kevin

Tags (1)
0 Kudos
6 Replies

1,323 Views
Yuri
NXP Employee
NXP Employee

Please try to disable all USB3 ports on the host computer.

0 Kudos

1,323 Views
robbzimmerman
Contributor I

i am having the same visual C++ runtime error with my machine (dell E6530) running both 11.11.00 and 12.05.00 on windows 7 Pro. simply disabling the USB3.0 drivers did nothing to change my problem. i have tried to update my machine's BIOS, but that was also unsuccessful. any ideas?

0 Kudos

1,323 Views
gage08
Contributor I

Yuri,

Thank you for your suggestion.  It did not completely fix the problem.  Apparently there is some kind of controller device driver on my new laptop called "USB-IF xHCI USB Host Controller".  Even if I disable all USB device drivers on my laptop this controller driver is still running.  I added code to the MfgTool to avoid enumerating this controller and everything is now working after disabling all of the USB 3.0 device drivers.

Thanks,

Kevin

0 Kudos

1,323 Views
MarekVasut
Senior Contributor I

You can try running git.bfuser.eu Git - marex/mxsldr.git/summary if you're using Linux ;-)

0 Kudos

1,323 Views
gage08
Contributor I

Marek,

Thank you for the suggestion, but we are using Windows Embedded Compact 7.  Do you have a similar link, like the one above, for Windows Embedded?

Thanks,

Kevin

0 Kudos

1,323 Views
MarekVasut
Senior Contributor I

This is a tool that's supposed to be run on the HOST machine. And as much as I'd love to help you, the answer is no -- to some extent.

The tool is written using libusb-1.0 in pure C and that's about it. And you can simply install libusb on windows, no problem. Then just recompile the tool and you can use it (I believe).

0 Kudos