Getting Started with Freescale MQX RTOS for Kinetis SDK and MDK-ARM Keil

Similar documents
Getting Started with Freescale MQX RTOS for Kinetis SDK and Kinetis Design Studio IDE

Getting Started with Freescale MQX RTOS for Kinetis SDK and ARM GCC

Kinetis SDK Freescale Freedom FRDM-KL03Z Platform User s Guide

MQX RTOS Release Notes for Kinetis SDK v1.2.0 for KL33Z64 for FRDM-KL43Z Freescale Freedom Development Platform

MQX RTOS Release Notes for Kinetis SDK FRDM- KV10Z Freescale Freedom Development Platform

Freescale MQX USB Stack for TWR-K24F120M GA User s Guide

TWR-KV10Z32 Sample Code Guide for IAR Board configuration, software, and development tools

Getting Started with MQX RTOS for Kinetis SDK

Kinetis SDK Release Notes for the TWR-K24F120M Tower System Module

FRDM-K64F Board Errata

TWR-KV10Z32 Sample Code Guide for CodeWarrior Board configuration, software, and development tools

Kinetis SDK v Release Notes for KV5x Derivatives

Freescale Kinetis Software Development Kit Release Notes

Adding a run control interface into an existing CodeWarrior for MCU v10.x project

Getting Started with MCUXpresso SDK CMSIS Packs

Kinetis USB-KW41Z Wireless Protocol Sniffer Quick Start Guide

Emulating Dual SPI Using FlexIO

Freescale MKW40Z IEEE Software Quick Start Guide

WPR1500-LDO MP Receiver V2.1 Reference Design User s Guide

Kinetis SDK v Release Notes for the MK21DA5 and MKW24D5 Devices

Kinetis Bootloader v1.2.0 Release Notes

Load Position-Independent Code (PIC) on a Kinetis Platform Using the IAR EWARM Compiler

DDR Validation Tool Getting Started Guide

Processor Expert Software for i.mx Processors Version 1.0

HVP-KV10Z32 User s Guide

Building U-Boot in CodeWarrior ARMv8

OpenSDA on TWR-KW2x. User s Guide Rev 1.1

Freedom FRDM-MC-LVBLDC Development Platform User s Guide

Collecting Linux Trace without using CodeWarrior

Freescale MQX RTOS TWR-K64F120M Release Notes

HVP-KV31F120M User s Guide

TWR-LS1021A Getting Started

Offline Flash Programmer for Kinetis K- and L-series MCUs

TWR-LS1021A Getting Started

Three-Phase Power Meter Hardware Design Reference Manual

General C Functions for the etpu Covers the MCF523x, MPC5500, MPC5600, MPC5700, MPX40 and all etpu-equipped Devices

Quick Start Guide for FRDM-FXS-MULTI-B

i.mx 6Solo/6DualLite Product Lifetime Usage Estimates

Kinetis Updater User's Guide

Integrate TWR-EPD Software with MQX RTOS Based on the TWR-K21F120M Platform

Freescale MQX RTOS for Kinetis SDK Release Notes version beta

Quick Start Guide for FRDM-KL05Z

i.mx 7 Dual/Solo Product Lifetime Usage

Getting Started with the MCU Flashloader

How to setup pre-build steps in CodeWarrior for Microcontrollers v10.x

Component Development Environment Getting Started Guide

Getting Started with FreeRTOS BSP for i.mx 7Dual

PMSM Field-Oriented Control Using MC56F84789 DSC With Encoders Demo Guide

Watt Saver Software Component (WSC)

Quick Start Guide for the Freescale Freedom Development Platform FRDM-KL43Z

MCUXpresso SDK USB Power Delivery

Working around ERR7026 according to application needs

i.mx 6ULL Product Usage Lifetime Estimates

Emulating I2C Bus Master by using FlexIO

i.mxrt1050 Product Lifetime Usage Estimates

Keil uvision 4 Kinetis Support for Freescale MQX RTOS Release Notes

Quick Start Guide for FRDM-KL46Z Rev 1

i.mx 6 Android JB 4.3_1.1.1 Patch Release Notes

i.mx 6UltraLite Product Usage Lifetime Estimates

Emulating I2S bus on KE06

How to use FlexMemory as D-Flash and EEPROM in KE1xF

Using an External GCC Toolchain with CodeWarrior for Power Architecture

Kinetis Bootloader to Update Multiple Devices in a Field Bus Network

Reference Design KL25-AGMP01 User Guide 10-Axis Data Logger Tool Kit

Kinetis Bootloader Demo Application User's Guide

Installing Service Pack Updater Archive for CodeWarrior Tools (Windows and Linux) Quick Start

CodeWarrior Development Studio Processor Expert RTOS Adapter User Guide

AIOP Task Aware Debug

Single Chip Module (SCM) Package-on- Package (PoP) Assembly Guide

FRDM-KL03Z User s Guide

Intelligent Sensing Framework 2.1 for Kinetis Errata Sheet

Kinetis Flash Tool User's Guide

P1010RDB-PB Quick Start Guide

for StarCore DSP Architectures Quick Start for the Windows Edition

Quick Start Guide for FRDM-KL46Z Rev 1

Generating a Quick and Controlled Waveform With the DAC

HVP-MC56F82748 User s Guide

Smart Plug Software Design Reference Manual

for Freescale MPC55xx/MPC56xx Microcontrollers V2.10 Quick Start

for ColdFire Architectures V7.2 Quick Start

MCU Bootloader Release Notes

Getting Started with Kinetis SDK (KSDK) v.1.3

Quick Start Guide TRK-KEA. Kinetis EA Series MCUs for Automotive Electronics Applications. StarterTRAK

HVP-56F82748 Quick Start Guide

NADK Reflector Application Debug

Freedom FRDM-KV31F Development Platform User s Guide

How to Enable Boot from QSPI Flash

NXP Semiconductors MCU Bootloader Demo Applications User's Guide

Using DMA for Pulse Counting on S32K

TWR-K60F120M Quick Start Guide

Quick Start Guide. TWR-KV10Z32 Development Kit for Kinetis KV1x Family TOWER SYSTEM

Configuring DDR in U-Boot using QCVS

Getting Started with Pins Tool User's Guide

i.mx 6 Yocto Project Patch Release Notes

FRDM-KE02Z User s Manual

Kinetis KE1xF512 MCUs

QN9080 QN908x RF Certification Guide

MMPF0100 Errata for Mask 1N47F and 1N18J

CodeWarrior Development Studio for StarCore DSP SC3900FP Architectures Quick Start for the Windows Edition

Controller Continuum. for Microcontrollers V6.3. Quick Start

Transcription:

Freescale Semiconductor, Inc. Document Number: KSDKGSKEILUG User s Guide Rev. 1, 04/2015 Getting Started with Freescale MQX RTOS for Kinetis SDK and MDK-ARM Keil µvision5 1 Read Me First This document describes the steps required to configure Keil MDK to build, run, and debug MQX RTOS demo applications and necessary driver libraries provided in the KSDK framework. The Hello World demo application targeted for the TWR-K64F120M Tower System hardware platform is used as an example in this guide. Additionally, more information related to Freescale Kinetis platform support in µvision 5 tools is in the arm.com/files/pdf/kinetis_lab.pdf document. Contents 1 Read Me First... 1 2 Import project files into KEIL workspace... 2 3 Build library project files... 3 4 Build the application project file... 5 5 Run a demo application... 7 6 Revision history... 13

Master Page for Page 1 2 Import project files into KEIL workspace Each demo application of MQX RTOS for Kinetis SDK requires several libraries to be built together with a demo application itself. For user convenience, the Freescale MQX RTOS package contains multiproject workspace files containing all required libraries. The workspaces are available on following locations: <install_dir>/rtos/mqx/mqx/examples/<demo_name>/build/mdk/<demo_name>_<board_name>/<dem o_name>_<board_name>.uvmpw For example, with hello demo application for TWR-K64F120M, open the workspace file in the Keil MDK. <install_dir>/rtos/mqx/mqx/examples/hello/build/mdk/hello_twrk64f120m/hello_twrk64f120m.uvmpw Figure 1 : Import project files into workspace Getting Started with Freescale MQX RTOS for Kinetis SDK and MDK-ARM Keil µvision5, Rev. 1, 04/2015 2 Freescale Semiconductor, Inc.

3 Build library project files This section will guide you to build the library project files of the hello example in MQX RTOS for KSDK for TWR-K64F120M. Follow the steps to build libraries with different build target at the same time. 1. Go to Project and select Batch Build from the toolbar menu options to start the batch build. Figure 2: Start batch build 2. In the Batch Build dialog window, check the boxes next to the library with the desired build target that you want to build. Getting Started with Freescale MQX RTOS for Kinetis SDK and MDK-ARM Keil µvision5,rev. 1, 04/2015 Freescale Semiconductor, Inc. 3

Master Page for Page 1 3. Click the Build button to build the libraries for the first time, or the Rebuild button (in red) to build the libraries again. Figure 3: Select projects to build When complete, check that the library files are generated in folders <install_dir>/rtos/mqx/lib/<board_name>.mdk/<build_target>/mqx/<lib_mqx>.lib <install_dir>/rtos/mqx/lib/<board_name>.mdk/<build_target>/mqx_stdlib/<lib_mqx_stdlib>.li b <install_dir>/lib/ksdk_mqx_lib/mdk/<device_name>/<build_target>/<libksdk_platform_mqx>. lib For example with the hello example of MQX RTOS for KSDK for TWR-K64F120M and Debug target, the following library files are generated. <install_dir>/rtos/mqx/lib/twrk64f120m.mdk /debug/mqx/<lib_mqx>.lib <install_dir>/rtos/mqx/lib/twrk64f120m.mdk/debug/mqx_stdlib/<lib_mqx_stdlib>.lib <install_dir>/lib/ksdk_mqx_lib/mdk/k64f12/debug/<libksdk_platform_mqx>.lib Getting Started with Freescale MQX RTOS for Kinetis SDK and MDK-ARM Keil µvision5, Rev. 1, 04/2015 4 Freescale Semiconductor, Inc.

4 Build the application project file After building the libraries, build the application project file. The steps to build the hello example of MQX RTOS for KSDK for TWR-K64F120M are described here. 1. In the workspace, set the hello_twrk64f120m as the active project by right clicking the project and select Set as Active Project. 2. Select the appropriate build target. Figure 4: Select build target for hello project 3. Click the build button (in red) to build the project. Figure 5: Build hello example Getting Started with Freescale MQX RTOS for Kinetis SDK and MDK-ARM Keil µvision5,rev. 1, 04/2015 Freescale Semiconductor, Inc. 5

Master Page for Page 1 4. When the build of the hello finishes, the build output message is similar to this image. Any error or warning message will be in the Build Output tab view. Note that a warning message will not affect the linking process and the application image is generated normally. Figure 6: Build output message Getting Started with Freescale MQX RTOS for Kinetis SDK and MDK-ARM Keil µvision5, Rev. 1, 04/2015 6 Freescale Semiconductor, Inc.

5 Run a demo application To download and run the application, follow these steps. 1. Connect the development platform to your PC via USB cable between the OpenSDA USB connector and the PC USB connector. 2. Open the terminal application on the PC, such as PuTTY or TeraTerm, and connect to the OpenSDA serial port number. Configure the terminal with these settings: a) 115200 baud rate b) No parity c) 8 data bits d) 1 stop bit Figure 7: Set up serial terminal Getting Started with Freescale MQX RTOS for Kinetis SDK and MDK-ARM Keil µvision5,rev. 1, 04/2015 Freescale Semiconductor, Inc. 7

Master Page for Page 1 3. Right click the hello project and select Options for <demo_name> or press Alt+F7 to open Options dialog window for the project. For the hello example of MQX RTOS for KSDK for TWR-K64F120M, open the specific window. Figure 8: Project options Note In case Freescale MQX RTOS option is not available in your Keil MDK IDE, install the plug-in can by running <KSDK_DIR>/tools/mqx_plugins/keil_extensions/MDK_MQXViewer_A ddon.exe executable file. Getting Started with Freescale MQX RTOS for Kinetis SDK and MDK-ARM Keil µvision5, Rev. 1, 04/2015 8 Freescale Semiconductor, Inc.

4. Navigate to the Debug option and select the other debugging tool to make sure the Debugger you use is suitable for the development platform. Figure 9: Select Debugger Getting Started with Freescale MQX RTOS for Kinetis SDK and MDK-ARM Keil µvision5,rev. 1, 04/2015 Freescale Semiconductor, Inc. 9

Master Page for Page 1 5. After selecting of appropriate Debugging tool, click the Settings button, next to the drop down menu of the Debugger selection, to configure the Debugger. This allows the Keil µvision5 to be able to connect to the board via the Debugger. This figure shows the P&E Micro debugger as an example, but you may use different debugger. In the open window, select the right interface (in red) and Port (in pink). Click the Refresh List button (in orange) to update the status of the board. In some cases, the target CPU also needs to be changed (in blue). Check the SWD option (in yellow). Click the OK button (in green) when done. Figure 10: Debugger configurations Getting Started with Freescale MQX RTOS for Kinetis SDK and MDK-ARM Keil µvision5, Rev. 1, 04/2015 10 Freescale Semiconductor, Inc.

1. Click the Download button (in red) to download the application to the target platform. Figure 11: Download application image 2. Click the Start/Stop Debug Session button (in red) to debug the application. Figure 12: Start debug session Getting Started with Freescale MQX RTOS for Kinetis SDK and MDK-ARM Keil µvision5,rev. 1, 04/2015 Freescale Semiconductor, Inc. 11

Master Page for Page 1 3. The application runs and stops to the main() function. Figure 13: Run the application 4. Click the Run button (in red) to run the application. Figure 14: Output of hello example of MQX RTOS for KSDK Getting Started with Freescale MQX RTOS for Kinetis SDK and MDK-ARM Keil µvision5, Rev. 1, 04/2015 12 Freescale Semiconductor, Inc.

6 Revision History This table summarizes revisions to this document. Table 1 Revision History Revision number Date Substantial changes 1 04/2015 Kinetis SDK 1.2.0 release 0 12/2014 Kinetis SDK 1.1.0 release Getting Started with Freescale MQX RTOS for Kinetis SDK and MDK-ARM Keil µvision5,rev. 1, 04/2015 Freescale Semiconductor, Inc. 13

How to Reach Us: Home Page: freescale.com Web Support: freescale.com/support 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. 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, including 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 experts. Freescale does not convey any license under its patent rights nor the rights of others. Freescale sells products pursuant to standard terms and conditions of sale, which can be found at the following address: freescale.com/salestermsandconditions. Freescale, the Freescale logo, and Kinetis 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, ARM powered logo, Keil, µvision, and Cortex are registered trademarks of ARM Limited (or its subsidiaries) in the EU and/or elsewhere. All rights reserved. 2015 Freescale Semiconductor, Inc. Document Number: KSDKGSKEILUG Rev. 1 04/2015