![](images/nxp.png)
NXP Kinetis CPU Support Package
This package contains project templates and system files for the NXP Kinetis.
CrossWorks Version 3 Installation Instructions
- To install this support package
-
- Click the Tools > Package Manager menu option to open the package manager window.
- Right click on the NXP Kinetis CPU Support Package entry and select Install Selected Packages.
- Click Next to take you to the summary page.
- Click Next to install the package.
- Click Finish to close the package manager window.
- Click the Tools > Show Installed Packages.
- Click on the NXP Kinetis CPU Support Package link to view the package and its contents.
- To manually install this support package
-
- 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.
- Download the file Kinetis_V3.hzq using your web browser.
- Click the Tools > Manually Install Packages menu option.
- Select the file you have just downloaded to install the package.
- Click the Tools > Show Installed Packages.
- 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
- Added support for KE14Z4, KE15Z4 and KE16Z4 devices.
- New projects will use CMSIS-Core property group to select CMSIS headers.
3.9
- Fixed memory maps for K27FN2M0 and K28FN2M0 devices.
- Added workaround for errata e7534 in target script.
- Added support for KW35 and KW36 devices.
- Vector files now generated from the equivalent CMSIS header file.
3.8
- Added support for K27FN2M0 and K28FN2M0 devices.
3.7
- Added support for KE14Z7, KE15Z7, KE14F16, KE16F16, KE18F16, KV10Z7, KW21Z4, KW31Z4 and KW41Z4 devices.
3.6
- Changed Freescale to NXP.
3.5
- Removed support for KV4x15 devices.
- Added support for K80FN256, K82FN256, KL28Z7, KL82Z7, KS22FN256, KS22FN128, KV11Z7, KV42F16, KV44F16, KV46F16 and KV5x22 devices.
- CMSIS-CORE package is used for new projects. Existing projects can rename project property file/directory references from $(TargetsDir)/CMSIS_3 to $(PackagesDir)/CMSIS_4 if required.
- Added DDR placement.
3.4
- Added support for KM34Z256, K26F18 and K65F18 devices.
- Supplied missing vector tables and peripheral files for KL13Z64/MKL13Z32/KL33Z64/MKL33Z32 devices.
- Modified vector tables and peripheral files for K22F12 and K21F12 devices.
3.3
- Added support for K21FA, KL17Z32, KL17Z64, KL27Z32, KL27Z64 devices.
- Fixed SRAM start address for K24FN1M0, K63FN1M0, K64FX512 and K64FN1M0 devices.
3.2
- Added support for K02F, K11DxxxA, K21DxxxA, K24FN256, KL17, KL27, KL33, KL43, KV30, KV40 and WPR1516 devices.
- Fixed SRAM sizes for K24FN1M0, K63FN1M0, K64FX512 and K64FN1M0 devices.
3.1
- Added support for SKEA devices.
3.0
- Initial release for CrossWorks V3.
Documentation
Creating Kinetis Projects
To create a new Kinetis project
- Select the File > New > New Project menu item.
- Select the appropriate Generic Kinetis from the Categories list.
- Select the required project template type from the Templates list.
- Set the required project name and location directory.
- Click OK.
To build and debug an application the runs in Flash memory
- Select the project to work on by using the Project > Set Active Project menu option.
- Select the configuration you require by using the Build > Set Active Build Configuration menu option.
- Right click on the project node in the project explorer and select the Flash placement.
- Build the project by using the Build > Build Project menu option.
- Connect to the appropriate target in the target window.
- Download and start debugging the current project by using Debug > Start Debugging.
To make the application startup from reset
- Right click on the project node in the project explorer and select Properties...
- In the properties window scroll down to the Preprocessor Options section.
- Type STARTUP_FROM_RESET into the Preprocessor Definitions property editor.
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:
- Flash application runs in internal Flash memory.
- Flash Vectors In RAM application runs in internal Flash memory with exception vectors in RAM memory.
- Flash Copy To RAM application starts in internal flash and copies itself to run internal RAM memory.
- Flash Copy To RAM2 application starts in internal flash and copies itself to run in two RAM memory segments. Use the section placement macros property to specify the RAM names to copy to. For example RAM_NAME=DDR_CODE;RAM2_NAME=DDR_DATA_WB will copy the code into the DDR_CODE segment and the data into the DDR_DATA_WB segment.
- RAM application runs in internal RAM memory.
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.