View previous topic :: View next topic |
Author |
Message |
Marco IW5EJM Guest
|
out of rom problem PIC 16F876 |
Posted: Sun Apr 27, 2008 5:11 pm |
|
|
I'm going to recompile a source code used by another person before me. His project worked well (we got a hex file with ccs c compiler).
Now I've got from this person his C source code and I try to recompile, but I get this error: "Out of ROM, A segment or the program is too large"
I'm sorry, but I don't know where to put a #separate. Can you help me?
source code link http:/ / digilander.libero.it/discoroller/rotoreC.txt
heaeder link http:/ / digilander.libero.it/discoroller/rotoreH.txt
Many thanks,
Marco Niccolini. |
|
![](templates/subSilver/images/spacer.gif) |
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Sun Apr 27, 2008 6:04 pm |
|
|
I compiled it without problems in both v3.249 and v4.057.
What is your compiler version number?
Try changing the path to your include file. I never like the hard coded paths as it is easy to use an old header file. Best is to do it like: Code: | #include "rotore.h" | This way the header file from the same directory as the C-file is used.
Remember:
- Place the header name between '< >' and it will be loaded from the default library path.
- Set the header name between two double quotes " " and it will be loaded from the source directory. |
|
![](templates/subSilver/images/spacer.gif) |
Marco IW5EJM Guest
|
|
Posted: Mon Apr 28, 2008 2:12 am |
|
|
I use 3.14V
Eghm...I'm sorry...I posted a modified source code with a #separate before a function (rs 232 reading routine), but obviously so pic doesn't listen to rs232 port, because of this mod.
The right code is: http:/ / digilander.libero.it/discoroller/riprovaci.c
Many thanks again,
Marco. |
|
![](templates/subSilver/images/spacer.gif) |
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Mon Apr 28, 2008 7:40 am |
|
|
This is not a correct version number for the compiler. The compiler always has 3 digits after the dot. The number is a bit difficult to find, I always look at the top of the .lst file.
Quote: | The right code is: http:/ / digilander.libero.it/discoroller/riprovaci.c | What is the header file for this code?
I compiled it with rotore.h in v3.249 and had no problems. |
|
![](templates/subSilver/images/spacer.gif) |
Guest
|
|
Posted: Mon May 05, 2008 8:15 am |
|
|
Well...thank you!
I compiled the source code finally.
But there is another problem running software on the pic.
The rs232 reading routine doesn't work. It must listen to com port to receive data from pc, but it goes just one time. After the first data transfer the pic became deaf to rs 232.
Have you any ideas?
The finnaly project source dode and hex file:
http:/ / digilander.libero.it/discoroller/rotore/ultimo.h
http:/ / digilander.libero.it/discoroller/rotore/ultimo.c
http:/ / digilander.libero.it/discoroller/rotore/ultimo.hex |
|
![](templates/subSilver/images/spacer.gif) |
|