REG10J0077-0100
Renesas Starter Kit for H8/36079
Tutorial Manual
RENESAS SINGLE-CHIP MICROCOMPUTER
Rev.01.00 Renesas Technology Europe Ltd.
Revision date: 17.OCT.2007 www.renesas.com
Table of Contents
Chapter 1. Preface..................................................................................................................................................1
Chapter 2. Introduction............................................................................................................................................2
Chapter 3. Tutorial Project W orkspace ...................................................................................................................3
Chapter 4. Project Workspace................................................................................................................................4
4.1. Introduction...................................................................................................................................................4
4.2. Creating a new Project Workspace..............................................................................................................4
4.3. Build Configurations and Debug Sessions...................................................................................................5
4.3.1. Build Configuration ................................................................................................................................5
4.3.2. Debug Session.......................................................................................................................................5
Chapter 5. Building the Tutorial Project ..................................................................................................................6
5.1. Building Code...............................................................................................................................................6
5.2. Connecting the debugger.............................................................................................................................7
5.3. Connecting to the target with the E8A..........................................................................................................7
Chapter 6. Downloading and Running the Tutorial.................................................................................................9
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)................................................................................14
7.1.3. Main tutorial code (main_tut_tutorial.c / main_tut_tutorial.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. Duplication of this document, either in whole or part is prohibited 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. 2007. All rights reserved.
© Renesas Technology Corporation. 2007. All rights reserved.
© Renesas Solutions Corporation. 2007. All rights reserved.
Website:
Glossary
CPU Central Processing Unit
HEW High-performance Embedded Workshop
LED Light Emitting Diode
PC Program Counter
RSK Renesas Starter Kit
http://www.eu.renesas.com/
LCD Liquid Crystal Display
ADC Analog to Digital Converter
CD Compact Disc
E8A E8A On-chip debugger module
1
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, the compiler tool-chains or the E8A Emulator – please c onsult the
relevant user manuals for more in-depth information.
2
Chapter 3. Tutorial Project Workspace
The workspace includes all of the files for two build configurations. The tutorial code is common to both the Debug and the Release build
configurations. The tutorial is designed to show how code can be written, debugged then downloaded 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 same files.
Maintaining only one set of project files means that projects are more controllable.
3
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 installation of the software support for the RSK product. 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.
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 RSKH836079 selected.
• Select the ‘H8S,H8/300’ CPU family and Tool-chain for the RSK
• Select the ‘RSKH836079’ 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.
• The project name field will be pre-filled to match the workspace name above; this name may be changed.
Note: HEW allows you to add multiple projects to a workspace. You may add the sample code projects later so you may
wish to choose a suitable name for the Tutorial project now.
4