View previous topic :: View next topic |
Author |
Message |
alexou Guest
|
Compile... |
Posted: Wed May 25, 2005 9:19 am |
|
|
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
|
|
Posted: Wed May 25, 2005 9:34 am |
|
|
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.
|
|
Posted: Wed May 25, 2005 9:43 am |
|
|
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:
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.
|
|
Posted: Wed May 25, 2005 9:49 am |
|
|
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
|
|
Posted: Thu May 26, 2005 8:03 am |
|
|
Thank you for your answers... |
|
|
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Wed Apr 19, 2006 7:23 am |
|
|
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. |
|
|
|