Why don't you just change the start of your Application? For example:<br><br><br><font size="2" face="Courier New">MEMORY</font>
<br><font size="2" face="Courier New">{</font>
<br><font size="2" face="Courier New"> ram : ORIGIN =
0x40020000, LENGTH = 2M</font>
- 128 K<br><font size="2" face="Courier New">}</font>
<br><br>RTEMS will not modify anything from <font size="2" face="Courier New">0x40000000 to </font><font size="2" face="Courier New">0x4001FFFF.<br></font><br><br><div class="gmail_quote">On Wed, Dec 9, 2009 at 14:26, Leonard Bise <span dir="ltr"><<a href="mailto:leonard.bise@syderal.ch">leonard.bise@syderal.ch</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><font size="2" face="sans-serif">Thanks for your answer Joel.</font>
<br>
<br><font size="2" face="sans-serif">We are using the 4.6 version of RTEMS
so I guess the memory must be cleared.</font>
<br>
<br><font size="2" face="sans-serif">I already use a customized linkcmds
file in this application, to specify various sections and other stuff.</font>
<br>
<br><font size="2" face="sans-serif">Thats what I modified for my RAM size
:</font>
<br>
<br><font size="2" face="Courier New">RAM_SIZE = 2M ;</font>
<br>
<br><font size="2" face="Courier New">EEPROM_SIZe = 512K ;</font>
<br>
<br><font size="2" face="Courier New">PROM_SIZE =
64K ;</font>
<br>
<br><font size="2" face="Courier New">RAM_END = RAM_START + RAM_SIZE;</font>
<br>
<br><font size="2" face="Courier New">MEMORY</font>
<br><font size="2" face="Courier New">{</font>
<br><font size="2" face="Courier New"> rom : ORIGIN =
0x00000000, LENGTH = 64K</font>
<br><font size="2" face="Courier New"> ram : ORIGIN =
0x40000000, LENGTH = 2M</font>
<br><font size="2" face="Courier New"> eeprom : ORIGIN = 0x60000000,
LENGTH = 512K</font>
<br><font size="2" face="Courier New">}</font>
<br>
<br><font size="2" face="sans-serif">></font><tt><font size="2">If you do
not reserve the memory area out of the linkcmds, then<br>
>it is likely to be used for some other purpose and overwritten.</font></tt>
<br>
<br><tt><font size="2">How can I reserve memory ? I tried creating a section
like this :</font></tt>
<br>
<br><font size="2" face="Courier New"> sCCA_Main 0x401E7000: {</font>
<br><font size="2" face="Courier New"> *(sCCA_Main)</font>
<br><font size="2" face="Courier New"> } > ram </font>
<br>
<br><tt><font size="2">then my var in the code looks like this :</font></tt>
<br>
<br><font size="2" face="Courier New">uint32 PkgHW_CCA_main __attribute__
(( section ( </font><font size="2" face="Courier New" color="#4200ff">"sCCA_Main"</font><font size="2" face="Courier New">
) ) ) ;</font>
<br>
<br><tt><font size="2">But this does not work, the data I place in 0x401E7000
before starting execution of my RTEMS apps is overwritten by 0.</font></tt>
<br><tt><font size="2">Hope you can help.</font></tt>
<br>
<br><tt><font size="2">Léonard.</font></tt>
<br>
<br>
<br>
<br>
<br>
<table width="100%">
<tbody><tr valign="top">
<td width="40%"><font size="1" face="sans-serif"><b>Joel Sherrill <<a href="mailto:joel.sherrill@oarcorp.com" target="_blank">joel.sherrill@oarcorp.com</a>></b>
</font>
<p><font size="1" face="sans-serif">09.12.2009 14:16</font>
</p></td><td width="59%">
<table width="100%">
<tbody><tr valign="top">
<td>
<div align="right"><font size="1" face="sans-serif">A</font></div>
</td><td><font size="1" face="sans-serif">Leonard Bise <<a href="mailto:leonard.bise@syderal.ch" target="_blank">leonard.bise@syderal.ch</a>></font>
</td></tr><tr valign="top">
<td>
<div align="right"><font size="1" face="sans-serif">cc</font></div>
</td><td><font size="1" face="sans-serif">Sebastian Huber <<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a>>,
"<a href="mailto:rtems-users@rtems.org" target="_blank">rtems-users@rtems.org</a>" <<a href="mailto:rtems-users@rtems.org" target="_blank">rtems-users@rtems.org</a>></font>
</td></tr><tr valign="top">
<td>
<div align="right"><font size="1" face="sans-serif">Objet</font></div>
</td><td><font size="1" face="sans-serif">Re: Réf : Re: Init of the memory by
RTEMS</font></td></tr></tbody></table>
<br>
<table>
<tbody><tr valign="top">
<td>
</td><td></td></tr></tbody></table>
<br></td></tr></tbody></table>
<br>
<br>
<br><tt><font size="2">On 12/09/2009 06:41 AM, Leonard Bise wrote:<br>
><br>
> I forgot to mention it.<br>
><br>
> I'm using RTEMS for the LEON2 platform.<br>
><br>
Version?<br>
> Also I'm not too sure how to know the address of the workspace or
heap?<br>
><br>
They are next to each other and the linkcmds and symbol<br>
table from your application should give the information.<br>
<br>
Where did you override the RAM size? The linkcmds<br>
has this:<br>
<br>
MEMORY<br>
{<br>
rom : ORIGIN = 0x00000000, LENGTH = 256M<br>
ram : ORIGIN = 0x40000000, LENGTH = 1024M<br>
}<br>
<br>
And the start.S zeroes out the BSS from "_edata"<br>
to "_end".<br>
<br>
The addresses you mentioned will be part of the<br>
unused memory from after the bss until the end of ram<br>
and since you didn't tell the linkcmds or RTEMS about them,<br>
they will be put in either the Workspace or C Program Heap<br>
and used by something.<br>
<br>
<br>
<br>
--joel<br>
<br>
> Léonard.<br>
><br>
><br>
><br>
> *Sebastian Huber <<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a>>*<br>
><br>
> 09.12.2009 11:31<br>
><br>
> <br>
> A<br>
> Leonard
Bise <<a href="mailto:leonard.bise@syderal.ch" target="_blank">leonard.bise@syderal.ch</a>><br>
> cc<br>
> <a href="mailto:rtems-users@rtems.org" target="_blank">rtems-users@rtems.org</a><br>
> Objet<br>
> Re:
Init of the memory by RTEMS<br>
><br>
><br>
><br>
> <br>
><br>
><br>
><br>
><br>
><br>
> Hi,<br>
><br>
> which BSP do you use? Is the memory address 0x401E7000 part of the
<br>
> workspace or<br>
> heap?<br>
><br>
> CU<br>
><br>
> -- <br>
> Sebastian Huber, embedded brains GmbH<br>
><br>
> Address : Obere Lagerstr. 30, D-82178 Puchheim, Germany<br>
> Phone : +49 89 18 90 80 79-6<br>
> Fax : +49 89 18 90 80 79-9<br>
> E-Mail : <a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a><br>
> PGP : Public key available on request.<br>
><br>
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.<br>
><br>
<br>
</font></tt>
<br><br>_______________________________________________<br>
rtems-users mailing list<br>
<a href="mailto:rtems-users@rtems.org">rtems-users@rtems.org</a><br>
<a href="http://www.rtems.org/mailman/listinfo/rtems-users" target="_blank">http://www.rtems.org/mailman/listinfo/rtems-users</a><br>
<br></blockquote></div><br>