USBDM - Version 4.9 (JS16/JMxx Hardware Versions)

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

USBDM - Version 4.9 (JS16/JMxx Hardware Versions)

45,176 Views
pgo
Senior Contributor V

Dear All,

 

USBDM has been updated to V4.9. 

 

Please post any queries on this version in this thread,

 

Information available at: SourceForge

 

bye

 

Note

  • Please note that these design are different from the Freescale OSBDM-JM60 design which was proceeding independently while I was doing the above designs.

 

BDM History

  • V4.9 (February 2012) -
    • Extensive changes to HCS12 programmer
    • Added programming algorithms for several HCS12 devices (HY,HA,XE,XS).
    • Autoselection of firmware image for update.
    • Tested with Codewarrior 10.2
  • V4.8 (December 2011) -
    • General update of how the programming algorithms are controlled.
      They are much more configurable by the external XML and TCL files. This allows for some customisation of the memory map on HCS12 devices or custom startup operations.
    • Added Coldfire+ devices & algorithms.
    • Erase options extended (on some targets).
    • Re-testing of all devices (see programmer help file) with complete memory images including paging were used.
    • Bug fixes on HCS08 programming. Unsure were these were introduced but (hopefully) now squashed.
    • Paging of Flash and EEPROM has been updated for HCS12 and HCS08 devices.
    • The memory image descriptions are now more detailed and are more carefully enforced when programming. Attempting to program non-existent memory is now reported before programming is attempted. This should result in more meaningful error messages.
    • msi install updated for Codewarrior 10.2
    • Testing with Codewarrior 10.2 Beta
  • V4.7 (October 2011) -
    • Improved support for devices in low power modes (Eclipse).
    • Improved support for secured devices (Eclipse).
    • BDM interface speed control implemented for CFVx devices
    • Windows Installer
    • Updates for Eclipse Kinetis device name changes
    • BDM firmware (including bootloader) will now auto-detect 4, 8 or 12 MHz crystals. (JS16/JMxx)
    • Added progress dialogues for programmers.
    • Programmer erase options are more consistent.
    • Bug fixes
      • Devices incorrectly identified as secured
      • Failure to connect to device in low power modes
      • Corrections to CFVx connection sequences
      • Corrections to USB CDC Driver installation
      • Bootloader reliability improved
      • Corrections to USB CDC driver installation file.
  • V4.6 (June 2011) -
    • Support for Kinetis Targets in Codewarrior V10.1 (Eclipse, USBDM/CF only)
    • Improvements to USB error checking (JMxx/JS16 only)
    • TCL scripting
  • V4.5 (February 2011) -
    • Support for Codesourcery Lite - Coldfire Vx
    • Support for Coldfire Flasher (CFFlasher) Coldfire V2,3,4 only
    • Support for Codewarrior Eclipse 10.1
    • Flash buffer is now dynamically sized in Flash programmers
    • Added fix for Legacy Codewarrior tools missing TBDML/OSBDM targets
Tags (2)
0 Kudos
Reply
102 Replies

6,151 Views
MartinKupec
Contributor II

pgo wrote:

Hi Martin,

 

No - not dropped just neglected.

 

I built the V4.8 on linux but couldn't get the eclipse plug-in to load for some reason.  I've been distracted since then.

 

I'll do the current version  and see if I can work out what the problem is.

 


Ok. Thank you a lot. If I can be of any help, let me know. I don't know much about eclipse and eclipse base codewarrior, but I can did some developement on linux platform.

0 Kudos
Reply

6,152 Views
MarkK
Contributor I

Hi,

 

Can you tell me if version 4.9 of USBDM will work with S9S12P32JOMQK processors?

 

Thank you,

Mark

0 Kudos
Reply

6,152 Views
pgo
Senior Contributor V

Dear Mark,

 

It has been tested with a S9S12P128J0MQK which is the same die I believe so it should.  I have not however tested it as I don't have that chip.

 

By tested I mean with the HCS12 programmer provided and as a TBDML device with Codewarrior 5.1.

 

It would work with codewarrior in previous versions in any case I believe.

 

bye

0 Kudos
Reply

6,152 Views
MarkK
Contributor I

Hi,

 

I tried version 4.9 with a S9S12P128J0MQK chip, and got the following error message:

 

Programming of target flash failed!

Reason: Program data not within target flash memory

 

Can you give me any idea what might cause this?

 

Thank you,

Mark

0 Kudos
Reply

6,151 Views
pgo
Senior Contributor V

Dear Mark,

 

The programmer checks the S-record file against the description in the USBDM XML device files.  The error you are getting indicates that the programmer thinks the range you are trying to program is outside of the memory map for the Flash in the chip.

The device entry for the MC9S12P128 is as follows:

 

      <device family="HCS12" name="MC9S12P128">         <clock type="External" />         <memory type="ram">            <memoryRange end="0x3FFF" start="0x2800" />         </memory>         <memory registerAddress="0x0100" type="eeprom" sectorSize="256">            <memoryRange end="0x0013FF" start="0x000400" />         </memory>         <memory pageAddress="0x0015" registerAddress="0x0100" type="flash" securityAddress="0xFF00" sectorSize="512">            <securityInfoRef ref="HCS12-default-security-off" />            <securityInfoRef ref="HCS12-default-security-on" />            <memoryRange end=  "0x27FF" start=  "0x1400" />            <memoryRange end=  "0x7FFF" start=  "0x4000" />            <memoryRange end="0x00BFFF" start="0x008000" pageNo="0x0E" />            <memoryRange end="0x08BFFF" start="0x088000" />            <memoryRange end="0x09BFFF" start="0x098000" />            <memoryRange end="0x0ABFFF" start="0x0A8000" />            <memoryRange end="0x0BBFFF" start="0x0B8000" />            <memoryRange end="0x0CBFFF" start="0x0C8000" />            <memoryRange end="0x0DBFFF" start="0x0D8000" />            <memoryRange end="0x0EBFFF" start="0x0E8000" />            <memoryRange end="0x0FBFFF" start="0x0F8000" />            <memoryRange end=  "0xFFFF" start=  "0xC000" />         </memory>         <sdid value="0x3980" />         <flashScripts>            <tclScriptRef ref="HCS12-FTMRCK-flash-scripts" />         </flashScripts>         <flashProgramRef ref="HCS12-PMMC-FTMRCK-flash-program" />      </device>

 

This is for a paged memory map.

Could you compare your s-record file?  I might have made a mistake in the above or possibly the s-record file is using linear addresses which would require a different entry.

 

How are you producing the file?

If it's not confidential and not too large you could post a Zip and I will look at it.

 

bye

 

 

 

 

 

0 Kudos
Reply

6,151 Views
marco8
Contributor I

Hi PGO,

I am attaching the file that won't load into the 9s12P.  I have tried deleting the S0 record and also all the RAM address records which gets past the addr range error.  After that it seems to finish programming but is rejected when verifying.  I have tried all the different erase options.  The board is working and I can program it with another programmer but am trying to use the USBDM-1 board with ver 4.9.

Thanks for your help,

MarkK

0 Kudos
Reply

6,151 Views
pgo
Senior Contributor V

Dear mark

 

Yes I can confirm that it is a bug in USBDM.  The chip has a minimum program element of 8 bytes (a phrase). Your image has two disjoint regions with in the same phrase. This is triggering the bug.

 

I will fix this shortly!

 

If you are in a hurry you can modify your program to close the gap at 0xFFE9-0xFFEE but there may be other spots.

 

Sorry.

0 Kudos
Reply

6,152 Views
pgo
Senior Contributor V

Dear Mark,

 

This bug has been fixed in V4.9.2 uploaded to sourceforge.

 

Test at you convenience.

 

PS. You will still need to remove the reference to the RAM areas.

 

bye

0 Kudos
Reply

6,152 Views
marco8
Contributor I

Hello pgo,

   I downloaded the updated V4.9.2 to USBDM-1 and now  file loads and works great - THANKS!

Mark

0 Kudos
Reply

6,152 Views
MarkK
Contributor I

Hi PGO,

 

We would like to include the USBDM circuit on our circuit board, permanently connected to the S9S12P128 processor that runs the board.  If we do this, will we be able to install the USBDM's bootloader software and update the USBDM's firmware via the 6 pin USBDM connection that is common to the USBDM's MC9S08JS16 processor and the main S9S12P128 processor on the board?  Will attempting to do this cause a signal contention between the two processors?  If so, do you have any suggestions for programming the '08 chip in this configuration?

 

Thanks,

Mark

0 Kudos
Reply

6,152 Views
joncas
Contributor II

MarkK wrote:

Hi PGO,

 

We would like to include the USBDM circuit on our circuit board, permanently connected to the S9S12P128 processor that runs the board.  If we do this, will we be able to install the USBDM's bootloader software and update the USBDM's firmware via the 6 pin USBDM connection that is common to the USBDM's MC9S08JS16 processor and the main S9S12P128 processor on the board?  Will attempting to do this cause a signal contention between the two processors?  If so, do you have any suggestions for programming the '08 chip in this configuration?

 

Thanks,

Mark


Hello Mark,
The firmware upgrade utility functions via the USB port of the  '08 chip, not the 6-pin USBDM connector, but it asks for the target (the '12) to be disconnected during firmware upgrades, so maybe you could put a jumper to separate the BKGND line of the '12 chip during firmware upgrades?
In any case the 6-pin USBDM connector is "bdm-out" for the '08 chip (not at all connected to its own BKGND signal).
best regards,
Robert


0 Kudos
Reply

6,152 Views
MarkK
Contributor I

Hi Robert,

 

Thanks for your help and for your suggestions.  This helps clarify things.

 

Best regards,

Mark

0 Kudos
Reply

6,152 Views
pgo
Senior Contributor V

Dear Mark,

 

As Robert has indicated, you can initially program and update a JM16 based USBDM using just the USB connection.  There is no need for a BDM connection to the JS16 at all.  It might be advisable to bring out the BLMS (?) pin to a jumper so you can force the (freescale) ICP mode by grounding it. 

 

If you are using a JMxx chip or if you want  a BDM connection for the JS16 anyway then a 2 or 3-pin connector is all that is really needed (BGND, GND and optionally Vcc).  There is no need for reset and power can be supplied from the USB if needed.  This connector must be separate from the bdm connections to the 9s12P.

 

The USBDM dialogue that says "Remove the target..." is only a precaution and is only necessay for the RS08  version where there is a small possibility that the 12V supply might get turned on during the update (it shouldn't but the consequence might be nasty).

 

I would suggest that you use the JS16 version that has the serial port.  The serial port interface can be simplified to a few resistors on a dedicated board if at 3-volts or ommitted entirely if everything is running at 5V and the BDM is always powered when the target is.

 

bye

 

 

 

 

0 Kudos
Reply

6,152 Views
MarkK
Contributor I

Hi PGO,

 

Thank you for helping clarify the operation and programming of the JM/JS16 chip.  Just so that I'm clear, are you saying that there is no need to program the new JM/JS16 chip at all prior to installing it on the board, and that you can program the 4.9.2 code directly into the Chip via the USB connection without first programming it with a bootloader program to enable the USB function? 

 

Is there a functional difference between the JS16 and JM16 chips that cause them to operate differently in this regard?

 

You mentioned the serial port in your response.  The S9S12P on our existing board communicates to the outside world via a serial port.  Can the serial port connections on the JS/JM16 be connected to the serial port connections on the S9S12 and can doing so allow the JS/JM16 chip act as a serial to USB translater for the S9S12P chip (therefore eliminating the need for a serial connection on the board by replacing it with a USB connection?  Is special software needed for this function or is it already built into the 4.9.2 code?

 

I apologize if I am asking what are probably very basic questions; I am very new to the operation of the JM/JS16 chip.

 

Thanks for all your help,

Mark

0 Kudos
Reply

6,152 Views
pgo
Senior Contributor V

Dear MarkK,

 

The JS16 chips can be programmed over usb as they include a bootloader in ROM.  This may be done after assembly.

The JMxx chips do not contain any ROM and need to be programmed with a BDM initially. 

 

For uniformity, the JS16 would be initially programmed with an image of the USBDM bootloader using the Freescale ICP software.  Further upgrades are done with the USBDM bootloader.

The JMxx chips are programmed with the bootloader using another BDM.

 

After the above both versions may be upgraded with the USBDM bootloader.

 

Please see http://usbdm.sourceforge.net/USBDM_V4.9/USBDM_JS16/html/installation_page.html

 

The USBDM software USBDM_SER_JS16CWJ_V4.sx contains a USBDM-CDC interface i.e. serial over USB.  This is not particularly high performance but is convenient.

 

bye

0 Kudos
Reply

6,152 Views
marco8
Contributor I

Hello pgo,

To get the file to load thru USBDM-1 I changed the DFlash location in the mc9S12P128.inc codewarrior file from 10400 to 0400.  But then the DFlash doesn't show up on the codewarrior memory map (using 10400 it shows up at 0400).  I don't need to use the global memory map.  Is there a DFlash address that will work for both codewarrior and USBDM?

Thanks

Mark

0 Kudos
Reply

6,152 Views
pgo
Senior Contributor V

Dear Mark,

 

According to the P128 data sheet the chip has unpaged Dflash from 0x400 to 0x13FF.

 

The stationary provided with Codewarrior 'thinks' the chip has paged DFlash from 0x010400 to 0x113FF.  I believe this is incorrect.

 

To test this I created a C program using codewarrior that used the Dflash segment as supplied.  It failed to program the DFlash when using the debugger. 

 

I then changed the segment description in the .prm file to what I believe is the correct range.  The debugger then correctly programmed the DFlash.  Checking the memory description in the debugger also confirms the above expectations about where the DFlash is.

Note that the debugger accesses USBDM directly so my having different memory maps in my software has no bearing on the above.

 

I haven't used absolute assembly with paging with these chips so I'm unclear what is the equivalent way of informing the software where the DFlash is apart from using ORG statement.  The following correctly placed some numbers in the DFlash when using the debugger.  The resulting S19 file could also be programmed with the USBDM HCS12 programmer.

 

      ORG $0400      dc.b   1,2,3,4,5,6

 

If you are doing a relocatable assembly project or a C project I suggest modifying the .prm file so that the DFlash is located at the correct location.

 

If the above isn't helpful or clear could you describe what kind of project you are using in Codewarrior and what options are used to create the project.

 

bye

 

0 Kudos
Reply

6,152 Views
marco8
Contributor I

Hello pgo,

I am using Codewarrior 5.9.0 with the P&E Multilink Interface to program the target.  The program is in assembly language and uses ORG to set the DFlash location.  I don't get any errors when DFlash download is to $0400, it just does not get into memory.  When I use $10400 it ends up at $0400 on CW memory window.  The code itself uses $0400 for reading and $4400 for programming and works ok.

So now when I want to use USBDM-1  I change the ORG to $0400 and use that image for programming the target.  All seems to work ok so far.

Thanks for your reply.  I didn't understand the $10400 and thought I was missing something on how the memory map works.  Because you can use ORG $400 and get code into $0400  using CW and USBDM and I can't using CW and P&E, It would seem the P&E is the problem.

Mark

0 Kudos
Reply

6,152 Views
MarkK
Contributor I

Thank you; I'll give it a try.

0 Kudos
Reply