没有合适的资源?快使用搜索试试~ 我知道了~
首页RL78家族CC-RL编译器用户手册 V1.01.00版
RL78家族CC-RL编译器用户手册 V1.01.00版
需积分: 0 1 下载量 44 浏览量
更新于2024-06-19
收藏 5.02MB PDF 举报
CC-RL Compiler是一款针对瑞萨(Renesas)RL78系列单片机的嵌入式编译器,专为V1.01.00版本或更高版本设计,该文档属于用户手册,发布于2017年12月,版本号为Rev.1.06。此编译器是用于开发和优化针对RL78微控制器的应用程序的重要工具。 该编译器的主要功能包括将高级语言源代码转换为机器代码,以便能在RL78系列的硬件平台上运行。用户手册提供了详细的技术信息,包括电路描述、软件设计指导和相关应用示例,旨在帮助开发者理解和实现高效能的嵌入式系统解决方案。 值得注意的是,文档中的所有内容在发布时具有准确性,但可能随时间而变化,因此建议用户通过Renesas Electronics官方网站(<http://www.renesas.com>)或其他官方渠道获取最新的产品规格和更新。编译器用户必须对根据文档中的电路、软件及其信息进行设计的产品或系统负责,因为这些信息仅作为教学和演示用途,并不构成对性能的承诺或保证。 Renesas Electronics明确表示,他们不对因使用这些电路、软件或信息而导致的任何损失或损害承担责任,包括但不限于用户或第三方可能遇到的任何经济损失。因此,在使用CC-RL Compiler进行项目开发时,开发者应确保充分理解并承担相应的风险,同时遵守适用的法律法规和行业标准。 CC-RL Compiler是瑞萨RL78系列单片机开发的重要组成部分,提供了一套完整的工具链,帮助工程师将抽象的编程思想转化为实际硬件操作的指令集。在使用过程中,开发者需谨慎处理文档中的内容,并保持与官方信息的同步,以确保项目的成功实施。
资源详情
资源推荐
![](https://csdnimg.cn/release/download_crawler_static/88537394/bg10.jpg)
R20UT3123EJ0106 Rev.1.06 Page 16 of 778
Dec 01, 2017
CC-RL 2. COMMAND REFERENCE
2.2 I/O Files
The I/O files of the ccrl command are shown below.
Table 2.1 I/O Files of ccrl Command
File Type Extension I/O Description
C source file .c I Source file described in C language
This is created by the user.
Preprocessed file .i
Note 1
O Text file which the execution result of preprocess processing for
the input file is output
This file is output when the -P option is specified.
Assembly source file .asm
Note 1
O Assembly language file generated from C source file by compila-
tion
This file is output when the -S option is specified.
.asm
.s
I Source file described in assembly language
This is created by the user.
Header file free I File referred by source files
This file is described in C language or assembly language.
This is created by the user.
The extension is free, but the following is recommended.
- #include directive: .h
- $include control instruction: .inc
Object file .obj
Note 1
I/O ELF-format file including machine-language information, reloca-
tion information relating to machine-language allocation
addresses, and symbol information
Assemble list file
Note 2
.prn
Note 1
O List file which has information from the assemble result
This file is output when the -asmopt=-prn_path option is speci-
fied.
Library file .lib
Note 1
I/O ELF-format file in which two or more object files are included
This file is output when the -lnkopt=-form=library option is speci-
fied.
Load module file .abs
Note 1
I/O ELF-format file of the object code of the link result
This is the input file when a hex file is output.
This file is output when the -lnkopt=-form=absolute option is
specified.
If you specify the -lnkopt option but not the -form option, the com-
mand assumes that the above option has been specified.
Relocatable file .rel
Note 1
I/O Relocatable object file
This file is output when the -lnkopt=-form=relocate option is spec-
ified.
Intel HEX file
Note 2
.hex
Note 1
I/O Load module file converted into the Intel HEX format
This file is output when the -lnkopt=-form=hexadecimal option is
specified.
Motorola S-record file
Note 2
.mot
Note 1
I/O Load module file converted into the Motorola S-record
This file is output when the -lnkopt=-form=stype option is speci-
fied.
Binary file .bin
Note 1
I/O Load module file converted into the binary format
This file is output when the -lnkopt=-form=binary option is speci-
fied.
![](https://csdnimg.cn/release/download_crawler_static/88537394/bg11.jpg)
CC-RL 2. COMMAND REFERENCE
R20UT3123EJ0106 Rev.1.06 Page 17 of 778
Dec 01, 2017
Note 1. The extension can be changed by specifying the option.
Note 2. See "3. OUTPUT FILES" for details about each file.
Symbol address file .fsy I/O Assembly source file where external defined symbols are
described in assembler directives
This file is output when the -lnkopt=-fsymbol option is specified.
Link map file
Note 2
.map
Note 1
O List file which has information from the link result
This file is output when the -lnkopt=-list option is specified.
Library list file
Note 2
.lbp
Note 1
O List file which has information from the library creation result
This file is output when the -lnkopt=-list option is specified.
Stack information file .sni O List file which has information of the stack capacity
This file is output when the -lnkopt=-stack option is specified.
Variable/function
information file
.h
Note 1
I/O File containing declarations of the saddr variable or callt function
This file is output when the -lnkopt=-vfinfo option is specified.
Static analysis information
file
free I/O File which has information from the static analysis result
The extension is free, but ".cref" is recommended.
This file is output when the -cref option is specified.
Error message file free O File which contains error messages
The extension is free, but ".err" is recommended.
This file is output when the -error_file option is specified.
Subcommand file free I File which contains the parameters of the execution program
This is created by the user.
File Type Extension I/O Description
![](https://csdnimg.cn/release/download_crawler_static/88537394/bg12.jpg)
R20UT3123EJ0106 Rev.1.06 Page 18 of 778
Dec 01, 2017
CC-RL 2. COMMAND REFERENCE
2.3 Environment Variable
This section explains the environment variables.
The environment variables of the optimizing linker and the examples when specifying them on the command line are
shown below.
- HLNK_LIBRARY1, HLNK_LIBRARY2, HLNK_LIBRARY3
Specify the default library that the optimizing linker uses.
The library specified by the -library option has the precedence for linking.
After that, if unresolved symbols remain, default libraries HLNK_LIBRARY1, HLNK_LIBRARY2, and
HLNK_LIBRARY3 are searched in that order.
Example
-HLNK_TMP
Specify the folder where the optimizing linker creates temporary files.
If this environment variable is not specified, the files are created in the current folder.
Example
-HLNK_DIR
Specify the folder where the input files for the optimizing linker are stored.
The files specified by the -input and -library options are searched from the current folder and the folder specified by
HLNK_DIR in that order.
However, the files specified with wildcard characters are searched in the current folder.
Example
>set HLNK_LIBRARY1=usr1.lib
>set HLNK_LIBRARY2=usr2.lib
>set HLNK_LIBRARY3=usr3.lib
>set HLNK_TMP=D:\workspace\tmp
>set HLNK_DIR=D:\workspace\obj1;D:\workspace\obj2
![](https://csdnimg.cn/release/download_crawler_static/88537394/bg13.jpg)
CC-RL 2. COMMAND REFERENCE
R20UT3123EJ0106 Rev.1.06 Page 19 of 778
Dec 01, 2017
2.4 Method for Manipulating
This section explains how to manipulate each command.
- Command line operation
- Subcommand file usage
2.4.1 Command line operation
You can launch the ccrl command (the compilation driver) to perform compilation, assembly, linking, and other actions.
The assembler (asrl) and optimizing linker (rlink) can also start by itself.
(1) Specification format
Enter the following on the command line.
option: Option name
file: File name
[ ]: Can be omitted
...: Pattern in proceeding [ ] can be repeated
{ }: Select from items delimited by the pipe symbol ("|")
: One or more spaces
The following points should be noted when entering a command.
- The specification formats of options depend on the command that is used.
See "2.5.1 Compile options", "2.5.2 Assemble options" and "2.5.3 Link options" for cautions about options of
each command.
- A file name supported by Windows can be specified.
"-" cannot be also used at the beginning of a file name because it is regarded as the option specification.
"(" and ")" cannot be also used for a file name because they are regarded as the part of link options.
- The length that can be specified for a file name depends on Windows (up to 259 characters).
- Uppercase characters and lowercase characters are not distinguished for the alphabet of a file name.
- Two or more files can be specified as input.
Files which have different types (C source file and assembly source file or object file, and the like) can be mixed.
Note that two or more files having the same source file name except for the extension cannot be specified (even
when they are stored in separate folders).
In this case, even if there is an error in one file, processing of the remaining files will continue if processing is
possible.
The generated object files are not deleted after linking.
(2) Example of operations
The examples of operations on the command line are shown below.
Remark See "2.5 Option" for details about each option.
(a) Performing compilation, assembly, and linking by one command
C source file "file1.c" is compiled by ccrl, and then assembly source file "file1.asm" is generated.
Next, assembly source file "file1.asm" and "file2.asm" are assembled by asrl, and then object file "file1.obj" and
"file2.obj" are generated.
The assemble list files are output to the current folder.
Finally, object file "file1.obj", "file2.obj", and "file3.obj" are linked by rlink, and then link map file "sample.map"
and load module file "sample.abs" are generated.
>ccrl[option]...file[file|
option]...
>asrl[option]...file[file|option]...
>rlink[{file|option}...]
![](https://csdnimg.cn/release/download_crawler_static/88537394/bg14.jpg)
R20UT3123EJ0106 Rev.1.06 Page 20 of 778
Dec 01, 2017
CC-RL 2. COMMAND REFERENCE
Remark In the ccrl command line, use the -asmopt option to specify an option dedicated to asrl; to specify
an option dedicated to rlink, use the -lnkopt option.
(b) Performing compilation and assembly by one command, and linking separately
C source file "file1.c" is compiled by ccrl, and then assembly source file "file1.asm" is generated.
Next, assembly source file "file1.asm" and "file2.asm" are assembled by asrl, and then object file "file1.obj" and
"file2.obj" are generated.
The assemble list files are output to the current folder.
Remark In the ccrl command line, use the -asmopt option to specify an option dedicated to asrl.
Object file "file1.obj", "file2.obj", and "file3.obj" are linked by rlink, and then link map file "sample.map" and load
module file "sample.abs" are generated.
(c) Performing compilation, assembly, and linking separately
C source file "file1.c" is compiled by ccrl, and then assembly source file "file1.asm" is generated.
Assembly source file "file1.asm" and "file2.asm" are assembled by asrl, and then object file "file1.obj" and
"file2.obj" are generated.
Assemble list files are also output.
Object file "file1.obj", "file2.obj", and "file3.obj" are linked by rlink, and then link map file "sample.map" and load
module file "sample.abs" are generated.
2.4.2 Subcommand file usage
A subcommand file is a file that options and file names specified for a ccrl, asrl, rlink command are described.
The command treats the contents of a subcommand file as if they were command-line arguments.
Use a subcommand file when the arguments will not fit on the command line, or when same options are specified
repeatedly each time the command is executed.
(1) Using a subcommand file for the compiler and assembler
(a) Cautions about description of a subcommand file
- The arguments to be specified can be coded over several lines.
However, you cannot start a new line within the name of the option specification or file.
- When the subcommand option is specified in a subcommand file, the same file name as the current subcom-
mand file cannot be specified in the subcommand option.
- The character code contents of a subcommand file cannot be specified by using the -character_set option.
If you use characters other than ASCII in the subcommand file, use the UTF-8 file with BOM.
- The following characters are treated as special characters.
Special characters written in a subcommand file are deleted from the parameter string passed to the ccrl com-
mand, and the ccrl command is executed with that string.
>ccrl file1.c file2.asm file3.obj -asmopt=-prn_path -lnkopt=-list -osample.abs -
cpu=S2 -dev=dr5f100pj.dvf
>ccrl -c file1.c file2.asm -asmopt=-prn_path -cpu=S2 -dev=dr5f100pj.dvf
>rlink file1.obj file2.obj file3.obj -output=sample.abs -list
>ccrl -S file1.c -cpu=S2 -dev=dr5f100pj.dvf
>asrl file1.asm -prn_path -cpu=S2 -dev=dr5f100pj.dvf
>asrl file2.asm -prn_path -cpu=S2 -dev=dr5f100pj.dvf
>rlink file1.obj file2.obj file3.obj -output=sample.abs -list
剩余777页未读,继续阅读
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://profile-avatar.csdnimg.cn/default.jpg!1)
Roy_喜乐宝
- 粉丝: 41
- 资源: 8
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![](https://csdnimg.cn/release/wenkucmsfe/public/img/voice.245cc511.png)
最新资源
- 构建Cadence PSpice仿真模型库教程
- VMware 10.0安装指南:步骤详解与网络、文件共享解决方案
- 中国互联网20周年必读:影响行业的100本经典书籍
- SQL Server 2000 Analysis Services的经典MDX查询示例
- VC6.0 MFC操作Excel教程:亲测Win7下的应用与保存技巧
- 使用Python NetworkX处理网络图
- 科技驱动:计算机控制技术的革新与应用
- MF-1型机器人硬件与robobasic编程详解
- ADC性能指标解析:超越位数、SNR和谐波
- 通用示波器改造为逻辑分析仪:0-1字符显示与电路设计
- C++实现TCP控制台客户端
- SOA架构下ESB在卷烟厂的信息整合与决策支持
- 三维人脸识别:技术进展与应用解析
- 单张人脸图像的眼镜边框自动去除方法
- C语言绘制图形:余弦曲线与正弦函数示例
- Matlab 文件操作入门:fopen、fclose、fprintf、fscanf 等函数使用详解
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![](https://img-home.csdnimg.cn/images/20220527035711.png)
![](https://img-home.csdnimg.cn/images/20220527035711.png)
![](https://img-home.csdnimg.cn/images/20220527035111.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![](https://csdnimg.cn/release/wenkucmsfe/public/img/green-success.6a4acb44.png)