REJ11J0015-0101
SH7670 CPU Board
M3A-HS71
Installation Manual
32
Renesas 32-Bit RISC Microcomputers
SuperHTM RISC engine Family/SH7670 Series
Rev. 1.01
Issued: May 7. 2008
Download from Www.Somanuals.com. All Manuals Search And Download.
Download from Www.Somanuals.com. All Manuals Search And Download.
Download from Www.Somanuals.com. All Manuals Search And Download.
[Indication of Warnings and Cautions]
The following explains the warnings and cautions indicated for the handling of the product.
If the product is improperly handled without regard for this indication, there will be a
WANING
possibility of inflicting death or heavy wound on persons.
If the product is improperly handled without regard for this indication, there will be a
CAUTION
possibility of inflicting an injury on persons or physical damage.
IMPORTANT
Indicates other important information to be observed when using the product.
In addition to the above, the following will be indicated as necessary.
The mark indicates a warning or caution.
Example:
Be Careful About Electric Shock
The
mark indicates a prohibition.
Example:
Do Not Disassemble
The
mark indicates a compulsory or directive instruction.
Example:
Unplug from Socket
Download from Www.Somanuals.com. All Manuals Search And Download.
Download from Www.Somanuals.com. All Manuals Search And Download.
Important
Before using this product, be sure to read the user’s manual (this user's manual) carefully. Keep this user’s
manual, and refer to this when you have questions about this product.
About this product:
The term “this product” referred to here mean the product manufactured by Renesas Technology
Corporation.
It does not include the user systems and host machines of the customers.
Purpose of use of this product:
This product is developed for experiencing the development environment and specification of the Renesas
32-bit RISC MCU SuperH RISC engine family /SH7670. Be sure to use this product correctly according to
said purpose of use. Please avoid using this product for other than its intended purpose of use.
For those who use this product:
This product can only be used by those who have carefully read the user’s manual and know how to use it.
Use of this product requires the basic knowledge of electric circuits, logical circuits, and MCUs.
When using this product:
(1) This product is a development supporting unit for use in your program development and evaluation
stages.
In mass-producing your program you have finished developing, be sure to make a judgment on your own risk
that it can be put to practical use by performing integration test, evaluation, or some experiment else.
(2) In no event shall Renesas Solutions Corp. be liable for any consequence arising from the use of this
product.
(3) This product has been developed by assuming its use for program development and evaluation in
laboratories. Therefore, it does not fall under the application of Electrical Appliance and Material Safety Law
and protection against electromagnetic interference when used in Japan.
(4) Renesas Solutions Corp. cannot predict all possible situations or possible cases of misuse where a
potential danger exists. Therefore, the warnings written in this user’s manual and the warning labels attached
to this product do not necessarily cover all of such possible situations or cases. Please be sure to use this
product correctly and safely on your own responsibility.
(5) This product is designed for use in program development and evaluation stages. It cannot be embedded
in your product for mass-production purposes.
(6) Even if this product has a deficiency in its internal microcomputer, it will not be replaced with a product
which has had the microcomputer deficiencies corrected.
(7) No parts incorporated in this product may be dismantled for diverted use in other products.
(8) For the products with socket mounted, it is likely to become a loose connection by the vibration and the
shocking In this case, please reinstalls IC again.
Download from Www.Somanuals.com. All Manuals Search And Download.
Download from Www.Somanuals.com. All Manuals Search And Download.
Usage restrictions:
This product has been developed as a means of supporting system development by users. Therefore, do not
use it as a device used for equipment-embedded applications. Also, do not use it for developing the systems
or equipment used for the following purposes either:
(1) Transportation and vehicular
(2) Medical (equipment where human life is concerned)
(3) Aerospace
(4) Nuclear power control
(5) Undersea repeater
If you are considering the use of this product for one of the above purposes, please be sure to consult your
local distributor.
About product changes:
We are constantly making efforts to improve the design and performance of this product. Therefore, the
specification or design of this product or its user’s manual may be changed without prior notice.
About the rights:
(1) We assume no responsibility for any damage or infringement on patent rights or any other rights arising
from the use of any information, products or circuits presented in this user’s manual.
(2) The information or data in this user’s manual does not implicitly or otherwise grant a license for patent
rights or any other rights belonging to us or third parties.
(3) This user’s manual and this product are copyrighted, with all rights reserved by us. This user’s manual
may not be copied, duplicated or reproduced, in whole or part, without prior written consent of us.
About diagrams:
The diagrams in this user’s manual may not all represent exactly the actual object.
Download from Www.Somanuals.com. All Manuals Search And Download.
Download from Www.Somanuals.com. All Manuals Search And Download.
Table of Contents
CHAPTER1 BEFORE USING THE SH7670 CPU BOARD.................................................................1-1
1.1 Overview...................................................................................................................................................................... 1-2
1.5 Items to Be Prepared by User...................................................................................................................................... 1-5
CHAPTER2 SETTING UP THE HARDWARE.....................................................................................2-1
2.2.2 SH7670 CPU Board Jumper Switch Setting......................................................................................................... 2-3
2.3 System Connections and Power-On Sequence........................................................................................................... 2-4
2.4 Procedure for Disconnecting System Power Supply.................................................................................................... 2-4
CHAPTER3 SETTING UP THE SOFTWARE .....................................................................................3-1
CHAPTER4 RUNNING THE SOFTWARE ..........................................................................................4-1
4.1.2 SH7670 CPU board and E10A-USB Startup Procedure (HEW Startup)............................................................... 4-2
4.1.4 Sample Software Download Procedure................................................................................................................ 4-8
5.2 Setting Up the Flash Memory Download...................................................................................................................... 5-8
Rev. 1.01 May 7, 2008
REJ11J0015-0101
i
()
Download from Www.Somanuals.com. All Manuals Search And Download.
5.3.1 Copying Hardware Setup Files........................................................................................................................... 5-10
Rev. 1.01 May 7, 2008
REJ11J0015-0101
ii
( )
Download from Www.Somanuals.com. All Manuals Search And Download.
*This page is blank*
Rev. 1.01
iii
( )
May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Download from Www.Somanuals.com. All Manuals Search And Download.
Before Using the SH7670 CPU Board
1.1 Overview
1
1.1 Overview
The SH7670 CPU board(board type name: M3A-HS71) consists of the SH7670 CPU board and the sample software.
This installation manual describes mainly how to set up the SH7670 CPU board hardware and software. For more
information about SH7670 hardware and programming manual, refer to the manuals in CD-ROM included with this
product.
If there is anything that you notice about the package contents of this product, please contact Renesas Technology
Corporation, Renesas Solutions Corporation, or Renesas Technology Sales Co., Ltd. or its distributor.
To Ensure Safe and Correct Use
Safety precaution:
z This manual uses various pictorial indications to ensure the correct use of the product and
thereby prevent inflicting an injury on users or other people or causing damage to property.
• These pictorial indications are explained in the section 1.2, “Usage Precautions.” Please be sure
to understand the contents written in that section before you use the product.
1.2 Usage Precautions
The precautions described here must be observed in order to prevent inflicting an injury on users or other people or
causing damage to property, and to ensure that this product is used safely.
To ensure the correct use, be sure to read these precautions and understand the written contents before you use the
product. Not all precautions described in this manual relate to the Renesas product alone, some of them apply to an
entire personal computer system incorporating the Renesas product also.
The following explains the warnings and cautions indicated for the handling of this product.
<Warning Indication>
WARNING
Regarding the handling of this product:
z Do not use this product outdoors. It can only be used indoors.
• Do not let foreign matters such as water, pieces of metal or inflammable material get into the
board or connectors.
Regarding installation:
• Do not install the product in humid or wet places. Should water get into the internal circuit of the
product, an unrecoverable fault may result.
Regarding the working environment:
• The upper-limit ambient temperature at which this product can be used (i.e., rated maximum
ambient temperature) is 50°C. Make sure this rated maximum ambient temperature is not
exceeded.
1-2
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Before Using the SH7670 CPU Board
1.2.1 Symbols Used
1
<Caution Indication>
CAUTION
Regarding the reconstruction of this product:
• Do not reconstruct this product. If the product has gotten out of order for reasons of disassembly
or reconstruction, requests for repair may not be accepted.
Regarding the handling of this product:
z Handle this product with caution, not to let it drop or fall down or apply strong mechanical shock.
z Do not touch the communication interface connector pins or other connector pins directly with
your hand. The internal circuit may be broken by static electricity.
z When moving this product to another place of installation, be careful not to apply strong vibration
or mechanical shock to it.
z After connecting each piece of equipment with cable, check the cables again to see that they are
connected correctly. For details on how to connect, refer to Chapter 2, “Setting Up the Hardware.”
z Before turning on the power for each connected piece of equipment, make sure you’ve finished
connecting all cables. Do not connect or disconnect any cable when the power is turned on.
Regarding the operating procedure for this product:
Note
• Exceptional conditions or precautions are noted in an operation procedure or explanatory
description when it is necessary to call the user’s attention.
1.2.1 Symbols Used
Table 1.2.1 lists the symbols used in this manual.
Table 1.2.1 Symbol List
Symbol
Meaning
The arrow “Æ” indicates a menu option.
[Menu->Menu Option]
Example: File menuÆSave As…
" … " indicates file names, directory, or button of dialog box.
“File name”
“Directory”
“Button"
Example :"C:¥Workspace¥Sample_softwawe¥ SH7670_sample "
"OK" button
"resetprg.c"
1-3
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Before Using the SH7670 CPU Board
1.3 Procedure for Introducing This Product
1
1.3 Procedure for Introducing This Product
Figure 1.3.1 SH7670 CPU board Installation Procedure
1.4 Operating Guarantee for This Product
This product (hardware and software) was developed for only helping users get hands-on experience on the
functionality and development environment of the SH7670, and does not guarantee the results arising from the use of it.
The SH7670 CPU board has the type of host computer designated as its operating environment (IBM PC/AT and its
compatible). This only indicates the operating environment assumed by Renesas, and does not guarantee that the
SH7670 CPU board will operate normally in all relevant types of machines or in all relevant environments (e.g., device
driver and peripheral device).
1-4
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Before Using the SH7670 CPU Board
1.5 Items to Be Prepared by User
1
1.5 Items to Be Prepared by User
The following lists the items that need to be prepared by users separately from this product.
<For SH7670 CPU board>
You need to prepare the following power supply separately from the product package in order to supply power to the
SH7670 CPU board.
Table 1.5.1 Items to Be Prepared by User (For SH7670 CPU board)
No.
1
Item to Be Prepared by User
Remark
1.5 A
5 V DC output stabilizing power supply
or more
<For the Development Environment>
The installation described here uses the tools made by Renesas.
To use this product following the installation, you need to prepare some items separately from the product package.
The table below lists the tools made by Renesas that users should prepare.
Table 1.5.2 Items to Be Prepared by User (Renesas Tools)
No.
2
Item to Be Prepared by User
Product Type Name
HS0005KCU02H or
Applicable Version
SH-2A
E10A-USB emulator for the SuperH family
One that supports the
Ver.9.00 release01 or more
Ver.4.03.00 or more
HS0005KCU01H
3
R0C40700XSW09R
SuperH RISC engine C/C++ compiler package
Integrated development environment tool,
HEW (High-performance Embedded Workshop)
4
-
Notes:
• If you already have the E10A-USB emulator main unit and are using any device group other than the SH-2A group,
you need to purchase an “additional device group license tool” separately from the product package.
• For details on how to set up a new device group in the E10A-USB emulator, refer to Section 3.2.2, “Setting Up the
E10A-USB Emulator” in Chapter 3 of this manual.
1.5.1 Recommended Host Computer Environment
To use the above Renesas tools, we recommend using the host computer and the OS version listed in Table 1.5.3
below.
Table 1.5.3 Operating Environment for the Renesas Development Tools
Host Computer
IBM PC/AT Series and Compatibles
Specification
IBM PC and its compatible incorporating Pentium III or later (600 MHz or greater
CPU
recommended) and USB 1.1/2.0 (Full Speed)
128 MB or more (at least twice the load module size recommended)
Memory
Installation requires 100 MB or more of hard disk capacity.
(With the swap area taken into consideration, at least twice the memory size must be
available (four times or more recommended).)
Hard disk capacity
OS
Windows 2000, WindowsXP
1-5
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Before Using the SH7670 CPU Board
1.5 Items to Be Prepared by User
1
*This page is blank*
Rev. 1.01 May 7, 2008
REJ11J0015-0101
1-6
Download from Www.Somanuals.com. All Manuals Search And Download.
Setting Up the Hardware
2.1 Connections Between SH7670 CPU board and E10A-USB Emulator
2
2.1 Connections Between SH7670 CPU board and E10A-USB Emulator
Figure 2.1.1 shows how SH7670 CPU board and E10A-USB emulator should be connected.
Figure 2.1.1 System Connection of SH7670 CPU board and E10A-USB Emulator
2.2 SH7670 CPU board Switch Setting
The following describes how to set the switches of SH7670 CPU board.
CAUTION
• Do not change DIP switch and jumper settings while the SH7670 CPU board is operating. Always
be sure to turn off the power before changing DIP switch or jumper settings. This is necessary to
prevent unrecoverable damage to the SH7670 CPU board that may otherwise occur.
2-2
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Setting Up the Hardware
2.2.1 SH7670 CPU board DIP Switch Setting
2
2.2.1 SH7670 CPU board DIP Switch Setting
To use the SH7670 CPU board following the installation described here, be sure to set the DIP switch SW8 to its
ON
SW8
Board
edge
Figure 2.2.1 DIP Switch Setting
Table 2.2.1 Switch SW8 Functions
Initial Settings
Switch No.
SW8-1
SW8-2
SW8-3
SW8-4
SW8-5
Function
Setting
Set clock mode to 0
Set clock mode to 1
HIF pin enable
ON
Clock mode 0
ON
ON
ON
Cancel HIF pin activation
HIF boot mode specified
NOR flash memory
Do not activate from host interface (HIF)
Cancel write protection in NOR flash memory
OFF
2.2.2 SH7670 CPU Board Jumper Switch Setting
To use the SH7670 CPU board following the installation described here, be sure to set the jumpers to their default
Figure 2.2.2 System Connection of SH7670 CPU board and E10A-USB Emulator
Table 2.2.2 SH7670 Group Power Supply Selection Jumper Setting (JP2 to JP4)
Jumper
JP2
Default Setting
Function
1-2
1-2
1-2
Power supply from J15
JP3
3.3 V fixed power supply voltage (supplied from U10)
1.2 V fixed power supply voltage (supplied from U11)
JP4
2-3
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Setting Up the Hardware
2.3 System Connections and Power-On Sequence
2
2.3 System Connections and Power-On Sequence
Follow the same procedure when you check to see that the power for the host computer is turned off, or that the
E10A-USB emulator is not connected to the host computer with USB cable.
1. Connect the SH7670 CPU board and the E10A-USB emulator with the user interface cable.
2. Plug the USB cable into the connector on the host side of the E10A-USB emulator.
3. Turn on the power for the host computer. (The OS will start up.)
4. Supply power to the SH7670 CPU board (by turning the POWER switch on).
2.4 Procedure for Disconnecting System Power Supply
Disconnect power supply as following procedure.
1. Disconnect E10A-USB on HEW (High-performance Embedded Workshop).
2. Turn off a CPU board.
3. Terminate a HEW, and turn off a host computer.
CAUTION
• Unless the above power-on sequence is followed, unrecoverable damage may occur to the
SH7670 CPU board or the E10A-USB emulator or both.
2-4
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Setting Up the Software
3.1 About the HEW
3
3.1 About the HEW
HEW, or High-performance Embedded Workshop, is an integrated development environment with a graphical user
interface designed to help users develop and debug the applications created in C/C++ and assembly languages for use
in Renesas microcomputers. The SH7670 CPU board based software development is carried out by using the HEW.
For more information about the HEW, refer to the “SuperH RISC Engine High-performance Embedded Workshop 4
User’s Manual”. The following shows how to install the HEW.
3.1.1 HEW Installation Procedure
(1) Execute “HewInstMan.exe” included in the cross tool (SuperH RISC engine C/C++ compiler package) stored in the
CD-ROM. High-performance Embedded Workshop Install Manager is activated, and click “Installation”.
Figure 3.1.1 HEW Installation Procedure (1)
3-2
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Setting Up the Software
3.1 About the HEW
3
Figure 3.1.2 HEW Installation Procedure (2)
Note: If you have already installed a HEW on your PC, you can select “Install a new High-performance Embedded
Workshop” and install a new HEW in another directory on your PC.
(3) Continue to install following the instructions in the installation window.
(4) Next, install an Autoupdate Utility. Click “Next”.
Figure 3.1.3 HEW Installation Procedure (4)
Note: When you have not selected “Autoupdate” on the Choice of an installation product, the above dialog is not
displayed.
3-3
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Setting Up the Software
3.1 About the HEW
3
(5) Continue to install following the instructions in the installation window. When entire installation is finished, the dialog
Figure 3.1.4 HEW Installation Procedure (5)
3-4
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Setting Up the Software
3.2.1 E10A-USB Software Installation Procedure
3
3.2 Setting Up the E10A-USB Emulator Software
Next, the following explains how to set up the E10A-USB emulator software.
3.2.1 E10A-USB Software Installation Procedure
(1) Execute “HewInstMan.exe” included in the E10A-USB emulator software CD-ROM. High-performance Embedded
Workshop Install Manager is activated, and click “Installation”.
Figure 3.2.1 E10A-USB Software Installation Procedure (3)
(2) When the dialog box shown in Figure 3.2.2 is displayed, select “Update the active High-performance Embedded
Workshop” and click “Next”.
Figure 3.2.2 E10A-USB Software Installation Procedure (2)
3-5
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Setting Up the Software
3.2.1 E10A-USB Software Installation Procedure
3
Note: If you have already installed a HEW on your PC, you can select “Install a new High-performance Embedded
Workshop” and install a new HEW in another directory on your PC.
(3) When the dialog box shown in Figure 3.2.3 is displayed, select “SuperH RISC engine Family SH-2A Device Group”
and “SH7670”, then click “Next”.
Figure 3.2.3 E10A-USB Software Installation Procedure (3)
(4) Click “Next to start the installation. Continue to install following the instructions in the installation window.
Figure 3.2.4 E10A-USB Software Installation Procedure (4)
3-6
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Setting Up the Software
3.2.1 E10A-USB Software Installation Procedure
3
(5) Next, install an Autoupdate Utility. Click “Next”.
Figure 3.2.5 E10A-USB Software Installation Procedure (5)
Note: When you have not selected “Autoupdate” on the Choice of an installation product, the above dialog is not
displayed.
(6) When the installation is complete, the dialog shown in Figure 3.2.6 is displayed. Click “Finish”.
Figure 3.2.6 E10A-USB Software Installation Procedure (6)
3-7
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Setting Up the Software
3.2.1 E10A-USB Software Installation Procedure
3
(7) When entire installation is finished, the dialog shown in Figure 3.2.7 is displayed, click “Exit”.
Figure 3.2.7 E10A-USB Software Installation Procedure (7)
3-8
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Setting Up the Software
3.2.2 Setting Up the E10A-USB Emulator
3
3.2.2 Setting Up the E10A-USB Emulator
(i) Setting Up New Firmware
The following explains the case where you set up new firmware of the E10A-USB emulator.
If your E10A-USB emulator already has the firmware suitable for the SH-2A group, skip this step and go to paragraph
(ii) “Setting Up the E10A-USB Emulator Driver.”
Firmware setup requires changing the DIP switch settings on the E10A-USB emulator main unit. Be careful not to
mistake the part of the DIP switch that you need to set. Figure 3.2.8 shows the DIP switch mounted on the E10A-USB
emulator.
Figure 3.2.8 DIP Switch on the E10A-USB Emulator
3-9
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Setting Up the Software
3.2.2 Setting Up the E10A-USB Emulator
3
(1) Open the slide switch cover on the E10A-USB emulator main unit, and check to see that the emulator setup switch
(SW1) is set to the “1” side.
(2) From [All Programs] on [Start menu], choose [Renesas High-performance Embedded Workshop] Æ
[Setup Tool for E10A-USB Emulator] Æ [SH-2A Device Group]. An E10A-USB emulator setup tool will start up.
(a)
(b)
(c)
Figure3.2.9 E10A-USB Emulator Setup Tool
(a) Device group of the emulator firmware
(b) Version number of the emulator firmware
: Shows the product group name that is currently set up.
: Shows the version of the SH-2A group control software in the
E10A-USB emulator.
(c) Version number of the setup program
: Shows the version of the setup program.
Note: The version numbers differ with each device group supported by the E10A-USB emulator.
3-10
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Setting Up the Software
3.2.2 Setting Up the E10A-USB Emulator
3
Notes
• If the versions shown in (b) and (c) are the same, you do not need to set up. If the version shown in (b) is “-.-.--.---”
or older than the version in (c), you need to set up.
• If the emulator connected to your system is not the E10A-USB emulator suitable for the SH7670, the error
message shown below will be displayed, with the setup tool thereby terminated. In this case, you need to purchase
an “additional device group license tool” separately from the SH7670 CPU board package and use it to set up the
emulator firmware.
Figure3.2.10 Error Message
• If the error message shown below is displayed, it means that the host computer and the E10A-USB emulator are
not connected together, or the emulator setup switch (SW1) is set to the “0” side. If the emulator setup switch
(SW1) is set to the “0” side, set it to the “1” side and temporarily remove the USB cable and plug it in back again. If
the Add New Hardware Wizard is displayed, refer to the next paragraph (ii), “Setting up the E10A-USB emulator
driver.”
Figure3.2.11 Error Message
3-11
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Setting Up the Software
3.2.2 Setting Up the E10A-USB Emulator
3
Figure3.2.12 Setup Tool for SHxxxx E10A-USB Emulator Dialog Box
(4) Set the emulator setup switch (SW1) to the “0” side, and temporarily remove the USB cable and plug it in back again.
Then click “OK”. The system will start setting up the E10A-USB emulator firmware.
Figure3.2.13 System Starts Setting Up the Firmware
CAUTION
• Do not turn off the power for the host computer or remove the USB cable while the system is
setting up the E10A-USB emulator. Such an act may cause the E10A-USB emulator to break
down.
(5) When the dialog box shown below is displayed, it means that the system has finished setting up the E10A-USB
emulator normally.
Figure3.2.14 Setup Completion Message
3-12
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Setting Up the Software
3.2.2 Setting Up the E10A-USB Emulator
3
(6) After the E10A-USB emulator setup is completed, the message shown below will be displayed.
Set the emulator setup switch (SW1) to the “1” side, and temporarily remove the USB cable and plug it in back again.
Then click “OK”.
Figure3.2.15 Setup Tool for SH-2A E10A-USB Emulator Dialog Box
Note: Always make sure the emulator setup switch (SW1) remains in the “1” side unless the setup tool is used.
(7) The dialog box shown below will be displayed again, so check it to see that you now have the latest version of
firmware installed, and click “Exit”. Then you’ve finished setting up new firmware.
Version numbers
Figure3.2.16 E10A-USB Emulator Setup Tool at Completion
Note: The version numbers differ with each device group supported by the E10A-USB emulator.
3-13
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Setting Up the Software
3.2.2 Setting Up the E10A-USB Emulator
3
(ii) Setting Up the E10A-USB Emulator Driver
The following shows how to set up the E10A-USB emulator driver.
The setup procedure here is explained for the Windows XP case.
Note: The dialog boxes shown here are displayed when you set up the E10A-USB emulator driver for the first time or
when you’ve changed the USB port on the host computer side and connected the emulator to that port for the first
time. It will take some time until the dialog box appears.
(1) [Found New Hardware Wizard] shown below will start.
In this dialog box, select the option “Install from the list or specific location (Advanced)”, then click “Next”.
Figure3.2.17 New Hardware Detection Wizard Start (1)
(2) Select the option “Search for the best driver in these locations” and select the check box “Search removable media
(floppy, CD-ROM...).” Then click “Next”.
Figure3.2.18 New Hardware Detection Wizard Start (2)
3-14
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Setting Up the Software
3.2.2 Setting Up the E10A-USB Emulator
3
(3) Search the CD-ROM for drivers and select” <drive>:¥driver¥usb¥xp¥elusb.inf“ and then click “Next”. The ‘xp’ in the
underlined part (in the setup here, Windows XP) indicates the OS version.
Figure3.2.19 New Hardware Detection Wizard Start (3)
Note: If [Hardware installation] dialog box, which says the software has not passed Windows Logo.. is displayed, just
click “Continue Anyway”. The version numbers differ with each device group supported by the E10A-USB
emulator.
(4) [Found New Hardware Wizard] dialog box shown below will be displayed. Click “Finish”. You’ve now finished setting
up the E10A-USB emulator driver.
Figure3.2.20 Finish New Hardware Detection Wizard Dialog Box
3-15
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Setting Up the Software
3.2.2 Setting Up the E10A-USB Emulator
3
(5) Activate Device Manager to confirm whether the USB controller driver has been installed.
<Activating Device Manager>
Choose [Control Panel] from [Start menu] and double-click [System] icon. In [System Properties] dialog box, click the
[Hardware] tab and then [Device Manager].
Figure3.2.21
Confirming in the Device Manager Window
3-16
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Setting Up the Software
3.2.2 Setting Up the E10A-USB Emulator
3
*This page is blank*
3-17
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Download from Www.Somanuals.com. All Manuals Search And Download.
Running the Software
4.1 Running the Software
4
4.1 Running the Software
This product comes with sample software for verifying the hardware operation as technical reference material for
software development. The following describes the necessary steps to be followed before the load module of the
sample software can be downloaded.
Note: To execute the sample software, the DIP switch (SW8) on the SH7670 CPU board should be set as the initial
setting.
4.1.1 Preparing for Downloading the Sample Software
Copy “Sample_software” directory from the CD-ROM into the working directory of the host computer. When the
“Sample_software” directory has the read-only attribute, remove its read-only attribute. Make sure the directory path to
which this directory is copied does not include kanji and space characters. Presence of such characters makes the
cross tools unable to operate normally.
The explanation below assumes that this directory has been copied to the C:¥WorkSpace directory.
Notes:
• To download the load module of the sample software, the HEW and E10A-USB emulator software must be installed in
your host computer. (Refer to chapter 3)
• When you desire to modify the sample software, the SuperH RISC engine C/C++ compiler package must be installed
in your host computer. (Refer to the section 1.5
)
4.1.2 SH7670 CPU board and E10A-USB Startup Procedure (HEW Startup)
(1) Connect the host computer and the E10A-USB emulator.
(2) Connect the SH7670 CPU board and the E10A-USB emulator. (Do not turn on the power for the SH7670 CPU board
yet.)
(3) From [All Programs] on [Start menu], choose [Renesas High-performance Embedded Workshop]
Æ[High-performance Embedded Workshop].
(4) [Welcome] dialog box shown below will be displayed.
Select the option “Browse to another project workspace” and click “OK”.
Figure 4.1.1 Welcome Dialog Box
Note: The project workspace is a user’s working area, in which projects and their configurations are accommodated. A
project consists of a configuration necessary to create programs or final binary files and a set of files. For more
information about the project workspace, refer to the “SuperH RISC engine High-performance Embedded
Workshop 4 User’s Manual.”
4-2
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Running the Software
4.1.2 SH7670 CPU board and E10A-USB Startup Procedure (HEW Startup)
4
(5) The [Open Workspace] dialog box shown below is displayed. In this dialog box, specify the directory indicated below.
<Directory in which to store the sample software>
"C:¥WorkSpace¥Sample_software¥SH7670_sample"
(6) After specifying the directory, select the file indicated below and click “Select”.
Figure 4.1.2 Open the Workspace Dialog Box
Note: For the first time only, a dialog box prompting you to confirm that the workspace directory has been moved will be
displayed. When this dialog box appears, click “Yes”.
(7) The [Select Emulator mode] dialog box shown below is displayed.
Select “Device:SH7670” and “E10A-USB Emulator” and click “OK”.
Figure 4.1.3 Select Emulator Mode Dialog Box
4-3
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Running the Software
4.1.2 SH7670 CPU board and E10A-USB Startup Procedure (HEW Startup)
4
Note: For the first time only, a message “Please choose driver” is displayed. Click “OK” to display the Driver Details, and
select “Renesas E-Series Driver” for the Driver.
Figure 4.1.4 Driver Details Dialog Box
(8) [Connecting] dialog box is displayed, and the system starts connecting the emulator.
Figure 4.1.5 Connecting Dialog Box
(9) The dialog box shown below is displayed.
Figure 4.1.6 Dialog Box Prompting to Reset the User System
4-4
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Running the Software
4.1.2 SH7670 CPU board and E10A-USB Startup Procedure (HEW Startup)
4
(10) Turn on the power for the SH7670 CPU board.
(11) Press the reset button (SW3) on the SH7670 CPU board and press “OK” in the above dialog box.
(12) If the reset signal cannot be detected, the dialog box shown below is displayed.
Clicking “Ignore” here allows you to issue an internal reset from the E10A-USB emulator to the CPU and thereby start
up the system.
Figure 4.1.7 Cannot Find RESET Signal Dialog Box
(13) When you see “Connected” displayed in [Output] window of the HEW, it means that the E10A-USB emulator has
started up successfully.
Figure 4.1.8 Output Window
4-5
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Running the Software
4.1.3 E10A-USB Emulator Connection Error Dialog
4
4.1.3 E10A-USB Emulator Connection Error Dialog
If the E10A-USB emulator does not start up, the dialog box shown below will be displayed.
(a) If the dialog box shown below is displayed and the E10A-USB emulator cannot be started by the method in (11) on the
previous page, the SH7670 CPU board may not be supplied with the system power. Check the power supply for the
SH7670 CPU board.
Figure 4.1.9 Can not find /RESET signal Dialog Box
(b) If the dialog box shown below is displayed, the H-UDI pins and the H-UDI port connector may not be connected
correctly. Check the connection between the H-UDI pins and the H-UDI port connector.
Figure 4.1.10 Check the Connection Dialog Box
(c) If the dialog box shown below is displayed, the E10A-USB emulator firmware may not be set up correctly. Use the
setup tool or the additional license tool to set up the firmware for the device group that you use.
Figure 4.1.11 Product Currently Connected Dialog Box
(d) If the dialog box shown below is displayed, the firmware version set up in the E10A-USB may be old. Use the setup tool
to set up the appropriate version of firmware.
Figure 4.1.12 Version of the Emulator Firmware Dialog Box
4-6
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Running the Software
4.1.3 E10A-USB Emulator Connection Error Dialog
4
(e) If the driver has not been set up correctly, the dialog box shown below will be displayed.
Figure 4.1.13
Unable to Restore Dialog Box
(f) If a wrong device is selected, the following dialog box is displayed.
Figure 4.1.14 [Invalid CPU] Dialog Box
4-7
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Running the Software
4.1.4 Sample Software Download Procedure
4
4.1.4 Sample Software Download Procedure
Next, the following describes how to download the load module of the sample software.
Here, the sample software is downloaded to the flash memory connected external to the SH7670 CPU board.
For details about flash memory download settings, refer to the “SuperH Family E10A-USB Emulator User’s Manual.”
(1) Setting up the flash memory download function
From [Setup] menuÆ [Emulator] Æ[System…], open [Configuration] dialog box and then [Loading flash memory]
page.
For “File Name” here, specify the flash memory download program " fmtool_hs71.mot". The sample workspace is
assumed to have the flash memory download program stored in the directory indicated below.
" C:¥WorkSpace¥Sample_software¥sh7670_sample¥fmtool_hs71"
As shown in Figure 4.1.15, select “Enable” for Loading Flash Memory, and after checking “File Name”, “Bus Width of
Flash Memory” and “Entry Point” settings, press “OK”.
Note:
•“Loading Flash Memory” is set to “disable” in the default setting. Therefore, you need to enable it whenever you
connect the E10A-USB emulator.
• In fmtool_hs71.mot, because the flash memory of each sector is deleted by using Writing module, please select
“Disable” for Erasing flash memory.
Figure 4.1.15 Configuration Dialog Box
4-8
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Running the Software
4.1.4 Sample Software Download Procedure
4
(2) Specifying the command batch file before downloading
Next, you need to run the script file (fmtool_hs71.hdc) in which the access timing and bus control signal settings are
written in the flash memory of the SH7670 CPU board before downloading the sample software.
In the sample workspace, the following script file is assumed to be stored in.
" C: WorkSpace¥Sample_software¥SH7670_sample¥ fmtool_hs71"
Open [Debug] menu Æ[Debug Settings], and select [Option] tab. Check to see that the items on this tab are set as
shown below.
Command batch file load timing: Before download of modules
Command line batch processing:
"C: ¥WorkSpace¥ Sample_software¥sh7670_sample¥fmtool_hs71¥ fmtool_hs71.hdc"
Figure4.1.16 Debug Settings Dialog Box
(3) Activating the command line window
When downloading the load module of the sample software, you need to activate [Command Line] window to check
whether the script file is running.
Select [View] menu Æ [Command Line] to check whether [Command Line] window is open.
Note: Unless the script file is running, you cannot download the load module into the flash memory. So be sure to check
this.
4-9
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Running the Software
4.1.4 Sample Software Download Procedure
4
(4) Downloading the sample load module
Choose Download from the Debug menu and then sample load module. Figure 4.1.17 shows the download operation
window.
Immediately after you select the sample load module, the script file is automatically executed. Then the system starts
downloading the sample load module.
Figure 4.1.17
Download Operation Window
4-10
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Running the Software
4.1.4 Sample Software Download Procedure
4
(5) Completion of downloading
When the system has finished downloading the sample load module, the program counter is shown in “resetprg.c”.
Figure 4.1.18 Download Completion Window
4-11
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Running the Software
4.1.4 Sample Software Download Procedure
4
(6) Running the program
If the sample software is downloaded normally, LED7 on the SH7670 CPU board lights up and goes out alternately at
approximately one-second intervals.
Figure 4.1.19 Running the Program
Note: The contents of “resetprg.c" can be different according to the sample software version. If an error occurs or
unable to operate correctly or the software does not operate correctly, the hardware or software may not have
been set up correctly. Check the setup procedures in Chapters 2 and 3.
4-12
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Creating and Running a New Project Workspace
5.1 Creating a New Project Workspace
5
5.1 Creating a New Project Workspace
The following explanation describes how to create a new project workspace suitable for the SH7670 CPU board.
The procedure for creating a load module from a new project workspace and then downloading and running the
module in the flash memory connected external to the SH7670 CPU board are described as the below.
5.1.1 Preparing for Creating a New Project Workspace
Copy “Sample_software” directory from the CD-ROM into the working directory of the host computer. When the
“Sample_software” directory has the read-only attribute, remove its read-only attribute. Make sure the directory path to
which this directory is copied does not include kanji and space characters. Presence of such characters makes the
cross tools unable to operate normally.
The explanation below assumes that this directory has been copied to the "C:¥WorkSpace¥sample_software"
Note: To create a new project workspace, the HEW, E10A-USB emulator software, and SuperH RISC engine C/C++
compiler must be installed in the host computer.
5.1.2 Procedure for Creating a New Project Workspace
(1) Connect the host computer and the E10A-USB emulator.
(2) Connect the SH7670 CPU board and the E10A-USB emulator. (Do not turn on the power for the SH7670 CPU board
yet.)
(3) From [All Programs] on [Start] menu, choose [Renesas High-performance Embedded Workshop]
Æ [High-performance Embedded Workshop].
(4) [Welcome] dialog box shown below will be displayed.
(5) In this dialog box, select the option “Create a New Project Workspace” and click “OK”.
Figure 5.1.1 Welcome Dialog Box
5-2
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Creating and Running a New Project Workspace
5.1.2 Procedure for Creating a New Project Workspace
5
(6) Project Generator will start.
Here, enter “test” for the workspace name. After checking the directory, CPU type and tool chain, click “OK”.
Figure 5.1.2 New Project Workspace Dialog Box
(7) Next, select a “CPU Series” and a “CPU Type” from [New Project-1/9-Select Target CPU] dialog box. Make selections
as follows; CPU Series: SH-2A-FPU, CPU Type: Other
Figure 5.1.3 New Project-1/9 Dialog Box
5-3
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Creating and Running a New Project Workspace
5.1.2 Procedure for Creating a New Project Workspace
5
(8) Specify the global options from [New Project--2/9] dialog box.
FPU: Single
Round: Zero
Figure 5.1.4 [New Project-2/9] Dialog Box
(9) Fill out [New Project-3/9] to [New Project-4/9] dialog boxes. Select the check boxes as necessary. Leave default
settings intact here and simply click “Next”.
5-4
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Creating and Running a New Project Workspace
5.1.2 Procedure for Creating a New Project Workspace
5
(10) In [New Project-5/9] dialog box, set up a stack as follows;
Stack Pointer Address: H’FFF88000
Stack Size: H’400
*Stack size can be changed according to need.
Figure 5.1.5 New Project-5/9 Dialog Box
(11) In [New Project-6/9] dialog box, set up a vector.
Here, leave default settings intact (with the Vector Definition Files check box selected) and simply click “Next”.
Figure 5.1.6 New Project-6/9 Dialog Box
5-5
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Creating and Running a New Project Workspace
5.1.2 Procedure for Creating a New Project Workspace
5
(12) In [New Project-7/9] dialog box, set up the target as below. Firstly, select the Target type and then, select the Targets.
Target type: SH2A-FPU
Targets: SH2A-FPU E10A-USB SYSTEM(SH2A)
Figure 5.1.7 New Project-7/9 Dialog Box
(13) Verify [New Project-8/9] and [New Project-9/9] dialog boxes and click “Finish”.
Quit the Project Generator following the instructions shown in the window.
The HEW will be activated, automatically generating standard source files for the SH-2A device group.
(14) After the HEW started up, connect the E10A-USB emulator.
The E10A-USB emulator can be connected simply by switching to the session file for the E10A-USB emulator.
Note: The dialog box which confirms the change of session is displayed. Click “YES”.
Select the session
Figure 5.1.8 E10A-USB Emulator Connection Setup Screen
5-6
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Creating and Running a New Project Workspace
5.2 Setting Up the Flash Memory Download
5
(15) [Select Emulator mode] dialog box shown below will be displayed.
For details on how to operate here, refer to paragraphs ”4.1.2 SH7670 CPU board and E10A-USB Startup Procedure
(HEW Startup)”
Figure 5.1.9 Select Emulator Mode Dialog Box
(16) Execute build processing.
Choose Build from the Build menu to execute build processing.
After the E10A-USB emulator has been connected, execute build processing once without modifying the standard
source file. If a build error occurs here, the SuperH RISC engine C/C++ compiler may not have been installed
normally.
5-7
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Creating and Running a New Project Workspace
5.2 Setting Up the Flash Memory Download
5
5.2 Setting Up the Flash Memory Download
Next, the following shows how to set up the function for downloading load modules into the flash memory connected
external to the SH7670 CPU board.
Here, we use the flash memory download program stored in
"C:¥ WorkSpace¥Sample_software¥sh7670_sample¥fmtool_hs71.
For details about flash memory download settings, refer to the “SuperH Family E10A-USB Emulator User’s Manual.”
5.2.1 Setting Up the Flash Memory Download Function
Setting up the flash memory download function
From [Setup] menu Æ [Emulator] Æ [System…], select [Configuration] dialog box, and open [Loading flash memory]
page.
For “File Name” here, specify the flash memory download program (fmtool_hs71.mot). The sample workspace is
assumed to have the flash memory download program stored in the directory indicated below.
" C:¥WorkSpace¥Sample_software¥sh7670_sample¥fmtool_hs71"
Set up “Loading flash memory”, “File name”, “Bus width of flash memory” and “Entry point” as shown in Figure 5.2.1
Note: Loading Flash Memory is set to “Disable” in the default setting. Therefore, you need to enable it whenever you
connect the E10A-USB emulator.
Select “Enable”
Specify the path to
the fmtool_71.mot file.
Set the bus width to 16 bits.
Set H'FFF80000
for the write module address.
Figure 5.2.1 Configuration
Dialog Box
5-8
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Creating and Running a New Project Workspace
5.2.2 Specifying the Command Batch File Before Downloading
5
Table5.2.1 Loading flash memory Setting
Enable
Disable
Loading flash memory
Erasing flash memory
File name
C:¥WorkSpace¥Sample_software¥sh7670_sample¥fmtool_hs71¥ fmtool_hs71.mot
Bus width of flash memory
Flash memory erasing time
All erasing module address
Writing module address
Access size
16-bit
-
-
H'FFF80000
1 or 2
5.2.2 Specifying the Command Batch File Before Downloading
Next, you need to run the script file “fmtool_hs71.hdc” which has written the access timing and bus control signal
settings in the flash memory of the SH7670 CPU board before you download the modules.
From the Debug menu, open the Debug Settings dialog box and select the Options tab.
Set up the items on this tab as shown below.
• Command batch file load timing:
• Command line batch processing:
Before download of modules
"¥WorkSpace¥Sample_software¥sh7670_sample¥fmtool_hs71¥ fmtool_hs71.hdc "
Figure 5.2.2 Debug Settings Dialog Box
Note: With default settings, “Download modules after build” is selected. So deselect this check box, and then
select “Reset CPU after download module”, as shown above.
5-9
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Creating and Running a New Project Workspace
5.2.3 Activating the Command Line Window
5
5.2.3 Activating the Command Line Window
Choose Command Line from the View menu and open the Command Line window.
When downloading the load modules, activate the Command Line window to check whether the script file is running.
Note: Unless the script file is running, you cannot download the load modules into the flash memory. So be sure to
check this.
5.3 Adding/Modifying Hardware Setup Files
For the software to be run on the SH7670 CPU board, the hardware dependent part of the SH7670 CPU board must
be set up.
Here, the hardware dependent part of the SH7670 CPU board is added or modified for the standard source files that
were automatically generated when you created a new project. The procedure for adding/modifying hardware setup
files is described below.
The setting of the hardware dependent part indicates the settings of external memory (flash memory, SDRAM)
access timing, the operating clock and the cache memory.
5.3.1 Copying Hardware Setup Files
Copy “HardwareSetup” directory from the CD-ROM into the directory for the new project workspace
"C:¥WorkSpace¥test" that you created previously.
The explanation given below assumes that the hardware setup files are stored in
"C:¥WorkSpace¥test¥HardwareSetup" directory.
5.3.2 Removing the Standard Source Files
(1) Select [Project Æ Remove Files...].
Figure 5.3.1 Setting Up to Removing Files (1)
5-10
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Creating and Running a New Project Workspace
5.3.3 Adding Hardware Setup Files
5
(2) From [Remove Project Files] dialog box, select the file of "dbsct.c", "intprg.c", "resetprg.c", "sbrk.c", and "vecttbl.c".
Then, click “Remove”.
Figure 5.3.2 Setting Up to Removing Files (2)
5.3.3 Adding Hardware Setup Files
(1) Select [Project Æ Add Files...].
Figure 5.3.3 Setting Up to Add Files (1)
5-11
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Creating and Running a New Project Workspace
5.3.3 Adding Hardware Setup Files
5
(2) From the "C:¥WorkSpace¥test¥HardwareSetup" directory to which you copied hardware setup files, add the files
listed below.
Files to add : "bsc_cs0c.c", "bscsdram.c", "cache.c”, ”cpg.c", "dbsct.c", "hwsetup.c", "intprg.c", “lowsrc.c”,
"resetprg.c", “sbrk.c”, “siochar.c”, “siorw.c”, "vecttbl.c"
(Select the Relative Path check box)
Look in:
File name:
Files of type:
Select the
Relative
Path check
Figure 5.3.4 Setting Up to Add Files (2)
(3) Check to see that the files have been added as shown below.
Figure 5.3.5 Setting Up to Add Files (3)
5-12
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Creating and Running a New Project Workspace
5.3.4 Setting Compiler Options
5
5.3.4 Setting Compiler Options
From the Build menu, open [SuperH RISC engine Standard Toolchain] dialog box and open [C/C++] tab. On this tab,
set “Category”, “Show entries for” and “Options C/C++” as necessary.
For details on how to set “Option C/C++”, refer to the manuals for SuperH RISC engine C/C++ compiler, assembler
and optimization linkage editor.
In the installation described here, because the include files for the hardware dependent part of the SH7670 CPU
board are stored in a separate directory other than the default project directory, you need to set an additional relative
path to the include file directory.
• Default project directory:
"C:¥WorkSpace¥test¥test"
• Directory in which the include files are stored:
"C:¥WorkSpace¥test¥HardwareSetup"
The following shows how to set a relative path to the include file directory.
Figure 5.3.6 Compiler Option Setup Window
(1) Open “C/C++” tab of [SuperH RISC engine Standard Toolchain] dialog box, set up the following, and click the
“Add...”.
• Category: Source
• Show entries for: Include file directory
(2) Open [Add include file directory] dialog box, make selections as shown below, and press “OK”.
• Relative to: Select “Workspace directory” from the dropdown list.
• Sub-directory: Enter “HardwareSetup” in the text box.
Figure 5.3.7 Add Include File Directory Dialog Box
5-13
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Creating and Running a New Project Workspace
5.3.5 Setting Linker Options
5
5.3.5 Setting Linker Options
Open the Build menu, open the dialog box [SuperH RISC engine Standard Toolchain], and select “Link/Library” tab.
Set ”Category”, “Show entries for”, and “Option Link/Library” appropriately as necessary.
For details on how to set optimization linker options, refer to the user’s manuals for SuperH RISC engine C/C++
compiler, assembler and optimization linkage editor.
Here, the following describes how to change section settings.
Figure 5.3.8 Linker Option Setup Window
5-14
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Creating and Running a New Project Workspace
5.3.5 Setting Linker Options
5
(a) Section setting example for the case that a cache memory setup function is used
To use the io_init_cache function (that sets cache memory), the section for it must be located in the non-cacheable
area of CS0. The following shows how to set up the section to the non-cacheable area of CS0.
For the details about cache memory, refer to the chapters of cache and BSC in SH7670 group hardware manual.
(1) From the Build menu, open [SuperH RISC engine Standard Toolchain] dialog box and then the Link/Library tab.
On this tab, select the following and then click “Edit“.
• Category: Section
• Show entries for: Section
Figure 5.3.9 Section Settings (1)
(2) [Section] dialog box shown below will be displayed. In this dialog box, click “Add”.
Figure 5.3.10 Section Settings(2)
5-15
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Creating and Running a New Project Workspace
5.3.5 Setting Linker Options
5
(3) [Section address] dialog box shown below will be displayed. In this dialog box, enter “0x207FF000” for the
Figure 5.3.11 Section Settings (3)
(4) The section address will be added and it returns to [Section] dialog box. Choose a blank section as shown in
Figure 5.3.12, and click “Add”.
Figure 5.3.12 Section Settings (4)
5-16
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Creating and Running a New Project Workspace
5.3.5 Setting Linker Options
5
(5) [Add section] dialog box shown below will be displayed. Enter “PCACHE” for “Section name” as shown in
Figure 5.3.13, and press “OK”.
The “CACHE” section is defined in the “cache.c” source file. The first character “P” indicates a P section.
Figure 5.3.13 Section Settings (5)
(6) The section name will be added, and it returns to [Section] dialog box. Confirm if the section has been set as
It returns to the SuperH RISC engine Standard Toolchain dialog box, so press “OK” to finish your settings
Set in the
non-cacheable
area of CS0
Figure 5.3.14 Section Settings (6)
5-17
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Creating and Running a New Project Workspace
5.3.5 Setting Linker Options
5
(b) Section modifications example for the case that a B section is changed to the SDRAM area
The following shows the section modification example for changing the location of a B section to the SDRAM area.
For a detailed procedure for section setting, refer to paragraph (a) described previously.
Figure 5.3.15 Section Change (1)
Example: Adding a section to the SDRAM
• Address: 0x0C000000
• Section: B
Note: For details about the SDRAM area in the SH7670 CPU board, refer to Section 1.7, “SH7670 Memory
Mapping,” in the SH7670 CPU board User’s Manual.
Setting the B section
in the SDRAM area
Figure 5.3.16 Section Change (2)
5-18
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Creating and Running a New Project Workspace
5.3.5 Setting Linker Options
5
(c) Setting example for section in case for forwarding vector table section DINTTBL to on-chip RAM
Interrupt response speed can be sped up by forwarding vector table to on-chip RAM, and using register bank.
Forwarding vector table sets the vector table section on ROM as DINTTBL, and sets the section on RAM for the
forwarding destination as RINTTBL with "dbsct.c" added by 5.3.3.
<Section definition for vector table>
• Section name of vector table (ROM section): DINTTBL
• Section name of forwarding destination (RAM section): RINTTBL
The following shows the section setting procedure to modify the DINTTBL section from ROM to on-chip RAM
in the sample program.
<Example for adding section to on-chip RAM area>
“Address”: 0xFFF80000
“Section”: RINTTBL
Note: When the address above is set, the vector base register of CPU should be set. In the sample software,
the vector base register should be set inside the reset exception handling in the resetprg.c file.
ROM area
Change RINTTBL,
B, and R sections to
0xFFF80000 address
RAM area
Figure 5.3.17 Section Change (1)
5-19
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Creating and Running a New Project Workspace
5.3.5 Setting Linker Options
5
(2) Open [Link/Library] tab and select the below, and click “Add”.
• Category : Output
• Show entries for : ROM to RAM mapped sections
Figure 5.3.18 Section Change (2)
Note: In the sample software, the section initialization table should be set inside the reset exception
handling in the dbsct.c file.
(3) Select the items as below on [Add Rom to Ram] dialog box, and click "OK".
It returns to [SuperH RISC engine Standard Toolchain] dialog box, and click "OK" to finish your setting.
• ROM section : DINTTBL
• RAM section : RINTTBL
Figure 5.3.19 Section Change (3)
5-20
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Creating and Running a New Project Workspace
5.3.6 Writing the Main Function (Operation Confirmation)
5
5.3.6 Writing the Main Function (Operation Confirmation)
In the main function (test.c source file), write a program to turn on the LED (LED7 on the SH7670 CPU board lights up).
• Open the source file C:¥WorkSpace¥test¥test¥test.c with an editor, etc.
• Write the program that is shown below to turn on the LED.
Omitted
11: #include "iodefine.h"
12:
13: void main(void)
14: {
15:
16:
17:
18:
19:
20:
21: }
22:
/* ==== Port setting ==== */
PORT.PCCRH1.BIT.PC20MD = 0;
PORT.PCDRH.BIT.PC20DR = 0;
/* ====Port output (LED lights up) ==== */
PORT.PCIORH.BIT.PC20IOR = 1;
Note: In this example, the value is set to the port C data register H (PCDRH) by the bit operation instruction. Since the
bit operation instruction performs the read modify write access, the port input level read for the unspecified bit is
written in the port data register. As a result, please note that the unintended value might be set. In the other ports
(1) Creating a new load module
Choose Build from the Build menu to execute build processing.
Note: Because the C section is not used, the following warning message will be displayed. It does not present
any problem.
<Warning message>
L1100(W)Cannot find “C” specified in option “start”
Phase OptLinker finished
Build Finished
0 Errors,1 Warning
(2) Creation of new test.abs
If a new load module (test.abs) has been created, it means that you’ve finished adding/modifying hardware setup
files successfully.
(3) Running the program
Try running the program after downloading the load module. (LED7 on the SH7670 CPU board lights up)
5-21
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Creating and Running a New Project Workspace
5.3.6 Writing the Main Function (Operation Confirmation)
5
*This page is blank*
5-22
Rev. 1.01 May 7, 2008
REJ11J0015-0101
Download from Www.Somanuals.com. All Manuals Search And Download.
Revision History
SH7670 CPU Board Installation Manual
Rev.
Date of Issue
Content of Revision
Points
Page
1.00
1.01
Jan 9.08
May 7.08
-
-
First edition issued.
Revision history page location was changed.
Colophon was changed from ©2007 to ©2008.
Download from Www.Somanuals.com. All Manuals Search And Download.
Download from Www.Somanuals.com. All Manuals Search And Download.
SH7670 CPU Board
M3A-HS71
Installation Manual
Publication
Date
May 7, 2008
Rev. 1.01
Published by
Renesas Technology Corp.
Renesas Solutions Corp.
© 2008. Renesas Technology Corp., All rights reserved. Printed in Japan.
Download from Www.Somanuals.com. All Manuals Search And Download.
M3A-HS71
Installation Manual
Download from Www.Somanuals.com. All Manuals Search And Download.
|