As was true for KSDK v1, v2 is a collection of comprehensive software enablement for NXP Kinetis Microcontrollers. It 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 (online, PDF) along with usage examples and demo applications. However, v2 features several new components and improvements upon v1.
KSDK v2 eliminates the separate HAL and Peripheral Driver, replacing these two layers with a single driver for each peripheral. The single driver provides both the low-level functionality of the HAL and the non-blocking interrupt-based functionality of the Peripheral Driver. Peripheral drivers in KSDK v2 also eliminate external software dependencies on an OSA, Power Manager, and Clock Manager. This makes the drivers easier to configure and more suitable for usage outside of the KSDK environment.
Simplified Folder Structure
The folder structure of KSDK v2 has been simplified. The image below shows the folder structure for a KSDK v2 build for FRDM-K64F.
The boards folder has been elevated to the top level and contains folders for all supported evaluation hardware. Specific board folders contain demo application, driver examples, middleware examples, and RTOS examples—all designed and tested to run on that specific board.
The CMSIS folder contains the ARM® CMSIS vendor-independent hardware abstraction layers for Cortex®-M devices including CMSIS-CORE include files and CMSIS-DSP source and libraries.
The devices folder has also been elevated to the top level. This folder contains sub-folders for each supported Kinetis MCU device. KSDK v2 does not have a separate platform library. All peripheral drivers can be found in the drivers folder contained within each device. Here you’ll find all the drivers for the given device. This greatly simplifies include path requirements and makes it easy to determine which drivers apply to which devices.
You’ll also find middleware, and rtos folders at the top level that contain subfolders with source code for all middleware components and RTOS kernels supported.
One of the most notable changes in KSDK v2 is the focus on FreeRTOS. All RTOS examples now use the FreeRTOS kernel. MicriumμC/OS-II and μC/OS-III kernels are also pre-integrated into the KSDK (under an evaluation license). RTOS peripheral driver wrappers for FreeRTOS and uC/OS-II & III are also provided that leverage native RTOS services (with no OSA). These are provided for use as-is or as examples for how to integrate KSDK drivers and middleware with other Operating Systems.
The MQX kernel, stacks and middleware have been removed from the Kinetis SDK. However, MQX Software is still a supported software suite from NXP that is available in the MQX RTOS and MQX for KSDK v1.3 products. New ports of MQX following the “Classic” architecture (i.e. similar style to MQX v4.x) will soon be available for newer Kinetis devices. From here forward, the Kinetis SDK will focus on open-source RTOS solutions.
KSDK v2 features a few new and updated middleware packages. The USB stack is new and now offered under an open source, permissive license. lwIP and FatFS are retained as open source solutions or TCP/IP communications and filesystem support, respectively. There are also two optional cryptography packages, available separately, that have been pre-integrated and tested with the Kinetis SDK: wolfSSL and mbedTLS.