Page 1
On April 1 , 2010, NEC Electronics Corporation merged with Renesas Technology Corporation, and Renesas Electronics Corporation took over all the business of both companies. Therefore, although the old company name remains in this document, it is a valid Renesas Electronics document. We appreciate your understanding.
Page 2
Renesas Electronics. Renesas Electronics shall not be in any way liable for any damages or losses incurred by you or third parties arising from the use of any Renesas Electronics product for an application categorized as “Specific”...
Page 3
Renesas Starter Kit for H8S/2472 Tutorial Manual RENESAS SINGLE-CHIP MICROCOMPUTER H8S FAMILY Rev.1.00 2008.08...
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.
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? •...
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.
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.
• Click <OK> to start the RSK Project Generator wizard. The next dialog presents the example projects available. Choose the Tutorial code which will be explained later in this manual. There is also an option for Sample code which provides examples for using various peripherals. This will open a new dialog allowing the selection of many code examples for the peripheral modules of the device.
Chapter 5. Building the Tutorial Project The tutorial project build settings have been pre-configured in the tool-chain options. To view the tool chain options select the ‘Build’ Menu item and the relevant tool-chain. This should be the first option(s) on the drop down menu. The dialog that is displayed will be specific to the tool-chain selected.
5.2. Connecting the debugger For this tutorial it is necessary for you to power the RSK from the supplied PSU. The E10A module will be powered via the USB cable. Please be aware that if you have too many devices connected to your USB port it may be shut down by Windows. If this happens remove some devices and try again.
Page 12
• Enter ID code as ‘0000E10A’. • Flash Memory write downloaded. • The Output window in HEW will state ‘Connected’ Now is a good time to save the HEW session. • Select ‘File’ | ‘Save Session’. If you have changed any workspace settings now is a good time to save the workspace. •...
Chapter 6. Downloading and Running the Tutorial Once the code has been built in HEW it needs to be downloaded to the RSK. There will now be an additional category in the workspace view for ‘Download Modules’ • Right click on the download module listed and select ‘Download’.
Page 14
the column to the left of the breakpoint column. Eight eventpoints can be set. Eventpoints do not require programming the flash memory, and thus are faster to use. • Press ‘Reset Go’ on the Debug Toolbar. The code will execute to the breakpoint. At this point all the device initialisation will have been completed. •...
Page 15
• Right click on the ‘FlashLEDs(); function and select ‘Go to cursor’. The code will execute to the selected line and stop. An automatic breakpoint was inserted in the code and then removed after calling the break. • Press ‘Step Over’ on the Debug Toolbar. The code will run and flash the LEDs 200 times.
Page 16
• Press <Stop> on the debug toolbar. • Press ‘CTRL-B’ to open the breakpoint window. • Select ‘Remove All’ • Press <OK>. • Open the file ‘main.c’ • Insert a breakpoint on ‘Statics_Test();’. The statics test is used to demonstrate that the initialisation has successfully copied all initialised variables from storage in flash to RAM. •...
Page 17
replacement string. • Remove the breakpoint • Right click on the ‘DisplayString();’ function call after the loop and select ‘Go to cursor’. This shows that the variable was initialised at program start up and can be overwritten with ‘TESTTEST’. You have now run the tutorial code and used many of the common features of the debugger. We suggest that you review the rest of the tutorial code as many functions have important information on the operation of the code, the compiler directives and comments on when they should or must be used.
7.1. Standard Project Files The RSK tutorials are configured so that it is possible to provide the same tutorial code on multiple RSK products. This allows the evaluation of the different processor cores using equivalent code. To achieve this, the following files are common between all device cores and Tool-chains.
The main tutorial code is common to all tutorial projects. The display initialisation and string display functions operate on the LCD display module. Check compatibility with ks0066u controller and pin connection on the schematic before connecting a LCD module not supplied by Renesas.
For details on how to use High-performance Embedded Workshop (HEW), refer to the HEW manual available on the CD or from the web site. Further information available for this product can be found on the Renesas website at: http://www.renesas.com/renesas_starter_kits General information on Renesas Microcontrollers can be found at the following website.
Need help?
Do you have a question about the REG10J0083-0100 and is the answer not in the manual?
Questions and answers