Kinetis Design Studio Knowledge Base

cancel
Showing results for 
Search instead for 
Did you mean: 

Kinetis Design Studio Knowledge Base

Labels
  • General 94

Discussions

This document provides some sample codes and steps for relocating Code and Data into RAM/FLASH. Please look at them with projects in attachment. It is based on “MCUXpresso_IDE_User_Guide.pdf”, so about the understanding of some macros, you can check on that document. This document is based on FRDM-K64, MCUXpressoIDE_10.0.2_411. You can use it on other chips too.   1. Introduce the “Memory configuration editor” 2.1. Relocating Data into RAM 2.1 Relocating Code into RAM 2.3 Relocating Code into Flash 3.Reference  
View full article
After we released the "Kinetis Bootloader to Update Multiple Devices in a Network for Cortex-M4" (Kinetis Bootloader to Update Multiple Devices in a Network for Cortex-M4 ), many customers want to port it to FRDM-K64 board, so here I share it.   - This bootloader is based on KDSv3.2. -About the detail introduce and user guide, please refer to:    https://community.nxp.com/docs/DOC-328365 - There also some points when porting, please check the attachment. - I attached the project source code. And also two user application projects.   Customers can refer to the application and user guide to configure your application project. - The GUI is the same with bootloader for k22, we do not change anything.   BR Alice
View full article
More and more customers now use the ARM MBED develop Internet of Things(IoT) and embedded devices, also includes the kinetis chips. While this development tool only supports writing and compile code , not supports debug project. The good news is now we can export the project to KDS, we can debug it on KDS IDE. Below is the steps how to do it .
View full article
This tutorial describes how to build a project from command-line, using the GCC build tools included in the Kinetis Design Studio (KDS) tool from NXP.  KDS uses open-source components including the Eclipse IDE and GCC build tools.  The Eclipse IDE can be configured to automatically create make files for the project.  After KDS creates these make files, they can be used to build the project from the command-line, without using the KDS IDE.  This tutorial uses an example for the Kinetis KE04Z microcontroller (MCU), using the FRDM-KE04Z development board.  The following software is used in these tutorial steps: Microsoft Windows 7 64-bit Kinetis Design Studio (KDS) v3.2.0 FRDM-KEXX Driver Library Package v1.3
View full article
In most cases, there is no debug interface for user to update the application or fix bugs , so user can use Bootloader. Bootloader is a small program put into a device that allows user using communication interfaces to upgrade application , such as use UART , I2C , USB, CAN and so on. This application describe a bootloader based on the TRK-KEA128 board with CAN interface . The bootlaoder and user application code are written in separate projects , user can program the bootloader with tools such as J-Link ,Multilink, then boot the application file through CAN . The bootloader and application code are all provided , user can porting it to their own board of KEA/KE chips.   Pay attention to that, if your board is TRK-KEA128 Rev D , you need give a low signal to STB of PC33901 chip to set it in Normal mode:     GPIOB_PDDR |= (1<<16);     GPIOB_PCOR = (1<<16); In other old version boards , for example Rev C, the STB have been connected to ground , so we needn't configure it .     IDE: Kinetis Design Sturio v3.2 Hardware: TRK-KEA128   About the detail code and introduction of this bootloader, please check the attachment .   Thanks for my colleague Jennie Zhang and  Kerry Zhou . Welcome your valuable advice .   Best  Regards! Alice    
View full article
Hello community!   This document explains how to link the CMSIS-DSP library to a KSDK 2.x project in KDS.   The steps described in the document were done using the MK64FN1M0VLL12 MCU like the one in the FRDM-K64F board, but the same principles are applicable to any Kinetis MCU.     Software versions The steps described in this document are valid for the following versions of the software tools: KDS v3.2.0 KSDK v2.x     Contents   1. Glossary . 2. Overview and concepts .      2.1 CMSIS - Cortex Microcontroller Software Interface Standard .           2.1.1 CMSIS Components . 3. DSP example application .      3.1 Creating KSDK 2.x Project .      3.2 Linking CMSIS-DSP Library .      3.2 Importing DSP example source files . Appendix A - References .     I hope you can benefit from this post, if you have questions please let me know.   Best Regards! Carlos Mendoza
View full article
Some customers have special requirements for the output data.  They need them to be aligned, especially when they are using the customized bootloader or Flash Programmer.     However, the hex file generated in KDS3.2 is not aligned as the customer expected. Below is extracted from the hex file generated in a KE06 project.  In this file, the data is not aligned at 16 bytes, and the size of each line is different.   The attached document shows generate aligned Hex and S-record file step by step.
View full article
In some application, we hope one project can support multiple targets. Some typical examples: user needs different firmware to run on different PCB with different crystal on it; Or sometimes user needs one project support both debug and release mode; another widely used example is, user needs one project support multiple part numbers.etc. To implement the multiple targets project, we will consider at least three aspects: Depend on the different targets, some files/codes may be included or not.  Depend on the different targets, compiler/linker settings may be different. If bootloader involved, different target may link with different bootloader firmware.   In this article I will discuss this topic with Classic CodeWarrior and Eclipse CodeWarrior10.x/KDS separately. Original Attachment has been moved to: Multi-Targets-Project_Classic-CW-HCS12-v5_1.zip Original Attachment has been moved to: Multi-Targets-Project_KDS-v3_2.zip
View full article
The Kinetis Bootloader(KBOOT) v2 is now available on www.nxp.com/kboot webpage, it supports building bootloader image on KDS v3.2  IDE. About how to use the KBOOT to load a user's application on kinetis MCU please refer to the DOC”Kinetis Bootloader Demo Application User’s Guide”(It is under the KBOOT install package: NXP_Kinetis_Bootloader_2_0_0\doc).   When using KDS build the bootloader image, there is one point need to be paid attention: the image size in debug mode build is over 0xa000(the 0xa000 is user's application start address). That is to say , if we download the debug build image to mcu, can’t use it . So this doc povides the correct way to use the KBOOT on KDS, the problem shows in FRDM-K64 and FRDM-K22 boards, on other chips , if they also have the out of range problem, the correct method is the same .   How to correctly use the KBOOT v2 on KDS ? Please check this DOC on attachment !
View full article
Recently, there were some customers asking how to change MCU for a KDS2.x  project in KDS. It’s not difficult but the question is typical. So I wrote an article on this topic.   Attached document sets an example of porting a KSDK2.0 K21F project to K22F.  Step by step. User can use it as a reference to change MCU for other kinetis device.
View full article
When starting a new project, in many cases it is helpful to start from an existing project and copy it.  Here are some methods to do this when starting with the Kinetis Software Development Kit (KSDK).  This example is done with KSDK v1.3.0, and the toolchain Kinetis Design Studio (KDS) v3.2.0, using the KSDK hello_world demo for the FRDM-KL03Z board.   There is a handy tool called KSDK Project Generator, which is useful for starting a new KSDK project, or cloning some KSDK example projects.  But sometimes it is still preferred to copy an existing project.   KDS is built on the Eclipse IDE.  And Eclipse provides the ability to copy a project within the Project Explorer view.  To do this, right-click the project in the Projects View to copy, and select Copy.  And then the project can be pasted in the Project Explorer.   When pasting the project, Eclipse defaults to creating the copied project in your workspace directory.   Using the default location like this works for simpler projects, where the needed files are self-contained in the project directory.  But with a KSDK example project, this default location will typically lead to errors in the copied project, see screenshot below.  The reason is because the KSDK example projects use project-relative paths to find the source files and libraries used by the project.  These paths are relative from the original KDS project directory.  After copying to a new location like this, the needed files are no longer in the same relative location from the new KDS project directory.  In a new location like this, all the paths in the project settings will need to be updated from the new location to build.   So another option when copying the project is to place the new project under the same parent directory of the original project.  That way, all the project-relative paths are the same.  For example, the hello_world KDS project directory used here is located by default at C:\Freescale\KSDK_1.3.0\examples\frdmkl03z\demo_apps\hello_world\kds.  This time, the new project will be copied to the same parent directory, using C:\Freescale\KSDK_1.3.0\examples\frdmkl03z\demo_apps\hello_world\Copied_hello_world_frdmkl03z.  Using this location, the copied project builds without errors.   If it is preferred to move the new project somewhere other than the parent directory of the original project, then the paths in the new project settings need to be updated.  Here are the typical project settings within KDS that need to be changed based on the new project directory location:   C Compiler Includes settings for all the header files in KSDK:   Linker settings for the linker command file location:   Linker settings for KSDK library locations:
View full article
- This document introduces how to develop a simple CAN module application on KDS, it is suitable for the beginners to start using the KDS and Processor Expert, and it mainly focus on how to developing a CAN Loopback application, how to use the “Typical Usage” of “help on component”. - About the Sending or Receiving data demo(with interrupt or polling) we can find on  the "Typical Usage" of "help on component" . - Pay attention that , in the Typical Usage code , the Transfer Message ID is 0x123u, while in the CAN_LDD default configuration , the Receive Message ID is 0x7FF, they are should be same . So we should change one of them (In standard frame format, the admissible range is from 0x00 to 0x7FF; in extended format, the range is from 0x00 to 0x1FFFFFFF ), on my project , I change the TX ID from 0x123u to 0x7FFu on the code, about the detail information, please look at the document and application project.   This application hardware is TWR-K21F120M board, software is KDS v3.2.0 .
View full article
Hello community!   Attached is a document that explains how to use Kinetis Design Studio to debug both a bootloader and application at the same time, this will be done using GDB commands to specify an additional symbol file to be used in the debug session.   The bootloader used for this example is the project for the FRDM-K64F board provided in the KBOOT 1.2.0 named freedom_bootloader and the application is a bareboard led demo that was adapted to work with this bootloader by following the steps described in this document:   https://community.freescale.com/docs/DOC-256669   The document was created using the MK64FN1M0VLL12 MCU like the one in the FRDM-K64F board, but the same principles are applicable to any Kinetis MCU.   Software versions The steps described in this document are valid for the following versions of the software tools: KDS v3.2.0 KBOOT v1.2.0     Contents      1. Overview and concepts . 1.1 Kinetis Bootloader . 1.2 GDB Server .      2. Flashing Bootloader and Application . 2.1 Flashing freedom_bootloader project . 2.2 Loading demo application using the Kinetis Updater . 2.3 Flashing demo application and bootloader using the P&E advanced programming options .      3. Debugging Bootloader and Application . 3.1 Debugging bootloader and demo application projects using the P&E interface . 3.2 Debugging bootloader and demo application projects using the Segger interface .      4. Conclusion.      Appendix A - References .     I hope you can benefit from this post, if you have questions please let me know.   Best Regards! Carlos Mendoza Original Attachment has been moved to: K64F12_Led_Demo.zip
View full article
This list includes all the documents in the NXP community Kinetis Design Studio space. You can download the latest version of KDS on NXP web : Kinetis Design Studio Integrated Development |NXP .   Installation and Update New Kinetis Design Studio v3.2.0 available Kinetis Design Studio Update V3.1.0 available New Kinetis Design Studio V3.0.0 available Kinetis Design Studio V2.0.0 available on the Web! Kinetis Design Studio V1.1.1 Released! Kinetis Design Studio V1.1.0: Release Notes and News Kinetis Design Studio V1.0.1 Beta Release Notes KDS Install Guide KSDK 1.3.0 Documents Plugin for KDS 3.0.0 Extended Device Support: Updated P&E Debug Plugin V1.1.4 for KDS V1.1.1 Kinetis Design Studio V1.0.1 Beta Release Notes Support for Kinetis M (KM14, KM33, KM34) in Kinetis Design Studio   How to Use   Generate aligned HEX and S-record data output with GNU in KDS 3.2  How to support multiple targets in CodeWarrior(Classic, Eclipse)/KDS  Adding CMSIS-DSP Library to a KSDK 2.x project in Kinetis Design Studio  Using KBOOT v2 on KDS in Debug Mode Debugging Bootloader and Application using Kinetis Design Studio V3.2.0 Changing MCU for SDK2.0 project in KDS How to start customized KSDK V1.2 project based on KSDK demo code Tutorials using the Kinetis SDK V1.0.0 with Kinetis Design Studio  How to Create a C++ Project Using MQX RTOS for KSDK1.2 Converting a non-Processor Expert Project into a Processor Expert Project Creating KDS project based upon the KL46 from CW project How to Add Existing Files to KDS Relocating Code and Data Using the KDS GCC Linker File for Kinetis Increasing Eclipse Heap Space to Improve Performance Semihosting for Kinetis Design Studio Getting started with CDE in Kinetis Design Studio Getting started with SVN and Kinetis Design Studio Kinetis Design Studio: Migrating KDS V2.0.0 Projects to GNU Tools for ARM Embedded (Launchpad, KDS V3.0.0) Importing MCU V10.6 projects (sample, using PE and MQX) under KDS V1.1.1  Quickstart Guide for KDS v1.0.1 beta Using ESFC bit - Flash programming routines in Cotex M0+ kinetis MCU Start working with NXP Touch Software library How to Start CAN Module Development on KDS v3.2.0 + Processor Expert   Compiler and Linker Changing the ARM GNU Tool Chain in Kinetis Design Studio Extended Inline Assembly with Kinetis Design Studio How to build BeeKit exported CodeWarrior 10.6 projects using KDS How to add uninitialized data section to a GCC build Merging applications using Kinetis Design Studio   Debugger Interface and firmware GDB Debugging with Kinetis Design Studio KDS Debug Configurations (OpenOCD, P&E, Segger) Summary of FRDM-K64F open source debug interface Summary of FRDM-K22F debug interface Using FRDM-K64F with P&E and Segger OpenSDAv2 Firmware FRDM-K22F: Debugging with P&E OpenSDAv2.1 Firmware FRDM-K22F: Debugging with Segger J-Link OpenSDAv2.1 Firmware OpenOCD support for K22FN512 & K24FN256 in KDS How to setup SEGGER J-Link lite debugger connection in Kinetis Design Studio 1.1.1 Register Detail Debugging with KDS   KDS Application KEA128 CAN Bootloader  Kinetis Bootloader to Update Multiple Devices in a Network - for Cortex-M0+ Kinetis Bootloader to Update Multiple Devices in a Network for Cortex-M4 Using the FRDM-KL25 Board as a USB Keyboard in KDS Using the FRDM-KL25 Board as a USB Mouse in KDS KDS - Simple Air Mouse on a FRDM KL25Z Hello World bare metal project for FRDM-KL25 using KDS Using the Accelerometer on the FRDM-KL25 Board in KDS Using the FRDM-KL46 Board as a USB Mouse in KDS Using the FRDM-KL46 Board as a USB Keyboard in KDS Using the LCD screen on a FRDM-KL46 Board as a timer using KDS Using the LCD screen on a FRDM-KL46 Board to display accelerometer data using KDS Using the LCD screen on a FRDM-KL46 Board to display temperature using KDS Using the LCD screen on a FRDM-KL46 Board to light intensity using KDS Baremetal code examples using FRDM-K64F Using the FRDM-MK64 Board to write to an SD Card in KDS Using the FRDM-MK64 Board to write to Accelerometer data to an SD Card in KDS SD Card Bootloader :how to using SD card to update existing firmware on CodeWarriror or KDS Using the Accelerometer on the FRDM-MK64 Board in KDS Blinking an LED on a FRDM-MK64 Board in KDS Reaction measuring game on a FRDM-KL46 board using KDS Tutorials: WS2812B LED Stripes with the FRDM-K64F Board Toggling the FRDM-K64F RGB LED using interrupts in Kinetis Design Studio (KDS) How to use printf() to print string to Console and UART in KDS2.0 Disabling Watchdog for 'Bare' Projects   Bug and Workaround Defect fix for KSDK1.2/KSDK1.3 MK02FN128 -- “xxx.elf uses VFP register arguments” kds_quick_start has ommision error. Uninstalling KDS: "Error opening installation log file."   KDS FAQ KDS Frequently Asked Questions (FAQ)
View full article
Greetings, 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.   Main benefits of v3.2.0 are: Includes all previous updates in a single installation image, no need to download 3.0.0 and apply updates which can be problematic depending on the order updates are applied Fixes known issue with GNU ARM Eclipse updates which affects debugging with OpenOCD and Segger J-Link Fixes known issue with launching KDS on Mac OS X 10.11 (El Capitan) Includes the latest GNU ARM Eclipse build utilities to overcome the Windows 8192 command line character limit Updated P&E and Segger drivers Includes the "Project of Project" plugin Includes the Kinetis SDK v2.x Project Wizard Includes bare project support for KM1 and KM3 devices   Using KDS v3.2.0 instead of using KDS v3.0.0 with the updates is recommended. KDS v3.0.0 can be kept installed and does not need to be removed. Do *not* install KDS v3.2.0 over an existing KDS installation!   Download the Installer Go to Kinetis Design Studio Integrated Development |NXP Under the Downloads tab, click the button to Download the software Select the host operating system for which you want to download the installer: You need to agree on the license agreement Download the Installer and release notes which contain additional installation instructions: Install the software and consult the release notes for additional installation instructions. Release notes are attached to this document too.   Links Kinetis Design Studio Download Page: Kinetis Design Studio Integrated Development |NXP
View full article
NXP Freedom K22F is an ultra-low-cost development platform for Kinetis K22 MCUs . This board is already widely used among NXP customers. http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=FRDM-K22F   The FRDM-K22F platform features OpenSDAv2.1, which is a bit different as OpenSDAv2 on FRDM-K64F board.  The NXP open source hardware embedded serial and debug adapter running an open source bootloader. This circuit offers several options for serial communication, flash programming, and run-control debugging. User who works with KDS3.0 can choose Segger J-Link OpenSDA, P&E OpenSDA interface, or Mbed interface.  For each of the option, user need update debugger firmware first.  I will introduce each of them one by one.   All the related driver and firmware will be enclosed in this article as attachment.   Enjoy KDS + FRDM-K22F debugging. 🙂
View full article
Hello community!   Attached is a document that introduces the usage of version control using SVN and Kinetis Design Studio.     Contents: 2. Overview and concepts      2.1 VisualSVN Server      2.2 TortoiseSVN 3. Installation instructions      3.1 Installing VisualSVN Server      3.2 Installing SVN Eclipse plugins      3.3 Installing TortoiseSVN 4. Using version control      4.1 Creating new repository in VisualSVN      4.2 Putting a project under SVN Control      4.3 Checking out a project from SVN      4.4 Synchronizing changes 5. Conclusion Appendix A - References       You can find more detailed information about version control on the following post created by our colleague Erich Styger:   Version Control with Processor Expert Projects | MCU on Eclipse   And on this document that explains how to use Git and KDS:   FTF-DES-F1149.pdf   I hope you can benefit from this post, if you have questions please let me know.   Best Regards! Carlos Mendoza
View full article
A new Kinetis SDK has been released Jan 29th 2016. This document shows the steps how to use the SDK with Kinetis Design Studio v3.0.0. Unlike previous SDK's, with the SDK v2.0 it only needs a generic 'new project wizard' inside KDS.   Downloading a Kinetis SDK Package Go to Welcome to Kinetis Expert | Kinetis Expert Login with your user NXP name/account Click on 'Build an SDK' button If this is your first configuration: select board/processor you want to use Customize the SDK version, toolchain and Host OS Build the SDK Check the Software vault and download the file 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) The above steps are in the attached video 'Kinetis SDK V2.0 Configuration Generation.mp4'   Installing Kinetis SDK v2.0 New Project Wizard in Kinetis Design Studio Start Kinetis Design Studio Select Menu Help > Install New Software Select KDS Update site (Freescale KDS Update Site - http://freescale.com/lgfiles/updates/Eclipse/KDS ) Install the New Kinetis SDK 2.x Project Wizard See attached video 'Installing KSDK v2.0 Project Wizard in KDS.wmv'   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:   Creating and Debugging KSDK V2.0 Project Use menu File > New > Kinetis SDK 2.x Project Select/Browse SDK to be used Provide project name Select device/board Select driver set and RTOS Press Finish Build Project Debug Project Steps are shown in the attached video 'Create build and debug Kinetis SDK v2.0 project.wmv'   Links: Kinetis SDK: Welcome to Kinetis Expert | Kinetis Expert Kinetis Design Studio: Kinetis Design Studio Integrated Development |NXP
View full article
Since last year, I have received several same cases from customers when using KSDK1.2/KSDK1.3 and KDS3.0 with MK02FN128. When create a new MK02FN128 KSDK project with  SDK Project Generator ( http://www.nxp.com/products/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 ) or KDS3.0 project wizard, even the new created project has build errors:   When we use KSDK,  ksdk_platform_lib_xxxx must be built for the specific SoC being used in the new created KSDK platform. For K02F12810, this library project file is under: C:\Freescale\KSDK_1.3.0\lib\ksdk_platform_lib\kds\K02F12810   Open ksdk_platform_lib_K02F122810 with KDS3.0, there is wrong setup in ksdk_platform_lib_K02F12810 properties setting: the default target processor is cortex-m0plus!   Because K02 is cortex m4 core, obviously we need modify ksdk_platform_lib_K02F12810 target setting to cortex-m4 instead:   After above revise, rebuild the library project.  Then rebuild user project. The errors are gone.   If user needs to use K02F12810 ksdk_hal_lib_K02F12810 or ksdk_startup_lib_K02F122810 library, they need revise ARM family core to cortex-m4 accordingly. These two libraries project files are under: C:\Freescale\KSDK_1.3.0\lib\ksdk_hal_lib\kds\K02F12810 C:\Freescale\KSDK_1.3.0\lib\ksdk_startup_lib\kds\K02F12810   I have tested all the KSDS1.3 library projects. This defect is only in K02F12810 . NXP doesn’t have K02F FRDM board so far, User can download K02F128 project to FRDM-K22F board without problem. I suggest user use K02F128 project+FRDM-K22F board to start a project. For more information on this related, see application note: http://cache.nxp.com/files/microcontrollers/doc/app_note/AN5040.pdf “Using the FRDM-K22F to Evaluate K02 and K22FN Devices Hardware and Software Considerations”
View full article
Hello community!   Attached is a document that introduces the usage of Component Development Environment (CDE) by creating a software component that will use the Kinetis Software Development Kit (KSDK) drivers to control a 16x2 LCD.   The code provided on the below document will be used as starting point for the creation of the component:   Driving 16x2 LCD using KSDK drivers: https://community.freescale.com/docs/DOC-329190     Contents: 1. Glossary   2. Overview and concepts   2.1 Processor Expert Software   2.1.1 Embedded Components   3. Creating a new embedded component   3.1 Adding properties   3.2 Adding a method   3.3 Adding inherited components   4. Testing component.   Appendix A - References       I hope you can benefit from this post, if you have questions please let me know.   Best Regards! Carlos Mendoza
View full article