This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[OMAP3503] Problem with global declaration in emulator

Other Parts Discussed in Thread: OMAP3503

Hi all

    Presently we are working on omap3503 evm(3530).

1 when i declare the global variables in simulator its automatically initialized to zero(default).but i worked in emulator for the same code it is initialized to some garbage  values,for this i am doing memset(),so cpu cycles are wasting here.

  can you please tell me the reason and any alternatives  or i want to do any compiler settings?

I am waiting for your valuable reply.

Thanks & regards

sureshkumar c v .

 

  • sureshkumar said:

    when i declare the global variables in simulator its automatically initialized to zero(default).but i worked in emulator for the same code it is initialized to some garbage  values,for this i am doing memset(),so cpu cycles are wasting here.

      can you please tell me the reason and any alternatives  or i want to do any compiler settings?

    When you are working with the emulator and a real target board, this is different than a simulation environment.  On real target hardware, things like DRAM or SRAM do not initialize to any specific value.  This is why you see garbage data values.

    Regardless, the C compiler/linker implements functionality like the C run-time environment initialization routines, or explicit calls to memset, both require CPU cycles to initialize memory.