From: Bernhard H. <ber...@be...> - 2003-05-11 17:47:12
|
AFAIK the contents of the internal RAM is undefined after a power up reset. Therefore all global or static variables must be initialized, even if they are zero and in IRAM. If the the whole IRAM is filled with $a5 by adding the line fill iram 0 0xff 0xa5 to uCsim.cmd, a lot of tests will fail. zeropad_storage_idata.c struct x { short a; char b[10]; }; struct x idata teststruct[3] = { { 10, { 1, 2, 3, 4, 5} }, { 20, { 11 } }, { 30, { 6, 7, 8} } }; The padbytes are not initialized to 0. bug-227710.c struct { unsigned char index; } s; s.index isn't initialized to 0. Please correct me, if I'm wrong. Otherwise I'll file a bug report. Bernhard |