Renesas Technology, Tools FAQs
Last Updated: December 20, 2001
Document Number: 01120506_e
Q.
To execute a source compile on the M3T-NC30WA, I treat the enumerator by the generated code modifying option "-fCE" as an
unsigned char type, rather than int type. However, when I reference the enumerator type variable with the M3T-PD30 (display by
moving the mouse curser to the variable), it displays the form in 16 bits instead. Why?
A.
The enumerator type variables are treated as 2-byte variables by the M3T-PD30. Even if you specify the enumerator as a 1-byte
variable in the compiler, the enumerator type variable will be displayed in 2 bytes. However, you can reference the variable
correctly by casting and registering it in the C-watch window, as done in the program below.
[Example Program]
----------------------------------
typedef enum eTag {
ENUM0=0,
ENUM1,
ENUM2,
...
} ENUMTYPE;
ENUMTYPE enEnum;
----------------------------------
[Example of Registration in C Watch Window]
----------------------------------
(eTag)(unsigned char)enEnum
----------------------------------
When registering in the C watch window, make sure you cast with [enumerator tag (shown as "eTag" above)]. Do not cast with the
type you declared in typedef.
For more details, please refer to MAEC TOOL NEWS "PD32RSIM, PD308SIM, PD30SIM, PD79SIM, PD77SIM, PD38SIM,
PD32000, PD32R, PD308, PD30, PD79, PD77, PD38, PD308M, and PD30M Precautions" issued on August 1, 2001.
Top of Page | Back to Previous Page
Terms of Use Privacy Policy
(C)2004 Renesas Technology Corp., All Rights Reserved.
Comentários a estes Manuais