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>
<br><div class="gmail_quote">On Thu, Dec 10, 2009 at 14:53, 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">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>
<br>
<br><font size="2" face="sans-serif">That's because in bsp_start function
the following overwrites this value:</font>
<br>
<br><font size="2" face="sans-serif"> work_space_start = (unsigned
char *)rdb_start;</font>
<br><font size="2" face="sans-serif"> work_space_start -= BSP_Configuration.work_space_size;</font>
<br><font size="2" face="sans-serif"> BSP_Configuration.work_space_start
= work_space_start;</font>
<br>
<br><font size="2" face="sans-serif">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>
<br>
<br><font size="2" face="sans-serif">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>
<br>
<br><font size="2" face="sans-serif">Is there any other possibility I'm missing
there?</font>
<br>
<br><font size="2" face="sans-serif">Léonard.</font>
<br>
<br>
<br>
<br>
<table width="100%">
<tbody><tr valign="top">
<td width="40%"><font size="1" face="sans-serif"><b>Leonard Bise <<a href="mailto:leonard.bise@syderal.ch" target="_blank">leonard.bise@syderal.ch</a>></b>
</font>
<br><font size="1" face="sans-serif">Envoyé par : <a href="mailto:rtems-users-bounces@rtems.org" target="_blank">rtems-users-bounces@rtems.org</a></font>
<p><font size="1" face="sans-serif">10.12.2009 14:18</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">Joel Sherrill <<a href="mailto:joel.sherrill@oarcorp.com" target="_blank">joel.sherrill@oarcorp.com</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">"<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">Réf : Re: Réf : Re: Réf : 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><font size="2" face="sans-serif"><br>
After looking around I found exactly where the data is being cleared.</font><font size="3">
<br>
</font><font size="2" face="sans-serif"><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"> <br>
</font><font size="2" face="sans-serif"><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"> <br>
</font><font size="2" face="CMTT10"><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"> <br>
</font><font size="2" face="CMTT10"><br>
Léonard.</font><font size="3"> <br>
<br>
<br>
</font>
<table width="100%">
<tbody><tr valign="top">
<td width="31%"><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">10.12.2009 13:15</font><font size="3">
</font>
</p></td><td width="68%">
<br>
<table width="100%">
<tbody><tr valign="top">
<td width="5%">
<div align="right"><font size="1" face="sans-serif">A</font></div>
</td><td width="94%"><font size="1" face="sans-serif">Leonard Bise <<a href="mailto:leonard.bise@syderal.ch" target="_blank">leonard.bise@syderal.ch</a>></font><font size="3">
</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">Aleix Conchillo Flaqué <<a href="mailto:aconchillo@ice.csic.es" target="_blank">aconchillo@ice.csic.es</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><font size="3">
</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: Réf : Re: Réf : Re: Init
of the memory by RTEMS</font></td></tr></tbody></table>
<br>
<br>
<table>
<tbody><tr valign="top">
<td>
</td><td></td></tr></tbody></table>
<br></td></tr></tbody></table>
<br><font size="3"><br>
<br>
</font><tt><font size="2"><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 <<a href="mailto:joel.sherrill@oarcorp.com" target="_blank">joel.sherrill@oarcorp.com</a>>*<br>
><br>
> 09.12.2009 20:28<br>
><br>
> <br>
> A<br>
> Aleix
Conchillo Flaqué <<a href="mailto:aconchillo@ice.csic.es" target="_blank">aconchillo@ice.csic.es</a>><br>
> cc<br>
> Leonard
Bise <<a href="mailto:leonard.bise@syderal.ch" target="_blank">leonard.bise@syderal.ch</a>>, "<a href="mailto:rtems-users@rtems.org" target="_blank">rtems-users@rtems.org</a>"
<br>
> <<a href="mailto:rtems-users@rtems.org" target="_blank">rtems-users@rtems.org</a>><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 <<a href="mailto:leonard.bise@syderal.ch" target="_blank">leonard.bise@syderal.ch</a><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>
><br>
</u></font></tt></a><font size="3"><br>
</font><tt><font size="2">_______________________________________________<br>
rtems-users mailing list<br>
<a href="mailto:rtems-users@rtems.org" target="_blank">rtems-users@rtems.org</a><br>
</font></tt><a href="http://www.rtems.org/mailman/listinfo/rtems-users" target="_blank"><tt><font size="2">http://www.rtems.org/mailman/listinfo/rtems-users<br>
</font></tt></a>
<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>