Wow, that was fast! The SourceForge USBDM project has added support for MCU10.4 (see as well this post) in release 4.10.5 available here, announced in the Freescale Forum.
Installation is easy (uninstall a earlier version might be necessary). As for 10.4, make sure you browse to your installation folder (it was not able to find my 10.4 installed version in the default C:\Freescale\CW MCU v10.4\ path:
Then make sure you launch Eclipse with the -clean option (or from the shortcut installed) after installation:
However, although the USBDM device was properly showing up in the device manager, and as well in the debugger settings, I was not able to connect:
From the connection settings everything was looking ok:
Still, I had errors:
Starting 3rd party flash programming... DiMemoryDownload() - DI_DNLD_TERMINATE - Programming memory image... =========================================================== Programming target Device = 'MKL25Z128M4' Trim, F=0, NVA@0000, clock@0000 Ram[1FFFF000...20002FFF] Erase=EraseAll Security=unsecured Total bytes=892 doRamWrites=T DiMemoryDownload() - DI_DNLD_TERMINATE - Programming complete, rc = 7 GDI: => DI_ERR_FATAL DiErrorGetMessage() => Failed to write to target GDI: Failed to write to target
New USBDM Firmware
Reading the release notes, it tells that the OpenSDA USBDM supports USB CDC (similar to the P&E OpenSDA CDC), so I thought that there must be a new USBDM firmware. And I found it here:
C:\Program Files (x86)\pgo\USBDM 4.10.5\FlashImages\MKxx\USBDM_OpenSDA.sx
Programmed the board with the new firmware. However, this did not not help :-(.
Uninstalling and Re-installing USBDM Device Drivers
Next thing to try was to uninstall the USBDM Drivers, as I would have expected that a USB CDC device would enumerate as virtual COM port. Obviously this would need new device drivers. So I uninstalled the existing drivers and installed the new ones. And indeed: now USBDM shows up as a composite (multi-role) device:
And it enumerates sucessfully as an USBDM Serial Port:
Good news: with this I should have USB CDC support as with the original P&E OpenSDA. Bad news: I’m still not able to connect to my board 😦
I uninstalled the USBDM drivers, installed a clean CodeWarrior for MCU10.4, re-installed USBDM and all the drivers. But still: not able to connect to my board.
Puzzled with that, I re-installed the original P&E USBDM firmware, and I was able to connect to the board. Then flashed again the USBDM firmware, tried with USBDM, and: it worked! 🙂
I’m really not sure what the problem is/was. All what I can say is that I was working with low power modes on that board, and it could be that the microprocessor was in a low power (stop, I think) mode, and somehow OSBDM failed to connect to it. I have made so many desperate changes, that I’m not sure any more what was originally on the board. But at least I was able to connect to it with the original OpenSDA.
Summary
USBDM supports new CodeWarrior for MCU10.4. The wizard integration works out of the box, and even a problem I have seen with the earlier 4.10.4 version disappears with the new version. USBDM has added USB CDC support which is a great thing. Until I’m able to reproduce my (potential low power mode) problem, I recommend to use the original OpenSDA firmware in case connecting to the board does not work. Other than that: USBDM works very well for me.
Happy Debugging 🙂
Pingback: Adding USBDM to CodeWarrior for MCU10.4 | MCU on Eclipse
I have a freedom board that I use to program my own board with the the KL25 processor on it. I have on occasion put code in that will not allow me to connect to the device and I came across the trick that if you hold down reset on target board then try and connect them release the reset before it times out I am able to recover and connect to my devices.
LikeLike
Hi Rex,
yes, I have tried that. But unfortunately it did not work. I have tried to keep the reset down different times, but maybe I was not lucky, or my case is special in some way.
Thanks for your help!
LikeLike
Pingback: CMSIS-DAP with IAR and the KL25Z Freedom Board | MCU on Eclipse
Thanks!
Now I can use Freemaster with the Freedom!!
Freemaster is a great tool but has no OpenSDA drivers, the only way to use it with the Freedom in the past was through the CDC and this way was not very efficient. Now I can use it through USBDM and works great!
It’s a shame that give so little attention to this tool, I do not see progress in their development 😦
LikeLike
Hi Carlos,
are you using the USBDM CDC with FreeMaster?
LikeLike
No. What I meant is that before I had to use Freemaster through a communication port CDC and now I can do it by directly accessing memory through USBDM because the Freemaster not have the drivers for the OpenSDA of PEMicro. (My English is not as good as I would like so sorry if I confused you).
LikeLike
Hi Carlos,
ah, ok. Now it is clear. Thanks for the clarification.
LikeLike
Pingback: Bricking and Recovering FRDM-KL25Z Boards: Reset, SWD Clock and Low Power | MCU on Eclipse
Hi Erich:
Does USBDM apply to FRDM-KL25Z only? I was trying to use USBDM on FRDM-KL02Z, it is possible to identify KL02Z device, but CodeWarrior got stuck during firmware downloading.
Not sure whether this is my environmental problem or it is compatibility issue for USBDM.
Thanks a lot.
LikeLike
Hi Joey,
I do not have a FRDM-KL02Z, but I can say it works for me for the FRDM-KL25Z, FRDM-K20D50M and the FRDM-K05Z.
LikeLike
Hi Erich:
Mmm, just made a try on FRDM-KL05, USBDM works well.
It seems FRDM-KL02 is not supported by USBDM.
LikeLike
Hi Joe,
maybe post your question on the Freescale forum to ‘pgo’, see freescale community thread/307079
LikeLike
Pingback: DIY Free Toolchain for Kinetis: Part 3 – Debugger (GDB Server with P&E and Segger) | MCU on Eclipse
Pingback: The Freescale OpenSDA Trap: “No Device Available”, or something like that…. | MCU on Eclipse