 |
|
 |
MESC TOOL NEWS:
MESCT-NC30WA-980601D
|
NC30WA V.3.00 Release 1 Precaution
|
Mitsubishi requests that care should be exercised about problems that may occur in using C compiler NC30WA V.3.00 Release 1 (including Assembler AS30 and Integrated Tool Manager TM) for the M16C family of microcomputers.
On Bit Instructions
- Problem
Bit instructions are occasionally output within an area where they are not valid, so that assemble error "Value is out of range" will be generated.
- Conditions under Which Problem Occurs
This problem occurs when the following 3 conditions are satisfied:
- A variable is being bit-accessed
- The variable is the data defined with an argument or the #pragma ADDRESS directive
- The data of the argument crosses the boundary of FB offset 16, or the data of the #pragma ADDRESS directive crosses address 1FFFH
[Example]
#pragma ADDRESS bit 1FFEH
struct {
unsigned int i;
unsigned int b0:1;
unsigned int b1:15;
}bit;
struct tag{
long int l;
long int ll;
int lll;
unsigned int b0:15;
unsigned int b1:1;
};
func(struct tag argbit)
{
bit.b1=1;
argbit.b1=1;
}
- Workaround
Access the data concerned after assigning it once to a temporary variable declared to be of type auto.
NC30WA V.3.00 Release 1 Precaution MESCT-NC30WA-980601D
On Bit Fields of 4 Bits Wide
- Problem
Erroneous codes are output when accessing bit fields of 4 bits wide.
- Conditions under Which Problem Occurs
This problem occurs when the following 3 conditions are satisfied:
- A bit field of 4 bits wide is assigned to a variable
- The bit field has attribute far
- The variable to which the bit field of 4 bits wide is assigned is allocated to a register
- Workaround
After assigning a bit field of 4 bits wide once to a temporary variable declared to be of type auto, assign the bit field to the variable with the temporary variable.
|
 |