Home

Kinetis Design Studio User Guide

image

Contents

1. Select Window Show View to open a specific view if the view is not currently open in the Kinetis Design Studio IDE s Debug Perspective 5 Flashing an embedded application This section describes how to flash an application without an Eclipse project using the Kinetis Design Studio IDE 5 1 Flashing with the Kinetis Design Studio IDE 1 Click onthe button from the main toolbar Figure 15 Flash configuration r ij Flash Configurations Create manage and run configurations Name example E Main Debugger B Startup E Source Common C C Application Debug example elf Variables Search Project Browse Project example Browse Build if required before launching Build configuration Debug 7 Select configuration using C C Application Enable auto build Disable auto build Use workspace settings Configure Workspace Settings Revert Filter matched 3 of 3 items Apply SE e m Regardless of the debug adapter being used select the Main tab and confirm that the correct Project and C C Appli cation is selected 3 Next select the Debug configure it as described in section 4 Finally click Flash It should take a few moments to flash the embedded application to your Freescale Kinetis device Once completed power cycle the the board The embedded application should boot and run Copyright O 2013 2014 14 of 18 SOMNIUM
2. 4 When you have launched a debug of your embedded application you will be prompted to open the Debug Perspective if are not already in the Debug Perspective Select Yes to switch perspective The Debug Perspective will open and the embedded application will break on the breakpoint set on main Copyright O 2013 2014 SOMNIUM Technologies Limited 12 of 18 SOMNIUM Document Number SOMN KDS 0001 Freescale Document Number KDS200UG Rev 0 11 14 Kinetis Design Studio User Guide Figure 14 Kinetis Design Studio IDE debug perspective r i Debug example SourEURIRET Finetis Design SEO mom EMT File Edit Source Refactor Navigate Search Project ProcessorExpert Run Window Help c elas i gt i m3 a e i x 0 4 9047 0 797 sls Quick Access ES fig C C 35 Debug Debug 32 gga a 09 Variables 9o Breakpoints 25 Registers E Modules H 4 c example Debug GDB OpenOCD Debugging 5 de a BBS Y 4 i example elf V amp main c function main type Temporary 4 g Thread 1 Suspended Breakpoint main at main c 48 Ox4d4 pol openocd I po arm none eabi gdb main c 23 BE Outline z Disassembly 25 Write your local variable definition here Enter location here amp t ES wi ay 4 zrs Processor Expert internal initialization DON T REMOVE THIS CODE 948 PE low level initQ 3 rocessor Expert internal initialization gt 000
3. Document Number SOMN KDS 0001 SOMNIUM Technologies Limited Freescale Document Number KDS200UG Rev 0 11 14 Kinetis Design Studio User Guide A Technical notes This section describes some of the terms and concepts used in this document which relate to the Kinetis Design Studio soft ware development tools A 1 Differences with the GNU ARM Embedded toolchain The GNU ARM Embedded toolchain is a GNU toolchain targeted at embedded ARM processors namely Cortex R Cortex M processor families The toolchain is maintained by ARM Both the GNU ARM Embedded toolchain and the Kinetis Design Studio software development tools are derived from the GNU tools Hence they are both GNU compatible This means any GNU specific features behaviours used in an application will be correctly handled by the Kinetis Design Studio software development tools However there are several differences between the Kinetis Design Studio software development tools and the GNU ARM Embedded toolchain to note e The Kinetis Design Studio software development tools only supports 32 bit Cortex M based Kinetis devices e The GNU ARM Embedded toolchain requires additional libraries and linker options that aren t provided or required by the Kinetis Design Studio software development tools for instance references to rdimon and nosys Attempting to build applications with such references using the Kinetis Design Studio software development tools will result in build errors e
4. Hide items that are already installed What is already installed Ico a Next gt Finish Cancel 4 of 18 SOMNIUM Document Number SOMN KDS 0001 Freescale Document Number KDS200UG Rev 0 11 14 Kinetis Design Studio User Guide 3 Building an embedded application This section describes how to launch the Kinetis Design Studio IDE and create a new Kinetis Design Studio project to build an embedded application for a Freescale Kinetis device 3 1 Launching the Kinetis Design Studio IDE e On Windows double click the Kinetis Design Studio IDE in the Start Menu A Desktop shortcut may also have been created if requested during installation e On Linux run the following command which assumes Kinetis Design Studio was installed at the default location of opt Freescale KDS 2 0 0 Example 3 1 Launching the Kinetis Design Studio IDE on Linux opt Freescale KDS 2 0 0 eclipse kinetis design studio A splash screen will appear while the IDE loads You will be prompted to select a Workspace This is the directory where your settings and projects will be stored When opening a new workspace the Kinetis Design Studio IDE will display a Welcome screen This can be closed at this point by clicking on the Workbench icon in the top right corner Figure 2 Kinetis Design Studio IDE welcome screen n d C C Kinetis Design Studio Gap m o 8 X File Edit Source Refactor Navigate Search Project P
5. 18 11 Build Finished took 35 8 2ms 4 Debugging an embedded application This section describes how to debug an embedded application on a Freescale Kinetis device using the Kinetis Design Studio IDE 4 1 Development environment The Kinetis Design Studio software development tools supports the following debug adapters for debugging applications on a Freescale Kinetis device 1 On board OpenSDA debug interface running the ARM mbed project CMSIS DAP firmware Copyright O 2013 2014 SOMNIUM Technologies Limited 8 of 18 SOMNIUM Document Number SOMN KDS 0001 Freescale Document Number KDS200UG Rev 0 11 14 Kinetis Design Studio User Guide 2 SEGGER J Link and J Trace debug adapters 3 P amp E USB Multilink Universal and USB Multilink Universal FX debug adapters Figure 8 Supported debug adapters OpenSDAdebug interface SWD interface lif present see note Note Not all Freescale Kinetis boards have a SWD interface or SWD interface header present on the board Refer to the Freescale user manual for the board you are using to check these details Note Both SEGGER and P amp E provide firmware for the OpenSDA debug interface The P amp E firmware is provided in the Kinetis Design Studio software development tools under install dir pemicro opensda The SEGGER firmware is not delivered with the Kinetis Design Studio software development tools however it can be down loaded from the SEGGER web site at http www se
6. Other options Commands set mem inaccessible by default off Browse Variables m Allocate console for the telnet connection Browse Variables Apply ae b If you are using a SEGGER J Link debug interface then enter the Device name for your Freescale Kinetis device Use the link Supported device names to help you with your selection Note SEGGER software tries to protect users from accidentally permanently locking their devices by provid ing two variants of each Freescale Kinetis device The default will not allow disabling mass erase while the alternate labelled allow security will As a result it is recommended to not use the allow security devices without good reason The remaining fields of the Debugger tab can be left with the default entries This will connect to the remote target as a localhost Figure 11 Debugger tab for a GDB SEGGER J Link Debugging configuration n Debug Configurations unm m Create manage and run configurations amp x oi type filter text c C C Application c C C Attach to Application fe C C Postmortem Debugger C C Remote Application GDB Hardware Debugging GDB OpenOCD Debugging GDB P amp E Interface Debugging 4 c GDB SEGGER J Link Debugging c example Debug B Launch Group ta af fa io Filter matched 10 of 10 items D NL Name example Debug E Main Debugger B Startup 7
7. Source Common GDB Server Setup V Start the GDB server locally S ilink_path JLinkGDBServerCL Executable Device name MKL25Z128 004 natae Connection USB 5 IP Interface SWD 5 JTAG Debug speed Auto Adaptive 9 Fixed GDB port 2331 SWO port 2332 Telnet port 2333 Log file Otheroptions s 7 Allocate console for the GDB server Connect to running target Supported device names m USB serial or IP name address 30 kHz V Verify downloads V Initialize registers on start V Local host only F Silent Browse V Allocate console for semihosting and SWO c Ifyou are using a P amp E debug interface then select the Device name for your Freescale Kinetis device from the drop down list The remaining fields of the Debugger tab can be left with the default entries This will connect to the remote target as a localhost If you are using the P amp E OpenSDA firmware then you need to select the Interface to be OpenSDA Embedded Debug USB Port Copyright O 2013 2014 SOMNIUM Technologies Limited 11 of 18 SOMNIUM Document Number SOMN KDS 0001 Freescale Document Number KDS200UG Rev 0 11 14 Kinetis Design Studio User Guide Figure 12 Debugger tab for a GDB P amp E Interface Debugging configuration E i Debug Configurations sz hae type filter text fe C C Application c C C Attach to Application c C C Postmo
8. The Kinetis Design Studio software development tools supports two C runtime libraries newlib and newlib nano By de fault an application is linked with newlib However newlib nano can be selected using the nanolibc linker option The GNU ARM Embedded toolchain also provides newlib nano however the process to build applications using it is different A 2 Semihosting Semihosting is a mechanism allowing ARM programs running under the control of a debug agent to access resources on the host machine For example it is often useful during development to have a semihosted application read to and write from files stored on the host machine using standard C library functions Semihosting is built in to the C libraries included with the Kinetis Design Studio software development tools Semihosting must be supported and enabled in the debug agent During execution the debug agent watches for semihosting requests When such a request is encountered the target application is stopped and the debug agent performs the requested operation Copyright O 2013 2014 15 of 18 SOMNIUM Document Number SOMN KDS 0001 SOMNIUM Technologies Limited Freescale Document Number KDS200UG Rev 0 11 14 Kinetis Design Studio User Guide B Driver installation When using either the OpenOCD SEGGER J Link or P amp E Multilink debug interface the relevant device drivers need to have been installed B 1 Installing on Windows The Kinetis Design Studio Windows Installer
9. and 64 bit machines e Red Hat Enterprise Linux RHEL CentOS 6 4 and Ubuntu 14 04 LTS Linux hosted variants of the Kinetis Design Studio software development tools are distributed as 64 bit binaries which will not work on 32 bit systems Note The Kinetis Design Studio software development tools may work on older versions of these systems but this has not been tested and is not supported To use the Kinetis Design Studio software development tools the following minimum system requirements should be met e 1 8 GHz processor e 2 GB of RAM e Approximately 1 5 GB of free disk space when installing the full product 1 3 Supported Freescale devices The Kinetis Design Studio software development tools support devices in the Kinetis product range see individual compo nent documentation for complete lists of supported devices 1 4 License information The Kinetis Design Studio software development tools are licensed under the terms outlined in License htm which is found at the top of the install directory Copyright O 2013 2014 1 of 18 SOMNIUM Document Number SOMN KDS 0001 SOMNIUM Technologies Limited Freescale Document Number KDS200UG Rev 0 11 14 Kinetis Design Studio User Guide 1 5 Objectives of this document This guide demonstrates how to quickly get started using the Kinetis Design Studio software development tools Install the Kinetis Design Studio software development tools on either a Windows or Linux host Star
10. 004d4 bl x8b PE low level init PE low level init for End of Processor Expert internal initialization Es or 55 0 900004d8 b n x4d8 lt main 8 gt 00004da nop mov r8 r8 flush cache eeeoeadc push r7 1r 00004de sub sp 8 Write your code here For example for Don t write any code pass this line or it will be deleted during c s dd RTOS startup code Macro PEX RTOS START is defined by the RTOS comp poosesep M r7 sp 2 X ai C42 6 new nrar erant AAARAAALeS str r r7 41 4 a w b 4 j E Console 23 Tasks 2 Problems 3 Executables 0 Memory En BE LH ag mi ELTE example Debug GDB OpenOCD Debugging openocd Into Kinetis FLASH Write target state halted target halted due to debug request current mode Thread xPSR 0x61000000 pc 0x00000740 msp 0x20003000 semihosting 4 3 Controlling the application in the debugger Once the breakpoint on main has been reached you will be able to step through lines of code double click on the left of a code statement to set a breakpoint resume execution pause execution restart or terminate the debug session The table below lists the main buttons which are used to control the execution of an application in the debugger muon Aeon nein 00 Resume continue execution of the suspended application Suspend pause the execution of the application a Instruction Activate instr
11. GER J Link Debugging configuration a oaaae 12 14 Kinetis Design Studio IDE debug perspective eres 13 15 PleshCOUneUlauiOliia co 2h RECIBE GXE TsS ee9 339 4 9 949594 994J929349 592 4535 14 Copyright O 2013 2014 iii Kinetis Design Studio Version 2 0 0 SOMNIUM Technologies Limited Kinetis Design Studio User Guide 1 Introduction Welcome to the Kinetis Design Studio software development tools a GNU Eclipse based development environment for Freescale Kinetis devices 1 1 Main features The Kinetis Design Studio software development tools are provided free of charge and include the following features e A GNU toolchain An Eclipse IDE for a application editing building and debugging e Integration with Processor Expert and Kinetis SDK e Support for SEGGER J Link J Trace P amp E USB Multilink Universal USB Multilink Universal FX and CMSIS DAP debug adapters e Optional newlib nano C runtime library to reduce the memory footprint of an embedded application e The Kinetis Design Studio software development tools are rigorously validated using commercial validation and perfor mance suites 1 2 Supported host operating systems The Kinetis Design Studio software development tools support the following host operating systems Microsoft Windows 7 and Windows 8 all editions Windows hosted variants of the Kinetis Design Studio software de velopment tools are distributed as 32 bit binaries which will run on 32 bit
12. Kinetis Lon S tudio Kinetis Design Studio v2 0 0 User Guide SOMNIUM Document Number SOMN KDS 0001 Freescale Document Number KDS200UG Rev 0 11 14 Copyright 2013 2014 SOMNIUM Technologies Limited Contents 1 Introduction 11 Mainfeatures 22r 1 2 Supported host operating systems 13 SupportedFreescaledevices 00 eee ee ee ee 1 4 Licenseinformation 0 00 2 eee eee ees 15 Objectives ofthisdocument 02 0002 ene 2 Installing the Kinetis Design Studio software development tools 21 Installing on Windows llle 2 4 1 Installing fromthe commandline 2 2 Installing on LinuX es c sa 25 eR de wae be ehbeeaaees 2 2 1 Installing with Red Hat package manager RPM 2 2 2 Installing with Debian package manager DEB 23 Installing KSDK za x 2 934 3 949 139 3 84444 a8 504 4 5 3 Building an embedded application 3 1 Launching the Kinetis Design Studio IDE 3 2 Creating a new Kinetis Design Studio project 3 3 Configuring the project 0 ee en 4 Debugging an embedded application 4 1 Development environment 4 2 Debugging with the Kinetis Design Studio IDE 4 3 Controlling the application in the debugger 5 Flashing an embedded application 5 1 Flashing with the Kinetis Design Studio IDE A Technical notes A l Di
13. M and the SOMNIUM logo are registered trademarks of SOMNIUM Technologies Limited Freescale the Freescale logo CodeWarrior and Kinetis are trademarks of Freescale Semiconductor Inc Reg U S Pat amp Tm Off All other product or service names are the property of their respective owners ARM and Cortex are registered trademarks of ARM Limited or its subsidiaries in the EU and or elsewhere mbed is a trademark of ARM Limited or its subsidiaries in the EU and or elsewhere Freescale reserves the right to make changes without further notice to any products herein Freescale makes no warranty representation or guarantee regarding the suitability of its products for any particular purpose nor does Freescale assume any liability arising out of the application or use of any product or circuit and specifically disclaims any and all liability in cluding without limitation consequential or incidental damages Typical parameters that may be provided in Freescale data sheets and or specifications can and do vary in different applications and actual performance may vary over time All operating parameters including typicals must be validated for each customer application by customer s technical ex perts Freescale does not convey any license under its patent rights nor the rights of others Freescale sells products pur suant to standard terms and conditions of sale which can be found at the following address http www freescale co
14. Optimization Q3 Warnings 3 Miscellaneous 4 amp 3 Cross ARM C Compiler Q3 Preprocessor e Includes Q3 Optimization G3 Warnings G3 Miscellaneous 4 Cross ARM C Linker e General 3 Miscellaneous m Generate map S BuildArtifactFileBaseName map _ Cross reference Xlinker cref _ Print link map Xlinker print map v Other linker flags nanolibc Restore Defaults Apply fF After changing the project s settings click OK In the Project Explorer view right click on the project and select Clean Project Once cleaned select Build Project Monitor the generated command lines used to build the embedded application in the build Console view Any problems with the build will be reported under the Problems view Assuming the build is successful the generated binary will be listed under the project in the Project Explorer Figure 7 Build console and the generated binary I Problems j Tasks Il Console 23 B Properties CDT Build Console example A Mi pc n Finished building Generated Code Vectors c a Dames gt X example elf arm le Building target example elf Invoking Cross ARM C Linker arm none eabi g mcpu cortex m plus mthumb 08 fmess Finished building target example elf gt E Documentation gt 2 Generatec Code gt E Project Settings gt z Sources S Processor xpert pe Prajectinf5 xml 17
15. RM family cortex m plus Y Architecture Toolchain default z Instruction set Thumb mthumb v 7 Thumb interwork mthumb interwork n Endianness Toolchain default Y Toolchain default Toolchain default Unaligned access Toolchain default z Generic mcpu generic Toolchain default Toolchain default Toolchain default Enabled simd Small mcmodel small Strict align mstrict align T As an example the Kinetis Design Studio software development tools supports two C runtime libraries newlib and newlib nano By default a Kinetis Design Studio project will link an application with newlib nano If you wish to link with newlib instead remove the flag nanolibc from the Other linker flags field under Miscellaneous of the Cross ARM C Linker folder Copyright O 2013 2014 SOMNIUM Technologies Limited 1 of 18 SOMNIUM Document Number SOMN KDS 0001 Freescale Document Number KDS200UG Rev 0 11 14 Kinetis Design Studio User Guide Figure 6 Linking with newlib nano H Properties for example type filter text Resource Builders 4 C C Build Build Variables Environment Logging Settings Tool Chain Editor C C General Processor Expert Project References Run Debug Settings Task Repository WikiT ext Settings 3 Debugging 4 Cross ARM GNU Assembler Q3 Preprocessor Q3 Includes Q3 Warnings G3 Miscellaneous 4 l3 Cross ARM C Compiler Q3 Preprocessor Includes e
16. an specify the location of the project or check the box to use the default location Then click Next 3 In the Select the device derivative you would like to use dialog select the Freescale Kinetis device that you would like to use and click Next You can use the filter text box to search for the device name 4 The Rapid Application Development dialog allows you to configure use of Use Processor Expert for configuration and KSDK Processor Expert is included with Kinetis Design Studio software but KSDK must be installed separately For details see section 2 3 and the documentation provided with these components 5 Once all your selections have been made click Finish Figure 4 Project Explorer L3 Project Explorer 55 H g E 4 example gt Includes gt E Documentation gt E Generated Code gt E Project Settings gt gt Sources Ry ProcessorExpert pe Projectinfo xml 6 Your new Kinetis Design Studio project should now be shown under the Project Explorer T To create a new source file under the project right click on the project and select New Source File Alternatively you can drag and drop existing source files header files directories into the project 6 of 18 SOMNIUM Document Number SOMN KDS 0001 Copyright O 2013 2014 Freescale Document Number KDS200UG Rev 0 11 14 SOMNIUM Technologies Limited 3 3 Configuring the project Kinetis Design Studio User Guide A new Kinetis Design Studio project will be
17. fferences with the GNU ARM Embedded toolchain A2 Semihosting eee rers B Driver installation B l Installing on Windows c crees B 2 Installing on Linux eere C Notices Copyright O 2013 2014 ii SOMNIUM Technologies Limited Kinetis Design Studio v2 0 0 User Guide HB e HH Hm 14 Pu n eee ea Sad ee EOEUE S E e RC E 14 15 TUTTI TTITTT TIT 15 IP 15 16 Sheet eee See ee ee eG eee 16 eee ee ee ee ee ee 16 18 Kinetis Design Studio Version 2 0 0 Kinetis Design Studio v2 0 0 User Guide List of Figures 1 MAMER DE 5 4 mu Gee USERS wae eee bee Pee SEDES eee ee ee eee eee eee 4 2 Kinetis Design Studio IDE welcome screen leeren 5 3 New Kinetis Design Studio project wizard oaaae a 6 4 POET ERDI T usos wm EUR RS4SPPHRAe T u 9949 25 X43 5 344 THESE EERE ERE 6 5 Project Properties C C build settings err T 6 Linking with newlib nano eee ehh her s 8 T Build console and the generated binary 22s 8 8 Supported debug adapters eee eee ee 9 9 Create a new debug configuration aooaa aa sns 10 10 Debugger tab for a GDB OpenOCD Debugging configuration ees 11 11 Debugger tab for a GDB SEGGER J Link Debugging configuration ee ee ee 11 12 Debugger tab for a GDB P amp E Interface Debugging configuration 0 eee ee ee ee 12 13 Startup tab for a GDB SEG
18. gger com opensda html The procedure to debug an embedded application using the SEGGER OpenSDA firmware is the same as if you were us ing either a SEGGER J Link or J Trace debug adapter Similarly the procedure to debug an embedded application using the P amp E OpenSDA firmware is largely the same as if you were using either a P amp E USB Multilink Universal or USB Multilink Universal FX debug adapter 4 2 Debugging with the Kinetis Design Studio IDE 1 In the Project Explorer right click on the project containing the embedded application that you want to debug Select Debug As Debug Configurations Alternatively click on the drop down icon of the button from the main toolbar and select Debug Configurations Copyright O 2013 2014 9 of 18 SOMNIUM Document Number SOMN KDS 0001 SOMNIUM Technologies Limited Freescale Document Number KDS200UG Rev 0 11 14 Kinetis Design Studio User Guide Figure 9 Create a new debug configuration r Debug Configurations i amp xioi type filter text c C C Application c C C Attach to Application fe C C Postmortem Debugger E C C Remote Application 4 c GDB OpenOCD Debugging c example Debug c GDB P amp E Interface Debugging c GDB SEGGER J Link Debugging aach rou Filter matched 10 of 10 items Create manage and run configurations Name example Debug E Main Debugger B Startup S Source Ei Common C C Applicatio
19. ling on systems that use the RPM package manager e g Red Hat and CentOS 2 deb for installing on systems that use the Debian package manager e g Ubuntu 2 2 1 Installing with Red Hat package manager RPM The Kinetis Design Studio software development tools may be installed on an LSB Linux Standard Base compliant system using the rpm package file Copyright O 2013 2014 2 of 18 SOMNIUM Document Number SOMN KDS 0001 SOMNIUM Technologies Limited Freescale Document Number KDS200UG Rev 0 11 14 Kinetis Design Studio User Guide Example 2 2 Installing With RPM sudo rpm Uvh kinetis design studio 2 0 0 1 x86 64 rpm Preparing T 3E IERERERETEREREREREREREIEHETEREREREREREHEIEREREREREREREEIEHEREREE IE E EE 100 1 Kinetis Design Studio HHHHHHHHHHHHHHHHHHHHHHRHHHHHHHHRE HHA HHH 100 This will install the Kinetis Design Studio software development tools to the default location opt Freescale KDS_2 0 0 2 2 2 Installing with Debian package manager DEB On Debian like systems including Ubuntu the Kinetis Design Studio software development tools can be installed using the deb package file Example 2 3 Installing with DPKG sudo dpkg i kinetis design studio 2 0 0 1 amd64 deb Reading database 209462 files and directories currently installed Preparing to replace kinetis design studio 2 0 0 using kinetis design studio 2 0 0 1 amd64 gt deb Unpacking replacement kinetis design studio Setting up kineti
20. m SalesTermsandConditions Copyright O 2013 2014 18 of 18 SOMNIUM Document Number SOMN KDS 0001 SOMNIUM Technologies Limited Freescale Document Number KDS200UG Rev 0 11 14
21. n Debug example elf Variables Search Project Browse Project example Build if required before launching Build configuration Debug V Select configuration using C C Application Enable auto build Use workspace settings Disable auto build Configure Workspace Settings m Apply Close Note Appendix B provides details on the device drivers which are needed to work with the chosen debug interface a If you are using the on board OpenSDA debug interface running the mbed projectCMSIS DAP firmware then right click on GDB OpenOCD Debugging and select New to create a new debug configuration This configuration will use the OpenOCD Open On Chip debugger GDB server to interface with the target c If you are using a SEGGER J Link or J Trace debug adapter or if you are using the on board OpenSDA debug inter face running the SEGGER firmware then right click on GDB SEGGER J Link Debugging and select New to create a new debug configuration This configuration will use the SEGGER J Link GDB server to interface with the target O If you are using a P amp E USB Multilink Universal or USB Multilink Universal FX debug adapter or if you are using the on board OpenSDA debug interface running the P amp E firmware then right click on GDB P amp E Interface Debugging and select New to create a new debug configuration This configuration will use the P amp E GDB server to i
22. n screen instructions to complete the installation Copyright O 2013 2014 3 of 18 SOMNIUM Document Number SOMN KDS 0001 SOMNIUM Technologies Limited Freescale Document Number KDS200UG Rev 0 11 14 Figure 1 Installing KSDK Kinetis Design Studio User Guide Debi Ctrl Shift L File Edit Source Refactor Navigate Search Project ProcessorExpert Run Window iti ST SPSS Tees un Woon 35 Debug zoa 2 Help Contents a P Search Dynamic Help Key Assist Tips and Tricks 4f Report Bug or Enhancement Cheat Sheets Eclipse Marketplace Check for Updates Install New Software About Kinetis Design Studio beta Install Available Software Check the items that you wish to install Work with type filter text Name 4 v 000 Processor Expert Software v Eclipse Update for KSDK 1 0 0 GA Select All Deselect All 1 item selected Details Y Show only the latest versions of available software v Group items by category Show only software applicable to target environment v Contact all update sites during install to find required software Copyright 2013 2014 SOMNIUM Technologies Limited Eclipse Update for KSDK 1 0 0 GA jar file C Freescale KSDK 1 0 0 tools eclipse update SDK 1 0 0 GA Update for Eclipse zip v Add Find more software by working with the Available Software Sites preferences Version 1 0 0
23. nterface with the target 2 Select the Main tab and check that the correct Project and C C Application is selected Next select the Debugger tab a If you are using the OpenOCD debug interface then insert the options f kinetis cfg under the Other options field of the OpenOCD section of the D ebugger tab This will connect to the remote target as a localhost Copyright O 2013 2014 SOMNIUM Technologies Limited 10 of 18 SOMNIUM Document Number SOMN KDS 0001 Freescale Document Number KDS200UG Rev 0 11 14 Kinetis Design Studio User Guide Figure 10 Debugger tab for a GDB OpenOCD Debugging configuration r lt E Debug Configurations owe a Create manage and run configurations COXI oP type filter text c C C Application c C C Attach to Application c C C Postmortem Debugger c C C Remote Application c GDB Hardware Debugging 4 c GDB OpenOCD Debugging c example Debug P T 9 E GDB P amp E Interface Debugging c GDB SEGGER J Link Debugging B Launch Group Filter matched 10 of 10 items Name example Debug 5 E Main 5 Debugger Startup S7 Source Common gg P Ww OpenOCD Setup v Start OpenOCD locally Executable S openocd_path openocd GDB port 3333 Telnet port 4444 Log file Other options _ kinetis cfg v Allocate console for OpenOCD GDB Client Setup Executable S cross prefixjgdbS cross suffix
24. permissions allocated by the rules file can be adjusted By default this requires users to be in the plugdev group Run the command udevadm control reload rules to instruct udev to reload its rules Copyright O 2013 2014 16 of 18 SOMNIUM Document Number SOMN KDS 0001 SOMNIUM Technologies Limited Freescale Document Number KDS200UG Rev 0 11 14 Kinetis Design Studio User Guide Driver udev rules file nos SS e Copy the udev file into the configuration directory for example under etc udev Segger J Link install dir segger 99 jlink rules TUSSA Run the command udevadm control reload rules to instruct udev to reload its rules P amp E Multilink install dir pemicro drivers Run the setup sh script found under the same libusb_64_32 28 pemicro rules directory Copyright 2013 2014 17 of 18 SOMNIUM Document Number SOMN KDS 0001 SOMNIUM Technologies Limited Freescale Document Number KDS200UG Rev 0 11 14 Kinetis Design Studio User Guide C Notices Copyright 2013 2014 SOMNIUM Technologies Limited Kinetis Design Studio is produced for Freescale by SOMNIUM Technologies http www somniumtech com All rights re served Information in this document is provided solely to enable system and software implementers to use Freescale products There are no express or implied copyright licenses granted hereunder to design or fabricate any integrated circuits based on the information in this document SOMNIU
25. pported Figure 13 Startup tab for a GDB SEGGER J Link Debugging configuration Debug Configurations Create manage and run configurations amp amp x oi Name example Debug type filter text E Main 3 Debugger B Startup 7 Source Common gg plu C C Application Initialization Commands C C Attach to Application TO Initial Reset and Halt E E C C Postmortem Debugger iV Initial Reset and Halt Type Low speed 30 kHz fe C C Remote Application JTAG SWD Speed 9 Auto Adaptive Fixed kHz c GDB Hardware Debugging V Enable flash breakpoints E GDB OpenOCD Debugging J Enable semihosting Console routed to V Telnet GDB client c GDB P amp E Interface Debugging 4 c GDB SEGGER J Link Debugging Enable SWO PU freq 0 Hz SWO freq 0 Hz Port mask xi c example Debug B Launch Group Load Symbols and Executable V Load symbols Use project binary example elf Use file orkspace File Syst Symbols offset hex V Load executable A Revert Filter matched 10 of 10 items pply o The remaining fields of the Startup tab should be correctly set up ready for you to Apply the debug configuration and hit the Debug button This will launch the debugger c Users of the P amp E debug interface do not need to change any of the default settings under the Startup tab Click on Apply and hit the Debug button This will launch the debugger
26. pre configured and so you will be able to build the project for your Freescale Kinetis MCU based target board straight away In the Project Explorer view right click on the project and select Build Project The configuration of the project can be adjusted by performing a right click on the project and selecting Properties In the Properties wizard the toolchain build settings can be changed by clicking on C C Build gt Settings Figure 5 Project Properties C C build settings type filter text Resource 4 C C Build Build Variables Environment Logging Settings Tool Chain Editor Processor Expert Project References Run Debug Settings Task Repository WikiText amp Properties for example Settings c Qv Y v Configuration Debug Active V Manage Configurations Tool Settings 3 Toolchains Build Steps Build Artifact ui Binary Parsers Error Parsers 3 Target Processor Optimization Q3 Warnings 3 Debugging 4 B3 Cross ARM GNU Assembler Q3 Preprocessor Includes Q3 Warnings e Miscellaneous 4 Cross ARM C Compiler Q3 Preprocessor Q3 Includes Q3 Optimization Q3 Warnings G3 Miscellaneous 4 83 Cross ARM C Compiler 3 Preprocessor Q3 Includes Q3 Optimization G3 Warnings Q3 Miscellaneous 4 3 Cross ARM C Linker 3 General A Libraries Other target flags A
27. rocessorExpert Run Window Help amp GS Welcome 23 i Welcome to Kinetis Design Studio Overview Get an overview of the features Note If the Kinetis Design Studio IDE fails to launch with the error message Failed to create the Java Virtual Machine then you may need to decrease the maximum size of IDE s heap Similarly if the IDE reports Out of memory errors while running then you may need to increase the heap size This is achieved by changing the value of the Xmx argument found in the file install dir eclipse kinetis design studio ini The default is Xmx512m giving the IDE a maximum heap size of 512MB Copyright O 2013 2014 5 of 18 SOMNIUM Document Number SOMN KDS 0001 SOMNIUM Technologies Limited Freescale Document Number KDS200UG Rev 0 11 14 Kinetis Design Studio User Guide 3 2 Creating a new Kinetis Design Studio project 1 To create a new Kinetis Design Studio project open the File menu then select New gt Project gt Kinetis Design Studio Project You will be presented with the New Kinetis Design Studio Project wizard Figure 3 New Kinetis Design Studio project wizard r H New Kinetis Design Studio Project Ej X Create a Kinetis Design Studio Project Choose the location for the new project Project name example v Use default location C Users Steve workspace example default D lt Back Next gt Cancel 2 Enter a Project name You c
28. rtem Debuggel c C C Remote Application fe GDB Hardware Debugging fe GDB OpenOCD Debugging 4 GDB PEMicro Interface Debug c test Debug GDB SEGGER J Link Debuggint B Launch Group gt OERE Create manage and run configurations Name test Debug E Main Debugger B Startup Ey Source Ei Common PEMicro Interface Settings Interface USB Multilink USB Multilink FX Embedded OSBDM OSJTAG USB Pot v Compatible Hardware Port z Refresh Device Name KL25Z128M4 pecify Network Card IP Additional Options T Always mass erase on connect V Use SWD reduced pin protocol for communications Hardware Interface Power Control Voltage gt Power Out Jack Z Provide power to target Regulator Output Voltage Power Down Delay 250 ms LJ m Power off target upon software exit 2V Power Up Delay 1000 ms Target Communication Speed Debug Shift Freq KHz 5000 Delay after Reset and before communicating to target for 0 milliseconds decimal x 4 m r Filter matched 10 of 10 items Apply Revert 3 Next select the Startup tab a Users of the OpenOCD debug interface do not need to change any of the default settings under the Startup tab Click on Apply and hit the Debug button This will launch the debugger b Forusers ofthe SEGGER OpenSDA application then de select the Enable SWO radial button as this is not currently su
29. s design studio 2 0 0 This will install the Kinetis Design Studio software development tools to the default location opt Freescale KDS 2 0 0 2 3 Installing KSDK Some Kinetis Design Studio IDE functionality requires the Kinetis SDK KSDK To activate this functionality the KSDK must be installed both on the host machine and into the Kinetis Design Studio IDE Installation on the host machine is achieved by downloading and running the KSDK installer see http www freescale com ksdk The KSDK installation directory contains an Eclipse update site a zip file in the toolsNeclipse update directory This needs be be installed into the Kinetis Design Studio IDE using the nstall New Software wizard Note Users with the Kinetis Design Studio IDE installed in a read only location which is the default for Linux systems must launch the Kinetis Design Studio IDE with administrative root privileges to install the KSDK 1 Startthe Kinetis Design Studio IDE section 3 1 2 Startthe nstall New Software wizard from the Help menu 3 On the Available Software screen click Add to add a new location to Work with 4 ClickArchive and select to the zip file provided by KSDK Then click OK 5 The Work with box should now be populated and the list of available software should show Eclipse Update for KSDK in the Processor Expert Software category 6 Check the checkbox to install Eclipse Update for KSDK T Click Next and follow the o
30. t the Kinetis Design Studio IDE and create a new C C project Build an embedded application for a Freescale Kinetis device e Debug an embedded application running on a Freescale Kinetis device e Flash an embedded application directly to a Freescale Kinetis device Understand how file I O is supported by semihosting e Be aware of the differences between the Kinetis Design Studio software development tools and the GNU ARM Embedded Toolchain 2 Installing the Kinetis Design Studio software development tools 2 1 Installing on Windows The Kinetis Design Studio software developmenttools are installed on Windows using Windows Installer Simply double click the installer KDS v2 0 0 exe The Windows Installer will be started and on screen instructions will guide you through the installation 2 1 1 Installing from the command line Alternatively Windows Installer can be launched from the command line and controlled using the standard Windows Installer command line switches The following example launches Windows Installer using a basic user interface to install the Kinetis Design Studio software development tools Example 2 1 Launching Windows Installer from the command line KDS vy2 0 0 exe cb The basic user interface will not ask any questions but will display a progress bar 2 2 Installing on Linux Package files are provided for installing the Kinetis Design Studio software development tools on a Linux system 1 rpm for instal
31. uction step mode when selected otherwise stepping is Stepping Mode performed on lines of C C code The Debugger switches to the instruction stepping mode automatically when the Disassembly view has focus Step Over Execute the current line following execution inside a routine 3 Step Into Execute the current line including any routines and proceed to the next statement 1 Continue execution to the end of the current routine then follow execution to IF Step Return m the routine s caller Restart the selected debug session pr i Detaches the debugger from the selected debug session be Terminate the selected debug session Launch the last debug configuration or use the drop down list to select a X Debug debug configuration Currently using the Debug button to launch the last debug configuration does not work as expected when used under the IDE s C C perspective Refer to the Kinetis Design Studio Release Notes for further details When stopping on a breakpoint or with the execution paused the state of the target can be examined by viewing the current Copyright O 2013 2014 13 of 18 SOMNIUM Document Number SOMN KDS 0001 SOMNIUM Technologies Limited Freescale Document Number KDS200UG Rev 0 11 14 Kinetis Design Studio User Guide call stack in the Debug view ARM processor core registers Disassembly Memory Breakpoints which have been set local variables in Variables view global variables in Expressions view and more
32. will by default install the SEGGER J Link and the P amp E Multilink device drivers and so these do not need to be separately installed On Windows systems the mbed project CMSIS DAP firmware requires a serial port driver to be installed The Kinetis Design Studio Windows Installer does not do this and so it will need to be installed separately The table below provides a link which explains how to install the serial port driver The table also describes how to manually install the SEGGER J Link and P amp E Multilink drivers if this is required Follow the instructions at http mbed org handbook Windows serial configuration ARM mbed project Windows serial port driver Run the following installers SEGGER J Link e install dir segger USBDriver InstDrivers exe e install dir segger USBDriver CDC InstDriversCDC exe P amp E Multilink driver Run the P amp E driver installer instat 1 dirNpemicroNPEDrivers install exe B 2 Installing on Linux When the Kinetis Design Studio software development tools are installed on a Linux system it will contain a udev rules file for each of the OpenOCD SEGGER J Link the P amp E Multilink debug interfaces The table below describes how these can be installed Driver udev rules fit Notes S S S Copy the udev file into the configuration directory for example under etc udev rules d Rename the file to 99 openocd rules for example OpenOCD install dir openocd openocd udev Optionally the

Download Pdf Manuals

image

Related Search

Related Contents

DSL-N17U  Frigidaire FFBC4622QS Use and Care Manual    Samsung DVD-HD945 Керівництво користувача  Questionnaire-rapport 2012  PROVIDER WEB PORTAL User Guide  取扱説明書等(1)  Mode d`emploi FLIPBOX - Techni  User Manual - BIOSAP Inc.  Beschreibung verfügbarer CLIs und APIs  

Copyright © All rights reserved.
Failed to retrieve file