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 CCS Technical Support

Compile...

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







Compile...
PostPosted: Wed May 25, 2005 9:19 am     Reply with quote

Hello with all, puvez you to explain me what want following the lines:

>>> Warning 203 "C:\GPL\SequentV3-0\Dev\sequentv3-0.c" Line 159(1,1): Condition always TRUE
>>> Warning 216 "C:\GPL\SequentV3-0\Dev\sequentv3-0.c" Line 780(0,1): Interrupts disabled during call to prevent re-entrancy: @DIV3232
>>> Warning 216 "C:\GPL\SequentV3-0\Dev\sequentv3-0.c" Line 780(0,1): Interrupts disabled during call to prevent re-entrancy: @PRINTF_X_57600_31766_31767
>>> Warning 216 "C:\GPL\SequentV3-0\Dev\sequentv3-0.c" Line 780(0,1): Interrupts disabled during call to prevent re-entrancy: @PRINTF_U_57600_31766_31767
>>> Warning 216 "C:\GPL\SequentV3-0\Dev\sequentv3-0.c" Line 780(0,1): Interrupts disabled during call to prevent re-entrancy: Lire_EEprom
>>> Warning 216 "C:\GPL\SequentV3-0\Dev\sequentv3-0.c" Line 780(0,1): Interrupts disabled during call to prevent re-entrancy: @delay_ms1


merci...

Alexou
Ttelmah
Guest







PostPosted: Wed May 25, 2005 9:34 am     Reply with quote

Big part of the answer is that you are doing a lot of stuff inside interrupts. Don't!.
You should try to keep interrupt handlers as short as possible, set flags, and do the main tasks in the main code. Firstly because while you are in an interrupt handler, all the other interrupts are disabled, and secondly because the processor does not have a 'stack' for normal use (as opposed to a 'call stack'). This makes it almost impossible to make code 'reentrant'. Hence if you use a funtion in an interrupt routine, then the same function outside, the compiler will disable interrupts in the external function, to prevent the function being called from inside itself if an interrupt occurs. The last five warnings all refer to this happening, and imply that your interrupt code is doing a lot of things that really it shouldn't. Long delays in an interrupt handler, should not be happening (delay_ms), 32bit arithmetic inside the handler takes a _long_ time, and use of a printf inside the handler, is asking for a lot of problems.
The first warning is nothing, provided this is what you want (a permanent loop).

Best Wishes
bfemmel



Joined: 18 Jul 2004
Posts: 40
Location: San Carlos, CA.

View user's profile Send private message Visit poster's website

PostPosted: Wed May 25, 2005 9:43 am     Reply with quote

Warning 203 tells you that a statement is always evaluated as TRUE. This warning is printed when the compiler has determined at compile time that a relational expression will never be false. This usually happens in the main loop where you have a statement like for example:
Code:

while (TRUE) {
}

You never intended the loop to exit but the compiler is just warning you that it won't.


Warning 216 usually happens when you call a routine from within an interrupt service routine. Doing this means that this routine could become reentrant if it was running at the time that the ISR that also calls it comes along so the compiler took precautions to guarentee that the situation does not happen.

- Bruce
bfemmel



Joined: 18 Jul 2004
Posts: 40
Location: San Carlos, CA.

View user's profile Send private message Visit poster's website

PostPosted: Wed May 25, 2005 9:49 am     Reply with quote

I forgot to add that you can turn off the Warnings if you don't want to see them. I like to do that sometimes to come up with a perfectly clean output file that doen't trip my editor to jump to some line after each compile. So in the case of Warning 203 you can do the following.
Code:

#IGNORE_WARNINGS 203
   while (TRUE) {
#IGNORE_WARNINGS NONE

This will tell the compiler to ignore that warning between the first ignore and the ignore NONE.

- Bruce
Guest








PostPosted: Thu May 26, 2005 8:03 am     Reply with quote

Thank you for your answers...
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Wed Apr 19, 2006 7:23 am     Reply with quote

You can also get warning 203 if you type

while (x=1)

when you mean

while (x==1)
_________________
The search for better is endless. Instead simply find very good and get the job done.
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