Adding USBDM to CodeWarrior for MCU10.4

If you are following my recent posts, then you know I started using USBDM on OpenSDA as an alternative run control solution. Now with the advent of MCU10.4, the question is: how to use USBDM with it, because the USBDM installer obviously only knows the version up to MCU10.3?

USBDM 4.10.4a Installer

USBDM 4.10.4a Installer

💡 Update: There is an updated USBDM 4.10.5 available which has built-in support for MCU10.4. See this post.

Multiple Installations

I have USBDM installed for MCU10.3. MCU10.4 is installed on my machine in parallel, into a different folder:

C:\Freescale\CW MCU v10.4

💡 If you have only V10.4 installed, it is probably possible just to tell the USBDM installer to use the V10.4 installation folder as V10.3. Although I have not tried this, I think this could work too. But this does not help if you want to have multiple versions installed.

What I want is to have USBDM installed for V10.3, and in parallel for V10.4 too, as I want to keep both versions in parallel for a while.

❗ I’m using the OpenSDA USBDM version, but I hope the same thing applies to the other USBDM hardware too.

The USBDM installer only allows to have one installation for each version, so the steps here allow you to have multiple versions of CodeWarrior installed, and to add USBDM to each installations.

What I need to do is the following:

  1. Having a USBDM installation with CodeWarrior for MCU10.3 so I can copy the needed files from it.
  2. Copy the USBDM Java Connection plugin into eclipse\plugins
  3. Copy the USBDM GDI DLL’s files into MCU\bin\plugins\support\ARM\gdi
  4. Optional: Patch the ‘New Project’ wizard to show USBDM as connection

❗ As of today, I was not able to get step 4 (New Project wizard patch) workign properly. I have marked the text like this, and plan to updated it as soon as I get it working.

USBDM Base Installation

First, I recommend to install the USBDM for one of the supported CodeWarrior (e.g. MCU10.3). See this post. This ensures that everything is installed, including the USB drivers.

USBDM Java Connection Plugin

USBDM is using a Java plugin for the debugger connection settings, so it shows up as ‘USBDM ARM Interface’:

USBDM ARM Interface

USBDM ARM Interface

I need to copy this plugin. It has been installed by the USBDM installer inside my MCU10.3 as


So I need to copy that folder from my MCU10.3 and copy it into eclipse\plugins of MCU10.4:

USBDM Connection Plugin

USBDM Connection Plugin

GDI Driver Files

CodeWarrior and USBDM is using the GDI protocol. I need to copy the USBDM files into my MCU10.4 installation. The files are on my machine in

C:\Program Files (x86)\pgo\USBDM 4.10.4

I select the *.dll files and copy them:



Then I copy/paste them into the CodeWarrior Debugger GDI folder:

C:\Freescale\CW MCU v10.4\MCU\bin\plugins\support\ARM\gdi

There is only one problem: I see that my MCU10.3 has two more DLL files present:

  • usbdm-arm-gdi.dll
  • usbdm-arm-gdi-debug.dll
GDI DLL Files from MCU10.3

GDI DLL Files from MCU10.3

So I copy the above two files from the same folder inside MCU10.3.

❓ If anyone knows where else I can get these files, that would be a good tip. Please post a comment.

The same procedure would apply to MCU\bin\plugins\support\ColdFire\gdi GDI files too. Best if you refer to the files installed by USBDM in MCU10.3.

Wizard Patch for New Project Wizard

❗ ❗ ❗ IMPORTANT NOTE: The XML wizard patch from USBM 4.10.4 should work for MCU10.4, but there are likely some files which I’m missing, so the wizard will not create a proejct. I is recommended to use the updated USBDM 4.10.5 which supports MCU10.4 out of the box. ❗ ❗ ❗

The USBDM installer has created shortcuts to patch the CodeWarrior ‘New Project’ wizard:

USBDM Shortcuts to patch CodeWarrior Wizard

USBDM Shortcuts to patch CodeWarrior Wizard

For MCU10.4, we need to run a similar patch as for MCU10.4. For this I copy the patch shortcut command line and adopt it to use MCU10.4. Change the path to your MCU10.4 installation folder (mine is “C:\Freescale\CW MCU10.4”).

"C:\Program Files (x86)\pgo\USBDM 4.10.4\mergeXml.exe" -p "C:\Freescale\CW MCU v10.4\eclipse\plugins\com.freescale.mcu.projectwizard_1.*.*.*\\" "plugin.xml" "C:\Program Files (x86)\pgo\USBDM 4.10.4\WizardPatches\PatchNewWizardPlugin_3.xml"

I run that command from a DOS shell/command prompt, with CodeWarrior Eclipse closed (not running):

Running Wizard Patch File

Running Wizard Patch File

This patches the wizard XML files to include USBDM as a connection option. Note that the patch script has created a backup file of the wizard XML file (in case I need to go back to the original version).

Run  this for the other wizard as needed. See the other wizard shortcuts e.g. for MQX.

Running ‘Clean’

Next, I need to run CodeWarrior Eclipse with the -clean option so the plugins and XML files get properly updated:

Running CodeWarrior Eclipse -clean option

Running CodeWarrior Eclipse -clean option

💡 Using the -clean option tells Eclipse to re-read its plugins and configuration files. This -clean run only needs to be done in case of Eclipse issues, or as in our case if we changed the configuration.

Now if I create a new project, the USBDM shows up as an extra connection option in MCU10.4:

USBDM Connection in MCU10.4 New Project Wizard

USBDM Connection in MCU10.4 New Project Wizard

Changing Connection to USBDM

I can change an existing P&E OpenSDA connection to use USBDM. For this I press ‘Edit’ in the Launch/Run configuration:

Edit in Launch Configuration

Edit in Launch Configuration

Then I select the ‘USBDM ARM Interface’:

Selecting USBDM ARM Connection

Selecting USBDM ARM Connection

Now I have USBDM selected which I can use for debugging:



And debugging worked 🙂


Although the USBDM installer does not support the new MCU10.4 release, it is possible to patch it. With above steps, I was able to use USBDM on OpenSDA with my Freedom FRDM-KL25Z board. Only the wizard XML patch file did not work. But this is not a big problem, as I can create a project for P&E OpenSDA and then change it to USBDM in the connection settings.

Note: USBDM worked perfectly for normal ‘run’ mode applications. I’m working on low power (STOP mode) applications, and faced a problem that USBDM was not able to connect to a KL25Z in STOP mode. The original P&E OpenSDA was able to recover it. So I recommend to have the original P&E OpenSDA or better a P&E Multilink or Segger J-Link at hand for such situations.

Happy USBDMing 🙂


5 thoughts on “Adding USBDM to CodeWarrior for MCU10.4

  1. Pingback: USBDM 4.10.5 supports now MCU10.4 | MCU on Eclipse

What do you think?

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s