element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Freedom development platform
  • Products
  • Dev Tools
  • Freedom development platform
  • More
  • Cancel
Freedom development platform
Documents Codewarrior Tutorial for FRDM-KL05Z: Debugging with USBDM
  • Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Freedom development platform to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Engagement
  • Author Author: FreescaleTools_and_Software
  • Date Created: 4 Jul 2013 12:12 PM Date Created
  • Last Updated Last Updated: 4 Jul 2013 12:40 PM
  • Views 1121 views
  • Likes 0 likes
  • Comments 0 comments
Related
Recommended

Codewarrior Tutorial for FRDM-KL05Z: Debugging with USBDM

This tutorial was extracted from Erich Styger blog http://mcuoneclipse.wordpress.com with his agreement.

imageimage

  

I mentioned in “Debug External Processors with USBDM and Freedom Board” post that I had a problem to debug the FRDM-KL05ZFRDM-KL05Z with USBDM. Well, after a long night with some sleep, with more thinking and searching, finally I have it resolved: I can debug my FRDM-KL05Z with USBDM :-)

    

FRDM-KL05Z Debugging with USBDM   FRDM-KL05Z Debugging with USBDM

 

   

   

The problem was that I received a “Failed to resume target process., Downloading binary to target…’ error message:

   

Failed to resume target process

Failed to resume target process

 

This Freescale forum thread has finally lead me to the solution: a wrong USBDM device ID for KL05Z present on the FRDM board :-( .

 

 

USBDM Flash Programmer

 

USBDM comes with standalone flash programmers, and one of it is for ARM based devices:

USBDM 4.10.4 Installed Program Shortcuts

USBDM 4.10.4 Installed Program Shortcuts

 

 

The Flash Programmer has a ‘Detect’ functionality, it was not able to detect the KL05Z32 on the FRDM-KL05ZFRDM-KL05Z board:

  Flash Programmer for ARMFlash Programmer for ARM

 
 

Chip ID

 

The good thing is that it reports the chip ID. After searching around, I realized that the ID mapping is described in the arm_devices.xml file inside the USBDM installation folder:

 

arm_devices.xml configuration 

arm_devices.xml configuration

 

 

That file has the KL05Z32 listed as

 

 

MKL05Z32M4" family="ARM" subfamily="KL05">

 

<memoryRef ref="kinetisL4K_Ram" />

<memoryRef ref="kinetis32K_Flash_B0" />

<memoryRef ref="kinetisIO_KL" />

<sdid value="0x05130480" />

<tclScriptRef ref="Kinetis-KLxx-Scripts" />

<flashProgramRef ref="Kinetis-KLxx-FlashProgram" />

</device>

 

 

That device ID (0×05130480) does not match what the programmer reported (0×5130402). Testing the ID with the working FRDM-KL25Z, it seems to me that the last nibble is zero, so I changed the above entry to:

 

 

MKL05Z32M4" family="ARM" subfamily="KL05">

 

<memoryRef ref="kinetisL4K_Ram" />

<memoryRef ref="kinetis32K_Flash_B0" />

<memoryRef ref="kinetisIO_KL" />

<sdid value="0x05130420" />

<tclScriptRef ref="Kinetis-KLxx-Scripts" />

<flashProgramRef ref="Kinetis-KLxx-FlashProgram" />

</device>

 

 

With this, the device is properly detected:

 

MKL05Z32M4 Detected
MKL05Z32M4 Detected

 

 

And with this change, CodeWarrior for MCU10.3 is successfully debugging the FRDM-KL05Z with USBDM:

 

  

CodeWarrior MCU10.3 debugging the FRDM-KL05Z with USBDM

 

CodeWarrior MCU10.3 debugging the FRDM-KL05Z with USBDM
 

:mrgreen:

  

Happy OSBDMing :-)

  • usbdm
  • debug
  • freescale
  • freedom_board
  • debugger
  • kinetis
  • frdm-kl05z
  • codewarrior
  • kinetis-l
  • Share
  • History
  • More
  • Cancel
  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube