Technical information

Operating Precautions for CPDW9X/NT-CDR-V85X, Y-GHS-MULTI-V800
TM
Customer Notification r20tu0003ed1812 85
No. a77
Volatile Initializer forgotten
Version Information
V4.0.5, V4.0.7, V4.0.7a, V4.2.3
Details:
The compiler may ‘forget’ to initialize structure members, if both of the compiler options
“–pack=1” and “-misalign_pack” are used.
Example:
typedef volatile struct
{
volatile unsigned short X;
} mytype;
unsigned char buffer[256];
void main(void)
.text
.align 2
.globl _main
_main:
{
mytype *foo;
foo = (mytype *)buffer;
movea sdaoff(_buffer),gp,r2
foo->X = 1234;
foo->X = 5678;
movea 5678,zero,r10
st.h r10,0[r2]
Command Line
Ccv850e cpu=v850e Ospace -pack=1 -misalign_pack
Workaround
1. Use latest compiler CPDW9XNT-CDR-V85X-V424 or
2. ptach update CPDW9XNT-CDR-V85X-V424-PATCH01 available at
http://www.renesas.eu/updates?id=443