AnsweredAssumed Answered

Getting Started with Kinetis in a wrong way?

Question asked by wesperos on Oct 29, 2018
Latest reply on Oct 30, 2018 by Fang Li

Hello, folks!


I've just started discovering world of Kinetis MCUs after years of tinkering with Arduinos and a bit of STM32s. I've built a custom board with MKL26Z128, a replica of this project. Being a HW engineer, I made a board without big problems, but now when it comes to embedded SW stuff, I am a bit stuck. 


I imagine the standard workflow is to get an IDE (MCUExpresso, if I'm not wrong), libraries (or an SDK) and a programmer (J-Link or something) and it should be easy. But, there are few hurdles.


  1. the original project specifies that Kinetis Design Studio v3 should be used. I learned it is an outdated IDE, but nevertheless, I still installed it and it seems to be running fine. I was happy to find out that it is actually Eclipse in disguise, which I am somewhat familiar with.
  2. To make any projects with KDS, I need set of libraries, or SDK. But, the original project states that instead of the SDK, I need a Processor Expert, a toolbox to help us get going with code easy way, by automatically generating source code and libraries for all MCU components and peripherals we might need in a project.
  3. Also, to make any useful work with PE, I need components from this guy. I downloaded a zip file, and imported the components with Processor Expert -> Import Components.
  4. To program my MCU, I only have ST-Link at my disposal and a cheap ebay clone of J-Link.


I am having a trouble understanding when to use SDKs and when to use ProcessorExpert. To make matters worse, there are apparently two versions of SDK, mutually incompatible, where only version 1.3 supports PE. Also, not all MCUs work with both PE and SDK - some MCUs are only supported with SDK. So, since it is a bit tricky to understand how to get started, I did the following:


  1. I made a new project with PE  (File -> New -> Processor Expert Project)
  2. I chose my MCU: MKL26Z128
  3. I set Kinetis SKD to "None" and ticked Processor Expert
  4. I chose GCC as a compiler and finished my project setup.
  5. I copied and replaced files from the original project into my KDS project folder. Original project files can be found here, and they consist of source files, linker files, project settings file, etc.
  6. I refreshed my project and saw some new components in Component Window, such as ADC, DAC, USB, but also some peculiar ones like WAIT and UTIL. I did "generate code" a couple of times (until it worked) and managed to build a project without error messages. This was a pleasant surprise, since I wasn't sure if my project import is right.
  7. I wanted to program it using my ST-Link, but it didn't work. Apparently, KDS doesn't recognize ST-Link devices and I need to set up configuration somehow. In the meanwhile, I ordered a J-Link clone from the e-bay.


My questions is: am I doing it right? Is there a "proper" way to get started or import existing projects? What is the story with SDK vs PE? Are they really mutually exclusive? How should I know which and where to use each of them?

Finally, is there a possibility to include an ST-Link programmer? And, is it verified that clone J-Link will work as well?


If someone is able to reproduce what I did and recompile the original project, it would be awesome!