ROM allocation exceed-MC9RS08LA8

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

ROM allocation exceed-MC9RS08LA8

跳至解决方案
2,212 次查看
karunanithiprat
Contributor II

Hi,  i am using MC9RS08LA8(code warrior ver-6.3) and my current code size is 7990 bytes and i can go up to 8050 bytes( maximum ROM size is 8KB and some space is allocated to constant table) . when i add

32 bit division it showing ROM is out of allocated size.  The 32 bit division is given below ,

 

signed int long  Data=0;

//here i'll get 32bit data from serial port

Data=Data/1000l;// when i remove this line the code can be compiled and when i add this line the ROM overflow occurs.

help me to solve this.

 

Thanks,

标签 (1)
1 解答
2,050 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi,

thank you for contacting us.

in 8bit MCU,  long int computation is very memory consuming.

Data=Data/1000l takes around 420bytes.

so i don't think your project have enough memory for it.

optimization for code size can reduce some code size, but the reduction is quite limit according to my experience.

pastedImage_0.png

can this help you?


Have a great day,
Zhang Jun

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

6 回复数
2,050 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

can you upload your project here so that i can reproduce it directly on my side?

2,050 次查看
karunanithiprat
Contributor II

Ok, how do i send my file?

0 项奖励
回复
2,051 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi,

thank you for contacting us.

in 8bit MCU,  long int computation is very memory consuming.

Data=Data/1000l takes around 420bytes.

so i don't think your project have enough memory for it.

optimization for code size can reduce some code size, but the reduction is quite limit according to my experience.

pastedImage_0.png

can this help you?


Have a great day,
Zhang Jun

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

2,050 次查看
karunanithiprat
Contributor II

Thank you so much.

0 项奖励
回复
2,050 次查看
karunanithiprat
Contributor II

Hi,

I can compile code but when i press debug . it showing the ROM is out of allocation and when i compile i cant get the output file (i.e.*.abs).

to get the *.abs file how to do compile.

Thanks,

0 项奖励
回复
2,050 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

You are welcome!


Have a great day,
Zhang Jun

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复