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

Array Initialization

Dear All:

I use a array in my program like this.

int a[256];

But I found that, at program start phase,
the system would initialize the array.
Because my program storage is small, and
it would take some time at power-on.
This would not be good for ASIC test.

Could someone give me a hint that how
to remove the array initilzation action()?

Best regards .....

  • the array as shown will not be initialized beyond the general RAM clear.

    erik

  • STARTUP.A51 contains the code that zeros out memory after reset. You could alter the file for your project to eliminate this initialization.

    Note that the C language spec requires that global variables without initializers be initialized to zero. (That's why the startup code does so.) Be sure that the other C code in your program does not rely on the system initializing everything to zero before removing the startup code.

    Non-zero C initializers are handled by the INIT.A51 code.

  • Because my program storage is small, and
    it would take some time at power-on.
    This would not be good for ASIC test.


    the time it takes is very limited, "discrete" initialization of even a few variables would take much longet.

    Erik