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

Impossible to add code

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



Joined: 29 Dec 2003
Posts: 4

View user's profile Send private message

Impossible to add code
PostPosted: Sun Jun 06, 2004 12:46 am     Reply with quote

Hello to all,

I have next problem - I work with pic16c63, CCS compiler, after copilation of the program I see next parameters of RAM, ROM,Stack in *.lst file:

MPASM

CCS PCW C Compiler, Version 2.656, 3813

Filename: C:\PROJECTS\RDA-4_~1\1RDA-4~1\RDA4MAIN.LST

ROM used: 2044 (50%)
2044 (50%) including unused fragments
RAM used: 93 (48%) at main() level
113 (59%) worst case
Stack: 5 worst case (3 in main + 2 for interrupts)

If I add 2 line of code (for example, a = 0;) then all right, but if I add 3 same lines (a = 0) then I receive error - "Stack Overflow has occured" - I don't have time to exit from interrupts (RS232) and occur again interrupt plus interrupt.. - ERROR.
Not importance if this line of code execute in while(1) all time or execute rarely (if definite conditions executed).What happens? Why I can't add code?

Please help me..
Thank you very much
_________________
Anna
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Jun 06, 2004 3:53 pm     Reply with quote

Quote:
CCS PCW C Compiler, Version 2.656, 3813
16C63


The 16C63 makes me wonder if you have a very old version
of the demo. You can download a newer version here:
http://www.ccsinfo.com/demo.shtml

It still only works with 2K max program size.
Guest








PostPosted: Sun Jun 06, 2004 11:32 pm     Reply with quote

PCM programmer wrote:
Quote:
CCS PCW C Compiler, Version 2.656, 3813
16C63


The 16C63 makes me wonder if you have a very old version
of the demo. You can download a newer version here:
http://www.ccsinfo.com/demo.shtml

It still only works with 2K max program size.




Thank you about answer.

This version of CCS is not demo version, but may be version of the copiler what I use has limits? Where I will read about this?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Jun 07, 2004 1:03 am     Reply with quote

Quote:
I don't have time to exit from interrupts (RS232) and occur again interrupt plus interrupt

Are you re-enabling global interrupts inside your int_rda function ?
Something like this:

#int_rda
void int_rda_isr(void)
{
char c;
c = getc();

enable_interrupts(GLOBAL); // <- DON'T DO THIS !!!!
}

If you're doing that, it's very bad. The CCS PCM compiler does not
support nested interrupts. You must not re-enable Global interrupts
when inside an interrupt function.
Anna



Joined: 29 Dec 2003
Posts: 4

View user's profile Send private message

All problem fihished
PostPosted: Mon Jun 07, 2004 5:56 am     Reply with quote

PCM programmer wrote:
Quote:
I don't have time to exit from interrupts (RS232) and occur again interrupt plus interrupt

Are you re-enabling global interrupts inside your int_rda function ?
Something like this:

#int_rda
void int_rda_isr(void)
{
char c;
c = getc();

enable_interrupts(GLOBAL); // <- DON'T DO THIS !!!!
}

If you're doing that, it's very bad. The CCS PCM compiler does not
support nested interrupts. You must not re-enable Global interrupts
when inside an interrupt function.


Thank you for answer, all problem go away after I used CCS Compiler v3.173 , I think problem was in compiler - old and limit size code.
_________________
Anna
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