[SOLVED] Not enough ROM problem in PIC16F series

Status
Not open for further replies.

Mithun_K_Das

Advanced Member level 3
Joined
Apr 24, 2010
Messages
899
Helped
24
Reputation
48
Reaction score
26
Trophy points
1,318
Location
Dhaka, Bangladesh, Bangladesh
Activity points
8,252
I was working with a code that was just taking 22% RAM and 25% ROM. It is very normal code. But if I add just a single line, it says not enough ROM. What is the solution of this?



 
Last edited:

Post the project (all files). I will try to fix it.
 

I solved it myself. Splitting a big function into several small functions. Now it is OK. Basically PIC16F series can't handle a function over 2000 instruction. Although it may consume very little RAM & ROM adding another line may cause RAM/ROM overloaded. Because linker can't handle that. So if a large function is split into several small functions then it is ok.
 
They should add a proper warning and not such a confusing message...
Did you post on mikroC forums?
 

yes, they should have a warning for this type of problem with their compiler. I'll request them to add this feature in there next update. And yes, I requested few thing before and they changed those things I requested earlier. They are responsive in this matter.

- - - Updated - - -

Requested. Hope they will add this feature in the next update.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…