Kinetis Design Studio Knowledge Base

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Kinetis Design Studio Knowledge Base

Labels
  • General 92

Discussions

Sort by:
The following link has the information how to enable semihosting inside Kinetis Design Studio:   Semihosting with Kinetis Design Studio | MCU on Eclipse
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
A new updated plugins is available from P&E with extended device support (see list at the end) for KDS V1.1.1:   NOTE: You need V1.1.1 for this update, as V1.1.0 has an issue with updating the P&E plugins, unless you apply a manual workaround. See the V1.1.0 release notes.   Use the menu Help > Install New software and use the PEmicro update site from the list: Select the updated plugin, and press 'Next' to go through the installation. At the end, you are asked to re-start KDS.     Release Note information: KDS_513_b140905 includes the following features and bug fixes:   (*) Adds device support for the following devices: (*) Add MBED/PEMICRO OpenSDA support for FRDM-K22F and FRDM-K64F boards   Kinetis - K24 Series k24fn256m12   Kinetis - KL17/KL27/KL33/43 Series kl17z32m4 kl17z64m4 kl17z128m4 kl17z256m4 kl27z32m4 kl27z64m4 kl27z128m4 kl27z256m4 kl33z128m4 kl33z256m4 kl43z128m4 kl43z256m4   Kinetis - KMx - Photon3 km14z64am5 km14z128am5 km33z64am5 km33z128am5 km34z128am5   Kinetis - KV4x kv40f64m15 kv40f128m15 kv40f256m15 kv43f64m15 kv43f128m15 kv44f64m15 kv44f128m15 kv45f128m15 kv45f256m15 kv46f128m15 kv46f256m15   Kinetis - K11/K21 - K20 512k/1Mb k11dn512am5 k11dx128am5 k11dx256am5 k21dn512am5 k21dx128am5 k21dx256am5 k21fn1m0am12 k21fx512am12   Kinetis- K02F Series: K02F128M10 K02F64M10   Kinetis- KW Series:   KW01Z128 KW21D256M5 KW21D512M5 KW22D512M5 KW24D512M5   Kinetis- K66/65 Series: K66FX1M0M18 K65FX1M0M18 K66FN2M0M18 K65FN2M0M18   Kinetis - WPR Series alpha WPR1516M2   KDS_506c_b140807 includes the following features and bug fixes:   Plugin Version 1.12.   ENGR00325552 - Includes changes to p2.inf to include both metadata and artifact repositories on the same line. ENGR00325553 - Specify IP issue for Ethernet P&E interfaces (Cyclone MAX, Tracelink) is addressed. Adds support for MBED Bootloader 2.1 on FRDM-K22F and FRDM-K64F boards.       Happy Updating 🙂
View full article
'Bare' (no PEx, no SDK) projects created with KDS V1.0.1 beta have the issue that the watchdog is not disabled (see KDS V1.0.1beta release notes). This document explains how to disable the watchdog for the FRDM-KL25Z (steps are similar to other boards).   1. Add Derivative Header file Add the derivative header file to your project. The header files are located in C:\Freescale\KDS_1.0.1\eclipse\ProcessorExpert\lib\Kinetis\iofiles Copy the matching header into the Startup_Code folder:   2. Disable Watchdog Open startup.c and locate the function __init_hardware(). Include the derivative header file and the code to disable the watchdog:   This will disable the watchdog during startup. The above project is attached as a reference.   Code for the K64F #define STARTUP_WDOG_STCTRLH_VALUE                     0x01D2U   /* WDOG_STCTRLH value */ #define STARTUP_WDOG_KEY_1                             0xC520U   /* Watchdog unlock key 1 */ #define STARTUP_WDOG_KEY_2                             0xD928U   /* Watchdog unlock key 2 */   void __attribute__ ((weak)) __init_hardware(void) {   /* Disable the WDOG module */   WDOG_UNLOCK = (uint16_t)STARTUP_WDOG_KEY_1; /* Key 1 */   WDOG_UNLOCK = (uint16_t)STARTUP_WDOG_KEY_2; /* Key 2 */   WDOG_STCTRLH = (uint16_t)STARTUP_WDOG_STCTRLH_VALUE; /* Disable WDOG */ }
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
Blinking the LED in KDS   Description:   This is a small project made in KDS on a FRDM-MK64FN1M0VLL12 board. The blue LED toggles off and on every second, controlled by a timed interrupt.
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 is a list of tutorials about using the Kinetis SDK with either Kinetis Design Studio or Eclipse Kepler and the GNU ARM build tools. They use the FRDM-K64F board, but any other board/microcontroller supported by the Kinetis SDK can be used.   Project creation and Startup code:  Tutorial: DIY Kinetis SDK Project with Eclipse – Startup | MCU on Eclipse Board configuration: Tutorial: DIY Kinetis SDK Project with Eclipse – Board Configuration | MCU on Eclipse
View full article
Temperature in KDS   Description:   A project made in KDS using the FRDM-MKL46Z256VLL4 board's LCD screen to display temperature. The LCD will display temperature data taken from the magnetometer in degrees Celsius. Data is read every 500ms as this lowers flickering when between temperatures.   Updates:   After initially submitting this project after having it working, I tried to load it up and found out the temperature not displaying correctly. After much trial and error I managed to find out that not initializing the magnetometer was causing the issues, even though it was not the previous day! Have edited the project to add in the initialization just in case it causes anyone else errors.
View full article
KDS does not come with a register level detail view included, only the ARM core non-memory mapped registers are displayed in the Registers view. There is an open source Eclipse plugin which can be added to KDS which brings register level details: For this view, install the EmbSys Eclipse plugin, and apply a patch (zip file) to get all the Freescale register detail information in SVD (XML) files. The installation and usage of the plugin is described in: http://mcuoneclipse.com/2014/05/29/how-to-add-register-details-view-in-eclipse/   The patch files which fix an issue in the existing plugin (see EmbSys Registers View with CMSIS-SVD dimElementGroup | MCU on Eclipse) and adds extra Freescale SVD files to the installation (see Updated Eclipse EmbSysReg Viewer with extra Freescale SVD Files | MCU on Eclipse).   The patch files are hosted on SourceForge: McuOnEclipse - Browse /Eclipse Plugins/EmbSysReg at SourceForge.net   Happy Registering 🙂
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 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