To our customers,
Old Company Name in Catalogs and Other Documents
On April 1
st
, 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.
Renesas Electronics website: http://www.renesas.com
April 1
st
, 2010
Renesas Electronics Corporation
Issued by: Renesas Electronics Corporation (http://www.renesas.com)
Send any inquiries to http://www.renesas.com/inquiry.
Notice
1. All information included in this document is current as of the date this document is issued. Such information, however, is
subject to change without any prior notice. Before purchasing or using any Renesas Electronics products listed herein, please
confirm the latest product information with a Renesas Electronics sales office. Also, please pay regular and careful attention to
additional and different information to be disclosed by Renesas Electronics such as that disclosed through our website.
2. Renesas Electronics does not assume any liability for infringement of patents, copyrights, or other intellectual property rights
of third parties by or arising from the use of Renesas Electronics products or technical information described in this document.
No license, express, implied or otherwise, is granted hereby under any patents, copyrights or other intellectual property rights
of Renesas Electronics or others.
3. You should not alter, modify, copy, or otherwise misappropriate any Renesas Electronics product, whether in whole or in part.
4. Descriptions of circuits, software and other related information in this document are provided only to illustrate the operation of
semiconductor products and application examples. You are fully responsible for the incorporation of these circuits, software,
and information in the design of your equipment. Renesas Electronics assumes no responsibility for any losses incurred by
you or third parties arising from the use of these circuits, software, or information.
5. When exporting the products or technology described in this document, you should comply with the applicable export control
laws and regulations and follow the procedures required by such laws and regulations. You should not use Renesas
Electronics products or the technology described in this document for any purpose relating to military applications or use by
the military, including but not limited to the development of weapons of mass destruction. Renesas Electronics products and
technology may not be used for or incorporated into any products or systems whose manufacture, use, or sale is prohibited
under any applicable domestic or foreign laws or regulations.
6. Renesas Electronics has used reasonable care in preparing the information included in this document, but Renesas Electronics
does not warrant that such information is error free. Renesas Electronics assumes no liability whatsoever for any damages
incurred by you resulting from errors in or omissions from the information included herein.
7. Renesas Electronics products are classified according to the following three quality grades: “Standard”, “High Quality”, and
“Specific”. The recommended applications for each Renesas Electronics product depends on the product’s quality grade, as
indicated below. You must check the quality grade of each Renesas Electronics product before using it in a particular
application. You may not use any Renesas Electronics product for any application categorized as “Specific” without the prior
written consent of Renesas Electronics. Further, you may not use any Renesas Electronics product for any application for
which it is not intended without the prior written consent of 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” or for which the product is not intended where you have failed to obtain the prior written
consent of Renesas Electronics. The quality grade of each Renesas Electronics product is “Standard” unless otherwise
expressly specified in a Renesas Electronics data sheets or data books, etc.
“Standard”: Computers; office equipment; communications equipment; test and measurement equipment; audio and visual
equipment; home electronic appliances; machine tools; personal electronic equipment; and industrial robots.
“High Quality”: Transportation equipment (automobiles, trains, ships, etc.); traffic control systems; anti-disaster systems; anti-
crime systems; safety equipment; and medical equipment not specifically designed for life support.
“Specific”: Aircraft; aerospace equipment; submersible repeaters; nuclear reactor control systems; medical equipment or
systems for life support (e.g. artificial life support devices or systems), surgical implantations, or healthcare
intervention (e.g. excision, etc.), and any other applications or purposes that pose a direct threat to human life.
8. You should use the Renesas Electronics products described in this document within the range specified by Renesas Electronics,
especially with respect to the maximum rating, operating supply voltage range, movement power voltage range, heat radiation
characteristics, installation and other product characteristics. Renesas Electronics shall have no liability for malfunctions or
damages arising out of the use of Renesas Electronics products beyond such specified ranges.
9. Although Renesas Electronics endeavors to improve the quality and reliability of its products, semiconductor products have
specific characteristics such as the occurrence of failure at a certain rate and malfunctions under certain use conditions. Further,
Renesas Electronics products are not subject to radiation resistance design. Please be sure to implement safety measures to
guard them against the possibility of physical injury, and injury or damage caused by fire in the event of the failure of a
Renesas Electronics product, such as safety design for hardware and software including but not limited to redundancy, fire
control and malfunction prevention, appropriate treatment for aging degradation or any other appropriate measures. Because
the evaluation of microcomputer software alone is very difficult, please evaluate the safety of the final products or system
manufactured by you.
10. Please contact a Renesas Electronics sales office for details as to environmental matters such as the environmental
compatibility of each Renesas Electronics product. Please use Renesas Electronics products in compliance with all applicable
laws and regulations that regulate the inclusion or use of controlled substances, including without limitation, the EU RoHS
Directive. Renesas Electronics assumes no liability for damages or losses occurring as a result of your noncompliance with
applicable laws and regulations.
11. This document may not be reproduced or duplicated, in any form, in whole or in part, without prior written consent of Renesas
Electronics.
12. Please contact a Renesas Electronics sales office if you have any questions regarding the information contained in this
document or Renesas Electronics products, or if you have any other inquiries.
(Note 1) “Renesas Electronics” as used in this document means Renesas Electronics Corporation and also includes its majority-
owned subsidiaries.
(Note 2) “Renesas Electronics product(s)” means any product developed or manufactured by or for Renesas Electronics.
于日
本印刷
文档编号: U18787CA1V0AN00 (第一版)
出版日期: 2008 年 2 月
78K0S/Kx1+
示例程序
启动指南
应用笔记
2008
目标器件
78K0S/KA1+微控制器
78K0S/KB1+微控制器
78K0S/KU1+微控制器
78K0S/KY1+微控制器
本文档介绍了如何下载和安装示例程序所需的开发环境,以及如何使用示例程序。
目录
引言 ........................................................................................... 3
第一章 开发环境的准备工作 ....................................................................4
1.1 开发过程和开发工具之间的关系 ..................................................... 4
1.2 开发环境的配置 .............................................................................. 5
1.3 下载开发环境.................................................................................. 5
1.4 安装开发环境.................................................................................. 5
1.4.1 安装 RA78K0S (汇编器)...................................................... 6
1.4.2 安装 CC78K0S (C 编译器)................................................ 12
1.4.3 安装 78K0S/Kx1+的 SM+(系统仿真器) ............................. 17
1.4.4 解压缩和安装设备文件...................................................... 22
第二章 示例程序的准备工作 ..................................................................28
2.1 下载示例程序................................................................................ 28
2.2 文件配置....................................................................................... 30
第三章 注册集成化开发环境 PM+工程和执行编译.................................31
3.1 工程注册.......................................................................................31
3.1.1 工程注册(仅源文件) ..........................................................31
3.1.2 工程注册(源文件和工程文件) ............................................ 37
3.2 执行编译并启动调试器 .................................................................39
第四章 使用 SM+ 系统仿真器进行操作检验........................................... 45
4.1 使用 SM+ 检验操作检验 ............................................................... 45
4.1.1 打开仿真文件(仅源文件) ...................................................45
4.1.2 仿真 .................................................................................. 47
4.2 SM+ 主要功能 ..............................................................................50
4.2.1 [Source] 窗口.................................................................... 50
4.2.2 [Timing Chart] 窗口...........................................................54
4.2.3 [I/O Panel] 窗口 ................................................................58
4.2.4 [Assemble] 窗口................................................................ 60
4.2.5 [Memory] 窗口 ..................................................................63
4.2.6 [Watch] 窗口 .................................................................... 65
4.2.7 [Register] 窗口.................................................................. 67
4.2.8 [SFR] 窗口 ........................................................................70
第五章 相关文档.....................................................................................74
附录 修订历史 ....................................................................................75
应用笔记 U18787CA1V0AN
2
Windows 是微软公司在美国和在其它国家的注册商标和商标。
● 本文档信息发布于2008年02月。未来可能未经预先通知而进行更改。在实际进行生产设计时,请参
阅各产品最新的数据规格书或数据手册等相关资料,以获取本公司产品的最新规格。并非所有的产品
和/或型号都向每个国家供应。请向本公司销售代表查询产品供货及其他信息。
● 未经本公司事先书面许可,禁止采用任何方式复制或转载本文件中的内容。本文件所登载内容的错
误,本公司概不负责。
● 本公司对于因使用本文件中列明的本公司产品而引起的,对第三者的专利、版权以及其它知识产权的
侵权行为概不负责。本文件登载的内容不应视为本公司对本公司或其他人所有的专利、版权以及其它
知识产权做出任何明示或默示的许可及授权。
● 本文件中的电路、软件以及相关信息仅用以说明半导体产品的运作和应用实例。用户如在设备设计中
应用本文件中的电路、软件以及相关信息,应自行负责。对于用户或其他人因使用了上述电路、软件
以及相关信息而引起的任何损失,本公司概不负责。
● 虽然本公司致力于提高半导体产品的质量及可靠性,但用户应同意并知晓,我们仍然无法完全消除出
现产品缺陷的可能。为了最大限度地减少因本公司半导体产品故障而引起的对人身、财产造成损害
(包括死亡)的危险,用户务必在其设计中采用必要的安全措施,如冗余度、防火和防故障等安全设
计。
● 本公司产品质量分为: “标准等级”、“专业等级”以及“特殊等级”三种质量等级。
“特殊等级”仅适用于为特定用途而根据用户指定的质量保证程序所开发的日电电子产品。另外,各种日
电电子产品的推荐用途取决于其质量等级,详见如下。用户在选用本公司的产品时,请事先确认产品的
质量等级。
“标准等级”: 计算机,办公自动化设备,通信设备,测试和测量设备,视音频设备,家电,加工
机械,个人电气设备以及产业用机器人。
“专业等级”: 运输设备(汽车、火车、船舶等),交通用信号控制设备,防灾装置,防止犯罪装
置,各种安全装置以及医疗设备(不包括专门为维持生命而设计的设备)。
“特殊等级”: 航空器械,宇航设备,海底中继设备,原子能控制系统,为了维持生命的医疗设备和
用于维持生命的装置或系统等。
除在本公司半导体产品的数据表或数据手册等资料中另有特别规定以外,本公司半导体产品的质量等级
均为“标准等级”。如果用户希望在本公司设计意图以外使用本公司半导体产品,务必事先与本公司销售
代表联系以确认本公司是否同意为该项应用提供支持。
(注)
(1)本声明中的“本公司”是指日本电气电子株式会社(NEC Electronics Corporation)及其控股公司。
(2)本声明中的“本公司产品”是指所有由日本电气电子株式会社或为日本电气电子株式会社(如上定义)
开发或制造的产品。
M8E 02.11-1
引言
读者对象 本手册适用于那些第一次使用示例程序的用户,同时也适用于第一次使用
78K0S/Kx1+微控制器开发工具的用户。要使用这些开发工具,必须具备关于如何操
作 Windows
TM
的基础知识。
目的 本手册的目的是让用户了解如何使用示例程序,并帮助用户熟悉 78K0S/Kx1+微控
制器开发工具的基本操作。当阅读本手册并使用工具进行实际操作时,你会对关于
如何使用示例程序和开发工具的基本操作获得更深入的了解。
组成 本手册包含以下几个章节:
第一章 开发环境的准备工作
第二章 示例程序的准备工作
第三章 注册集成化开发环境 PM+工程和执行编译
第四章 使用 SM+ 系统仿真器进行操作检验
在第二章以及随后的章节的示例程序(初始化)描述中,以 78K0S/KB1+微控制器
为例。
应用笔记 U18787CA1V0AN
3