CW5.2 is not supporting USBDM for S12GA48

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

CW5.2 is not supporting USBDM for S12GA48

Jump to solution
7,266 Views
nkgavali1
Contributor II

Hello pgo,

I am posting a new question here as per your suggestion.

I am trying to connect my S12GA48 board with CW5.2 on Win10. I am using latest USBDM drivers from sourceforge site.

I am using USBDM based on JM60xx design. I can program my S12GA48 on my older Win7 board. I am following to patch CW5.2 missing variants as given below thread,

https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/How-to-Add-missing-derivatives-to-CodeWarrio...

I can detect the S12GA48  with HCS programmer app in USBDM. So, no issues of USBDM detection and programming issue.

But, when I am trying to create the project in CW5.2, I am not able see the USBDM in connection window as shown in attached image.

Your help is appreciated. We have already purchased 100 S12GA48 CPUs.

Gavali N. K. 

Tags (1)
0 Kudos
Reply
1 Solution
7,253 Views
pgo
Senior Contributor V

Hi,

I'm not familiar with the process you have linked to.

The following may be useful but given the above I am unsure.

The USBDM installer modifies the files within the C:\Program Files (x86)\Freescale\CWS12v5.2\bin\Plugins\Support\HC12Wizard\XML to add the USBDM target.  If the original XML file is not present when installing the software it will not be modified.

So .. You can check the following:

  1. Is the expected XML file for the target you are using present in the above directory e.g xxx.xml?
  2. If so, has it been updated by the USBDM installer.  You can check this by the presence of the xxx.xml.original file.
  3. If the first file is present but not the backup then you need to uninstall and re-install USBDM for it to upgrade the file.

I will have a play with this in a while.

I note that the S12GA48 was added to CWS12v5.1 by a fix-pack. 

https://www.nxp.com/docs/en/supporting-information/CW12_5-1_INST-INSTR-S12G-RMF.pdf

Can you use this version?

PS. There is no device entry for MC9S12GA48 in the USBDM software.  Are you using MCS12GA240 to test the stand-alone programmer?

bye

View solution in original post

7 Replies
7,254 Views
pgo
Senior Contributor V

Hi,

I'm not familiar with the process you have linked to.

The following may be useful but given the above I am unsure.

The USBDM installer modifies the files within the C:\Program Files (x86)\Freescale\CWS12v5.2\bin\Plugins\Support\HC12Wizard\XML to add the USBDM target.  If the original XML file is not present when installing the software it will not be modified.

So .. You can check the following:

  1. Is the expected XML file for the target you are using present in the above directory e.g xxx.xml?
  2. If so, has it been updated by the USBDM installer.  You can check this by the presence of the xxx.xml.original file.
  3. If the first file is present but not the backup then you need to uninstall and re-install USBDM for it to upgrade the file.

I will have a play with this in a while.

I note that the S12GA48 was added to CWS12v5.1 by a fix-pack. 

https://www.nxp.com/docs/en/supporting-information/CW12_5-1_INST-INSTR-S12G-RMF.pdf

Can you use this version?

PS. There is no device entry for MC9S12GA48 in the USBDM software.  Are you using MCS12GA240 to test the stand-alone programmer?

bye

7,247 Views
nkgavali1
Contributor II

Hello pgo,

The suggested xml file was already present in the directory.

I just uninstalled the USBDM and re-installed it.

Now it is working Win10 as well.

Thanks for quick suggestion. Great.

N. K. Gavali

0 Kudos
Reply
7,241 Views
nkgavali1
Contributor II

Hello pgo,

 I am now facing weird problem.

When I am trying to connect USBDM through CW5.2 IDE, then the debugger is not detected. Even if I tried to detect USBDM by pressing "DETECT" button. The problem is shown as the attached fig.

I can see that there is communication happening with debugger through IDE. The LED on USBDM (JM60xx board) not blinking.

if I have run the HIWAVE.exe utility separately, then USDBM can be detected correctly and I can connect to target.

Also, the USBDM can be detected in HCS12 programmer app and I can program the target.

The most surprising thing is, this problem is not facing on my home laptop with Win10. But, the problem can be seen in office laptop. The driver and USBDM version are same at both laptops.

I need to run the programming on office laptop for the code development.

Appreciated for help. 

Thanks and Regards,

N. K. Gavali

0 Kudos
Reply
7,227 Views
pgo
Senior Contributor V

Hi,

I'm equally surprised by your results, especially that you get different results when you run HIWAVE.exe stand-alone.  I cannot think why you would get different results when HIWAVE.exe is launched from the main application.

Can you do the following to produce log files:

In the directory C:\Program Files (x86)\Freescale\CWS12v5.2\Prog\gdi

  1. Rename usbdm.dll to usbdm.dll.save
  2. Copy usbdm-debug.dll to usbdm.dll
  3. Try connecting as usual
  4. Post the log files from %APPDATA%\usbdm\   (usbdm.log and tbdml.log)
  5. Try connecting using HIWAVE.exe stand-alone
  6. Post the new log files from %APPDATA%\usbdm\   (usbdm.log and tbdml.log)

Arbitrary things to try:

  1. Delete the file TBDML_Config.cfg to make sure there are no strange settings causing problems (unlikely).
  2. Compare the files in the gdi directory to those in C:\Program Files\pgo\USBDM 4.12.1.295\i386-win-gnu.  They should be identical.
  3. Try a USB2 port or put a USB2 hub in between.  This is to avoid any USB3 problems.  I can't see how this would explain the two different results you obtained!
  • What is the exact version of the BDM hardware you are using and the BDM firmware version (from bottom left of HCS12 programmer Interface tab).

For you own information the first few lines of the usbdm.log file will show the devices detected.

I have done some testing with a JS16 BDM - I will have to find a JM60 version for further tests.

bye

 

 

0 Kudos
Reply
7,223 Views
nkgavali1
Contributor II

Hello pgo,

Thanks for the quick reply.

>>>>Can you do the following to produce log files:

>>>>>In the directory C:\Program Files (x86)\Freescale\CWS12v5.2\Prog\gdi

The USBDM and TBDML log files with standalone HIWAVE and with CW52 debugging are attached here.

  • >>>> Delete the file TBDML_Config.cfg to make sure there are no strange settings causing problems (unlikely).

I have deleted TBDML_Config.cfg file from the location. But no change.

  • >>>>>>Compare the files in the gdi directory to those in C:\Program Files\pgo\USBDM 4.12.1.295\i386-win-gnu.  They should be identical.

Both folders are not identical. i386-win-gnu folder has more files than gdi folder. 

  • >>>>>Try a USB2 port or put a USB2 hub in between.  This is to avoid any USB3 problems.  I can't see how this would explain the two different results you obtained!

Already tested with USB hub and still the same problem.

  • >>>>>>What is the exact version of the BDM hardware you are using and the BDM firmware version (from bottom left of HCS12 programmer Interface tab).

Serial# = USBDM-JMxx-0001
Hardware Version = USBDM - (JMxxCLD)
Software Version = 4.12
Flash Start = 0xC000
Protect Address = 0xFC00
Code Start Address = 0xC000
Code End Address = 0xFFFF
UserDetectICP() = 0xEE07

 

Thanks

N. K. Gavali

0 Kudos
Reply
7,219 Views
pgo
Senior Contributor V

HI,

Thanks for the logs.

Sorry, I did not mean to imply that all the files would be present in GDI - merely that the ones there should be identical to the ones in the USBDM installation location i386-win-gnu.

The log doesn't really tell me much.

The process is failing very early on when the DLL tries to initialise libusb:

/* 0.07 */ USBDM_ErrorCode bdm_usb_init(): libusb_init() Failed, rc=-12, LIBUSB_ERROR_NOT_SUPPORTED

This doesn't occur for the stand-alone run.

libusb_init() doesn't even require the USBDM driver to be installed.

There are a few things about your logs that puzzle me but I have no idea what it means.

  1. The standalone log has repeated DLL_THREAD_ATTACH messages.  These are done when a thread attaches to an already loaded DLL.  These are absent from the CW52 version.  I don't know why.  I have attached a log from my machine (This is actually a Windows VM running under Linux but that should not affect the results).  My log HAS the DLL_THREAD_ATTACH messages!
  2. The USBDM software has been installed to C:\Program Files (x86) rather than C:\Program Files\ which is expected for a 64-bit application.

Things to try/check:

  1. Was the work installation done by you?
  2. Is there something different about your work machine - is it managed by the company with different user privileges?  Is it a different language?
  3. Can you compare the windows version information for your two machines. See https://support.microsoft.com/en-us/windows/which-version-of-windows-operating-system-am-i-running-6...
  4. Can you try running CW with extended privileges (Right-click -> run as Administrator)?

 

I will think about this a bit more but since I can't reproduce the problem its a bit hard to investigate.

 

bye

 

 

 

 

0 Kudos
Reply
7,215 Views
nkgavali1
Contributor II

Ok. followed your suggestion.

Running IDE.exe in administrator mode solve the issue.

Bravo!!!!....Thank pgo for fantastic help.

Happy Weekend.

N. K. Gavali

0 Kudos
Reply