<br><font size=2 face="sans-serif">Well, I can't use this method because
I have a requirement that the application shall be linked at 0x4000'0000
... It'd  have quite an impact to change this.</font>
<br>
<br><font size=2 face="sans-serif">I think a solution would be to set the
stack pointer below my famous address before starting the execution of
the appli and since RTEMS takes the value of the sp to clear the workspace
that could work.</font>
<br>
<br><font size=2 face="sans-serif">Léonard.</font>
<br>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Aleix Conchillo Flaqué
<aconchillo@ice.csic.es></b> </font>
<br><font size=1 face="sans-serif">Envoyé par : aconchillo@gmail.com</font>
<p><font size=1 face="sans-serif">10.12.2009 15:16</font>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">A</font></div>
<td><font size=1 face="sans-serif">Leonard Bise <leonard.bise@syderal.ch></font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td><font size=1 face="sans-serif">"rtems-users@rtems.org" <rtems-users@rtems.org></font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Objet</font></div>
<td><font size=1 face="sans-serif">Re: Réf : Réf : Re: Réf : Re: Réf :
Re: Réf : Re: Init of the memory by RTEMS</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=3>Did you try to use the area on top of your application
(modifying the ORIGIN) as I mentioned in a previous mail?<br>
<br>
It works for me, and this way you are safe if you increase the RAM size
or your application needs more space.<br>
</font>
<br><font size=3>On Thu, Dec 10, 2009 at 14:53, Leonard Bise <</font><a href=mailto:leonard.bise@syderal.ch><font size=3 color=blue><u>leonard.bise@syderal.ch</u></font></a><font size=3>>
wrote:</font>
<br><font size=2 face="sans-serif"><br>
Actually using </font><font size=2 face="CMTT10">CONFIGURE_EXECUTIVE_RAM_WORK_AREA</font><font size=2 face="sans-serif">
does not change anything.</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
That's because in bsp_start function the following overwrites this value:</font><font size=3>
<br>
</font><font size=2 face="sans-serif"><br>
  work_space_start = (unsigned char *)rdb_start;</font><font size=3>
</font><font size=2 face="sans-serif"><br>
  work_space_start -= BSP_Configuration.work_space_size;</font><font size=3>
</font><font size=2 face="sans-serif"><br>
  BSP_Configuration.work_space_start = work_space_start;</font><font size=3>
<br>
</font><font size=2 face="sans-serif"><br>
rdb_start has the value 0x401F FFF0 which is the end of my RAM. rdb_start
is set in start.S like so : set        (SYM(rdb_start)),
%g6        ! End of work-space area  but I can't
seem to find when is the g6 register loaded...</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
Basically I don't see how to solve my problem because if in the linker
script I specify a RAM size smaller, the BSP ignores it and use rdb_start
instead which has the last address of my RAM but I don't know how it gets
it. Specifying a start addr using the  </font><font size=2 face="CMTT10">CONFIGURE_EXECUTIVE_RAM_WORK_AREA</font><font size=2 face="sans-serif">
define does not do anything either.</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
Is there any other possibility I'm missing there?</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
Léonard.</font><font size=3> <br>
<br>
<br>
</font>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Leonard Bise <</b></font><a href=mailto:leonard.bise@syderal.ch target=_blank><font size=1 color=blue face="sans-serif"><b><u>leonard.bise@syderal.ch</u></b></font></a><font size=1 face="sans-serif"><b>></b>
<br>
Envoyé par : </font><a href="mailto:rtems-users-bounces@rtems.org" target=_blank><font size=1 color=blue face="sans-serif"><u>rtems-users-bounces@rtems.org</u></font></a><font size=3>
</font>
<p><font size=1 face="sans-serif">10.12.2009 14:18</font><font size=3>
</font>
<td width=59%>
<br>
<table width=100%>
<tr valign=top>
<td width=7%>
<div align=right><font size=1 face="sans-serif">A</font></div>
<td width=92%><font size=1 face="sans-serif">Joel Sherrill <</font><a href=mailto:joel.sherrill@oarcorp.com target=_blank><font size=1 color=blue face="sans-serif"><u>joel.sherrill@oarcorp.com</u></font></a><font size=1 face="sans-serif">></font><font size=3>
</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td><font size=1 face="sans-serif">"</font><a href="mailto:rtems-users@rtems.org" target=_blank><font size=1 color=blue face="sans-serif"><u>rtems-users@rtems.org</u></font></a><font size=1 face="sans-serif">"
<</font><a href="mailto:rtems-users@rtems.org" target=_blank><font size=1 color=blue face="sans-serif"><u>rtems-users@rtems.org</u></font></a><font size=1 face="sans-serif">></font><font size=3>
</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Objet</font></div>
<td><font size=1 face="sans-serif">Réf : Re: Réf : Re: Réf : Re: Réf :
Re: Init of the memory by RTEMS</font></table>
<br>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br><font size=3><br>
<br>
</font><font size=2 face="sans-serif"><br>
<br>
After looking around I found exactly where the data is being cleared.</font><font size=3>
</font><font size=2 face="sans-serif"><br>
<br>
In function _Workspace_Handler_initialization, RTEMS clears the whole workspace.</font><font size=3>
</font><font size=2 face="sans-serif"><br>
This operation is controlled by a flag but it is always set to true so
there is no easy way around it.</font><font size=3> </font><font size=2 face="sans-serif"><br>
<br>
The start address for this operation is 0x</font><font size=2 face="CMTT10">401df7f0
and the size is 133120.</font><font size=3> </font><font size=2 face="CMTT10"><br>
<br>
I guess I can use CONFIGURE_EXECUTIVE_RAM_WORK_AREA to specify a start
address for the workspace that is not so close from the end of the RAM
and thus it won't clear all of it. Am I correct?</font><font size=3> </font><font size=2 face="CMTT10"><br>
<br>
Léonard.</font><font size=3> <br>
<br>
</font>
<table width=100%>
<tr valign=top>
<td width=31%><font size=1 face="sans-serif"><b>Joel Sherrill <</b></font><a href=mailto:joel.sherrill@oarcorp.com target=_blank><font size=1 color=blue face="sans-serif"><b><u>joel.sherrill@oarcorp.com</u></b></font></a><font size=1 face="sans-serif"><b>></b>
</font>
<p><font size=1 face="sans-serif">10.12.2009 13:15</font><font size=3>
</font>
<td width=68%>
<br>
<table width=100%>
<tr valign=top>
<td width=5%>
<div align=right><font size=1 face="sans-serif">A</font></div>
<td width=94%><font size=1 face="sans-serif">Leonard Bise <</font><a href=mailto:leonard.bise@syderal.ch target=_blank><font size=1 color=blue face="sans-serif"><u>leonard.bise@syderal.ch</u></font></a><font size=1 face="sans-serif">></font><font size=3>
</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td><font size=1 face="sans-serif">Aleix Conchillo Flaqué <</font><a href=mailto:aconchillo@ice.csic.es target=_blank><font size=1 color=blue face="sans-serif"><u>aconchillo@ice.csic.es</u></font></a><font size=1 face="sans-serif">>,
"</font><a href="mailto:rtems-users@rtems.org" target=_blank><font size=1 color=blue face="sans-serif"><u>rtems-users@rtems.org</u></font></a><font size=1 face="sans-serif">"
<</font><a href="mailto:rtems-users@rtems.org" target=_blank><font size=1 color=blue face="sans-serif"><u>rtems-users@rtems.org</u></font></a><font size=1 face="sans-serif">></font><font size=3>
</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Objet</font></div>
<td><font size=1 face="sans-serif">Re: Réf : Re: Réf : Re: Réf : Re: Init
of the memory by RTEMS</font></table>
<br><font size=3><br>
</font>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br><font size=3><br>
<br>
</font><tt><font size=2><br>
<br>
On 12/10/2009 01:37 AM, Leonard Bise wrote:<br>
><br>
> I tried this methode but surprinsingly the memory in this area STILL
<br>
> gets erased. I don't know by what  and it does not make any sense
either.<br>
><br>
> 401e0000 g       *ABS*        00000000
_RAM_END<br>
><br>
> That seems correct but something is STILL clearing that damn memory
!<br>
><br>
Are you doing a CPU reset?<br>
<br>
Do you have GRMON?  I think it clears memory also.<br>
> I'm seriously lost now..<br>
><br>
> Léonard.<br>
><br>
><br>
><br>
><br>
> *Joel Sherrill <</font></tt><a href=mailto:joel.sherrill@oarcorp.com target=_blank><tt><font size=2 color=blue><u>joel.sherrill@oarcorp.com</u></font></tt></a><tt><font size=2>>*<br>
><br>
> 09.12.2009 20:28<br>
><br>
>                  <br>
> A<br>
>                  Aleix
Conchillo Flaqué <</font></tt><a href=mailto:aconchillo@ice.csic.es target=_blank><tt><font size=2 color=blue><u>aconchillo@ice.csic.es</u></font></tt></a><tt><font size=2>><br>
> cc<br>
>                  Leonard
Bise <</font></tt><a href=mailto:leonard.bise@syderal.ch target=_blank><tt><font size=2 color=blue><u>leonard.bise@syderal.ch</u></font></tt></a><tt><font size=2>>,
"</font></tt><a href="mailto:rtems-users@rtems.org" target=_blank><tt><font size=2 color=blue><u>rtems-users@rtems.org</u></font></tt></a><tt><font size=2>"
<br>
> <</font></tt><a href="mailto:rtems-users@rtems.org" target=_blank><tt><font size=2 color=blue><u>rtems-users@rtems.org</u></font></tt></a><tt><font size=2>><br>
> Objet<br>
>                  Re:
Réf : Re: Réf : Re: Init of the memory by RTEMS<br>
><br>
><br>
><br>
>                  <br>
><br>
><br>
><br>
><br>
><br>
> On 12/09/2009 10:24 AM, Aleix Conchillo Flaqué wrote:<br>
> > Why don't you just change the start of your Application? For
example:<br>
> ><br>
> ><br>
> > MEMORY<br>
> > {<br>
> >   ram     : ORIGIN = 0x40020000, LENGTH = 2M -
128 K<br>
> > }<br>
> ><br>
> > RTEMS will not modify anything from 0x40000000 to 0x4001FFFF.<br>
> ><br>
> Or simply leave ORIGIN alone and subtract 128K from the LENGTH.<br>
> Either way works.  But you can't tell RTEMS about it. :)<br>
><br>
> --joel<br>
> ><br>
> > On Wed, Dec 9, 2009 at 14:26, Leonard Bise <</font></tt><a href=mailto:leonard.bise@syderal.ch target=_blank><tt><font size=2 color=blue><u>leonard.bise@syderal.ch</u></font></tt></a><tt><font size=2><br>
> > <</font></tt><a href=mailto:leonard.bise@syderal.ch target=_blank><tt><font size=2 color=blue><u>mailto:leonard.bise@syderal.ch>>
wrote:<br>
> ><br>
> ><br>
> >     Thanks for your answer Joel.<br>
> ><br>
> >     We are using the 4.6 version of RTEMS so I guess
the memory must<br>
> >     be cleared.<br>
> ><br>
> >     I already use a customized linkcmds file in this
application, to<br>
> >     specify various sections and other stuff.<br>
> ><br>
> >     Thats what I modified for my RAM size :<br>
> ><br>
> >     RAM_SIZE   = 2M ;<br>
> ><br>
> >     EEPROM_SIZe = 512K ;<br>
> ><br>
> >     PROM_SIZE        = 64K ;<br>
> ><br>
> >     RAM_END = RAM_START + RAM_SIZE;<br>
> ><br>
> >     MEMORY<br>
> >     {<br>
> >       rom     : ORIGIN = 0x00000000,
LENGTH = 64K<br>
> >       ram     : ORIGIN = 0x40000000,
LENGTH = 2M<br>
> >       eeprom  : ORIGIN = 0x60000000, LENGTH
= 512K<br>
> >     }<br>
> ><br>
> > >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.<br>
> ><br>
> >     How can I reserve memory ? I tried creating a section
like this :<br>
> ><br>
> >       sCCA_Main 0x401E7000: {<br>
> >         *(sCCA_Main)<br>
> >        } > ram<br>
> ><br>
> >     then my var in the code looks like this :<br>
> ><br>
> >     uint32 PkgHW_CCA_main __attribute__ (( section
( "sCCA_Main" ) ) ) ;<br>
> ><br>
> >     But this does not work, the data I place in 0x401E7000
before<br>
> >     starting execution of my RTEMS apps is overwritten
by 0.<br>
> >     Hope you can help.<br>
> ><br>
> >     Léonard.<br>
> ><br>
> ><br>
> ><br>
> ><br>
> >     *Joel Sherrill <joel.sherrill@oarcorp.com<br>
> > <</u></font></tt></a><a href=mailto:joel.sherrill@oarcorp.com target=_blank><tt><font size=2 color=blue><u>mailto:joel.sherrill@oarcorp.com>>*<br>
> ><br>
> >     09.12.2009 14:16<br>
> ><br>
> ><br>
> >     A<br>
> >                  
   Leonard Bise <leonard.bise@syderal.ch<br>
> > <</u></font></tt></a><a href=mailto:leonard.bise@syderal.ch target=_blank><tt><font size=2 color=blue><u>mailto:leonard.bise@syderal.ch>><br>
> >     cc<br>
> >                  
   Sebastian Huber <sebastian.huber@embedded-brains.de<br>
> > <</u></font></tt></a><a href="mailto:sebastian.huber@embedded-brains.de" target=_blank><tt><font size=2 color=blue><u>mailto:sebastian.huber@embedded-brains.de>>,<br>
> >     "rtems-users@rtems.org <</u></font></tt></a><a href="mailto:rtems-users@rtems.org" target=_blank><tt><font size=2 color=blue><u>mailto:rtems-users@rtems.org>"<br>
> > <rtems-users@rtems.org <</u></font></tt></a><a href="mailto:rtems-users@rtems.org" target=_blank><tt><font size=2 color=blue><u>mailto:rtems-users@rtems.org>><br>
> >     Objet<br>
> >                  
   Re: Réf : Re: Init of the memory by RTEMS<br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> >     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<br>
> >     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 <sebastian.huber@embedded-brains.de<br>
> > <</u></font></tt></a><a href="mailto:sebastian.huber@embedded-brains.de" target=_blank><tt><font size=2 color=blue><u>mailto:sebastian.huber@embedded-brains.de>>*<br>
> > ><br>
> > > 09.12.2009 11:31<br>
> > ><br>
> > ><br>
> > > A<br>
> > >                
 Leonard Bise <leonard.bise@syderal.ch<br>
> > <</u></font></tt></a><a href=mailto:leonard.bise@syderal.ch target=_blank><tt><font size=2 color=blue><u>mailto:leonard.bise@syderal.ch>><br>
> > > cc<br>
> > > rtems-users@rtems.org <</u></font></tt></a><a href="mailto:rtems-users@rtems.org" target=_blank><tt><font size=2 color=blue><u>mailto:rtems-users@rtems.org><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  : sebastian.huber@embedded-brains.de<br>
> > <</u></font></tt></a><a href="mailto:sebastian.huber@embedded-brains.de" target=_blank><tt><font size=2 color=blue><u>mailto:sebastian.huber@embedded-brains.de><br>
> > > PGP     : Public key available on request.<br>
> > ><br>
> > > Diese Nachricht ist keine geschäftliche Mitteilung im Sinne
des<br>
> >     EHUG.<br>
> > ><br>
> ><br>
> ><br>
> ><br>
> >     _______________________________________________<br>
> >     rtems-users mailing list<br>
> >     rtems-users@rtems.org <</u></font></tt></a><a href="mailto:rtems-users@rtems.org" target=_blank><tt><font size=2 color=blue><u>mailto:rtems-users@rtems.org><br>
> > </u></font></tt></a><a href="http://www.rtems.org/mailman/listinfo/rtems-users" target=_blank><tt><font size=2 color=blue><u>http://www.rtems.org/mailman/listinfo/rtems-users<br>
> ><br>
> ><br>
><br>
><br>
> -- <br>
> Joel Sherrill, Ph.D.             Director
of Research&  Development<br>
> joel.sherrill@OARcorp.com        On-Line Applications
Research<br>
> Ask me about RTEMS: a free RTOS  Huntsville AL 35805<br>
>    Support Available          
  (256) 722-9985<br>
><br>
><br>
></u></font></tt></a><font size=3><br>
</font><tt><font size=2><br>
_______________________________________________<br>
rtems-users mailing list</font></tt><tt><font size=2 color=blue><u><br>
</u></font></tt><a href="mailto:rtems-users@rtems.org" target=_blank><tt><font size=2 color=blue><u>rtems-users@rtems.org</u></font></tt></a><font size=3 color=blue><u><br>
</u></font><a href="http://www.rtems.org/mailman/listinfo/rtems-users" target=_blank><tt><font size=2 color=blue><u>http://www.rtems.org/mailman/listinfo/rtems-users</u></font></tt></a><font size=3><br>
<br>
<br>
_______________________________________________<br>
rtems-users mailing list</font><font size=3 color=blue><u><br>
</u></font><a href="mailto:rtems-users@rtems.org"><font size=3 color=blue><u>rtems-users@rtems.org</u></font></a><font size=3 color=blue><u><br>
</u></font><a href="http://www.rtems.org/mailman/listinfo/rtems-users" target=_blank><font size=3 color=blue><u>http://www.rtems.org/mailman/listinfo/rtems-users</u></font></a><font size=3><br>
</font>
<br>
<br>