AnsweredAssumed Answered

21489 SPI boot and memory initialisation

Question asked by johnmca on Nov 5, 2012
Latest reply on Nov 9, 2012 by johnmca

Hi, we are developing a product with a sharc 21489. This will be booted via SPI using a host microprocessor. We are having some problems with memory initialisation - there appears to be a difference in behaviour when running the code via the HPUSB JTAG emulator or when it is booted via the SPI port.


I have some test code that contains static array initialisation e.g.


int MyArray[128] = {0};


If I run via JTAG, this array is set to zero (as is all the internal memory as far as I can see) but when booted via SPI, the array is uninitialised.


However if I change the code to read


int MyArray[128] = {0,1};


When booted via SPI the '1' element is initialised ok but the elements that should be zero remain uninitialised. Via JTAG everything is ok.


I have found that setting the 'runtime initialisation' option in the linker fixes this, however I would like to understand why the behaviour is different between JTAG and SPI without the 'runtime initialisation' option set.