AnsweredAssumed Answered

port example bare-metal source code to codewarrior project

Question asked by MB JK on Mar 28, 2014
Latest reply on Apr 1, 2014 by Jorge_Gonzalez



I am a beginner to the kinetis microcontroller and have gotten a few KL25Z dev boards to use in an upcoming project.  I plan on using codewarrior and have version 10.5 installed.  I have downloaded the quickstart guide and the sample code for the project.


In order to quickstart using the KL25Z for my projects I need to get started using  working with bare metal projects.  I would like to use existing project code from the basic projects source found in “KL25 Sample Code\kl25_sc_rev10\klxx-sc-baremetal\src\projects”  But, I am having problems getting the demo projects to properly build in CW10.5.


I am disappointed that there was not an already pre-built codewarrior project for the "demo"  projects that the board shipped with and the majority of the other projects for bare-metal.  I am not completely new to codewarrior/eclipse nor MCUs, but have spent numerous hours trying to build the project with no success.  I would think that this would be a direct problem other freedom board users and hope to get a decently documented set of instructions on creating the codewarrior project for  "FRDM_KL25ZDemo" the default running demo or any of the "demo" projects in the sample code download.


The only instructions that I can find are found in readme.txt at the root of "kl25_sc_rev10/readme.txt"  The instructions state:

Codewarrior Bare-metal projects


“The klxx-sc-baremetal\build\cw\make_new_cw_project.exe file can be used to clone the platinum project. The script will prompt you for a name to use for the new project, then creates copies of all needed compiler specific files and folders.  The main source file and klxx-sc-baremetal\src\cw\{proj name} files will need to be manually created.”

There seems to be a lot missing in the instructions to actually make this work.

1) What is the platinum project supposed to be?  A template project?  It appears that this project is a template with include paths to all of the dependent source in “klxx-sc-baremetal\src”.

2) The current source appears to have setup and interrupt code for IAR or other IDE’s than code warrior.  I can manage to get the code to build, but the interrupts are not setup correctly  and it jumps to the following interrupt handler which I believe is the default exception handler.

“void Default_Handler()




3)  So can someone provide instructions on how to actually re-create these “demo” projects in codewarrior?  Maybe I am overlooking something very obvious...

Note: It looks like this thread tried to address this same issue: and has the “solution” of:

“see: FRDM_KL25ZSCG_CW.pdf found in “Kinetis L Sample Code\kl25_sc_rev6\klxx-sc-baremetal\build\cw” in the sample code directory.”

Too bad this pdf file no longer exists.