PDA

View Full Version : Crash on DAS (Device Access Server) in Virtual Machines.



PE1PUP
Dec 12th, 2011, 07:22 AM
Hello all,

I use (VMware) Virtual Machines in order to install and run all my tools. This enables me to use tools in such a way that they can't interfere with each other. I tried to do this for an XC838 environment. DAVE and DAVE-Bench run fine in a WIndows-XP Virtual Machine. But as soon as I try to start the UDAS (as part of the installed DAS Servers) with actual XC836-EK hardware connected over USB, then my (virtual) machine crashes....

It doesn't matter if I start UDAS from the DAS Server Control Panel or from the Keil uVision4 environment.

If no (USB linked) hardware is connected, and I try to reprogram the device, then I get the proper error message (because of the missing hardware) as follows:...


Build target 'MyTest'
compiling HELLO.C...
linking...
Program Size: data=30.1 xdata=0 code=1096
"HELLO" - 0 Error(s), 0 Warning(s).
Load "C:\\Keil\\C51\\Examples\\Hello\\HELLO"
Searching for DAS Server 'UDAS'...
DAS Server 'UDAS' is installed.
DAS Server 'UDAS' is not started yet. Trying to start it now...
DAS Server 'UDAS' has been started successfully.
Warning: Unknown JTAG ID=00000000. Assuming an XC866-4FR device with 16K flash

So then I plugin the USB of my KIT_XC836_EK and give the same command.
I see the same text appearing in the output window until the line "DAS Server 'UDAS' is not started yet. Trying to start it now..."
And then I have a hard crash causing the (virtual) machine to reboot.....
This is fully reproducable....

Does anybody have any clue why invoking UDAS causes such a hard crash???
Can UDAS handle USB 1.0 ports? (These are the virtual USB ports under VMware...)
Or are USB 2.0 ports required as minimum????

I'm looking forward to any reaction on this odd issue...
Thanks in advance & best regards from the Netherlands,
Johan.

Update (18-jan-2012): In the meanwhile I'm getting the idea that the problem is caused by the fact that my virtual machine only has USB 1.0 ports while the UDAS tooling requires USB 2.0 for pushing the connection into SPD mode. I only do not understand why that makes the whole machine crash so hard. I would expect a failure message or warning. Not a full system crash.... Any ideas...????

alexshao1978
Dec 13th, 2011, 07:07 PM
I use VM to debug XBOARD-XC2265N, it work OK.
My host OS version is Windows 7 Ultimate, 64-bit (Build 7600) 6.1.7600.
My VM version 7.0.1 build-227600.
Someone tell me I must use 32Bit OS(Like WINXP) in VM and 64Bit OS(Like WIN7) in host to avoid address overflow.

Further more, do you notice any other features of VM? For example, have enable ACE? Have you connect device before you debug(click status bar in VM window below, connect and you will find a VM usb device in your host hardware managerment and a infinoen usb hardware in your VM OS)?

Juergen
Jan 18th, 2012, 07:28 PM
Hi Johan,

I have passed this to our DAS expert who will reply to this thread.
I myself also experienced this problem with XC836EK on an older laptop running on Windows2000. I had a few system hard crashes until I was told then that it is necessary to have USB 2.0
The probelm in my case was overcome by using a powered USB hub. Since I upgraded to a new laptop and Windows 7, I have not had this kind of problem anymore.

Best Regards
Juergen

Albrecht
Jan 19th, 2012, 01:09 AM
Hi Johan,

an SPD connection requires a USB 2.0 connection, so your setup with a virtual USB 1.0 port can't work.

Why it crashes is another issue. We know that there are problem with the USB drivers of FTDI on XP.
E.g. you can get on XP a blue screen when you do a hot unplug of the USB.
We also know from own experiments that a virtual machine makes the USB interaction much slower.
And there is a lot of USB interaction. So it worked for DAP/JTAG but it was no fun to work with it.

I just added the release notes of the upcoming DAS V4.0 point 3:

2. For SPD a device connection is only established if the miniWiggler is using a high speed USB
port, hub and quality cables.

3. It is discouraged to run DAS on a virtual machine when the Access HW (miniWiggler etc.) is
connected via USB. The performance of such a setup is very low. In particular it is not
possible to have a reliable SPD connection if possible at all (refer to point 2).

I would be interested whether the following setup is possible:
Start UDAS in the regular OS of your computer
Start your tool e.g. DAS Device Scanner within a Virtual Machine and use a socket connection to the UDAS on your host.
However I don't know the Host Computer address you need to use in such a case and whether it's possible at all.

-- Albrecht

PE1PUP
Feb 2nd, 2012, 05:01 AM
Hello Alex,

Thanks for your feedback that it should be possible what I try to do. Your comment enabled me to search deeper, and that way I found that my specific VMware image running XP inside was generated with an older VMware tool. This caused the image to only have USB 1.1 virtual ports connected to my real hardware USB 2.0 ports. The way to solve this is to migrate my VMware image of XP with the newest VMware tools to the latest version. In that latest version it's possible to determine the USB versions which will be emulated; so USB 2.0 can be selected for use inside the Virtual Machine. However, if it really would work has to be checked, because to the speed warnings Albrecht added... ;-)

Best regards from the Netherlands, Johan.

PE1PUP
Feb 2nd, 2012, 05:22 AM
Hello Albrecht,

Thanks for your feedback. Good to know for sure that USB 1.1 can't work.
It a clever step to add the "discouragement" to use VM's in the DAS 4.0 release notes. Using Virtualisation is becoming ever more popular, so any guidance is helpfull.

And your suggestion to start UDAS in the regular OS on my host and start DAS Device Scanner within a Virtual Machine and use a socket connection to the UDAS on my host is a very clever one...!!!
I tried it, and I can indeed make a logical connection that way. I just have to enter the IP address of my host into the proper Host Computer line in the DAS Device Scanner. (Where by default "localhost" can be found) And indeed I can see the UDAS running with the same PID as the UDAS I started in my host OS. So that looks very promising.
However, I did not manage to use such a socket connection for FLOADing from within my VM to my host where the XC836 is connected to the USB 2.0 port, but I will try that a bit more, just out of own personal interest.....

Best regards, Johan.

kamikaze
Feb 2nd, 2012, 07:16 AM
I was thinking about running DAS in VirtualBox on a FreeBSD Host, exactly for the reason that I cannot run DAS on FreeBSD.

Too bad that won't work. Or is anyone working on a DAS version for FreeBSD?

kamikaze
Feb 4th, 2012, 07:27 AM
I can offer you a little success story here.

VirtualBox OSE on a FreeBSD 9/amd64 Host
Windows 7/i386 VM

Installed into the VM:
DAS 3.3.1
XC800 Fload 5.3.4

Hardware passed through from host:
XC800 Starter Kit

The following things work:
Fload: erase, flash, verify
MCD Basic Client: run, stop, step, reset

VirtualBox OSE only supports USB 1.0, but the throughput is not limited to USB 1 speed, as far as I know.
Next week I will test it with a DAP miniWiggler (I don't have the 16pin cable at home).

hsiva
Dec 5th, 2012, 06:46 AM
Does anyone have DAS v3.3.1 setup files that you can send to me? If so, please email to harish.siva@gmail.com.

I am having issues with DAS 4.0.5 and FLOAD v5.3. When I try to connect to the micro, I get a message stating 'UDAS/JTAG server cannot be found'.
I would like to try DAS v3.3.1 just to see if I have similar issues...

Thank you very much.

kamikaze
Feb 19th, 2013, 04:03 PM
Use the latest FLOAD, 5.4:
http://www.infineon.com/cms/en/product/channel.html?channel=db3a304319c6f18c011a0b5492343 1e5