Kinetis Design Studio知识库

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Kinetis Design Studio Knowledge Base

标签

讨论

排序依据:
  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
查看全文
This document explains how you can debug the FRDM-K22F board with the P&E 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 P&E OpenSDAv2.1 firmware to debug the board. (Another solution is to use the Segger J-Link OpenSDAv2.1 firmware, see FRDM-K22F: Debugging with Segger J-Link OpenSDAv2.1 Firmware)   Update KDS from P&E Update Web Site For KDS V1.1.0, you need to install an update throught an Eclipse update. The update is from www.pemicro.com/eclipse/updates within the Install New Updates dialog under the Eclipse Help menu. !!!! Please note that there is a known issue in KDS V1.1.0 which requires  to remove and add a link to P&E's update site in order for installation procedure to work in KDS v1.02. Please see description below: Issue: The default P&E update site included in KDS v1.02 (PEMicro - http://www.pemicro.com/eclipse/updates)  will not allow a user to properly update the P&E plugin on a freshly installed KDS 1.02 layout. Workaround:  a. Remove the PEMicro - http://www.pemicro.com/eclipse/updates update site from the list of available update sites. Use the menu Help > Perferences > Install/Updates > Available Software Sites and Remove the PEMicro entry: b. Exit the KDS Eclipse IDE and restart it from the command line with the  -clean parameter. On Windows start Eclipes from the cmd.exe (DOS shell) with the -clean parameter: c. In Eclipse, add the PEMicro - http://www.pemicro.com/eclipse/updates update site. Use the menu Help > Install New Software and press the Add button: d) Enter http://www.pemicro.com/eclipse/updates as update Location and press OK: e) Then update from P&E's website:   Installation of P&E OpenSDA V2.1 Firmware You need to install the P&E OpenSDAv2.1 firmware on the board, and you only need to do this once (unless you change the firmware again).   Go to http://www.pemicro.com/opensda/ and download the OpenSDA Firmware Apps file (zip file) (requires registration at P&E) Unzip the firmware files to a folder on 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 the correct firmware file (DEBUG-FRDM-K22F_Pemicro_v108b_for_OpenSDA_v2.1.bin) to the 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 OpenSDA device, a virtual COM port and as PEMicro OpenSDA Debug Driver: You are ready to use to debug the FRDM-K22F as if you would use a P&E Multilink 🙂   Debugging with P&E 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):   In the Debugger tab, specify OpenSDA Embedded Debug as Interface, select the OpenSDA device as Port, and select the K22FN512M12 as device, and make sure 'SWD' is selected:   That's it. Now you can debug your application with P&E 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: And then I'm debugging the FRDM-K22 with the P&E OpenSDAv2.1: 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 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
查看全文
(NOTE: this document gets constantly updated with new information) =============================================================================== Release Notes and News: Kinetis Design Studio V1.1.0 Version Date: 05-Aug-2014 ===============================================================================   Greetings, The Kinetis Design Studio is a complimentary (free of charge) IDE and tool chain to develop, build and debug embedded applications for Freescale Kinetis Devices. It is based on open source software including Eclipse, GNU compiler and GDB Debugger. The Kinetis Design Studio is offered for free, and support for it is provided through this Freescale Kinetis Design Studio Community Forum.   Setup Files and Installation The software can be downloaded from the download section here: Kinetis Design Studio Integrated Development |Freescale. Currently, installation files are provided for Windows 7/8 (.exe) and Ubuntu 32-bit (.deb). NOTE: Installation files for RedHat/Centos (.rpm) have not been released yet, but we expect either a workaround or a fix shortly. NOTE: To have the full device support (e.g. KV31 devices) and Kintetis SDK support, you have to install the Kinetis SDK and install the KDS Eclipse update in <sdk installation>\tools\eclipse_update.   Documentation and Release Notes The documentation page on http://www.freescale.com/kds hosts several documents: Fact Sheet: Information about Kinetis Design Studio User Guide: Installation and Setup, first steps with Kinetis Design Studio Porting Guide: How to port applications from CodeWarrior to Kinetis Design Studio. Release Notes: Information about device support, known issues and workarounds. As the information and release notes are constantly updated, an update of the infomation is provided in the "Release Note Update" section below. Migrating from KDS V1.0.1 (Beta) to KDS V1.1.0 If you have the beta version installed, there is no need to uninstall it. Uninstall it once you migrated everything from the beta to the V1.1.0. If you have a workspace or projects from the beta version, it is recommended that you start with a new workspace (do not share a workspace between different versions!). You should be able to migrate 'normal' projects easily. However, Kinetis SDK projects will not be able to be migrated easily, because there has been a lot of changes. If you are migrating a Kinetis SDK project, then the best advice is to create a new project with KDS V1.1.0 and then move your own files over.   Release Note Updates and News This section contains updates and news after publication of the release notes: 05-Aug-14: Installation for RedHat/Centos 32-bit: the installation files are on hold right now. Watch for an annoucement in this community forum. 05-Aug-14: OpenOCD for FRDM-K22F board: KDS does not support OpenOCD for the K22F on these boards yet. Instead, a Segger (see FRDM-K22F: Debugging with Segger J-Link OpenSDAv2.1 Firmwarehttp://www.segger.com/opensda.html) or P&E debug application can be used until there will be an OpenOCD update for KDS. Watch for an announcement in this community forum.   Thanks for using the Kinetis Design Studio!   =========================================================================== 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. ===========================================================================   Freescale Community Forum: https://community.freescale.com/community/kinetis-design-studio
查看全文
KDS V1.0.1 (beta) is using the GNU 4.8.0 toolchain, while the latest and greatest from ARM Inc. on launchpad is the 4.8.2 GCC ARM Embedded.   KDS V1.0.1 (beta) is using an older newlib nano which requires at least 400 bytes of HEAP memory. This is an issue for smaller Kinetis devices (e.g. less than 2 KByte of RAM). It is possible to switch the tool chain and libraries in KDS to the 4.8.4 (or later) from ARM/launchpad.   The following article describes the details and steps to use a different toolchain than the default one: http://mcuoneclipse.com/2014/07/11/switching-arm-gnu-tool-chain-and-libraries-in-kinetis-design-studio/ Basically it means to put the GCC ARM Embedded into a special folder inside KDS. That article explains as well the differences between the original KDS tool chain and the GCC ARM Embedded one.
查看全文
Reaction game in KDS   Description:   A project made in KDS using the FRDM-MKL46Z256VLL4 board's LCD screen and the two switches, SW1 and SW3, to create a reaction testing game. Hold the board with both of your thumbs above the two switches. After "rdy" (ready) appears, the screen will either display "left", "righ" (right), or "both" and you must press the appropriate button(s). It will then display your reaction time in milliseconds. You initially get 1000ms to react, this decreases by 25ms for every point you score to a minimum of 500ms. 1 point is given per correct response. If you do not react fast enough, or press the wrong button(s), you lose the game. Once you lose, your score will be displayed and then the game will reset back at "rdy" with the 1000ms time to react.   Issues: You can cheat by pressing both buttons every time, this will not work 100% of the time though.
查看全文
Light Intensity in KDS   Description:   A project made in KDS using the FRDM-MKL46Z256VLL4 board's LCD screen to display light intensity. The LCD will display light intensity taken from the light sensor.
查看全文
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.
查看全文
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
查看全文
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 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
查看全文
USB Keyboard in KDS   Description:   A project made in KDS using the FRDM-MKL46Z256VLL4 board as a USB keyboard input. A red LED will flash while not connected as a USB keyboard, and green LED will flash when it is. Switch SW3 will type 'SW3 Pressed' and switch SW1 will type 'SW1 Pressed' In Application.c is commented out example code for pressing print screen and control+alt+delete.   Sections of code taken from http://mcuoneclipse.com/2013/06/30/using-the-frdm-kl25z-as-usb-keyboard/
查看全文
USB Mouse in KDS   Description:   A project made in KDS using the accelerometer on a FRDM-MKL46Z256VLL4 board to control a USB mouse input. A red LED will flash while not connected as a USB mouse, and green LED will flash when it is. SW1 will right click. SW3 will left click.   Sensitivity of the mouse can be changed by altering the HIDM1_Move command in main.c   Sections of code taken from: - http://mcuoneclipse.com/2012/09/21/tutorial-accelerating-the-kl25z-freedom-board/ - http://mcuoneclipse.com/2013/08/01/using-the-frdm-kl25z-as-a-usb-mouse-device/
查看全文
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.
查看全文
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/
查看全文
Writing to Acceleometer data to SD Card in KDS   Description:   A project made in KDS using the FRDM-MK64FN1MOVLL12 board to write the Accelerometer data to an SD Card. Every second, the time and the value of the variables x, y and z taken from the Accelerometer will be written to an SD Card. They will be written in a log.txt file, which will be created if it does not exist. The LED will flash green every second when writing. In case of an error, the LCD will flash red every second.   Sections of code taken from http://mcuoneclipse.com/2014/05/26/tutorial-data-logger-with-the-frdm-k64f-board/   Issues:   Time will always begin at 17:51:31 after being flashed. This is due to it being set as such at TmDt1_Init.
查看全文
Writing to SD Card in KDS   Description:   A project made in KDS using the FRDM-MK64FN1M0VLL12 board to write to SD Card. Every second, the time and the value of the variables x, y and z will be written to an SD Card. They will be written in a log.txt file, which will be created if it does not exist. x, y and z are set to 1, 2, and 3 by default.   Sections of code taken from http://mcuoneclipse.com/2014/05/26/tutorial-data-logger-with-the-frdm-k64f-board/   Issues:   Time will always begin at 17:51:31 after being flashed. This is due to it being set as such at TmDt1_Init.
查看全文
Based on Erich's HID Mouse tutorial, this is a simple HID compliant Air Mouse, with the pointer being controlled using the onboard accelerometer.     A full Tutorial on how to make this project is available inside the Zip under "Simple Air Mouse on a FRDM KL25Z.pdf". It aims to fully explain the process of building the project in KDS, how to set up the board for HID interaction and how to setup the accelerometer.   Thanks go to Erich Styger for the original tutorial and insight, along with his incredibly handy component library.   If i've been confusing or have forgotten to note something (as I no doubt will have), please don't be afraid to message in to let me know and i'll update the relevant files.
查看全文
USB Keyboard in KDS   Description:   A project made in KDS using the FRDM-KL25Z128M4 board as a USB keyboard input. The LED will flash red while not connected as a USB keyboard, and flash green when it is. The reset button will press the print screen button. The reset button can be configured to press any possible key as long as they are correctly #defined. Use http://www.usb.org/developers/devclass_docs/Hut1_11.pdf as a reference for keys. Strings may also be output, see the commented out H1DK1_SendStr call in main.c for an example.   Sections of code taken from http://mcuoneclipse.com/2013/06/30/using-the-frdm-kl25z-as-usb-keyboard/
查看全文
USB Mouse in KDS   Description:   A project made in KDS using the accelerometer on a FRDM-KL25Z128M4 board to control a USB mouse input. The LED will flash red while not connected as a USB mouse, and flash green when it is. The reset button will left click.   Sensitivity of the mouse can be changed by altering the HIDM1_Move command in main.c Reset button can be changed from left to right click by altering comments in main.c   Sections of code taken from: - http://mcuoneclipse.com/2012/09/21/tutorial-accelerating-the-kl25z-freedom-board/ - http://mcuoneclipse.com/2013/08/01/using-the-frdm-kl25z-as-a-usb-mouse-device/
查看全文