CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

out of rom problem PIC 16F876

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Marco IW5EJM
Guest







out of rom problem PIC 16F876
PostPosted: Sun Apr 27, 2008 5:11 pm     Reply with quote

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.
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Sun Apr 27, 2008 6:04 pm     Reply with quote

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.
Marco IW5EJM
Guest







PostPosted: Mon Apr 28, 2008 2:12 am     Reply with quote

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.
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Mon Apr 28, 2008 7:40 am     Reply with quote

Quote:
I use 3.14V
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.
Guest








PostPosted: Mon May 05, 2008 8:15 am     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group