Tutorial: FreeRTOS Projects with Kinetis SDK V1.3 and the SDK Project Generator

DZone 's Guide to

Tutorial: FreeRTOS Projects with Kinetis SDK V1.3 and the SDK Project Generator

This tutorial describes how to create a Kinetis SDK V1.3 project using the Freescale project generator in Kinetis Design Studio.

· IoT Zone ·
Free Resource

Image title


In this tutorial I show how to create projects with the Kinetis SDK Project Generator utility. That generator utility can create projects for different IDE’s. So instead waiting for the IDE vendors and providers to example projects or wizards to create projects, the project generator can create projects which then can be imported and used with different IDE’s.


I’m using here the Freescale Freedom FRDM-K64F board, Freescale Kinetis Design Studio V3.0.0, the Kinetis SDK v1.3 and the Freescale project generator. In general, this tutorial will work as well for any other IDE or tool combination (I hope). If you have some or all the items below already installed, you can skip some steps. The downloads below require that you have registered your account at Freescale.

  1. Download and install the Kinetis Design Studio (KDS) from http://www.freescale.com/kds.Use the ‘Downloads’ tab and select the installer for your host operating system. Then run the installer with the default settings. Kinetis Design Studio Download SectionKinetis Design Studio Download Section
  2. Download and install the Kinetis SDK from http://www.freescale.com/ksdk. Run the installer with the default settings. SDKv1.3 Download SectionSDKv1.3 Download Section
  3. Optionally, to make KDS aware of all the devices supported in the Kinetis SDK, there is an Eclipse update available. This extends the KDS project wizard plus adds Processor Expert device support. Use the menu Help > Install New Software in KDS and update it from the update zip file inside the SDK. On Windows it is this one:
    Installing SDK V1.3 Update in EclipseInstalling SDK V1.3 Update in Eclipse
  4. Download the Kinetis SDK Project Generator from here. This is a zip archive, unpack it to a location of your choice (I’m using the folder C:\Freescale\KSDK_Project_Generator_V1.0). Kinetis SDK Project GeneratorKinetis SDK Project Generator

This complete the setup :-).

Creating Project with Project Generator

Launch the Project Generator executable (On Windows: <GeneratorPath>\Windows\KSDK_Project_Generator.exe).

In the generator dialog, specify a project name and select the boar

Image title

To generate a FreeRTOS project, use the ‘Advanced’ button:

Image title

Here select the IDE/Toolchain (Kinetis Design Studio), the operating system (FreeRTOS) and select ‘standalone project’ with the directory where the project shall be generated. I recommend to use the Eclipse workspace location, but it could be anywhere else too.

 I recommend to use the standalone project because that way all the needed files get copied, so there are no links and dependencies left to the SDK installation folder.

Image title

Use the ‘Generate’ button to create the project:

Image title

With this, the project gets created in the specified project folder.

The project generation sometime hangs forever. Close the generator and start over again. Try to remove the settings.json present in the same folder as the executable program.

Image title

The ‘standalone’ option still does create linked files in the project which is somewhat unexpected.

Importing Project in Eclipse

To use the project in KDS, I have to import it into my workspace.

For this I use the menu File > Import > General > Existing Projects into Workspace in KDS/Eclipse and specify the location where the project has been generated by the generator in the previous step.

Actually there are two projects: a library project which includes the

Image title

This imports the project(s) into the workspace so I can build them:

Image title

The first thing I recommend to change for both projects is to enable ‘parallel build’, otherwise the build might take very long:

Image title

Project and the library should build just fine. And debugging the projects works out-of-the-box:

Image title

Enabling ‘print size’ (see “GNU Additional Tools: Create Flash Image, Print Size and Extended Listing Options“) shows that the example project has a lot of SDK code added beside the operating system itself:

Invoking: Cross ARM GNU Print Size
arm-none-eabi-size --format=berkeley "SDK_with_FreeRTOS_MK64FN1M0VLL12.elf"
   text       data        bss        dec        hex    filename
  17944        132       9952      28028       6d7c    SDK_with_FreeRTOS_MK64FN1M0VLL12.elf

So that code size is not ideal, but caused by the way the SDK with the RTOS is put together, so there is a lot of room for improvements. For now, I’ll keep it like that, as optimzing Kinetis SDK would be worth of a whole other article series.


If the generator now would create better project settings, that would make that a perfect solution. The Kinetis SDK Project Generator solves the problem that every IDE would need its own project creation tool for the Kinetis SDK. Instead, the projects get created by the tool who should know the SDK best which is a positive thing.


freescale, kinetis

Published at DZone with permission of Erich Styger , DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}