This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ARM IDE 5, cannot assign values to a static array!

Hello everybody!
Please help with such a problem. I try to create a static array of 8-bit values, but when I launch the program, for some reason, irrespective of which values I write, after startup the array has all the values nothing, but zeros. Here is the code:

This is how I state the array:

int main(void)
{
  static char string[10]={1,3,7,15,31,63,127,0,0,0};
...

After the program is launched, I look at the memory and see that the array has all the values set to zero.

Please help!

Parents
  • You'd want to review the scatter file or load regions, and how the startup.s is initializing the C runtime environment and statics, this is typically done by __main prior to calling your main() function.

    Make sure do you don't have any NOINIT sections.

Reply
  • You'd want to review the scatter file or load regions, and how the startup.s is initializing the C runtime environment and statics, this is typically done by __main prior to calling your main() function.

    Make sure do you don't have any NOINIT sections.

Children