 |
|
 |
MESC TOOL NEWS:
MESCT-NC79WA_2-990801D
|
NC79WA and NC77WA Precautions
|
Please take note of the following problem in using C compilers (with assembler and integrated development environment) NC79WA for the 7900 series and NC77WA for the 7700 series of microcomputers.
- Product Types and Versions Concerned
- NC79WA (NC79): V.2.00 Release 1 to V.3.10 Release 2
- NC77WA (NC77): V.3.00 Release 1 to V.5.10 Release 1
- Problem
When an interrupt is generated during the execution of standard library function "longjmp", the stack environment established by standard library function "setjmp" may not be recovered.
- Workaround
Disable any interrupt request during the execution of standard library function "longjmp".
- Example of C Source File
------------------------------------------------------------------------
| #include <setjmp.h>
| jmp_buf ErrEnv;
|
| void func(void)
| {
| :
| if(error condition){
| asm( " sei" ); <-- Set I flag
| longjmp( ErrEnv, err_code );
| asm( " cli" ); <-- Clear I flag
| }
| :
| }
|
------------------------------------------------------------------------
- Schedule of Fixing Problem
We plan to fix this problem in our next release such a way that any interrupt is disabled during the execution of standard library function "longjmp".
|
 |