Project Manager Editor & Debugger



Similar documents
UM1680 User manual. Getting started with STM32F429 Discovery software development tools. Introduction

SKP16C62P Tutorial 1 Software Development Process using HEW. Renesas Technology America Inc.

3 IDE (Integrated Development Environment)

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

UM1790 User manual. Getting started with STM32L053 discovery kit software development tools. Introduction

Microsoft Access 97 Keyboard Shortcuts

Embedded Software development Process and Tools:

Access 2013 Keyboard Shortcuts

DsPIC HOW-TO GUIDE Creating & Debugging a Project in MPLAB

UM0985 User manual. Developing your STM32VLDISCOVERY application using the IAR Embedded Workbench software. Introduction

Quick Start Tutorial. Using the TASKING* Software Development Tools with the Intel 8x930 Family Evaluation Board

Integrating CaliberRM with Software Configuration Management Tools

Updating the QIAcube operating software

EE8205: Embedded Computer System Electrical and Computer Engineering, Ryerson University. Multitasking ARM-Applications with uvision and RTX

High-Speed Inter Connect (HSIC) Solution

Installation Guide E Dielectric Probe Kit 85071E Materials Measurement Software

Release Notes: PowerChute plus for Windows 95 and Windows 98

SQLServer Mgmt Studio 2005 (Std keyset) Keyboard Shortcuts

Using Example Projects, Code and Scripts to Jump-Start Customers With Code Composer Studio 2.0

Embedded Development Tools

Adept DeskTop Online User Guide

AN2146 APPLICATION NOTE

Foreign Taxes Paid and Foreign Source Income INTECH Global Income Managed Volatility Fund

AN974 APPLICATION NOTE

Hypercosm. Studio.

UML - Getting Started EA v4.0

Agilent N5970A Interactive Functional Test Software: Installation and Getting Started

3. Programming the STM32F4-Discovery

AN3354 Application note

Introduction. - Please be sure to read and understand Precautions and Introductions in CX-Simulator Operation Manual and

Code Composer Studio Development Tools v3.3. Getting Started Guide

Basics of Word Processing

Capture desktop image to Clipboard. Display contextual Help Window. Rename.

Ride7 for ARM. RAISONANCE Tools for the STRx and STM32 families. Overview and Getting Started

Keysight Technologies N1918A Power Analysis Manager and U2000 Series USB Power Sensors. Demo Guide

UM1676 User manual. Getting started with.net Micro Framework on the STM32F429 Discovery kit. Introduction

IAR Embedded Workbench

EE8205: Embedded Computer System Electrical and Computer Engineering, Ryerson University. Introduction to Keil uvision and ARM Cortex M3

Software development and debugging for NXP ARM7 MCUs

AN3265 Application note

AN1754 APPLICATION NOTE

List of the keyboard shortcuts that are available in Windows XP

CooCox CoIDE UserGuide Version: page 1. Free ARM Cortex M3 and Cortex M0 IDE: CooCox CoIDE UserGuide

Infor ERP BaanIV / Baan 5.0 / LN 6.1. User's Guide for Worktop 2.4

Microsoft Office -Windows 7


PRODUCT DATA. PULSE WorkFlow Manager Type 7756

Get the benefits of Norgren s unique range of Online services

Configuring DHCP for ShoreTel IP Phones

How to read this guide

Agilent BenchVue Software (34840B) Data capture simplified. Click, capture, done. Data Sheet

Image Lab Software for the GS-900 Densitometer

NetFlow Feature Acceleration

Report on Government Information Requests

Windows XP Introduction Revised November 2004

Using the Query Analyzer

Application Notes for VTech 1-Line and 2-Line Analog Hotel Phones with Avaya IP Office 8.1 and Voic Pro 8.1 Issue 1.0

HANDLING SUSPEND MODE ON A USB MOUSE

Freescale Semiconductor, I

You can start almost every task you perform in QuickBooks by clicking something a

Quantum View Manage Administration Guide

Shortcut Keys. Edit document under cursor

AT-S39 Version 1.3 Management Software for the AT-8024 and AT-8024GB Fast Ethernet Switches. Software Release Notes

Word 2010 Introduction

PBA.pro Getting Started

What is the difference between an equivalent time sampling oscilloscope and a real-time oscilloscope?

How To Install A Gel Doc Xr+ Camera On A Computer Or Mouse Or Tv (For A Powerbook) With A Zoom Lens (For An Ipa) With An Iphone Or Ipa (For Mac) With The Zoom Lens

UM0834 User manual. Developing and debugging your STM8S-DISCOVERY application code. Introduction. Reference documents

ArchestrA Log Viewer User s Guide Invensys Systems, Inc.

Agilent Automotive Power Window Regulator Testing. Application Note

An Introduction to MPLAB Integrated Development Environment

Keysight M9485A PXIe Multiport Vector Network Analyzer. Configuration Guide

Tutorial for MPLAB Starter Kit for PIC18F

1. Click the File tab 2. Click "Options" 3. Click "Save" 4. In the line labeled "Default file location", browse to the desired folder 5.

Infineon XMC4000: Cortex -M4 Lab

CodeWarrior Development Studio for Freescale S12(X) Microcontrollers Quick Start

WinSCP: Secure File Transfer Using WinSCP for Secure File Transfer on Windows

Inventor. Keyboard Shortcuts

STMicroelectronics: Cortex -M4 Training STM32F429 Discovery evaluation board using ARM Keil MDK toolkit

Cisco Router and Security Device Manager File Management

Module 1: Getting Started With Altium Designer

Elecard AVC HD Editor User Guide

User s Manual. LG Programmable Logic Controller KGL for Windows [ MASTER-K Series] LG Industrial Systems Co., Ltd.

TIPS & TRICKS JOHN STEVENSON

Open Workbench. User Guide. v2.0.00

LEGO Digital Designer 4.3 User Manual

USBSPYDER08 Discovery Kit for Freescale MC9RS08KA, MC9S08QD and MC9S08QG Microcontrollers User s Manual

Keyboard shortcuts in Excel Keyboard access to the ribbon. In this article WILL MY OLD SHORTCUTS STILL WORK? Hide All

Website: Twitter:

The Basics of Microsoft Excel

LOGO!Soft Comfort Online Help. LOGO!Soft Comfort Online Help. LOGO!Soft Comfort V User interface. Tutorial 3. Sample applications 4

IDT Connect User Guide

Voice Internet Phone Gateway

Microsoft Frontpage 2003 Keyboard Shortcuts

Computer Specifications

Agilent U2000 Series USB Power Sensors

Basics of MS Word :: 137

NDA ISSUE 1 STOCK # CallCenterWorX-Enterprise IMX MAT Quick Reference Guide MAY, NEC America, Inc.

Hardware and Software Requirements

Transcription:

TM IDE for Microcontrollers Quick Start µvision2, the new IDE from Keil Software, combines Project Management, Source Code Editing, and Program Debugging in one powerful environment. This Quick Start guide gives you the information necessary to use µvision2 for your own projects. It provides a step-by-step introduction of the most commonly used µvision2 features including: n n n Project Setup for the Make and Build Process Editor facilities for Modifying and Correcting Source Code Program Debugging and Additional Test Utilities Project Window Peripheral Dialog Output Window Project Manager Editor & Debugger Workspace Watch Window and Call Stack Memory Window

PROJECTS Project Management µvision2 now includes several robust features to make project management easier than ever. File Groups let you group associated files together in a project. This is useful for grouping files into functional blocks or for identifying engineers in your software team. Project Targets let you create several programs from a single project. You may need one target for testing and another target for a release version of your application. Each target allows individual tool settings within the same project file. The Project menu provides access to all dialogs for project management including... New Project... which creates a new project. Targets, Groups, Files... which add components to a project. Local menus in the Project window let you add files to the project. Open Project... which opens an existing project. Note that the Quick Start examples are based on the measure project files located in EXAMPLES\MEASURE. Device Database The Device Database makes it easy to start writing programs for a particular CPU. Just select the microcontroller you use and µvision2 sets the necessary options automatically. Since µvision2 already includes numerous devices in its database, tool setup is fast and easy. You may add new devices to the database as the need arises. To choose a device for a project, point to the target name in the Project window and open the local menu. Then, use Select Device. Getting Help µvision2 provides a Books tab in the Project window where extensive on-line manuals for the toolchain and selected CPU are found. You may double-click on a book title to open the on-line manual. Most dialogs have a What s this help button which provides detailed information about the dialog controls. To get help on menu items, select the item and press F1. The Files tab in the Project window displays the currently selected target along with groups and files. You may drag & drop files within this window. The local menu opens when you click the right mouse button. Here, you may set options for targets, groups, and files. Generic devices may be used if a specific device is not available in the database. The Books tab in the Project window lists the on-line manuals that are available. 2

Tool Options Build Project OPTIONS & MAKE µvision2 lets you set the options for all files in a target, a group, or even a single source file. The options dialog opens via the local menu in the Project window. In the Target page of this dialog, you may specify the CPU and memory parameters of the target system. µvision2 uses this information to configure basic tool options including the linker/locater settings and the simulator driver. The Output page defines the output files generated by the assembler, compiler, and linker. The Listing page lets you configure the listing files. The C166, A166, and L166 pages let you enter tool-specific options (like #defines) and display the current tool settings. The Debug page configures the µvision2 Debugger. You can quickly open the Target Options Dialog for the selected target using the toolbar button. In the target dialog, specify the memory model along with CPU and memory parameters. Enter the off-chip memory address ranges under External Memory. To begin a new project, the settings of the target page are all you need! NOTE µvision2 does not insert or configure your C startup files. Configuring the startup code is described in the C Compiler User s Guide and should reflect the settings of the Target page. Start compiling and assembling your target application with the Build Target button on the toolbar. The toolchain stores include and source file dependencies. This information is used during the make process to build only those files that have changed. Optionally, incremental retranslations are performed when global optimizing is enabled. The Build page of the output window lists tool information during the code generation. You may double-click on error messages to correct syntax errors in your program. Errors are correctly located even after you insert or delete source lines. Target Options Dialog Stop Build Process Rebuild Target Build Target Translate current file Build Toolbar Select current Target of the project Specify the usage of integrated on-chip microcontroller components. ROM specifies areas for code and constants. RAM defines the address range for variables. Double-click on syntax errors to position the cursor on the erroneous line in the source. 3

EDITOR Redo Undo Paste Copy Cut Editor Toolbar Find in Files Clear all Bookmarks Previous Bookmark Next Bookmark Toggle Bookmark Project Window Print Find Open file New file Save all files Save file Indent Unindent Search Text Debug Disable all Enable/Disable Kill all Breaks Toggle Break Output Window Source Code Editor The µvision2 editor includes all the standard features you are accustomed to. Color syntax highlighting and text indentation are optimized for editing C source code. Most editor functions may be quickly accessed from the toolbar. The editor is available while debugging your program. This gives you a natural debugging environment that lets you quickly correct your source code. Double-click in the Files page of the Project Window to open a selected source file. Then, use the Workbook navigation bar to quickly select editor windows. Enable Workbook Mode from the View menu. Breakpoints µvision2 lets you set program breakpoints while writing your source text. Simply use the buttons on the Editor Toolbar to mark breakpoints on source lines. After making your program, you can start the Debugger with the Debug toolbar button. Breakpoints you have set while editing are activated in your debugging session. µvision2 marks the status of the source lines in the Attributes column of the editor window. This provides a quick overview of the current breakpoint settings. Utilities In addition to its standard editor features, µvision2 contains many powerful functions that help you complete your projects on time. For example, the Find in Files dialog performs a text search in all specified files. The search results are displayed in the Find in Files page of the Output window. You can use this feature to locate all uses of a function or variable. Workbook bar for quick document selection Attributes Bookmark No Executable Code Enabled Breakpoint Code already executed Current PC, next statement Disabled Breakpoint Selected line from Output Window Code is not executed Search Text Double-click to position the cursor on the line with the matching string. 4

DEBUGGER Debug Toolbar Watch Window Disassembly Window Show Trace Records Enable Trace Recording. Show next statement Reset CPU Step Over Step Out Single Step Into Halt Execution Run Run till Cursor line Performance Analyzer Code Coverage Window Memory Window Serial Window #1 Toolbox Code Execution You may use buttons on the toolbar to step through your application program. The Run button executes code until a breakpoint is reached. When Trace Recording is enabled, the Show Trace Records button lists the last 1024 instructions that were executed. Trace recording lets you analyze the program flow prior to a breakpoint. Watch Window The Locals page of the Watch Window displays the values of automatic variables in the current function. The value of a variable can be changed as follows: Select the value with a mouse click. Wait a second. Another mouse click enters edit mode. You can use this technique to edit variables in other Watch pages. The Call Stack page lists the program call tree; a double click shows the function invocation in the editor window. Memory Window The Memory Window displays two different memory areas. Double click to open an edit box to change the memory contents. Code Coverage The Code Coverage Window shows you the percentage of instructions in your program that have been executed. This aids in debugging and testing. It lets you easily distinguish the parts of your program that have been executed from the parts that have not. You may then change your testing strategy to ensure that all program paths are traveled and tested. Trace history shows the last 1024 instructions that were executed. Local menus let you select display formats. Code coverage displays statistical information and helps you locate un-executed program sections. 5

SIMULATOR Peripheral Simulation µvision2 simulates the on-chip peripherals of numerous microcontrollers. When you select a CPU from the device database to configure your project, µvision2 automatically configures the peripheral simulator for you. With its logical and timing simulation, it is possible to test an application before the target hardware is even available. The simulator makes it easy to test hardware defects and critical situations which are difficult to debug with real hardware. Peripheral dialog boxes, available with commands in the Debug menu, let you review and modify the status of on-chip components including system and BUS configuration. All interrupts, including timers, are simulated. You may enter I/O port values in the Parallel Port dialog pages. If an I/O pin is configured as an interrupt input, the interrupt service routine is serviced. In the Analog/Digital Converter dialog, you may enter the input voltage for the analog inputs of the CPU. µvision2 simulates the conversion time and the interrupt of the on-chip A/D converter. You may supply I/O pin values in the peripheral dialog boxes. Serial Window The Serial Window provides a terminal simulator for the on-chip UART. HEX and ASCII modes may be selected via the local menu. For devices with two serial interfaces a second Serial Window is available. The Serial Windows are convenient to use for printf test outputs in your application programs. Performance Analyzer The built-in performance analyzer records and displays execution times for functions and program blocks you select. A bar graph displays the amount of CPU time spent in each part of your program. You can use the information gathered by the performance analyzer to determine where your program spends most of its time. Then, you can concentrate your efforts on making that section faster. Select the Serial Window and enter ASCII characters for UART input. 6 Select a function or block for detailed statistics. Use the Debug - Performance Analyzer menu for configuration.

ADVANCED FEATURES Complex Breakpoints µvision2 allows breakpoints on C statements, assembly instructions, conditional expressions, and even on different types of memory accesses. Breakpoints may include a count which is decreased until the breakpoint is triggered. A command may be executed when the breakpoint is triggered. If no command is specified, program execution stops. You may use the Breakpoint command from the Debug menu to set breakpoint definitions. The command string may invoke debug functions when a breakpoint is triggered. Enable and disable breakpoints with convenient check boxes. Function Language µvision2 incorporates a C-like function language that lets you generate and use: Built-in functions like printf, memset, rand, and other useful routines. Signal functions to simulate analog and digital inputs to the CPU. User functions to extend the command scope and combine repetitive actions. You may use the function language to describe the behavior of external hardware components or to supply input values to the controller I/O pins. Signal functions run in the background while µvision2 simulates your target program. Therefore, signal functions must call the twatch function to let your target program run. Toolbox The Toolbox dialog contains user-configurable buttons. Click on a Toolbox button to execute the associated command. Toolbox buttons may be executed at any time, even while running the test program. Create Debug Functions with the Debug - Function Editor dialog. /* Toggle Port P2.0 and Set P2.8 */ FUNC void SetP28_ToggleP20 (void) { PORT2 ^= 0x0001; /* invert value on Port2.0 */ PORT2 = 0x0100; /* set bit Port2.8 */ } /* Simulate analog input ramp on analog input AIN0 */ SIGNAL void analog0 (float limit) { float volts; printf ("ANALOG0 (%f) ENTERED\n", limit); while (1) { /* forever */ volts = 0; while (volts <= limit) { AIN0 = volts; /* analog input 0 */ twatch (30000); /* 30000 Cycles Time-Break */ volts += 0.5; /* increase voltage */ } } } Using toolbox buttons, functions can be called at any time, even during program execution. Target Monitor The µvision2 debugger communicates with your target hardware and the Keil Monitor program to help you easily debug your applications in real-time. You can single-step through program code, check variables, set breakpoints, examine memory contents, and more! The Keil Monitor comes pre-installed on many evaluation boards. Toolbox buttons are defined in the Command page of the output window. Select Use Target Debugger to connect to a Monitor board. 7

SHORTCUTS The following table lists important shortcut keys for µvision2: Key Function Ctrl+N Create new file Ctrl+O Open an existing file Ctrl+P Print current document Ctrl+S Save current document F5 Go (execute) until the next active breakpoint Ctrl+F5 Start/stop debug session F7 Build project Ctrl+F7 Compile current file Alt+F7 Open project options dialog box F10 Single-step over a function Ctrl+F10 Go (execute) to the current cursor line F11 Single-step into a function Ctrl+F11 Step out of the current function EDITOR KEYS Ctrl+A Select all text Ctrl+C Copy selected text to the clipboard Ctrl+F Find text Ctrl+H Replace text Ctrl+V Paste text from the clipboard Ctrl+X Cut selected text to the clipboard Ctrl+Y Cut line to the clipboard Ctrl+Z Undo last operation Ctrl+[ Find matching brace Shift+Ctrl+Z Redo last Undo command Ctrl+Home Move the cursor to beginning of file Ctrl+End Move the cursor to end of file Ctrl+ Move cursor one word left Ctrl+ Move cursor one word right Ctrl+F2 Set bookmark on current line F2 Move cursor to next bookmark Shift+F2 Move cursor to previous bookmark F3 Repeat search text forward Shift+F3 Repeat search text backward Ctrl+F3 Search for word under cursor Example Programs Example programs are found in the EXAMPLES folder. Each program is stored in a separate folder along with a project file that will help you quickly build and evaluate the example. Many of the example project files contain several targets with different configurations. Refer to the document ABSTRACT.TXT for a detailed description. Example BADCODE CSAMPLE DHRY HELLO MEASURE RTX_EX1 RTX_EX2 SIEVE TRAFFIC Description Program with syntax errors and warnings. You may use the editor to correct these. Simple calculator which shows how to build a multi-module project with µvision2. Dhrystone benchmark. Calculates the dhrystones factor for the target CPU. Hello world program. Try this first when you begin using µvision2. It prints Hello World on the serial interface and helps you confirm that the development tools work correctly. Data acquisition system for analog and digital signals. RTX51 example. Demonstrates roundrobin multitasking with the RTX real-time kernel. RTX51 application that uses signals for task communication. Benchmark that calculates prime numbers. Traffic light controller using the RTX real- Contact your local distributor for more information about our other embedded systems development tools and products. Keil Elektronik GmbH and Keil Software, Inc., have representatives in the following countries: Australia, Austria, Belgium, Brazil, Canada, Czech, China, Denmark, Finland, France, Germany, Hong Kong, India, Ireland, Israel, Italy, Japan, Korea, Mexico, Netherlands, Norway, Poland, Russia, Spain, Singapore, South Africa, Sweden, Switzerland, Taiwan, United Kingdom, and United States. Contact Keil Elektronik GmbH or Keil Software, Inc., for the distributor nearest you. Evaluation software and detailed technical information are available from your distributor and our World Wide Web site (www.keil.com). Europe: United States: Keil Elektronik GmbH Keil Software, Inc. Bretonischer Ring 15 1501 10th Street, Suite 110 85630 Grasbrunn Plano, TX 75074 Germany USA Phone ++49 89 / 45 60 40-0 Phone 800-348-8051 Support ++49 89 / 45 60 40-24 972-312-1107 FAX ++49 89 / 46 81 62 FAX 972-312-1159 Email sales.intl@keil.com support.intl@keil.com Email sales.us@keil.com support.us@keil.com http://www.keil.com TM 8 Copyright 1998-2000 Keil Elektronik GmbH & Keil Software, Inc. All rights reserved. Information in this data sheet is subject to change without notice and does not represent a commitment on the part of Keil Software, Inc.