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
    About the element14 Community
  • 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
Blog Getting Started with KSDK 2.0: [How to use the SDK with Kinetis Design Studio using FRDM-K64F freedom board]
  • Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Freedom development platform to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: bheemarao
  • Date Created: 17 Mar 2016 9:12 PM Date Created
  • Views 3562 views
  • Likes 4 likes
  • Comments 10 comments
  • ksdk2.0
  • frdm-k64f
  • kds3.0.0
Related
Recommended

Getting Started with KSDK 2.0: [How to use the SDK with Kinetis Design Studio using FRDM-K64F freedom board]

bheemarao
bheemarao
17 Mar 2016

This document / tutorial show the steps how to use the SDK2.0 with Kinetis Design Studio v3.0.0 implementation using FRDM-K64F freedom board.

Unlike previous SDK's, with the SDK v2.0 it only needs a generic 'new project wizard' inside KDS.

 

KSDK V2.0

 

  Kinetis SDK v2 is a collection of comprehensive software enablement for NXP Kinetis Microcontrollers that includes system startup, peripheral drivers, USB and connectivity stacks, middleware, and real-time operating system (RTOS) kernels. The Kinetis SDK also includes getting started and API documentation along with usage examples and demo applications designed to simplify and accelerate application development on Kinetis MCUs.

image

The Kinetis SDK Builder allows you to get a customized SDK based on your specific evaluation platform or Kinetis MCU. Build your SDK now.

To quickly create new Kinetis SDK projects, or to clone existing projects, use the Kinetis SDK Project Generator.

All software is provided free-of-charge as assembly and C source code under permissive and open-source licensing. Support is provided through the Kinetis SDK Community Forum.

 

Below are the steps we are following for this tutorial:

 

01.     Kinetis Design Studio (KDS):

We assume KDS3.2.0 has been installed in your computer or follow below steps to install it:

A new release of Kinetis Design Studio (KDS) is available: the version v3.2.0

The KDS v3.2.0 is an update with includes all existing updates to the v3.0.0 release. So instead downloading and installing v3.0.0 and then apply all updates, it is recommended that you use the v3.2.0 version instead. There is no need to uninstall an existing KDS v3.0.0: the new v3.2.0 is installed in a separate directory and can be used side-by-side with the previous version.

You can download latest version of KDS from Here or direct download from below link:

https://nxp.flexnetoperations.com/control/frse/download?element=7490587

 

02.     Downloading a Kinetis SDK Package

  1. Go to Welcome to Kinetis Expert | Kinetis Expert
  2. Login with your user NXP name/account and Click on 'Build an SDK' button as shown below

 

image

 

3.If this is your first configuration: select board/processor you want to use

image

4. Customize the SDK version, toolchain and Host OS and Build the SDK as shown in above picture

5. Check the Software vault and download the file as shown below

image

 

image

6.Unpack the downloaded archive file to a folder (recommended into c:\nxp (e.g. (c:\nxp\SDK_v2.0-K64F) or into /nxp on other systems)

In my case i have copied into below shown folder:  “C:\NXP ksdk2.0 workspace\SDK_2.0_FRDM-K64F”

image

The Kinetis SDK architecture consists of five key components listed below.

 

  1. The ARM Cortex Microcontroller Software Interface Standard (CMSIS) CORE compliance device specific header files, SOC Header, and CMSIS math/DSP libraries.
  2. Peripheral Drivers
  3. Real-time Operating Systems (RTOS)
  4. Stacks and Middleware that integrate with the Kinetis SDK
  5. Demo Applications based on the Kinetis SDK

image

Installing Kinetis SDK v2.0 New Project Wizard in Kinetis Design Studio

 

First method:

project wizard for Kinetis SDK v2.0 to be installed with the ‘Install New Software‘ menu in Eclipse:

Start Kinetis Design Studio

Select Menu Help > Install New Software

image

 

Select KDS Update site

(Freescale KDS Update Site - http://freescale.com/lgfiles/updates/Eclipse/KDS)

Install the New Kinetis SDK 2.x Project Wizard

image

Second method:

For offline installation: the wizard can be downloaded from the https://www.nxp.com/kds web site under the Kinetis Design Studio V3.0.0 downloads, e.g. for Windows it is here:

https://nxp.flexnetoperations.com/control/frse/download?agree=Accept&element=6321017

image

 

Download this file and Unzip the archive and use Help > Install New Software menu to add Kinetis SDK V2.x wizard support to KDS V3.x.

Click 'Add' button and type Name = "New Kinetis SDK 2.x Project Wizard", Location = select: NPWforKinetisSDK2x.zip

image

 

And Confirm installation to proceed to install the  “NPWforKinetisSDK2x.zip”

 

‘New Project Wizard’ with SDK v2.0 and Kinetis Design Studio

 

With the example projects inside the SDK the Kinetis Design Studio is well supported. But what if I want to create a SDK project for my special board, or start with a ’empty’ SDK project?

Create new project

  1. Start Kinetis Design Studio

  2. Select the menu File > New  > Kinetis SDK 2.x Project

image

 

  3. Enter project name of your choice i have named as “K64F-RGB test” and Browse to the location “C:\NXP ksdk2.0 workspace\SDK_2.0_FRDM-K64F “

Select where you have unzipped the SDK package from previous step and press Next

image

  4. Select board or processor and press Finish as shown

image

Your project is now created as shown below:

imageimage

 

To check the project created is error free click on the hammer button to build the project as shown:

image

image

 

Now we will proceed to add our code to test RGB LED present on FRDM-K64F board:

LED on board is connected to port pin as shown:

RED LED -> PORTB-22

Green LED -> PORTE-26

Blue LED -> PORTB-21

 

All the hardware configurations have been defined in file <board.h> inside the ‘board’ folder

image

We need to Enable the clock to the PORT module that the LED is on using CLOCK_EnableClock() function and Setup the red LED pin as GPIO -> PORT_SetPinMux() and initialise the RGB to on/off condition using LED_RED_INIT() function.

Below is the C code written:

 

#include"board.h"
#include "pin_mux.h"
#include "clock_config.h"
#include "fsl_port.h"
#include "fsl_device_registers.h"
#include "fsl_debug_console.h"

/*!
 * @brief Application entry point.
 */
int main(void) {
  /* Init board hardware. */
  BOARD_InitPins();
  BOARD_BootClockRUN();
  BOARD_InitDebugConsole();
  
  
  // Enable the clock to the PORT module that the LED is on.
        CLOCK_EnableClock(kCLOCK_PortB);
        CLOCK_EnableClock(kCLOCK_PortE);

        // Setup the red LED pin as GPIO
       PORT_SetPinMux(BOARD_LED_RED_GPIO_PORT, BOARD_LED_RED_GPIO_PIN, kPORT_MuxAsGpio);
 PORT_SetPinMux(BOARD_LED_GREEN_GPIO_PORT, BOARD_LED_GREEN_GPIO_PIN, kPORT_MuxAsGpio);
       PORT_SetPinMux(BOARD_LED_BLUE_GPIO_PORT, BOARD_LED_BLUE_GPIO_PIN, kPORT_MuxAsGpio);

       //initialise the RGB to on/off condition
       LED_RED_INIT(LOGIC_LED_OFF);
       LED_GREEN_INIT(LOGIC_LED_OFF);
       LED_BLUE_INIT(LOGIC_LED_OFF);
       

  /* Add your code here */

  for(;;) { /* Infinite loop to avoid leaving the main function */
    __asm("NOP"); /* something to use as a breakpoint stop while looping */
    
    for(int i=0;i<=10000000;i++);
       LED_RED_TOGGLE();

       for(int i=0;i<=10000000;i++);
          LED_GREEN_TOGGLE();

          for(int i=0;i<=10000000;i++);
             LED_BLUE_TOGGLE();
  }
}

 

Now build the project to confirm it is working fine with no errors

image

image

You can see the project builds without errors

image

 

Now we will proceed to execute the project by debug process:

image

 

Make sure you have connected the K64F freedom board to USB port:

  Open debug configuration as shown below and press ‘Debug’

image

You will see below debug window:

image

Click on the resume button to ‘Run’ the project or ‘Step into’ and ‘Step over’ button for single stepping execution:

image

You can see RGB led glowing sequentially:

 

 

The project folder is attached along with this for quick evaluation

     Happy Start with KSDK2.0...  image image image image

Attachments:
K64F-RGB test.rar
K64F-RGB test-bin.rar
  • Sign in to reply
  • sdorf
    sdorf over 10 years ago

    Hello Bheema;

    I successfully reproduce your demo post.

    The program is compiled and downloaded using PE Micro OpenSDAto into target board.

    The program runs and the RGB LED’s are toggling.

    The problem that I have that the Resume (F8) is not responding after the downloading.

    I can’t execute stepping and after few F8 pressing the CPU is stuck in infinite loop somewhere in startup_MK64F12.S file.

    The only possibility to execute the program is during power up execution or manual board Reset (not in the debug mode only getting power via USB.

    I'm using Windows 10 and PEMicro Open SDA .

     

    Regards

    Shaul Dorf

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • clem57
    clem57 over 10 years ago

    Looks like I will be delving into this more with Freedom Paper Piano! Thanks bheemaraofor the inspiration/motivation.

    Clem

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • sdorf
    sdorf over 10 years ago

    Hello Bheema;

    Excellent as usual.

    Thanks

    Shaul

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • bheemarao
    bheemarao over 10 years ago in reply to clem57

    Hi Clem,

     

    Thanks for watching the tutorial.

    Find below the comparision sheet for K64F and K82F freedom board:

    image

     

    for more details please click on the below link:

    K8X Freedom Development Platform|NXP

     

    Best Regards

    Bheema Rao

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • clem57
    clem57 over 10 years ago

    Sorry if off topic, but how does the K64F compare to the newer K82F in terms of I/O storage and processor capabilities?

    Thanks in advance,

    Clem

    PS Another great tutorial.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
<
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 © 2026 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