Application Note. AN1205: Using P&E Micro Kinetis GDB Server

Similar documents
ATOLLIC TRUESTUDIO FOR ARM QUICK START GUIDE

ATOLLIC TRUESTUDIO FOR STM32 QUICK START GUIDE

Important Upgrade Information

Important Upgrade Information. iii P a g e

White paper. ARM Cortex -M system crash analysis

Upgrade Information COPYRIGHT NOTICE TRADEMARK DISCLAIMER DOCUMENT IDENTIFICATION REVISION. 2 P a g e

Quick Start Guide for mbed enabling Freescale FRDM-KL25z Freedom board

Atollic TrueSTUDIO for ARM. Installation Guide Quick Start Guide

Kinetis SDK Freescale Freedom FRDM-KL03Z Platform User s Guide

TrueSTUDIO Success. Working with bootloaders on Cortex-M devices

Atollic TrueSTUDIO for STMicroelectronics STM32. Quickstart Guide

IAR Embedded Workbench

Quick Start Guide for FRDM-KL05Z

Getting Started with Kinetis SDK (KSDK) v.1.3

Quick Start Guide for FRDM-KL46Z Rev 1

Getting Started with IAR Embedded Workbench for Renesas Synergy

Getting Started with Kinetis SDK (KSDK) v.1.2

Software Installation Guide for S32 Design Studio IDE (S32DS): FRDM-KEAZ128Q80 FRDM-KEAZ64Q64 FRDM-KEAZN32Q64

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

User Manual Rev. 0. Freescale Semiconductor Inc. FRDMKL02ZUM

S32K148 EVB QUICK START GUIDE REV1 APPLIES FOR: S32K148 EVB (SCH REV A/B) EXTERNAL USE

S32K118 EVB QUICK START GUIDE APPLIES FOR: S32K118 EVB (SCH_29945 REV B) EXTERNAL USE

IAR C-SPY Hardware Debugger Systems User Guide

STM32CubeProgrammer + Atollic TrueSTUDIO for STM32

Quick Start Guide for FRDM-KL46Z Rev 1

S32K144 EVB QUICK START GUIDE REV4.2 APPLIES FOR: S32K144 EVB (SCH REV B) EXTERNAL USE

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

User Manual Rev. 0. Freescale Semiconductor Inc. FRDMKL02ZUM

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

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

The process also requires the use of the following files found in the Micriµm Quick Start Package for the FRDM-KL46Z:

FRDM-KEA QUICK START GUIDE (QSG) FRDM-KEAZ128 FRDM-KEAZ64 FRDM-KEAZN32 Ultra-Reliable MCUs for Industrial and Automotive Applications

S32K118 EVB QUICK START GUIDE APPLIES FOR: S32K118 EVB (SCH_29945 REV B) EXTERNAL USE

RN2483_Silica Documentation

A brief intro to MQX Lite. Real work: hands-on labs. Overview, Main features and Code Size

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

µc/probe on the Freescale FRDM-KL05Z without an RTOS

Purchase Agreement. P&E Microcomputer Systems, Inc. 98 Galen St. Watertown, MA

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

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

IAR Embedded Workbench

Quick Start Guide (QSG) for - FRDM-KEAZ128 - FRDM-KEAZ64 - FRDM-KEAZN32

Installing and using CW 10.6 for TPMS applications. Revision 4

Apex-ICE Universal Emulator Hardware and Software Installation Guide

Kinetis Bootloader Demo Application User's Guide

S32K142 EVB QUICK START GUDE REV3.1 APPLIES FOR: S32K142 EVB (SCH_29701 REV D/C) EXTERNAL USE

Installing and using CW 10.x for TPMS applications. Revision 5

HVP-KV31F120M User s Guide

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

Hands-On Workshop: ARM mbed

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

OpenSDA on TWR-KW2x. User s Guide Rev 1.1

IAR Embedded Workbench

HVP-KV10Z32 User s Guide

Setting up Java environment for Project Capuchin development with Sony Ericsson phones

Getting Started with MCUXpresso SDK

IoT Sensing SDK. Getting started with IoT Sensing SDK (ISSDK) v1.7 middleware. Document information. IoT Sensing SDK, ISSDK, MCUXpresso, middleware

UM NXP USB PD shield board user manual COMPANY PUBLIC. Document information

MAXIM INTEGRATED INSTRUCTIONS FOR PROGRAMMING THE MAXREFDES220 ALGORITHM

UM1727 User manual. Getting started with STM32 Nucleo board software development tools. Introduction

Quick Start Guide for FRDM-FXS-MULTI-B

White paper. Embedded development using the GNU toolchain for ARM processors

NXP Semiconductors MCU Bootloader Demo Applications User's Guide

FRDM-KL03Z User s Guide

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

Kinetis SDK v Release Notes for KV5x Derivatives

Howto use Amontec JTAGkey- Tiny on

Firmware Update Function

An unrivalled feature-set and unprecedented integration

Kinetis Bootloader v1.2.0 Release Notes

MCUXpresso IDE User Guide. Rev November, 2018

Atollic TrueINSPECTOR. Improve software quality with static source code inspection!

Converting Earlier Versions of CodeWarrior for StarCore DSPs Projects to Version

Kinetis Motor Suite v1.2.0 Release Notes

Freescale MKW40Z IEEE Software Quick Start Guide

Howto use Amontec JTAGkey- Tiny on

Installation and Licensing Guide for the IAR Embedded Workbench

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

P&E Microcomputer Systems, Inc. P.O. Box 2044, Woburn, MA 01888, USA

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

Quick Start Guide for TWR-S08MM128-KIT TOWER SYSTEM MC9S08MM128. The industry s most complete solution for portable medical applications

Purchase Agreement. P&E Microcomputer Systems, Inc. 98 Galen St. Watertown, MA

for ColdFire Architectures V7.2 Quick Start

FRDM-KE02Z User s Manual

EAN-FPGA Firmware Update 1500-OEM

P&E Microcomputer Systems, Inc. P.O. Box 2044, Woburn, MA 01888, USA

P&E Microcomputer Systems, Inc. P.O. Box 2044, Woburn, MA 01888, USA

AURIX family and AUDO Future, AUDO MAX

Release Notes. S32 Design Studio for ARM v1.1

AIMMS User s Guide - Collaborative Project Development

Kinetis USB-KW41Z Wireless Protocol Sniffer Quick Start Guide

TriCore Free Entry Tool Chain. AURIX family and AUDO Future, AUDO MAX

Page Fault Monitor. by Software Verify

Zynq-7000 Platform Software Development Using the ARM DS-5 Toolchain Author: Simon George and Prushothaman Palanichamy

Hands-On Workshop: New Kinetis Development Platform

Apex-ICE Universal JTAG Emulator Hardware and Software Installation Guide

PrinterOn Hosted Service. Printing Guide and Frequently Asked Questions

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

FX RFID READER SERIES Embedded SDK Sample Application

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

Transcription:

Application Note AN1205: Using P&E Micro Kinetis GDB Server

Document Data COPYRIGHT NOTICE Copyright 2012 Atollic AB. All rights reserved. No part of this document may be reproduced or distributed without the prior written consent of Atollic AB. TRADEMARK Atollic, Atollic TrueSTUDIO, Atollic TrueINSPECTOR, Atollic TrueVERIFIER, Atollic TrueANALYZER and Atollic TrueSTORE and the Atollic logotype are trademarks or registered trademarks owned by Atollic. ECLIPSE is a registered trademark of the Eclipse foundation. MISRA and "MISRA C" is a registered trademark of MISRA Ltd, held on behalf of the MISRA Consortium. All other product names are trademarks or registered trademarks of their respective owners. DISCLAIMER The information in this document is subject to change without notice and does not represent a commitment of Atollic AB. The information contained in this document is assumed to be accurate, but Atollic assumes no responsibility for any errors or omissions. In no event shall Atollic AB, its employees, its contractors, or the authors of this document be liable for any type of damage, losses, costs, charges, claims, demands, claim for lost profits, fees, or expenses of any nature or kind. DOCUMENT IDENTIFICATION ASW-AN1205 November 2012 REVISION First version November 2012 Atollic AB Science Park Gjuterigatan 7 SE- 553 18 Jönköping Sweden +46 (0) 36 19 60 50 E-mail: sales @atollic.com Web: www.atollic.com Atollic Inc 115 Route 46 Building F, Suite 1000 Mountain Lakes, NJ 07046-1668 USA +1 (973) 784 0047 (Voice) +1 (877) 218 9117 (Toll Free) +1 (973) 794 0075 (Fax) E-mail: sales.usa@atollic.com Web: www.atollic.com ii P a g e

Table of Contents Contents Introduction... 4 Intended Readers... 4 Installation... 5 Licensing... 5 GDB Server Preferences... 5 Using the GDB Server... 6 Configuring the Debugger... 6 Configuring the GDB Server... 6 Debugging... 7 Freescale board configuration... 9 Enter OpenSDA Bootloader Mode... 9 Downlaod OpenSDA Firmware... 10 Update the MSD Flash Programmer Application... 10 Install the DEBUG APP... 11 GDB Server File examples... 12 File server.ini... 12 File project.ini... 12 iii P a g e

Introduction INTRODUCTION This Application Note provides information on how to use the P&E Kinetis GDB Server made by P&E Microcomputer Systems Inc. with Atollic TrueSTUDIO. Atollic TrueSTUDIO, from version 3.3 and later, can use this GDB Server to debug Freescale Kinetis processor targets. The GDB Server can be used with the following hardware interfaces: OpenSDA Embedded Debug USB Multilink USB Multilink FX Embedded OSJTAG INTENDED READERS This document is primarily intended for software developers using the Freescale Kinetis devices in Atollic TrueSTUDIO projects. 4 P a g e

INSTALLATION The P&E Kinetis GDB Server can be installed when installing Atollic TrueSTUDIO. The latest P&E Kinetis GDB Server version from P&E Microcomputer Systems Inc. is available here http://www.pemicro.com/downloads/download_file.cfm?download_id=382 LICENSING When a debug session using the P&E Kinetis GDB Server is started with Atollic TrueSTUDIO the debug session uses a challenge/response protocol to license the GDB Server. So there is no need to have any other license of the GDB Server to make it work with Atollic TrueSTUDIO. Note! If the GDB Server is started manually outside Atollic TrueSTUDIO without any other command line parameters it will start in License Activation mode and ask for an Installation Code. GDB SERVER PREFERENCES Atollic TrueSTUDIO settings for the P&E Kinetis GDB Server can be changed in the Preferences dialog. Select the menu command Windows, Preferences to open the Preferences dialog. In the panel for PE Micro the server settings can be configured. Please verify that the Server location is correct. Figure 1 PE Micro Preferences 5 P a g e

USING THE GDB SERVER This section contains information on how to use the GDB Server. CONFIGURING THE DEBUGGER First time a debug session is started there are some configuration needed. The following dialog is displayed when starting a debug session first time. Figure 2 Debug Configurations, Debugger Panel When using P&E Micro USB Multilink probes or OpenSDA or Embedded OSJTAG probes make sure that P&E Micro is selected in the Debugger tab. The actual type of probe is selected in the GDB Server. Info: The port number shall always be set to 7224 when connecting to current version of GDB Server. The Startup Debug tab contains the GDB script that will be used when starting a Debug session. CONFIGURING THE GDB SERVER The P&E Kinetis GDB Server settings are configured through initialization files. 6 P a g e

The GDB Server needs to be configured for the hardware before starting a debug session first time. Use the Open Configuration GUI (GDB Server) button in the Debugger tab in the Debug Configuration dialog to open the GDB Server. It is important to make the following selections: 1. Select Start server on Startup 2. Select the Interface to be used. E.g. Select OpenSDA Embedded Debug USB Port when using Freescale Freedom board. 3. Press the Refresh button to update port information according to connected hardware interface and select correct Port. 4. Select Device name Figure 3 - GDB Server User Interface - Unlicensed Close the GDB Server GUI when configuration is ready. Two initialization files are created by the GDB Server in the project. One pe_micro_serversettings.ini and one pe_micro_projectsettings.ini Use the Open Configuration GUI (GDB Server) button if any setting needs to be changed. DEBUGGING When the GDB Server has been configured for the hardware the debug session can be started. This is done by pressing the Debug button in the Debugger tab in the Debug Configurations dialog. When starting the debugger the GDB Server will be started by TrueSTUDIO. 7 P a g e

Figure 4 - GDB Server User Interface - Licensed The default TrueSTUDIO GDB script for PE Micro GDB Server will load the program, set a breakpoint at main(), and make a continue. So if everything works fine the program shall startup and run startup code until execution stops at the first executable program line inside main(). The GDB Server also provides some log information. Investigate this if there are some problems. The GDB script can be changed by updating the information in the Startup Debug tab in the Debug Configuration dialog Figure 5 Debug Configurations, Starup Debug Panel 8 P a g e

FREESCALE BOARD CONFIGURATION This section provides information about how to configure the Freescale Freedom board so that it can be used with the P&E Kinetis GDB Server. There are some preparations needed on the board to make it work with the debugger. The Freescale Quick Start Guide for FRDM-KL25Z and the Freescale FRDM-KL25Z User s Manual are also good to read to get information about the Freedom board. ENTER OPENSDA BOOTLOADER MODE First the OpenSDA Bootloader Mode shall be started. This is done by: 1. Unplug the USB cable if attached 2. Press and hold the Reset button (SW1). 3. Plug in a USB cable (not included) between a USB host and the OpenSDA USB connector (labeled SDA ). 4. Release the Reset button. A removable drive should now be visible in the host file system with a volume label of BOOTLOADER. You are now in OpenSDA Bootloader mode. Figure 6 Freedom BOOTLOADER files While in OpenSDA Bootloader mode, double-click SDA_INFO.HTML in the BOOTLOADER drive. A web browser will open the OpenSDA homepage containing the name and version of the installed Application. This information can also be read as text directly from SDA_INFO.HTML. 9 P a g e

Figure 7 P&E Micro OpenSDA Web page DOWNLAOD OPENSDA FIRMWARE Download latest OpenSDA Firmware (MSD & Debug) from the P&E Micro webpage: http://www.pemicro.com/opensda/index.cfm 1. Start to download the firmware, (Firmware Apps.zip file) 2. Wait until the file, Pemicro_OpenSDA_Debug_MSD_Apps_2012_11_09.zip, is downloaded. 3. Unzip the files to a folder The zip-file contains a number of SDA files that can be downloaded to the Freedom board. Next sections contain information about how to update the Flash Programmer Application and how to download the DEBUG_APP. It is necessary to install the DEBUG_APP to the board when the PE Micro GDB Server shall be used. UPDATE THE MSD FLASH PROGRAMMER APPLICATION It is good to update the Flash Programmer Application to the latest version available. 1. Open the directory where the PEMicro OpenSDA Firmware has been unzipped. 2. Copy & paste or drag & drop the MSD Flash Programmer Application, MSD-FRDM- KL25Z_Pemicro_vXYZ.SDA, to the BOOTLOADER drive. 3. Unplug the USB cable and plug it in again. The new OpenSDA Application should now be running and a FRDM-KL25Z drive should be visible in the host file system. 10 P a g e

INSTALL THE DEBUG APP It is necessary to install the DEBUG_APP to the board when the PE Micro GDB Server shall be used. 1. Start the OpenSDA Bootloader Mode. Unplug the USB cable, Press reset button (SW1), plug in the USB cable and release reset button. 2. Open the directory where the PEMicro OpenSDA Firmware has been unzipped. 3. Copy & paste or drag & drop the DEBUG_APP, DEBUG_APP_Pemicro_vXYZ.SDA, to the BOOTLOADER drive. 4. Unplug the USB cable and plug it in again. The new OpenSDA Application should now be running and a FRDM-KL25Z drive should be visible in the host file system. 11 P a g e

GDB SERVER FILE EXAMPLES The following are examples of server.ini and project.ini files for PEMicro GDB Server when using a Freescale Freedom board, FRDM-KL25Z. The on-board OpenSDA Embedded Debug-USB Port and KL25Z128M4 device are used. FILE SERVER.INI The following is an example of the server.ini file used with PEMicro GDB Server [STARTUP] AUTO_START=1 LOCALHOST=1 FILE PROJECT.INI [STARTUP] AUTOCONNECT=0 INTERFACE_SELECTION=7 PORT=181 FREQ_FX=4 FREQ_OSJTAG=0 FREQ_NORMAL=0 FREQ_CYCLONE=3 FREQ_TRACELINK=3 FREQ_OPENSDA=0 RESET_DELAY=0 USE_CYCLONEPRO_RELAYS=1 CYCLONEPRO_POWEROFFONEXIT=1 SPECIFY_IP_ENABLED=0 MULTILINK_POWERUPDELAY=1000 MULTILINK_POWERDOWNDELAY=250 SPECIFY_IP=127.0.0.1 SPECIFY_NETWORKCARD_ENABLED=0 SPECIFY_NETWORKCARD=127.0.0.1 FORCE_MASS_ERASE=0 USE_SWD=1 TRACELINK_MAXBUFFERSIZE=1 ECLIPSE_SHOW_CONNECTION_ASSISTANT=1 CPUTARGETTYPENAME= CYCLONEPRO_CURRENTVOLTAGE=255 CYCLONEPRO_POWERDOWNDELAY=250 CYCLONEPRO_POWERUPDELAY=250 12 P a g e

IO_DELAY_CNT=0 FREQ_LIGHTNING=1 SHOWDIALOG=1 [PEDEBUG] CURRENTDEVICE=KL25Z128M4 ENABLE_FLASH_PROGRAMMING_DIALOG=1 [PORT] IP= [DEVICE] CHIPMODE=KL25Z128M4 [STARTUP12] SHOW_HSTEP_ASSEMBLY_DETAILS=0 13 P a g e