array initialization on CCS does not work properly? do u know why? - ahmadagha23 - May 11 8:41:17 2008
Hi;
I am working on C6416 DSK. In my source code I have initialized
global arrays with zero as follows:
array1[900]={0};
array2[6]={0};
But when I see the content of array2, I see that only the first
member is set to zero and other ones are not zero.
Another strong problem is that When I used external Emulator
(TDS510USB from Wintech Co.), the above initialization results in
setting all values of array1 to zero but only first 4 bytes of array2
to zero. When I change the order of array1 and array2 in my source
code it works properly. Is it the bug of compiler or emulator?
How can I set all values of my big arrays?
Regards
------------------------------------
OMAP35x EVM jump-starts low-power apps
------------------------------------
The modular and extensible OMAP35x Evaluation Module (EVM) enables developers to start building
applications based on the OMAP35x architecture:http://www.DSPRelated.com/omap35x

(You need to be a member of code-comp -- send a blank email to code-comp-subscribe@yahoogroups.com )
Re: array initialization on CCS does not work properly? do u know why? - Jeff Brower - May 11 13:29:54 2008
Ahmad-
> I am working on C6416 DSK. In my source code I have initialized
> global arrays with zero as follows:
> array1[900]={0};
> array2[6]={0};
The code line:
array2[6] = {0};
is supposed to be integer? Floating-point? Short? Long? What? I don't think people can
help you if you can't ask
a precise question.
-Jeff
> But when I see the content of array2, I see that only the first
> member is set to zero and other ones are not zero.
>
> Another strong problem is that When I used external Emulator
> (TDS510USB from Wintech Co.), the above initialization results in
> setting all values of array1 to zero but only first 4 bytes of array2
> to zero. When I change the order of array1 and array2 in my source
> code it works properly. Is it the bug of compiler or emulator?
> How can I set all values of my big arrays?
------------------------------------
OMAP35x EVM jump-starts low-power apps
------------------------------------
The modular and extensible OMAP35x Evaluation Module (EVM) enables developers to start building
applications based on the OMAP35x architecture:http://www.DSPRelated.com/omap35x

(You need to be a member of code-comp -- send a blank email to code-comp-subscribe@yahoogroups.com )