Replaced Freedom KL25 - now OpenSDA doesn't work

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

Replaced Freedom KL25 - now OpenSDA doesn't work

10,417 Views
frankvanhooft
Contributor III

I've replaced the KL25Z128 on the Freedom board with a replacement KL25Z128 (after I killed the original one). Now when I try to connect to the board in CodeWarrior I get this message:

Error 17926. Target MCU mismatch. OpenSDA hardware only supports debugging the resident target processor.

Now what? It would appear from this error message that OpenSDA is locked to the "PKL25" processor on the Freedom boards, and placing an "MKL25" processor upsets it. Is this correct?  (And why is it called "OpenSDA" anyway - shouldn't it actually be called "ProprietarySDA" or "ClosedSourceSDA"? But I digress.)

Any pointers on fixing this would be appreciated. Thanks.

29 Replies

1,179 Views
gurindersinghgi
Contributor III

I totally agree , Being said "Open" i still haven't read about its source being open, more over There is NO literally NO LINUX Support , Freescale is stick to its silly PE Component which i personally, really don't like, and Great to hear that Freescale has dropped free support : if you want PE Component , well you have to buy it :smileysad: thats sad, now we have to

1st pay for CW, then for any PE component we need , then for GDB Debugger (Yes OpenSDA sounding open is really not open you even have to pay for even GDB , means how does that sound Open !!)

I am very very Dissapointed :smileysad:

1,179 Views
apanecatl
Senior Contributor II

You will not be able to use the board, the mcus installed in the freedom boards are tied to them through their unique Kinetis ID, if the IDs do not match to what the firmware has been taught they should be, the board will not work.

0 Kudos
Reply

1,179 Views
JimDon
Senior Contributor III

Are you saying that you can not replace the KL25Z128 even with another KL25Z128?

You have to throw the board away?

I expected that you could use the SDA to debug your own hardware as long as it was the same chip.

Things like this have been done in the past, locking a debugger to a particular chip, but never to a unique instance.

Please say it ain't so!

0 Kudos
Reply

1,179 Views
frankvanhooft
Contributor III

Well I'll be darned if I know why they call this the "Freedom" board with "Open" SDA. I've used many a development board in my time, and this one is close to the top of the list of "Proprietary, closed, limited-use only" boards I've had the misfortune to use. Someone at Freescale had a pretty strong sense of irony when they came up with those product names. Probably shooting for a career in politics.

There's no doubt that the programming interface is locked to the processor. Replacing the processor with an "identical" one most certainly does not work. Do Freescale really expect us to replace the entire board when we wire it to custom hardware and something goes wrong? Apparently they do. And do they tell us this fact on the Freedom board webpage or in the documentation? Not that I've seen.

Perhaps one day the source for the SDA processor will be released. Maybe. It gets asked a lot on these forums, but it hasn't happened yet. Being able to remove that restriction would be a huge step forward.

I've spent the past several days frustratingly attempting to find a way to program the KL25Z128, given that the SDA interface is deliberately broken. What's finally worked has been to take a revision 5 Kinetis KwikStik board, and wiring off the J-Link interface it provides. Here's how to hook it up:

For the 10-pin header J8 on the Kwikstik board:

1 - Vref   (connect to the VCC on your KL25Z128)

2 - SWDIO

4 - SWCLK

9 - GNDdetect - tie this to GND

3 - 5 - GND

Other pins are no-connect. Note that reset is not connected, nor is it required. (Of course you need to disconnect the SDA chip on the Freedom board - however you do that is up to you.)

The little "power" switch on the KwikStik board must be "off".

Then in CodeWarrior you need to set the debug interface to J-Link. Make sure you select "SWD" in the appropriate sub-menu (tab) - it seems to default to "JTAG" and that won't work.

Finally, with this ugly hardware hacking, I'm back to where I was several days ago - able to program the KL25Z128 again. What a lot of pointless work and wasted time - Freescale certainly isn't making it easy for their customers. I hope this posting helps others. Good luck.

1,179 Views
michaelsteffenf
NXP Employee
NXP Employee

Hi Frank,

I realized how frustrating it is trying to replace something only to have twice as much work as you start with.  Please understand Freescale made the Freedom board with inexpensive in mind.  If you look on Digikey or Mouser the KL25 chip you replaced costs a little over $4, and the time you have invested in coming up with an alternate way of re-programming it.

Wouldn't you might of been further ahead just replacing the board for $12.95?  Just a thought...

Mike

0 Kudos
Reply

1,179 Views
brionfinlay
Contributor I

Frank,

I have been trying to reproduce your solution with the kwikstick board but have not yet been able to get it to work. 

I get an error "An error occurred while trying to write memory.  The Debugger can not write memory."

I "disconnected" the SDA chip on the freedom board by cutting jumper J11 per the freedom board schematic.  Is that what you did or did you do something more when removing the SDA chip?

I have examined the lines with an oscilloscope and have confirmed that the kwikstick is sending signals to the freedom board.

Were there any other settings that you changed in the debug configuration for the jlink?

0 Kudos
Reply

1,179 Views
pgo
Senior Contributor V

Hi Brion,

If the K20 chip (openSDA chip) has the freescale debugger loaded it should by default not interfere with an external BDM connected to the 10 pin connector for the MKL25.

You should NOT remove the link since it is between the connector and the MKL25 target.  It is intended to allow the on-board BDM interface (K20 chip) to program external devices.  Of course the firmware doesn't actually allows this :smileyhappy:.

bye

0 Kudos
Reply

1,179 Views
pgo
Senior Contributor V

Hi Frank,

Just to point out some further options.

  • There is a CMSIS-DAP OpenSDA plugin that can be loaded into the FRDM-KL25 board that allows it to be used with a range of programs supporting that debugger interface e.g. Keil.  There is some information here:

The step to use CMSIS-DAP to debug the Freescale freedom board « CooCox Forum

  • The latest version of USBDM provides a OpenSDA version that works with the FRDM-KL25.  It supports Codewarrior and provided utilities allow unrestricted programming of any connected Kinetis chip.  It turns the FRDM-KL25 in to a general purpose BDM. It is actually open source.

http://usbdm.sourceforge.net/

bye

0 Kudos
Reply

1,179 Views
pgo
Senior Contributor V

Hi Frank,

I quite agree with the comments about OpenSDA and I'm still waiting for the information that would allow me to make use of it in an "open" fashion.  This is certainly what the name implies and is supported by what appears to be official Freescale statement.  Hopefully this will be rectified in the (near?) future.

However, in fairness, the debugger included in the Freedom boards is not opensource nor does it makes claims of being so.  It is a particular application loaded using the OpenSDA bootloader.  I believe it is a closed source debugger firmware produced by P&E micro and I can understand their preference for tying it to a particular chip type to prevent undermining their commercial products.  I believe they have been somewhat stung previously in this area (people using what was meant to be limited use programming interface on a demo board as a general programmer.)  Tying it to a particular chip using the UUID on the chip does seem a bit excessive!

Note that this application is not the same as the OSBDM-JM60 debuggers included on some of the other Freescale boards (e.g many tower boards).  The source code for these is readily available.

bye