- 1、本文档共3页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
error l107 address space overflow(地址空间溢出)问题原因分析及解决(错误l107地址空间溢出(地址空间溢出)问题原因分析及解决)
error l107 address space overflow(地址空间溢出)问题原因分析及解决(错误l107地址空间溢出(地址空间溢出)问题原因分析及解决)
Here comes the question: why variables I and j are not counted?
This is because I and j are local variables, and the compiler will try to optimize them into registers, Rx, or stacks. Also in this, if too many local variables defined in the local array, the compiler cannot be optimized, you must use RAM space, although the distribution of global variables calculated does not exceed the scope of use, will have the memory overflow error!
And whether the compiler can successfully optimize variables is based on your code
In the code above, the loop is bloated, and the variable J is completely unnecessary, so change the code to
UCHAR i;
UCHAR j;
For (I = 0; I LEN; ++i)
{
Tt1[i] = 0x55;
}
Compile and see, theres a mistake!
Because the compiler doesnt know how to use J, it cant be optimized, J must take up RAM space, and RAM will overflow. Some compilers automatically remove this useless variable, but this is not included in the discussion
To sum up, I suggest you review the definitions of variables in your program, or post your program (no code needed, as long as the variables are defined, including subroutines)
From the two compilation of your formulation, changed to compact after 111 bytes moved to XDATA, a simple method is to open the output folder in your.M51 file to find the symbol table, which variables are moved to XDATA, and then modify your program in these variables with IData, then look at the compiler
In addition, the variables defined for IData are best placed after the data variable
For this definition
Uchar c1;
IData uchar c2;
Uchar c3;
The variable C2 will definitely be addressed indirectly, but it can fall into the data area and waste a direct addressable space
您可能关注的文档
- bat 脚本基本语法(蝙蝠脚本基本语法).doc
- bdchelpn(bdchelpn).doc
- be to do, be going to do, be about to do 辨析词语辨析(要做,要做,就要做辨析词语辨析).doc
- bear(熊).doc
- basic语法(基本语法).doc
- bec 词汇整理(bec 词汇整理).doc
- bec-c(bec-c).doc
- bec-h(备课程).doc
- a试论成本费用的控制方法(A discussion on control method of cost and expense).doc
- a、b、c、d类商品分类原则(A, B, C and D classification principles).doc
- 2025至2030胶囊行业市场深度研究及发展前景投资可行性分析报告.docx
- 2025至2030胶囊行业市场发展分析及投资前景报告.docx
- 海上货物运输《普通杂货的配积载要求在线测试》模拟卷.doc
- Unit 6 Useful numbers Part A Let's learn课件(共27张PPT)(完整版).pptx
- 水稻种植介绍课件视频.pptx
- 2025至2030肺功能仪行业市场发展分析及投资前景报告.docx
- 水稻种植技术与管理课件.pptx
- 2025至2030肾脏透析设备行业市场深度研究及发展前景投资可行性分析报告.docx
- 2025年资助班会主题班会.pptx
- 2025至2030胶凝材料市场行业市场深度研究及发展前景投资可行性分析报告.docx
文档评论(0)