Kinetis デザインスタジオ・ナレッジベース

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Kinetis Design Studio Knowledge Base

ラベル
  • General 92

ディスカッション

ソート順:
KDS v3.0 (  New Kinetis Design Studio V3.0.0 available  ) and KSDK v1.2.0 (https://community.freescale.com/docs/DOC-104887  ) have been released for several days. If user project is expected to use the Kinetis SDK, as same as previous KDS and KSDK version, we must apply the Eclipse Update for Kinetis SDK into this tool using Help -> Install New Software. Then go to ..\KSDK_1.2.0\tools\eclipse_update folder to find the appropriate Eclipse update. Recently, I had several customers query a same question about how to start their own KSDK project. I think we can do it by either using KDS project wizard or basing on a KSDK demo project under KSDK3.0 install folder.  this document focuses on how to start customized KSDK project based on KSDK demo code.
記事全体を表示
Greetings, A new release V1.1.1 of KDS is available from the Download tab on http://www.freescale.com/kds V1.1.1 is a full release, and it is recommended to use this new release going forward. V1.1.1 supports Windows (7/8), Linux (32bit binaries for Ubuntu, RHE and CentOS): What's new: Linux RHE and CentOS installation (RPM) Updated KDS User Guide Updated P&E updated site handling to allow support for incremental device support Fixed IP Adddress Setup for P&E Ethernet connection devices (Cyclone MAX, TraceLink) For details, see the V1.1.1 Release Notes.   In addition to the KDS V1.1.1 release, there is an Eclipse update for Processor Expert and Kinetis SDK support. Implemented workaround for HEAP size needs of Newlib-nano GNU library Fixed include path delimiter for Linux hosts Fixed flash configuration field values for several bare project derivatives Updated board configuration templates. Details in the Update1 Release Notes.   Download this .zip file, then install it in Eclipse/KDS using the menu Help > Install New Software (the update will be available on the KDS Eclipse online update site too)   :   Please use KDS V1.1.1 with Eclipse/Processor Expert/SDK Update1 going forward. KDS V1.1.0 projects and settings can be used with V1.1.1.   Best regards, Erich
記事全体を表示
For those of you interested in starting up designs with K64 and KDS here you will find basic baremetal examples with detailed step by step guides explaining which registers to configure, they also include Reference Manual extracts to make it easier to understand and learn how to do so for those unfamiliar with Kinetis devices.   The rar files include document and code example. I hope all  you find them useful.     K64F-GPIO K64F-Interurpt K64F-UART K64F-ADC K64F-PWM
記事全体を表示
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
記事全体を表示
The project attached is a simple bare metal project for the FRDM-KL25 using the new Kinetis Design Studio. All the information about KDS can be found in:   Kinetis Design Studio Kinetis Design Studio Integrated Development Environment (IDE)   The project configures the board to run in PEE mode at 48 MHz. UART0, which is connected to the SDA virtual serial port, is used in Interrupt mode.   The application echoes what is written in the terminal and when the letter r, g or b is entered the RGBleds change respectively (red, green or blue).   I hope this project can be useful.   Best regards.
記事全体を表示
Accelerometer in KDS Description:   This is a small project made in KDS using the accelerometer on a FRDM-MK64FN1M0VLL12 board. The blue LED is on when the board is flat or upside down The red LED is on when the board is on its side The green LED is on when the board is on its nose or tail   Sections of code taken from http://mcuoneclipse.com/2014/05/26/tutorial-data-logger-with-the-frdm-k64f-board/
記事全体を表示
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)
記事全体を表示
Accelerometer in KDS   Description:   This is a small project made in KDS using the accelerometer on a FRDM-KL25Z128M4 board. The program outputs the 3D position of the board to a terminal, such as Tera Term at 9600 baud. PWMs are also used, their intensity is dependent on the offset from the zero position. The red LED intensity increases with X offset. The blue LED intensity increases with Y offset. Simply press any key to begin data output.   Sections of code taken from http://mcuoneclipse.com/2012/09/21/tutorial-accelerating-the-kl25z-freedom-board/   Issues:   There seem to be 'dead zones' while the board is tilted towards a corner. The terminal will not output anything while in a 'dead zone'.   There will be a constant flicker of the LED even when the board is flat. This is due to the accelerometer occasionally outputting 1 even when the board is static.
記事全体を表示
(NOTE: this document gets constantly updated with new information)   =========================================================================== Release Notes: Kinetis Design Studio (KDS) V1.0.1 Beta Date: 06-June-2014 ===========================================================================   Content: 1) What's New 2) Devices Supported 3) Known Issues and Workarounds   Freescale Community Forum: https://community.freescale.com/community/kinetis-design-studio   =========================================================================== 1) What's New =========================================================================== Kinetis Design Studio is a complimentary, free of charge and unlimited Eclipse based tool chain with GNU gcc and GNU gdb for the Freescale Kinetis devices. As debug connections, OpenOCD/CMSIS-DAP, P&E Multilink and Segger J-Link are supported.   A pre-release of the V1.0 beta has been used at the Freescale Technology Forum (FTF) 2014, and based on this feedback, several things have been improved: Installer: Backslash has been removed from KSDK_PATH variable. An additional variable is created (KSDK_PATH_1_0_0_BETA). Installer: Processor Expert CDE (Component Development Environment) is now installed too. Installer: fixed issue with intstallation into a path with spaces. Installer: The installation dialog dealing with removing old versions of KDS has been reworded to clarify that it offers users the opportunity to search for and remove old versions, not that it has already detected old versions on the system already. Installer: The working directory used by shortcuts created on Windows is now the KDS eclipse/ directory. This allows workspaces to be positioned relative to the installation. Processor Expert: an updated version of Processor Expert has been incorporated. Project Creation: Bare projects are now created with proper *.S assembly file extension. Project Creation: Kinetis SDK __START, __HEAP_SIZE and __STACK_SIZE preprocessor symbols are now generated, and include path settings have been extended. Project Creation: Projects for M4 cores with floating point unit have the hardware floating point options set in the compiler settings. Debugging: Updated (v4.84c) version of Segger debug tools which fixes a "Move to Line" GDB issue seen with previous versions. Eclipse: A new release of the GNU ARM Eclipse plugins (http://gnuarmeclipse.livius.net/blog) has been incorporated. This includes fixes for the following issues: On Windows the "Allocate console for OpenOCD" checkbox, that must always be checked, can no longer be modified. The GNU LD Error parser is now enabled by default. Previously errors and warnings from the linker didn't appear in the Problems view. Eclipse: The name of the default workspace has been changed to "workspace.kds". Eclipse: The list of available update sites now includes the P&E Micro update site. OpenOCD: In its default configuration OpenOCD will now always write a known-safe value to the Flash Configuration Field (FCF). This is designed to prevent users from inadvertently locking their devices by programming them with a broken executable. This safety feature can be disabled with the "fcf_write_enable" command, and re-enabled with "fcf_write_disable". These commands may only be used after the kinetis flash bank has been defined. OpenOCD: The part-specific OpenOCD configuration files included in previous releases have been deprecated. They have been replaced by a single configuration file for all kinetis parts: kinetis.cfg. This unified file also uses a faster adapter speed of 1000 Khz. Toolchain: Previous versions of the linker emitted a warning "cannot find entry symbol", when the specified entry point of the program could not be found. This warning has been promoted to an error by default. A pair of options, --warn-missing-entry --error-missing-entry, have been added to allow users to control this behaviour.   IMPORTANT: the KDS V1.0.1 beta installation comes with an installation of the beta Kinetis SDK. For KDS V1.0 GA (General Availability Release), the Kinetis SDK will be a separate installation/zip file, and therefore projects created with the KDS V1.0.1 beta will likely not work with that future Kinetis SDK version without modifictions (e.g. updating path settings).   =========================================================================== 2) Devices Supported =========================================================================== Processor Expert projects: - All Kinetis ARM Cortex-M0+ and Cortex-M4(F) devices supported by Processor Expert.   Kinetis SDK projects: - K64F (MK64FN1M0VMD12 only)   Bare Projects (no SDK and no Processor Expert projects) - K64F, KL25Z   =========================================================================== 3) Known Issues and Workarounds =========================================================================== Installation ISSUE: Users of the KDS v1.0 (FTF) may have an old KSDK_PATH "User" environment variable set. The updated installer only modifies system environment variables. WORKAROUND: Users should remove any stale "User" KSDK_PATH environment variables. ISSUE: When Kinetis Design Studio is installed in a read-only directory, for example Program Files, the Eclipse configuration is stored in a user-specific area. If the user has other versions of KDS, or other Eclipse-based products, using that same configuration area they may be prompted to perform an update when they launch Eclipse. For the components that don't provide a public update site this update will fail, however KDS should still be fully functional; the update can safely be skipped. WORKAROUND: Use the default installation path proposed by the installer. ISSUE: Installing on Linux, if you already have Segger drivers installed, you might receive an error like "dpkg: error processing kinetis-design-studio_1.0.1-1_i386.deb (--install): trying to overwrite '/etc/udev/rules.d/99-jlink.rules' which is alos in package jlink 4.78.7". WORKAROUND: make sure that you install as root. Uninstall the existing j-link drivers before running the KDS installer.   Project Creation ISSUE: For bare projects (no SDK, no Processor Expert), the project is with a linker file for the KL25Z. WORKAROUND: Change/replace the linker file with a linker file matching the device (e.g. copy from a Processor Expert project). ISSUE: Converting and Importing CodeWarrior for MCU projects to KDS as outlined in the QuickStart might result into projects which do not build. As the libraries for KDS are different (EWL), the cannot be automatically mapped to the GNU libraries. WORKAROUND: Update the projects settings manually after project import. ISSUE: Migrating existing CodeWarrior projects with multiple build targets can result in an error message Cannot run program "": Launching failed. The CodeWarrior Migration Assistant only converts the active build configuration. Other build configurations will be partially converted. WORKAROUND: This can be fixed by manually editing the Builder Settings tab in the C/C++ Build properties: Uncheck "use default build command" and replace ${cross_make} with make. ISSUE: After creating a project for MK64 devices that uses both Processor Expert and KSDK users may see build errors: "No valid CPU defined" fsl_sim_features.h. WORKAROUND: This can be worked around by adding a pre-processor definition supported by fsl_sim_features.h to the Projects C Compiler pre-processor settings. For FRDM-K64F make sure the following two symbols are defined in tehe Preprocessor settings of the compiler: "CPU_MK64FN1M0VLQ12" and "CPU_MK64FN1M0VMD12". ISSUE: For Kinetis SDK projects (both only SDK and SDK+PEx), global variables and library does not get properly initialized. A hard fault or undefined global variables are the possible result. This is caused by skipping some initialization code in the startup code. WORKAROUND: In the project settings, under Cross ARM GNU Assembler > Preprocessor, delete the "__START=main" and add __NO_INIT_DATA_BSS to the defines.   Processor Expert ISSUE: Using the AsynchroSerial component causes an error about missing SIM_PDD_SetClockSourceUART0(). (see Missing function SIM_PDD_SetClockSourceUART0 in KDS 1.0.1). WORKAROUND: See workaround in Re: Re: Missing function SIM_PDD_SetClockSourceUART0 in KDS 1.0.1 ISSUE: Processor Expert projects cause a rebuild of the project even if no changes are made. The issue is for example that after opening a project, the Processor Expert .pe (XML) file gets changed, causing a rebuild of the whole project. WORKAROUND: none.   Building ISSUE: ISSUE: In the problems view, after creating or opening a project, the messages "arm-none-eabi-gcc" not found in PATH appears. WORKAROUND: Ignore/delete these errors, as they come from the Eclipse indexer/parser, and they do not affect functionality. The messages will disappear as well if the project is built. Alternately the Problems view can be configured not to show errors from the Scanner: Select "Configure contents" from the Problems view menu, then uncheck the "Show all items" checkbox in the top left, and the "C/C++ Scanner Discovery Problem" checkbox in the types list. ISSUE: The Kinetis SDK comes with projects configured for the GNU ARM Embedded Toolchain which is different from the toolchain used in KDS. So the KDS make file projects cannot be used without modifications with KDS. WORKAROUND: Create a KDS project and add the SDK files to it. ISSUE: Building a Processor Expert project reports duing linking "arm-none-eabi/bin/ld.exe: cannot find entry symbol Reset_Handler". The likely reason is that the project sources for the CPU component including the vector table has not been generated properly. WORKAROUND: Enforce generation of the vector table and the linker file. Go the to 'Build' properties tab of the CPU component and e.g. change the stack size of heap size, then regenerate the code and build again.   Debugging ISSUE: Clicking on the 'bug' (or 'debug') toolbar icon shows a dialog named "Launch DEbug Configuration Selection", and debugging fails from there. WORKAROUND: select the debug configuration from the list behind the small triangle drop down in the 'debug' toolbar icon. ISSUE: When trying to start an OpenOCD debug session from within Eclipse, if the underlying OpenOCD tool fails to start, the Eclipse process manager may appear to hang or may fail with an uninformative error message. Possible causes of OpenOCD failing to start include a board not being connected, a board running the wrong OpenSDA application, or bad options being passed to OpenOCD. Running the command line tool: <KDS_INSTALL_DIR>/openocd/bin/openocd.exe may provide more informative output. WORKAROUND: Make sure the board is properly connected and powered. ISSUE: In some cases it is possible that with using OpenOCD and CMSIS-DAP it can lock the K64F chip on the board, so the CMSIS-DAP is not able to access it any more. You need a P&E Multilink or Segger cable to regain access to the chip. WORKAROUND: Make sure you use the lastest CMSIS-DAP release as it migh have fixed that issue. Use the P&E or Segger debug firmware to debug the board. Steps to load the new firmware: a) Power the FRDM-K64F board with the OpenSDA USB port and hold the reset button while powering the board b) Release the reset button, the board enumerates as BOOTLOADER device, the green LED is blinking. c) Copy the DEBUG_K64F_MBED_PEMICRO_V108.BIN file to the BOOTLOADER device. The green LED will blink fast. c) Repower the board normally: the green LED will be always on. ISSUE: If the PATH variable has double semicolons (;;) or a semicolon at the end, launching gdb debugger might fail. The it is possible that the gdb debugger specified with ${cross_prefix}gdb${cross_suffix} is not found. An error message with "Error while launching command: gdb --version" is shown. WORKAROUND: The likely reason for this issue is a double semicolon in the PATH environment variable, or a semicolon at the end of the variable, see  https://bugs.eclipse.org/bugs/show_bug.cgi?id=389823. If a double semicolon or one at the end is present in your PATH, remove it. If this does not help: In the launch configuration settings, instead using ${cross_prefix}gdb${cross_suffix}, point directly to the GDB executable, e.g. "C:\Freescale\KDS_1.0\toolchain\bin\arm-none-eabi-gdb.exe". ISSUE: The Quick Start Guide (installed in the layout, not the one in this community) states that no OpenOCD debug configuration is required, however "-f kinetis.cfg" must be specified in the other options box. WORKAROUND: specify "-f kinetis.cfg" in the other options box. ISSUE: The current versions of the mbed CMSIS-DAP image sometimes exhibit meta-stability. This manifests as "CMSIS-DAP Write Error (0x04)" and "Polling target kinetis.cpu failed" messages being emitted by OpenOCD. A possible cause is an invalid program being flashed to the device. WORKAROUND: Use another debug technology (P&E Multilink, Segger J-Link) to flash a valid program to the device. ISSUE: When creating a bare project (no KSDK and no Processor Expert) for MK64 devices, programs may not reach main when debugging. This is caused by the the COP watchdog triggering a reset. WORKAROUND: To work around this issue disable the watchdog in __init_hardware, as demonstrated by Processor Expert projects. See Disabling Watchdog for 'Bare' Projects ISSUE: 'Disconnect' from a running target debug session does not work as expected (e.g. halts the target). WORKAROUND: use this as 'Other options' in the debug configuration: -f kinetis.cfg -c "kinetis.cpu configure -event gdb-detach {   resume }"     =========================================================================== Freescale, the Freescale logo, Kinetis, Processor Expert are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. All other product or service names are the property of their respective owners. ARM is the registered trademark of ARM Limited. (c) 2014 Freescale Semiconductor, Inc. ===========================================================================
記事全体を表示
This document provides guidance for relocating Code and Data within the MCU memory map. As part of this process it explains how create new memory segments and sections by editing the GCC Linker File (.ld) for Kinetis Architectures.   Contents:   1.- Introduction 2.- Preliminary Backgrounds 3.- Linker File (.ld) Overview 4.- Relocating Code 4.1.- Prerequisites 4.2.- Relocating Code in ROM 4.3.- Relocating Code in RAM 4.4.- Relocating Code in a Specific RAM address 4.5.- Relocating Code in External RAM 5.- Relocating Data 6.- Linker File for RAM Project   Best Regards, Carlos Mendoza Technical Support Engineer
記事全体を表示
Greetings, I have created a multi-part tutorial how to use the WS2812B (aka Adafruit NeoPixel) LED stripes and boards with the FRDM-K64F board:   Tutorial: Adafruit WS2812B NeoPixels with the Freescale FRDM-K64F Board – Part 1: Hardware Tutorial: Adafruit WS2812B NeoPixels with the Freescale FRDM-K64F Board – Part 2: Software Tools Tutorial: Adafruit WS2812B NeoPixels with the Freescale FRDM-K64F Board – Part 3: Concepts Tutorial: Adafruit WS2812B NeoPixels with the Freescale FRDM-K64F Board – Part 4: Timer Tutorial: Adafruit WS2812B NeoPixels with the Freescale FRDM-K64F Board – Part 5: DMA The tutorials go though the hardware setup, Kinetis Design Studio, debugging the first project, using the Kinetis SDK, how to set up the Flex Timer Module (FTM) and how to use the Kinetis eDMA to generate the timing and bitstream to drive the WS2812B LED stripes.   I hope you find this useful, and you learn from this for your next design.   Happy Kinetising 🙂
記事全体を表示
Sometimes I only want to download a binary (.s19, .hex, .elf) without the need for the project and sources of it. With the command line version of GDB you can do this, but there is as well a way in KDS to do this more interactively: Flash to File...   From the Run menu, select 'Flash from file...':   Then configure your connection (see KDS Debug Configurations (OpenOCD, P&E, Segger)). Beside of the settings in the Debugger Tab (which depends on the used debug interface (P&E, Segger, OpenOCD, see note1 below), you need to specify in the 'Main' tab two things: The name of the binary (e.g. elf file) A project name (see note2 below)     Note1: there is a current issue in KDS v1.0.1beta that P&E is not listed as Debugging Connection. This is expected to be fixed in KDS V1.1 (GA).   Note2: While the project is not really necessary, there is the issue in KDS v1.0.1beta that without a project name, you will get an error. So if you start with a new/empty workspace, you need to create a 'dummy' project first and to provide this as a project name.   Happy Flashing 🙂
記事全体を表示
For the Windows version of SDK, I was not able to use the OpenSDA with CMSIS-DAP running on the FRDM-KL25Z.. The Quick Start guide Figure 12 shows the a blank field for "Other options". You must enter "-f kinetis.cfg" here or you will not be able to debug. See below.
記事全体を表示
The FRDM-K64F board comes with the mbed CMSIS-DAP firmware installed by default. CMSIS-DAP can be used with KDS using OpenOCD. There are two alternative firmware files available for the FRDM-K64F (which runs OpenSDAv2 (which is different from the previous OpenSDAv1)): P&E OpenSDAv2 which emulates a P&E OpenSDA/Multilink Segger OpenSDAv2 which emulates a Segger J-Link   The Segger firmware is available on the Segger home page (see Segger J-Link Firmware for OpenSDAv2 | MCU on Eclipse). The P&E firmware has not been released at the P&E web site yet, but is available attached to this document.   To install the firmware: Unpack the .bin file from the zip archive. Power the board with the OpenSDA USB port with the reset button pressed Release the reset button, the green LED shall blink. Copy the .bin file to the BOOTLOADER device, wait until the green LED flashes fast Re-power the board Now you have your new P&E or Segger firmware loaded. In KDS use the P&E GDB server and select OpenSDA. For Segger select J-link. See KDS Debug Configurations (OpenOCD, P&E, Segger) for details.
記事全体を表示
LCD Timer in KDS   Description:   A project made in KDS using the FRDM-MKL46Z256VLL4 board's LCD screen as a timer. The LCD will display minutes and seconds from 00:00 to 99:59, before resetting to 00:00.   Sections of code taken from an example project found at: https://github.com/ErichStyger/mcuoneclipse/tree/master/Examples/FRDM-KL46Z/FRDM-KL46Z_Demo
記事全体を表示
This document explains how you can debug the FRDM-K22F board with the Segger J-Link OpenSDAv2.1 Firmware and the Kinetis Design Studio V1.1.0.   Applicable to: OpenSDAv2.1 boards (FRDM-K22F for now) Kinetis Design Studio V1.1.0     Outline The FRDM-K22F board (FRDM-K22F|Freedom Development Board|Kinetis|Freescale) comes with OpenSDAv2.1 programmed on it, and has the CMSIS-DAP debug firmware on it by default. (see 'Technical Details' at the end about the OpenSDA differences)   OpenOCD with CMSIS-DAP for FRDM-K22F is not supported in KDS V1.1.0. Trying to debug the FRDM-K22F board with KDS V1.1.0 and OpenOCD/CMSIS-DAP results in an error in the Console View and is currently not possible, until OpenSDA gets updated (see Kinetis Design Studio V1.1.0: Release Notes and News).   One solution is to use the Segger J-Link OpenSDAv2.1 firmware to debug the board. (Another solution is to use the P&E Multilink OpenSDAv2.1 firmware, see FRDM-K22F: Debugging with P&E OpenSDAv2.1 Firmware)   Installation of Segger J-Link OpenSDA V2.1 Firmware You need to install the Segger J-Link OpenSDAv2.1 firmware on the board, and you only need to do this once (unless you change the firmware again).   Go to SEGGER - The Embedded Experts - OpenSDA / OpenSDA V2 and download the OpenSDA V2.1 firmware (zip file) Unzip the firmware file (JLink-OpenSDA_v2_1.bin) in the zip file to your harddisk. Power the board/Plug in the USB cable with the OpenSDA USB port, while having the Reset/SW1 pressed. The device should enumerate BOOTLOADER: device on your host. You are now in bootloader mode. Copy the Segger .bin file to that BOOTLOADER device. Wait a few seconds to complete the operation. Unplug the board, and now power it normally (without SW1 pressed) The board should now show up as J-Link device and with a virtual COM port: You are ready to use to debug the FRDM-K22F as if you would do with a Segger J-Link 🙂   Debugging with Segger J-Link OpenSDAv2.1 Create a new debug/launch configuration: Select your project, then use the menu Run > Debug Configurations. Use the 'new' Icon to create a new configuration for your application and project (Main tab):   Specify MK22FN512xxx12 as your device name, and make sure 'SWD' is selected:   Have SWO disabled:   That's it. Now you can debug your application with Segger J-Link OpenSDA V2.1 firmware on the board :-). You can use the 'Debug' button in the launch configuration: Or use the debug icon drop-down list:   Happy Debugging 🙂 Technical Details There are so far three versions of the OpenSDA available: OpenSDAv1.0: this one is on all the FRDM boards like FRDM-KL25Z, FRDM-KL26Z, FRDM-KL46Z, FRDM-K20, ... (prior FRDM-K64F). The bootloader on these boards is protected and cannot be erased and supports P&E, Segger and CMSIS-DAP debug applications (*.sda). OpenSDAv2.0: This version was released at FTF 2014 with the FRDM-K64F board. This is an open source bootloader, and the bootloader can be replaced by the user. It supports *.bin files and P&E, Segger and CMSIS-DAP debug applications. OpenSDAv2.1: This version is released with the FRDM-K22F board. It is the same as The debug circuit on the board is the same for all OpenSDA versions (Kinetis K20 microcontroller): the difference is what bootloader is programmed on the K20: the bootloader on the OpenSDAv1.0 cannot be erased/changed. The bootloader on OpenSDAv2.x can be erased/changed, and the difference between the OpenSDAv2.0 and v2.1 is the address where the debug application starts: for OpenSDAv2.0 it expects the application at address 0x5000, while OpenSDAv2.1 expects the application to start at address 0x8000.   See also: OpenSDAv2
記事全体を表示
This document is a step by step to install KDS.
記事全体を表示
Kinetis Design Studio Q: What is the idea of KDS? A: It is a basic, complimentary, free development tool with no code size restrictions, for editing, compiling and debugging for all Kinetis MCUs. It is based on stock Eclipse (Kepler), includes GNU gcc build tools and GNU gdb debugging tools and Processor Expert. Q: Where is Kinetis Design Studio available for download? A: Kinetis Design Studio downloads are hosted on http://www.freescale.com/kds. Watch out for Announcments in this forum for new releases and updates.   KDS and CodeWarrior Q: What is the difference between KDS and CodeWarrior? A: KDS is unlimited, and the debugger is using open source GDB instead of a proprietary debugger engine. KDS only supports Kinetis, while CodeWarrior supports other architectures including ColdFire, ColdFire+, DSC, Qorivva, PX, RS08, S08 and S12Z. CodeWarrior will maintain the current support of Kinetis devices, while new Kinetis devices will be rolled into KDS. Q: Can I import CodeWarrior projects? A: Yes and no. CodeWarrior uses a different compiler (Launchpad GNU ARM gcc), while KDS is using a different version with different libraries. The build tool panels are similar, but not the same (KDS is using the open Source GNU ARM Eclipse plugins, while CodeWarrior uses an earlier and modified variant of that). As such, the compiler and project settings are similar, but not compatible. Moreover, the libraries (EWL in CodeWarrior, newlib and nano in KDS) are completely different. There is a migration assistant feature in KDS (see the KDS Quickstart Guide) which helps with some of the migrations settings. But it might be a cleaner approach just to create a new project with the new project wizard, and then add the CodeWarrior source files to the new KDS project instead.   Installation Q: Which host operating systems are supported? A: Windows 7 and 8 (both 32bit and 64bit), Linux (Ubuntu, RedHat, Centos) are supported. Mac OS X will be supported later to the end of this year. Q: The RPM Linux installation file has the *.i686.rpm extension, does this mean that it is a 64bit installation? A: No, it means that it runs on ix86, where i686 as a more recent version than the (old) i386. Both Linux packages for KDS (_i386.deb, .i686.prm) are 32bit packages. A 64bit package would be x86_64. Q: The binaries for Linux are 32bit, where are the 64bit binaries? A: In this version, only 32bit binaries are supported. We plan to provide 64bit binaries later this year. Q: In the custom setup of the installer, I do not see Processor Expert listed? Does this mean I have to install it separately? A: Processor Expert is included in the installation, and not optional (it is always installed). If you install KDS, then Processor Expert is installed in KDS as well, so no need to install it separately. Q: After installation of KDS, do I need to download and install the Kinetis SDK? B: Yes, this is a separate download and installer from http://www.freescale.com/ksdk. Additionally, you need to install the Eclipse update from the <sdk>\tools\eclipse_update for full board and SDK support in KDS.   Processor Expert Q: How can I add my own interrupt vector? A: Use the menu Run > Debug Configurations and see Creating New Eclipse Debug Configuration | MCU on Eclipse Q: I want to use the RESET or NMI pin as a user button. How can I do this? A: see Pin Muxing: Using the NMI Pin as GPIO Pin | MCU on Eclipse and Using the Reset Button on the Freedom Board as User Button | MCU on Eclipse. Q: How can I switch from the new 'tab' view to the 'table' view in the component inspector? A: Use the small triangle in the view to deselect the 'Tabs View', see Processor Expert (Driver Suite/Plugins/KDS) V10.4 with new Component Inspector | MCU on Eclipse   RTOS Q: I have downloaded MQX v4.1, but there are no KDS projects or KDS wizards included? A: MQX Kernel Awareness is supported in KDS V1.1.0 or later, and it is installed with the menu Help > Install New Software and use the KDS Eclipse Update Site (http://freescale.com/lgfiles/updates/Eclipse/KDS).   Building Q: How to build a S19 or binary file to be used with the mbed bootloader (OpenSDAv2) on the FRDM-K64F board? A: See Binary Files for the mbed Bootloader with Eclipse and GNU ARM Eclipse Plugins | MCU on Eclipse Q: How can I print the code and data size of my application? A: There is an option in the build tools to print the size, see Printing Code Size Information in Eclipse | MCU on Eclipse Q: I get a compiler error that 'asm' is not recognized? A: By default the compiler settings are for C99, and there the 'asm' keyword is not recognized. Either change it to __asm (with two underscores) or change the compiler settings to use GNU ISO 90 (see First experence with KDS (Beta) with FRDM-K64F) Q: I want to use the latest GCC ARM Embedded (launchpad) tools and libraries, and not the version in KDS. How can I use KDS with the a different ARM toolchain and libraries? A: This article describes how to swap/change the tool chain: Switching ARM GNU Tool Chain and Libraries in Kinetis Design Studio | MCU on Eclipse Q: How to print to a physial serial port with printf() on the K64F? A: You need to implement application hooks, see printf() and scanf() with GNU ARM Libraries | MCU on Eclipse and UART printf() for the FRDM-K64F Board and Kinetis Design Studio | MCU on Eclipse.   Debugging Q: Which debugging probes are supported? A: KDS supports P&E Multilinks (including P&E OpenSDAv1), Segger J-Link (OpenSDAv1 and OpenSDAv2) and OpenOCD with CMSIS-DAP (both OpenSDAv1 and OpenSDAv2). Q: What is the difference between OpenSDAv1 and OpenSDAv2? A: OpenSDAv1 (see OpenSDA on the Freedom KL25Z Board | MCU on Eclipse) is present on boards released prior the FRDM-K64F120M (e.g. the FRDM-KL25Z and other Freedom boards), and support *.SDA firmware files. OpenSDAv2 is based on an open source mbed bootloader, is installed by default e.g. on the FRDM-K64F board, and loads *.BIN firmware files. Q: How can I use the Segger OpenSDAv2 on my FRDM-K64F board? A: You need to download the firmware from Segger.com and load it on the board, see Segger J-Link Firmware for OpenSDAv2 | MCU on Eclipse. Q: How can I create a new debug configuration? A: See the steps outlined in Creating New Eclipse Debug Configuration | MCU on Eclipse Q: I cannot see global variables in the Variables View? A: In KDS (Eclipse Kepler) you need to use the Expressions View, see Variable Debugging with Eclipse Kepler | MCU on Eclipse Q: I only see core registers in the Registers View? A: Yes, peripheral registers are not yet supported in this version. But there is a plugin described here you can use with KDS: How to Add Register Details View in Eclipse | MCU on Eclipse Q: I'm using FreeRTOS, how to debug with Kernel Awareness so I see the tasks, stack size, etc? A: Download and install the additional FreeRTOS plugin as outlined in DIY Free Toolchain for Kinetis: Part 5 – FreeRTOS Eclipse Kernel Awareness with GDB | MCU on Eclipse. Q: My FRDM-K64F OpenSDAv2 (red) LED is always on, and I cannot debug or connect to my board. How can I recover? A: See the steps outlined in Recovering FRDM-K64F mbed Board | MCU on Eclipse Q: How can I share my debug configuration or to store it as a file in my project? A: See http://mcuoneclipse.com/2014/03/15/sharing-debug-configuration-with-eclipse/ Q: By default, the variables (e.g. in the registers view) are shown in decimal format. How to change the default to Hexadecimal format? A: See Debugging Variables in Hexadecimal with Eclipse | MCU on Eclipse Q: What device name can I specify in the Segger debug configuration? A: There is a link which points to all the devices supported by Segger in the launc configuration panel, see GNU ARM Eclipse & Segger J-Link Device Name Settings | MCU on Eclipse Q: How can I set a watchpoint on a variable in memory or on an address in memory? A: See C/C++ Watchpoints with Eclipse Kepler | MCU on Eclipse Q: How can I use printf() with semihosting? A: See Semihosting with Kinetis Design Studio | MCU on Eclipse Q: How to preserve memory ranges so that not everything gets erased on the target while downloading? A: For P&E GDB Server connection, see Preserving Memory Ranges with Eclipse and P&E GDB Server | MCU on Eclipse.
記事全体を表示
  Hello Freedom community users Bheema has posted on the Element14 community a very clear tutorial (accessible following the link below) to create from scratch a basic project example for the FRDM-K64 with Kinetis Design Studio (KDS). Freescale Freedom development platform: [FRDM-K... | element14 I strongly recommend you to start following those steps to properly setup the tool and the OpenSDAv2 interface embedded in the new Freedom and TWR boards. Happy Programming Greg
記事全体を表示
Accelerometer in KDS   Description:   A project made in KDS using the FRDM-MKL46Z256VLL4 board's LCD screen to display accelerometer data. The LCD will initially display the accelerometer data for the X axis. Pressing SW3 will toggle between displaying other axis. A timer has also been included from my previous project. Pressing the SW1 at any time will reset the timer back to 0.   Sections of code taken from an example project found at: https://github.com/ErichStyger/mcuoneclipse/tree/master/Examples/FRDM-KL46Z/FRDM-KL46Z_Demo
記事全体を表示