NXP Kinetis CPU Support Package

This package contains project templates and system files for the NXP Kinetis.

CrossWorks Version 4 Installation Instructions

To install this support package
  1. Click the Tools > Package Manager menu option to open the package manager window.
  2. Right click on the NXP Kinetis CPU Support Package entry and select Install Selected Packages.
  3. Click Next to take you to the summary page.
  4. Click Next to install the package.
  5. Click Finish to close the package manager window.
  6. Click the Tools > Show Installed Packages.
  7. Click on the NXP Kinetis CPU Support Package link to view the package and its contents.
To manually install this support package
  1. If you have not done so already, follow the CMSIS 5 CMSIS-Core(M) Support Package, CMSIS 5 CMSIS-DSP Support Package, CMSIS 5 Support Package and CrossWorks Tasking Library Package installation instructions.
  2. Download the file Kinetis_V3.hzq using your web browser.
  3. Click the Tools > Manually Install Packages menu option.
  4. Select the file you have just downloaded to install the package.
  5. Click the Tools > Show Installed Packages.
  6. Click on the NXP Kinetis CPU Support Package link to view the package and its contents.
To install this support package using other versions

Release Notes

3.10

3.9

3.8

3.7

3.6

3.5

3.4

3.3

3.2

3.1

3.0

Documentation

Creating Kinetis Projects

To create a new Kinetis project
To build and debug an application the runs in Flash memory
To make the application startup from reset

Kinetis Project Specifics

Target Processor

Once a project has been created you can select different target processors by right clicking on the project node in the project explorer and selecting the Target Processor entry.

Selecting the target processor will specify the memory map that is used for the build and debug. You can view the selected memory map by right clicking on the project node in the project explorer and selecting View Memory Map or View Memory Map (as text).

Selecting the target processor will cause the preprocessor definition __TARGET_PROCESSOR to be set to the specified processor name when you compile the project.

Section Placement

CrossStudio for ARM supports Kinetis projects running applications in a number of different memory configurations. You can select the memory configuration you require by right clicking on the project node in the project explorer and selecting the Placement entry.

For Kinetis projects the set of placements are:

Kinetis devices that have a Cortex-M0+ core may also have an on-chip MTB. By default the MTB will store the trace data to the SRAM_L block. To reserve this space for the MTB trace data add RAM_NAME=SRAM_H to the section placement macros property.

Stack and Heap Sizes

The stack and heap sizes are set to be 128 bytes by default when a project is created. This enables projects to run on the smallest of the Kinetis processors. It is likely that you will need to change these values when developing applications to run on the larger of the Kinetis processors.

Target Startup Code

The startup code Kinetis_Startup.s is common to all Kinetis processors. There are a set of preprocessor defines that configure the startup code and are documented in the startup file itself. The startup code calls out to symbol SystemInit with the stack pointer set to the top of RAM. The SystemInit function can be used to set the CPU clock or configure any external memories prior to the C initialisation code as such it cannot access initialised static data.

The startup code declares symoblic names (and weak implementations) for each interrupt service routine, for example the PORTA_IRQHandler function will be called when this interrupt occurs. If you are porting code that has application specific interrupt service routine names then you can use the preprocessor definitions to rename the symbol for example PORTA_IRQHandler=porta_isr.

Target Script

The script Kinetis_Target.js is used by the debugger to identify the Kinetis part, match the project to the target and to reset the target board.

Memory Simulator

An Kinetis memory simulator is provided that simulates the memories of the various Kinetis devices. The memory simulation parameter (which is set by the Target Processor selection) specifies the device name, the size of the internal Flash and RAM memories.

CMSIS support

CMSIS header files are included as part of the new project setup. The file Kinetis.h is provided which selects the appropriate header file depending on the target processor selection.

Known problems

The part name identification and matching cannot be done for all Kinetis devices.