This tutorial describes how to create a Kinetis SDK V1.3 project using the Freescale project generator in Kinetis Design Studio.
Outline
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.
Installation
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.
- 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. - Download and install the Kinetis SDK from http://www.freescale.com/ksdk. Run the installer with the default settings.
- 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:
C:\Freescale\KSDK_1.3.0\tools\eclipse_update\KSDK_1.3.0_Eclipse_Update.zip
- 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).
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
To generate a FreeRTOS project, use the ‘Advanced’ button:
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.
Use the ‘Generate’ button to create the project:
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.
💡 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
This imports the project(s) into the workspace so I can build them:
The first thing I recommend to change for both projects is to enable ‘parallel build’, otherwise the build might take very long:
Project and the library should build just fine. And debugging the projects works out-of-the-box :-):
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.
Summary
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.
Links
- Project Generator Download: http://www.freescale.com/tools/software-and-tools/run-time-software/kinetis-software-and-tools/development-platforms-with-mbed/software-development-kit-for-kinetis-mcus:KINETIS-SDK?fpsp=1&tab=Design_Tools_Tab
- Freescale Kinetis Design Studio: http://www.freescale.com/kds
- Freescale Kinetis SDK: http://www.freescale.com/ksdk
- Freescale FRDM-K64F Board: http://www.freescale.com/products/arm-processors/kinetis-cortex-m/k-series/k6x-ethernet-mcus/freescale-freedom-development-platform-for-kinetis-k64-k63-and-k24-mcus:FRDM-K64F
Depending on your naming convention, on the first build, you may have to build the ksdk_freertoslib(board/device) project before your own. Just due to a dependency error.
This happened even though I selected parallel build.
LikeLike
Hi Jason,
yes, indeed the library has to be built first. Parallel build does not affect this.
LikeLike
Sorry, that was a novice mistake. Key word “library.” I hit build all the first time not understanding how parallel build works.
LikeLike
Pingback: First NXP Kinetis SDK Release: SDK V2.0 with Online On-Demand Package Builder | MCU on Eclipse
Pingback: Tutorial: Blinky with Kinetis SDK V1.3 and Processor Expert | MCU on Eclipse