在使用RENESAS RL78 R5F100AA开发厚卡485电表时,编译器报错,说程序空间不足。
打开MAP文件,发现从5xxH到2000H之间为GAP,查看手册发现该芯片支持启动区转换,在使用此功能时,0000H-1000H和1000H-2000H内容互换。编译器可能默认预留该区域。
方案
气瓶 现场处置方案 .pdf气瓶 现场处置方案 .doc见习基地管理方案.doc关于群访事件的化解方案建筑工地扬尘治理专项方案下载
1:
提供方:自研
通过#pragma section语句强制将某个C文件定义在特定的区域
编译器选项:memory model type设为small
ROM : 368AH byte(s) real data
RAM : 1B4H byte(s) real data
Medium通不过
方案2:
提供方:欣瑞利技术支持
将文件中所有的const前加__far
将memory model type设为Medium
此工程可通过
ROM : 394FH byte(s) real data
RAM : 1B4H byte(s) real data
但是正式的工程编译不通过,仍然提示空间不足,因为此种方法占用空间太大。
方案3:
提供方:瑞萨原厂技术支持
该问题的解决办法,请在工程的.dr文件中加入以下语句:
merge @@CNST : AT (3D00H)
目的是将@@CNST的定义地址修改。
将memory model type设为Medium,
ROM : 38CEH byte(s) real data
RAM : 1B4H byte(s) real data
将memory model type设为small,
ROM : 368AH byte(s) real data
RAM : 1B4H byte(s) real data
在正式程序中不能设为Medium,因为Medium占用空间大
编译通过
方案4:
FAQ 1004452
最新更新:12/01/2011
功能: Coding tools ;
Looking at the MAP file, the area from 3CAH to 800H is a gap area.
I want to add a program to this empty area.
I have described the following before the code I would like to map from 3CAH. Is this a problem?
#pragma section @@CODE ROM
While this is not recommended, it is not a problem.
To use section specification, it is recommended to describe as
#pragma section @@CODE CODE 1
and specify
merge CODE1: AT (3CAH)
in the link directive file.