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.
I tried USBDM and its working fine for me , i do have an question as freescale stopped supporting linux , there is no Codewarrier 10.3 for linux and CodeWarrier 10.2 dosent support MKL25xxxx Series, so , is there any way setting up CMSIS /USBDM / etc. for gdb debugging under linux.
Hi Gurinder,
There is a brief description of how to set up Eclipse+Codesourcery+GDB+USBDM here:
This is for windows but a similar setup works for Linux. The required GDB sprite is included in the latest USBDM Linux version.
I'm currently working on an Eclipse plugin that should make it a little easier to setup.
bye
Hi Pgo,
I did tried Downloaded the latest version of USBDM but it gives an error saying CodeWarrior not found. ?
shall i change the script so as to make the installation into Eclipse instead of CodeWarrior ?
Any Help ?
Hello,
I had a similar problem with my FRDM board. I bricked the KL25 (I used the Flash app, and loaded an ELF file by mistake, and it protected my processor against program and erase), and replaced it on the board (MKL version). However, my CW10.3 continued debugging the board, until I uninstalled Beta version, and installed Release. From that moment on, the debugger app gives the same error message presented in the original post. I tried it in another computer, with CW beta, and it worked! Again, I installed Release version on the second computer... and now I only get the same error.
If I load the Flasher app, I am still able to load binary files, but I cannot debug it anymore.
Thanks for enlighting me about the problem. Even P&E support cannot find a solution. Now I noticed that I forgot to mention to support that the original KL25 was replaced.
I looked at the workarounds presented by pgo. Using the CMSIS-DAP demands another IDE, since CW does not support it. And I could not find the OpenSDA version for USBDM. Can anyone provide a direct link for the USBDM?
Thanks
Hi Antonio,
The OpenSDA version of USBDM is included in the latest version 4.10.4 available at:
USBDM - Browse /Version 4.10.4/Installation at SourceForge.net
It is included as part of the installation (look in the menu USBDM 4.10.4->BDM Flash Images). You will also need the appropriate driver installation.
bye
pgo,
I have attempted to install USBDM on a freedom board without success. The problem seems to be with the usb drivers - when I connect the board to the PC, it does not recognize the board or load an USBDM drivers.
I followed these steps to install usbdm:
1. install USBDM_4_10_4_Win.msi
2. install USBDM_Drivers_1_0_1_win_x64.msi (I am using Windows 7 64 bit)
3. hold down reset button on freedom board and attach to PC to put into bootloader mode
4. load USBDM_OpenSDA.sx by copying from "program files (x86)/pgo/USBDM 4.10.4/FlashImages/MKxx" to the bootloader drive.
5. detach freedom board
6. attach freedom board
When attaching the freedom board, there is no indication from Windows 7 that the board has been attached. Device Manager does not show any loaded USBDM devices. Codewarrior, when configured per below, cannot identify any USBDM devices. Using the program "ARM programmer" or "USBDM Firmware Updater", neither is able to detect a BDM device - presumable because the driver is not loaded.
Did I miss a step?
Hi Brion,
I just tried the FRDM-KL25 with a Windows-7 machine and it seemed to work OK.
I was able to update the firmware on board without any problem and when plugged in again it enumerated as an USBDM device.
The OpenSDA bootloaders I tried were:
==================================================
Board Name is: FRDM-KL25Z
MicroBoot Kernel Version is: 1.01
Bootloader Version is: 1.01
Application Version is: 0.00
==================================================
Board Name is: FRDM-KL25Z
MicroBoot Kernel Version is: 1.01
Bootloader Version is: 1.08
Application Version is: 0.00
I updated the Bootloader between these tests to see if the version affected anything.
The Application version is 0.00 since the USBDM firware doesn't report it correctly (mainly because I have no idea how to).
Could you do the following:
bye
It is the MicroBoot Kernel version. Most of my boards have MicroBoot Kernel version 1.03. I went through 4 different freedom boards and found 1 that had MicroBoot Kernel Version 1.01. I followed the same procedure and the USBDM interface enumerated immediately. It does not enumerate with any of the boards that have MicroBoot Kernel version 1.03.
The original board I tested on
==================================================
Board Name is: FRDM-KL25Z
MicroBoot Kernel Version is: 1.03
Bootloader Version is: 1.05
Application Version is: 0.00
==================================================
I upgraded to 1.08
==================================================
Board Name is: FRDM-KL25Z
MicroBoot Kernel Version is: 1.03
Bootloader Version is: 1.08
Application Version is: 0.00
==================================================
The MicroBoot Kernel 1.01:
==================================================
Board Name is: FRDM-KL25Z
MicroBoot Kernel Version is: 1.01
Bootloader Version is: 1.01
Application Version is: 0.00
==================================================
In the bootupdateapp release note, there is some information about Microboot 1.03 and about the bootloaders:
WARNING: If you are running Microboot v1.03 or older on a FRDM-KL25Z board, there is a scenario where interrupting the firmware update at a very specific spot during the update process will cause the board to become secure and unusable. It is very unlikely that this would occur as the entire update process takes about a second and this problem would occur only when replacing one of the many sectors in the flash which are reprogrammed. This flaw was fixed in Microboot v1.03. In order to fix the board, it would have to be shipped to P&E to be recovered.
BOOTUPDATEAPP with Bootloader v1.08 fixes the following issues:
v1.05 Fixed binary files download to bootloader. Wrong address was used (0x0000 instead of 0x8000)
Fixed led not coming on upon an error
v1.07 Added Bootloader support for Linux
v1.08 Future feature additions (undocumented)
Microboot 1.03 made some changes related to memory locations.
I speculate that there are changes in the address where the usbdm needs to load with microboot 1.03? (considering the info here: Basic OpenSDA Project)
Message was edited by: Brion Finlay
Some additional information that I neglected to add: When the microboot 1.03 devices are programmed with USBDM and attached to USB, Windows does not enumerate the device at all. It is like a dead device. This implies that the USBDM code (which manages the USB device) is not running, which leads me to speculate about a loading problem like memory location.
On the other hand, the OpenSDA LED lights up solid green, which according to the OpenSDA users guide means that OpenSDA MSD Bootloader is running an application normally with no error conditions and no USB activity.
Are there any fixes that can be made for the microboot 1.03?
Hi Brion,
Since I don't know what is going wrong it's difficult to fix. I will see if I can purchase a later version board to check out what is happening. I'm very surprised that the microboot version affects this.
bye
Message was edited by: Peter O Donoghue Also - Could you try programming the boards with USBDM using the command line i.e. copy command? There have been some posts about some strange things happening on some computers and I would like to eliminate this possibility. Thanks
I tried programming the board using the command line per your request. Confirmed that the USBDM device is not recognized by Windows after following the programming procedure.
I subsequently used the command line to replace the USBDM app with the PE_micro DEBUG app and confirmed that I can properly program the device this way.
Hi Brion,
I've finally have a later version FRM-KL25 board so I was able to track down the error that was preventing it working. In fact, I'm very puzzled that the bug didn't prevent it working with the earlier version.
I've uploaded the required image to sourceforge.
https://sourceforge.net/projects/usbdm/files/Version%204.10.4/Installation/
bye
Hi pgo - I wanted to let you know that I have been using this for the last month and it works great.
Thanks. I am just having problems to install the driver. I am using a winXP 32-bit with an AMD 64-bit processor. I suppose I have to use the 32-bit driver... but when I connect my FRDM board with the USBDM loaded, I get an error installing the driver.
I used zadig to install the USBDM driver, and now it works perfectly. I have created a new project using USBDM connection, and now I can debug my project.
Does anyone know how can I change the debugger connection from OpenSDA to USBDM, in projects already generated?
Thanks
Hi Antonio,
Try the following:
bye
"I wonder if Frank, the original poster, tried USBDM."
I have not, although I'm pleased to see the activity here. I've set up our system with a J-Link from a KwikStik board (as I described above how to do) and we've been using that ever since - it's working quite well.
Glad to hear that it worked.
You indicated above that the driver install (.msi file) failed to install the drivers but zadig succeeded.
zadig creates a driver directory in the root of C: I believe. Would you be able to zip this and post it? It might allow me to work out what is wrong with the .msi file.This problem appears to be specific to AMD machines and I don't have one for testing.
Thanks
Thanks Antonio,
Unfortunately I can't see anything special about the settings used compared to those in the installer. I'll have to look elsewhere.
Did you get an error message when you tried the USBDM 32-bit installer or did the installation just not work?
thanks for your assistance.
bye