REG10J0119-0100
Renesas Starter Kit
for SH7086
Tutorial Manual
RENESAS SINGLE-CHIP MICROCOMPUTER
Rev.1.00 Renesas Technology Europe Ltd.
Revision date:17.Jan.2008 www.renesas.com
Table of Contents
Chapter 1. Preface..................................................................................................................................................3
Chapter 2. Introduction............................................................................................................................................4
Chapter 3. Tutorial Project W orkspace ...................................................................................................................5
Chapter 4. Project Workspace................................................................................................................................6
4.1. Introduction...................................................................................................................................................6
4.2. Creating a new Project Workspace..............................................................................................................6
4.3. Build Configurations and Debug Sessions...................................................................................................7
4.3.1. Build Configuration ................................................................................................................................7
4.3.2. Debug Session.......................................................................................................................................7
Chapter 5. Building the Tutorial Project ..................................................................................................................8
5.1. Building Code...............................................................................................................................................8
5.2. Connecting the debugger.............................................................................................................................9
Chapter 6. Downloading and Running the Tutorial...............................................................................................10
Chapter 7. Project Files.........................................................................................................................................14
7.1. Standard Project Files ................................................................................................................................14
7.1.1. Initialisation code (Resetprg.c / resetprg.h).........................................................................................14
7.1.2. Board initialisation code (Hwsetup.c / hwsetup.h)...............................................................................15
7.1.3. Main tutorial code (Main.c / main.h).....................................................................................................15
Chapter 8. Additional Information..........................................................................................................................16
ii
Chapter 1. Preface
Cautions
This document may be, wholly or partially, subject to change without notice.
All rights reserved. No one is permitted to reproduce or duplicate, in any form, a part or this entire document without the written
permission of Renesas Technology Europe Limited.
Trademarks
All brand or product names used in this manual are trademarks or registered trademarks of their respective companies or
organisations.
Copyright
© Renesas Technology Europe Ltd. 2008. All rights reserved.
© Renesas Technology Corporation. 2008. All rights reserved.
© Renesas Solutions Corporation. 2008. All rights reserved.
Website:
Glossary
ADC Analog to Digital Converter
RSK Renesas Starter Kit
HEW High performance Embedded Workshop
CPU Central Processing Unit
E10A ‘E10A for Starter Kit’ debugger
http://www.renesas.com/
LCD Liquid Crystal Display
USB Universal Serial Bus
PC Program Counter
LED Light Emitting Diode
3
Chapter 2. Introduction
This manual is designed to answer, in tutorial form, the most common questions asked about using a Renesas Starter Kit (RSK): The
tutorials help explain the following:
• How do I compile, link, download, and run a simple program on the RSK?
• How do I build an embedded application?
• How do I use Renesas’ tools?
The project generator will create a tutorial project with two selectable build configurations
• ‘Debug’ is a project built with the debugger support included.
• ‘Release’ build demonstrating code suitable for release in a product.
Files referred to in this manual are installed using the project generator as you work through the tutorials. The tutorial exam ples in this
manual assume that installation procedures described in the RSK Quick Start Guide have been completed. Please refer to the Quick Start
Guide for details of preparing the configuration.
NOTE: These tutorials are designed to show you how to use the RSK and are not intended as a comprehensive introduction to
the High performance Embedded Workshop (HEW) debugger or the compiler toolchains – please consult the relevant user
manuals for more in-depth information.
4
Chapter 3. Tutorial Project Workspace
The workspace includes all of the files for two build configurations. The tutorial code is common to the “Debug” and “Release” build
configurations. The tutorial is designed to show how code can be written, debugged then downloaded without the debug monitor in a
‘Release’ situation.
The build configuration menu in High-performance Embedded Workshop (HEW) allows the project to be configured such that certain files
may be excluded from each of the build configurations. This allows the inclusion of the debug monitor within the Debug build, and its
exclusion in the Release build. Contents of common C files are controlled with defines set up in the build configuration options and
#ifdef statements within the source files.
Maintaining only one set of project files means that projects are more controllable.
5
Chapter 4.Project Workspace
4.1. Introduction
HEW is an integrated development tool that allows the user to write, compile, program and debug a software project on any of the Renesas
Microcontrollers. HEW will have been installed during the software installation for the RSK product.
To begin using the RSK, this manual will describe the stages required to create and debug the supplied tutorial code.
4.2. Creating a new Project Workspace
To look at the program, start High-performance Embedded Workshop from the Windows Start Menu or from its icon:
Open a new tutorial workspace from the [File -> New Workspace…] menu or select ‘Create a new project workspace’ when presented with
the ‘Welcome!’ dialog.
The example above shows the New Project Workspace dialog with the ‘E10A_RSKSH7086’ selected.
• Select the ‘SuperH RISC Engine’ CPU family and ‘Renesas SuperH Standard’ Toolchain for the RSK
• Select the ‘E10A_RSKSH7086’ Project type for the RSK from the project list.
• Enter a name for the workspace; all your files will be stored under a directory with this name.
6