View previous topic :: View next topic |
Author |
Message |
beetS
Joined: 02 Apr 2008 Posts: 1
|
out of ROM , 16F877 .... |
Posted: Wed Apr 02, 2008 7:27 am |
|
|
I have the compilation error , error 71 out of rom as said in the topic.
The problem is that when i use the same program, the same ICD module, and the same card with the same pic at school, this error doesnt appear.
My question is : why when i try to compile the program at home have i this error?
I took the CCS config file, from my school post and the error still... |
|
|
Matro Guest
|
|
Posted: Wed Apr 02, 2008 7:42 am |
|
|
Post your preprocessor lines, i.e. all lines beginning with #, that you are using.
Matro |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed Apr 02, 2008 9:36 am |
|
|
Quote: | why when i try to compile the program at home have i this error?
|
If everything else is the same except for the compiler, it probably means
you're using the demo compiler at home. The demo is limited to 2K ROM:
http://www.ccsinfo.com/demopoll.php |
|
|
Fred8 Guest
|
|
Posted: Mon May 05, 2008 9:33 am |
|
|
Hello,
I have the same problem of error 71 "out of rom segment : MAIN".
I have a main sub (24% of memory on my 16F877A : 8192b) and an interrupt sub routine (app 5% of ROM).
When I insert a call to a function in the interrupt sub (#INT_RB), the error appears. If I put this function into the main, the error does not appear anymore. If I add more functions, delays or others in the main loop, no memory problem, even in excess of 2k !!!
I need to run a program in the interrupts, so I which I will understand...
If you have ideas, I'm your man !
Thanks |
|
|
Matro Guest
|
|
Posted: Mon May 05, 2008 9:40 am |
|
|
Post a small compilable code that demonstrates the problem (with all preprocessor directives).
Do you use #ORG instructions?
What is your compiler version?
Matro |
|
|
Fred8 Guest
|
|
Posted: Mon May 05, 2008 11:05 am |
|
|
No, I don't use #ORG.
My compiler version is V4.057.
My MpLab version is 8.01 (using IDE for my ICD2).
My OS is Win XP SP2.
My age is 29 (maybe not the most important).
I tried to compact my code, but the error disapears...(my code is not very "compact" : about 2k of ROM, and it needs some files and libraries).
I develop a trigger with a delayed output (interrupt on an input, output on a pin and on another with a delay from 0.1 to 5000ms. The delay is adjustable by the user via 3 push-buttons and a 2x16 LCD.
In the main : the init, splash screen, and that's all.
In the interrupt routine, the delay, and I wish, a screen with the system state.
The problem is that when I introduced a function like lcd_gotoxy(x,y) in this interrupt routine, the compiler say me the code is out of space.
I can place this function in the main, and have no problem. |
|
|
Matro Guest
|
|
Posted: Mon May 05, 2008 11:10 am |
|
|
Try to add "#separate" just before the declaration of the function "lcd_gotoxy()"
Matro |
|
|
Fred8 Guest
|
|
Posted: Mon May 05, 2008 1:35 pm |
|
|
Same result...
May it be a problem of memory allocation (stack / heap)?
A compiler issue? |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
Matro Guest
|
|
Posted: Tue May 06, 2008 1:20 am |
|
|
You can eventually copy-paste here the .err file.
Matro |
|
|
Fred8 Guest
|
|
Posted: Fri May 09, 2008 5:01 am |
|
|
OK, many thanks for the command line, the solution was here ! |
|
|
|