Init of the memory by RTEMS

Joel Sherrill joel.sherrill at OARcorp.com
Wed Dec 9 13:04:06 UTC 2009


On 12/09/2009 04:14 AM, Leonard Bise wrote:
>
> I have a question about the RTEMS init operations.
>
> I must be able to share one data word of information between to 
> application, one is the boot and this boot loads and execute another app.
> The second app shall be able to read a word of data that was put by 
> the boot to have a general view of the system status.
>
> I picked a random address near the end of the memory (0x401E7000, I 
> have 2M of RAM) and before exiting the boot I write data in there, but 
> I noticed that everytime the data in this address is set to 0.
>
> I then noticed I should be close to the stack/heap memory space, so I 
> tried several different addresses (0x40050000 to 0x40090000) but they 
> all get reset.
>
> So my question is, does RTEMS clear the whole memory before starting 
> the execution of the app, and if yes is it possible to stop it?
>
> Or is there any other solution to my problem?
The answer to your question depends upon the RTEMS version and
BSP.

Older RTEMS versions always cleared memory.  Newer RTEMS versions
do not always do so.

In general, the BSP/RTEMS/linkcmds knows about all of RAM and will
use it somehow.  It may be part of the RTEMS Workspace or C Program
Heap.  If you do not reserve the memory area out of the linkcmds, then
it is likely to be used for some other purpose and overwritten.

--joel
>
> Léonard. 




More information about the users mailing list