Hi pgo,
I have downloaded and installed the new version 4.10.6.170 and I am still getting the same error messages.
I have also downloaded the release version of KDS and the same error message occurs when I try to use the USBDM debugger in this one too.
Regards
Ian
Hi Ian,
can you debug now using USBDM hardware in KDS? I'd like to do so but until now I'm able.
If you get your problem solved, please let me know how did you make it.
Thanks.
Frederico
Hi Ian,
This looks like it can't find one of the plugins - probably because it failed to load or was the wrong version.
Can I find check the following:
Also please check the following:
bye
I am running version 4.10.6.160 of the USBDM software. The error occurs when I try to create the Debug Launch configuration.
I did start off with an earlier version of USBDM that did not automatically detect the KDS installation so I used the configuration within the installer to install the plug ins into KDS1.0.1 etc. I have checked the contents of the dropins folder and all the files are date stamped 31/05/2014 which is the same as most of the files in my current pgo installation directory so it does not look as though anything has been left behind in here. I had an arm_devices.xml file left over from 4.10.6.140 in its own directory but that is the only file that I had modified. I have now deleted this file and the same error occurs.
For the plugins I have all the same file names as you on your list but the version numbers for everything is 4.10.6.201405311721 with the exception of USBDM Peripheral View which has the version number 1.0.0.201405311721.
I have had it working but recently for developing a multi processor system I have moved the USBDM device to a USB port on a hub rather than having it connected to my default debug port on my computer. The other device is debugging over J-Link. On the computer the USBDM device appears as a USB Composite device. On the hub the same device appears as a USBDM HCS08,HCS12,CFV1,ARM_SWD_BDM (I am debugging an ARM device over SWD). If I plug it into the computer USB port or the hub it still does not work within KDS.
If I connect the device to the PC USB port I can still use the ARM Programmer utility to program the micro controller, this does not work on the hub where it can not find a BDM device.
Hi Ian,
I'm a bit unclear about your description above. Does the plugin work with KDS if the BDM is plugged directly into the machine?
Anyway, I suspect there is a problem with loading one of the plugins (net.sourceforge.usbdm.constants). This handles paths to USBDM amongst other things.
Could I get you do do the following:
Thanks
bye
Hi pgo,
Sorry about the confusion. The plug is is not working within KDS where ever I plug the BDM in.
I have followed the instructions that you gave. On restarting KDS there was not any messages relating to USBDM in the log. When I try to connect to the debugger two new errors occur -
Problems occurred when invoking code from plug-in: "org.eclipse.jface". in plug in org.eclise.jface.
An error occurred while automatically activating bundle net.sourceforge.usbdm.contstants (464) in plugin org.eclispe.osgi
I have attached the full (or as much as I can get) error reports
Hi Ian,
The second exception looks more hopeful for a clue.
It appears that one of the plugins is throwing an exception when loading. Probably processing the USBDM paths but there isn't enough information to be sure.
I should have asked you to post the .metadata\.log file from the workspace you are using as this contains the entire log.
Would you please repeat clearing the log and triggering the exceptions?
Clearing the log first will reduce the "clutter" in the .log file.
I have installed USBDM 4.10.6.160 from sourceforge on another machine but it also appears to work OK with KDS.
Do you have any regular eclipse installations with USBDM installed. If so, are there any problems with them?
One last thing to check:
Thanks
Hi pgo,
I tried going diown the uninstall route and that has not resolved the problems.
I uninstalled the KDS installation. Checked for any files / folders left behind and removed these.
I uninstalled the USBDM installation. Checked for any files / folders left behind and removed these.
Reinstalled KDS using the full installation. Opened KDS and checked for any updates - nothing to get.
Reinstalled USBDM from USBDM_4_10_6_160_Win.msi.
I still get the same errors when I try to connect via the KDS. I do not know what else I can try now.
regards
Ian
Hi Ian,
I'm sorry I've been unavailable for a little while.
The trace you posted indicates that the plugin is failing to load the the JNI (Java Native Interface) code and the associated DLL usbdm.4.dll.
I can't reproduce this on the machines I tried but it may be due to OS related problem.
Could you post details about the Operating System you are using and I will try to do some more specific testing.
Thanks
Hi pgo
Sorry for adding a "me too" post, but I've hit this same plugin JNI issue on Windows 7 x64. It's been working reliably for weeks, but today it refuses to cooperate! I guess it's probably something changed on my machine in the time I haven't been using KDS, but even clean reinstalls of KDS/USBDM don't fix it for me.
If I launch the USBDM ARM programmer from the start menu, it will happily detect the device, so it really just seems to be the JNI part of the eclipse plug in which is failing.
Any pointers on how I can start tracking things down or tools which may help please - I'm running out of places to look :-)
Further background, in case it sparks any ideas:
It may be a coincidence, but I recently did an upgrade JetBrains WebStorm (v8 to v9). I'd hope WebStorm and KDS wouldn't fight each other, but perhaps there is one global eclipse setting somewhere that I can't find - I tried checking the registry and env variables, but nothing obvious leapt out waving a big red flag.
In desperation I've now uninstalled WebStorm 9 entirely then reinstalled only KDS (1.1.1), USBDM (4.10.6.230) and drivers (1.3.0 Win x64). But alas the error is still there when I go to the USBDM menu > Configure
Thanks,
Rich.
So, I've managed to get this working again, but without really understanding what has gone wrong with the plugin system. Documenting as best I can here in case it helps future visitors.
The underlying error, reported by Windows, is actually no entry point found in usbdm.4.dll on the path: C:\Freescale\KDS_1.1.1\eclipse\configuration\org.eclipse.osgi\bundles\451\1\.cp\usbdm4.dll
At this point, there are only 3 dlls in the directory libgcc_s_dw2-1.dll, libstdc++-6.dll and usbdm.4.dll. I assume they are getting unpacked from net.sourceforge.usbdm.jni_4.10.6.201412010002.jar
However the dll sizes are smaller than the equivalent dlls in C:\Program Files (x86)\pgo\USBDM 4.10.6.230\ which is what I installed.
So, my work around was to copy the larger usbdm.4.dll over the top. This fixes the JNI issue when trying to open the USBDM > Configure menu. I can't guarantee it's the 'correct' workaround, but it's got me able to debug again :-)
Hi Richard,
I'm glad you found a work-around.
I will check the two DLLs and see if I can reconcile the differences.
In general I have found the JNI stuff a bit fragile so I don't usually change anything unless there is a reason. Because of this it is not surprising that the DLLs may be different builds i.e. updated in the main files but not in the plugin.
It is strange that the same plugin works with Codewarrior.
Can I check a few things:
bye
Thanks for -initialize suggestion. I won't run it now as I have a working system, but good to know for the future.
Yes, my usbdm installation is under the Program Files (x86).
Edit: You may have been asking about KDS? This is installed to c:\Freescale\KDS_1.1.1\...
I still don't understand how it worked for a few weeks before failing and which dll it was using during that time. Maybe KDS hiccuped and reinitialised, or windows update changed the behaviour of loading dlls or security settings. For future reference I should mention that I'm using Win 7 SP1 x64, patched with Jan 2015's updates.
DLL mismatch is the issue!.
Situation is KDS2.0.0 and USBDM4.10.6.250! Initally I was also getting error trying to reach any menu concerning USBD.
I've checked the 'bundles' directory e.g. "Freescale\KDS_1.1.1\eclipse\configuration\org.eclipse.osgi\bundles\xxxx" - and the *.dll in plugin directory were
different size (usbdm4.dll was different version also, seen from properties)!!!!
I just copied all DLLs from the instalation directory in Program Files .... and voila! error disappeared, now all menus are accesible without error and debuging the target is also working.
Jeff, Good to know that combination KDS 2.0.0 and USBDM4.10.6.250 works. One of my many attempted installs yesterday was KDS2.0.0 + USBDM 10.6.230, but gdb server didn't launch for me so I settled for a combination that worked from me in the past (1.1.1 and 4.6.10.230).
Could I ask how you have configured the directory paths for the plugin? as I think that's probably what I had wrong in 2.0.0.
Thanks.
Hi Richard & Jeff,
The DLLs are different of course but I still can't understand why this would result in problems.
The eclipse plugin doesn't use the extra entry points and (of course) it works on the machines I tried.
The same plugin is used with Codewarrior and has been reported to work on the same machine as KDS fails so I'm thoroughly confused.
Any way I will update the plugin to be consistent and also add the refresh options to the installation process in case that is contributing (V4.10.6.250a).
Could I ask one of you to try one more test to confirm that the DLL build is the problem?
Thanks
Extracted: usbdm.4.dll from net.sourceforge.usbdm.jni_4.10.6.210412010002.jar
it is 163,840 bytes, version 4.10.5.0 and copied it into my KDS 'bundles'
Yes, it stops working immediately. Here is the debug trace from an attached Visual Studio debugger:
The thread 'Win32 Thread' (0xfac) has exited with code 0 (0x0).
'kinetis-design-studio.exe': Loaded 'C:\Freescale\KDS_1.1.1\eclipse\configuration\org.eclipse.osgi\bundles\450\1\.cp\libgcc_s_dw2-1.dll', Binary was not built with debug information.
'kinetis-design-studio.exe': Loaded 'C:\Freescale\KDS_1.1.1\eclipse\configuration\org.eclipse.osgi\bundles\450\1\.cp\libstdc++-6.dll', Binary was not built with debug information.
'kinetis-design-studio.exe': Loaded 'C:\Freescale\KDS_1.1.1\eclipse\configuration\org.eclipse.osgi\bundles\450\1\.cp\usbdm.4.dll', Binary was not built with debug information.
First-chance exception at 0x77911d82 in kinetis-design-studio.exe: 0xC0000139: Entry Point Not Found.
'kinetis-design-studio.exe': Unloaded 'C:\Freescale\KDS_1.1.1\eclipse\configuration\org.eclipse.osgi\bundles\450\1\.cp\usbdm.4.dll'
The thread 'Win32 Thread' (0x508) has exited with code 0 (0x0).
And recopying in the 4.10.6.230 (164,864 bytes) makes it work again. (I have only been replacing that single DLL, Jeff seems to have replaced all 3 or 4 dlls)
Could it be that the smaller dll depends on some other runtime lib which is not (or no longer) on our systems? Just a wild guess really!
Hi Richard,
Thanks for the quick feedback!
I did use a dependency checker on the original and larger DLL and they both appear to have the same dependency tree below.
Anyway it must be some subtle problem (or at least too subtle for me!). I have been caught before with the system picking up a DLL from somewhere else on my machine and hiding a problem like this so I suspect it is something like this.
Thanks again for taking the time to troubleshoot this.
I will upload an updated build tonight and I hope it will solve this.
bye
Hi pgo,
I'm in a position to test a fresh install of the eclipse plugin this week, is it USBDM_4_10_6_250a_Win.msi that includes your fixes to the JNI Dll version?
Thanks.
Hi Richard,
Yes the 250a version installer runs eclipse/KDS with the "-initialize" option and also includes the "fixed" (I hope) plugins.
I would appreciate you testing this.
I will be getting a new computer in the near future and I will do some similar tests.
Thanks.