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

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

Kinetis Design Studio Knowledge Base

ラベル

ディスカッション

ソート順:
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 is a step by step to install KDS.
記事全体を表示
Normally when debugging you need to know the status of your registers in the Embsys Registers section. Most of the time when a board or chip are just released you are not able to select them (because they're not available) and therefore it makes it more difficult for you to debug. In this document I will guide you through the process for adding any chip you are working with to EmbSys Registers section. 1. First of all it is needed to know where the Embsys Registers' Folder is located. Go to the folder where KDS is installed. 2. Go to eclipse folder. 3. \org.eclipse.cdt.embsysregview.data_0.2.4.freescale 4. \data 5. \SVD(CMSIS) 6. \Freescale 8. Finally this folder contains XML files, these files can be processed purely as data by the program. To add a new XML file which describes the new chip: 1. go to your chip's package (In my case \SDK_2.2_MKL28Z512xxx7.zip). Note: If you don't know where to build a package, please go to the following post: https://community.nxp.com/docs/DOC-333304  2. \SDK_2.2_MKL28Z512xxx7.zip\devices 3. \SDK_2.2_MKL28Z512xxx7.zip\devices\MKL28Z7 As you can see, the MKL28Z7 is not available in EmbsysRegView. Locate the XML and copy it to the route: C:\Freescale\KDS_v3\eclipse\plugins\org.eclipse.cdt.embsysregview.data_0.2.4.freescale\data\SVD(CMSIS)\Freescale Paste it in Freescale's folder: Go to EmbSysRegView again and now it will be available Restart Kinetis Design Studio and you'll be able to see your chip's registers: By Ivan Ruiz.
記事全体を表示
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
記事全体を表示
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.
記事全体を表示
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”
記事全体を表示
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.
記事全体を表示
NOTE: with the release of KDS V1.1.0 this quickstart is depreciated!   Note that this quickstart guide is an update/newer version than the one installed by the installer.
記事全体を表示
This is an ISF2.1 Project that goes with the blog post titled "Creating a Data Logger embedded application using ISF 2.1".
記事全体を表示
Recently I received two cases from Kinetis users. They both meet problem when porting Kinetis Interrupt project from CodeWarrior 10.x to KDS. There is a document KDS_Porting_Guide.pdf under KDS install folder which covers this topic. However I know many customers still have difficulty even they follow the document steps. This scenario is normal; because users’ projects are various, we can’t expect one porting document solve all kinds of problem of individuals. For me, honestly, I seldom use this porting guide to port my project. I prefer porting my project all by hand. Thus I can know my project changes from up to bottom. Thus even if I meet problem later, I can still position it easily and quickly. For the reason of time, in this article, I will focus on how to port Kinetis Interrupt from CodeWarrior to KDS by hand. Some NVIC register definition name and file structure are different in CodeWarrior and KDS. One big difference is that KDS uses core file from ARM limited directly. I summarized the difference as below table. It’s good to know the basic difference before we start the porting.       CodeWarrior KDS NVIC Register Definition :   Where MCU header file. Eg: MK60N512VMD100.h ARM Core file. Eg: core_cm4, core_cm0plus.h Written by NXP(former Freescale) ARM Limited Sample of usage NVICISERx = 0x01 NVIC->ISER[x] = 0x01 Packaged in NVIC_EnableIRQ(n) Vector Table Definition: Where Kinetis_sysinit.c Startup_MK60D10.S Language Using C Assembly Interrupt handler name Defined by user Defined by KDS. Eg, PORTA_IRQHandler Allow user modify. For more, see attached document.
記事全体を表示
FRDM-K64F is an ultra-low-cost development platform for Kinetis K64, K63, and K24 MCUs. this board is already widely used among Freescale customers. http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=FRDM-K64F   The FRDM-K64F platform features OpenSDAv2, the Freescale 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 J-Link interface, 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 are enclosed in this article as attachment.
記事全体を表示
Introduction   OpenOCD is the PC host application that is used by OpenSDAv2 (CMSIS-DAP application) for debugging. The standard installation of KDS does not include support for debugging the K22FN512 & K24FN256 device families via OpenOCD. This document will guide a KDS user through updating OpenOCD, bundled in KDS, to provide support for the K22FN512 & K24FN256 device families. In addition, we will show the user how to re-configure a KDS project to use OpenOCD to debug with CMSIS-DAP on a FRDM-K22F development board.   Requirements   The following CMSIS-DAP versions are required for this version of OpenOCD:   Development Board CMSIS-DAP Version FRDM-K22F 0203 TWR-K22F120M 0203 TWR-K24F120M ff03   Updating OpenOCD   First the user must locate their installation of KDS. On Windows machines, the default installation directory is “C:\Freescale\KDS_1.1.1”. For Linux users, the default installation folder is “opt/Freescale/KDS_1.1.1”. Inside this installation, you should see the same directories and files as seen in the figure below. Note: before continuing you must stop any debugging sessions and shutdown KDS.   Figure 1: Default KDS_1.1.1 installation directory.   In Figure 1, you can see the folder named “openocd”. This contains all the files necessary for OpenOCD to run in KDS. Before we install the updated version of OpenOCD we must rename the “openocd” folder. This way we have the old version of OpenOCD, should you feel the need to return.   Figure 2: Renamed "openocd" folder.   Once the “openocd” folder is renamed, as in Figure 2, we then need to download the “kds-openocd-update-09-04-14.zip” file attached to this document. Save this file into the KDS installation directory, as in Figure 3.   Figure 3: KDS OpenOCD update in KDS installation.   Once downloaded, extract the “openocd” folder for your operating system into the KDS installation directory. Figure 4 shows where the updated “openocd” folder is located for Windows users.   Figure 4: Location of updated OpenOCD folder for Windows.   Once the new “openocd” folder is copied to your KDS installation the update process is complete. OpenOCD in KDS now supports the K22F family of devices. It is now possible for FRDM-K22F users to debug their KDS projects with CMSIS-DAP via OpenOCD. Figure 5 shows the KDS installation folder after successfully updating OpenOCD.   Figure 5: Updated KDS installation.   Preparing projects for debugging with OpenOCD   Now a quick walkthrough on how to configure KDS projects to debug using OpenOCD. We will assume that the user already has a project in their workspace.[1] The first step is to highlight the desired project, and then select “Debug Configurations…” from the Debug drop down.   Figure 6: Open "Debug Configurations..."   Once the “Debug Configurations” menu pops up on your screen, select “GDB OpenOCD Debugging”, then click on the “New Launch configuration” button in the upper left of the window. Figure 7 shows where these items are located.   Figure 7: Create a new GDB OpenOCD Debugging configuration.   The new debug configuration should automatically pull in information from the selected project. If an .elf file exists for the project, then the “C/C++ Application” and “Project” fields will be populated as in Figure 8.   Figure 8: These fields should be generated automatically if the project has already been built.   If the “C/C++ Application” field is not populated, you can search your project for an .elf file using the “Search Project…” button below the “C/C++ Application” field. If no .elf exists, then it is necessary for the user to build the project to generate the .elf file.   Once the “Main” tab has been completed, it is time to move onto the “Debugger” tab. In the “Debugger” tab, it is necessary for the user to define the configuration file in the “Config options” field. For debugging in KDS, OpenOCD will need a configuration file, and the default configuration file is “kinetis.cfg”. Enter “-f kinetis.cfg” into the “Config options” field. Figure 9 shows the correct input for the “Config options” field. After populating the field, the user can now press the “Debug” button to begin debugging.   Figure 9: User must enter “Config options”.   If this is the first time debugging in the current workspace, a dialog box will appear prompting you to open the “Debug” perspective. You should check the “Remember my decision” box, and press the “Yes” button. This will allow KDS to switch to the “Debug” perspective, for you whenever you begin to debug an application. See Figure 10 for more detail.   Figure 10: Select to automatically change perspective when debugging.   Figure 11, below, shows a successful debug connection to the target device using OpenOCD. The application has run to “main” and is waiting for the user to interact with the debug session.   Figure 11: Once debugger has connected and run to main.   Summary   After completing the steps in the sections above, a KDS user should be able to debug applications using OpenOCD and CMSIS-DAP with K22FN512 & K24FN256 device families. For more information on KSDK and KDS please consult the documentation located in C:\Freescale\KSDK_1.0.0\doc and C:\Freescale\KDS_1.1.1\doc\pdf, respectively.   [1] For directions on importing an existing KSDK demo to KDS please consult the device family specific user’s guides in “C:\Freescale\KSDK_1.0.0\doc”, and on creating new KDS projects consult the “kds_user_guide” in “C:\Freescale\KDS_1.1.1\doc\pdf”. Original Attachment has been moved to: kds-openocd-update-09-04-14.zip
記事全体を表示
If you are migrating from CodeWarrior to KDS, then you might notice that CodeWarrior had a 'Add Files...' menu: KDS is using an unmodified Eclipse version, and because the above menu was a CodeWarrior specific extension, this menu is not present in Eclipse. But there are many different other ways in Eclipse how to add existing files to a project in KDS: File Import Menu Drag and Drop Copy and Paste See How to Add Existing Files to Eclipse Projects | MCU on Eclipse   Happy Adding 🙂
記事全体を表示
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 .
記事全体を表示
In case you are running into this error while trying to uninstall KDS on Windows (I had it with KDS V1.1.0, but it might apply to other versions too):   "Error opening installation log file. Verify that the specified log file location exists and is writeable."   After some googling, some installers (or uninstallers) can cause that error message. It seems that some files/folders are not accessible. In my case I had it with installing KDS, and then wanted to uninstall it as I installed (in error) V1.1.0 (and not the latest V1.1.1). I had not rebooted afterwards. But when I rebooted, the problem does go away.   So if you run into that problem: reboot your machine and try again. It worked for me.   Happy Uninstalling 🙂
記事全体を表示
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.
記事全体を表示
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
記事全体を表示
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.
記事全体を表示
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/
記事全体を表示
hi, Thank you for your response. Now am sending the file in  .doc format please check it once and let me know where are the mistakes in porting. Thanks and Regards, Padmaja
記事全体を表示