<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style></head>
<body>
<body><p dir="ltr">-DXXX on the linker command line overrides the defaults</p><div class="quote">On Nov 29, 2013 7:30 PM, Gedare Bloom <gedare@rtems.org> wrote:<br type="attribution"></div></body>
<font size="2"><div class="PlainText">Does the NGMP allow for variant sizes of ROM and RAM? If so will we<br>
provide separate BSP variants for all possibilities, or how does the<br>
user select the right size for their board?<br>
<br>
On Fri, Nov 29, 2013 at 8:20 AM, Sebastian Huber<br>
<sebastian.huber@embedded-brains.de> wrote:<br>
> Hello,<br>
><br>
> most SPARC BSPs use current the following linker provided symbols to specify<br>
> the memory layout:<br>
><br>
> _PROM_SIZE = DEFINED (_PROM_SIZE) ? _PROM_SIZE : 2M;<br>
> _PROM_START = DEFINED (_PROM_START) ? _PROM_START : 0x00000000;<br>
><br>
> _RAM_SIZE = DEFINED (_RAM_SIZE) ? _RAM_SIZE : 4M;<br>
> _RAM_START = DEFINED (_RAM_START) ? _RAM_START : 0x40000000;<br>
><br>
> So it is possible to define them as command line parameters. There are two<br>
> problems with this approach.<br>
><br>
> Firstly start address must be consistent with the memory area definition.<br>
> Due to this reason the NGMP linker command file looks like this:<br>
><br>
> _PROM_SIZE = DEFINED (_PROM_SIZE) ? _PROM_SIZE : 0;<br>
> _RAM_SIZE = DEFINED (_RAM_SIZE) ? _RAM_SIZE : 64M;<br>
><br>
> MEMORY {<br>
> rom : ORIGIN = 0xC0000000, LENGTH = 256M<br>
> ram : ORIGIN = 0x00000000, LENGTH = 2048M<br>
> sram : ORIGIN = 0xD0000000, LENGTH = 256M<br>
> }<br>
><br>
> _PROM_START = ORIGIN (rom);<br>
> _RAM_START = ORIGIN (ram);<br>
><br>
> INCLUDE linkcmds.base<br>
><br>
> Secondly the size symbols don't allow region overflow checks by the linker.<br>
><br>
> A better approach would be to remove the ability to define these symbols on<br>
> the command line and use a memory map definition via memory regions only.<br>
> For the NGMP as an example this would look like:<br>
><br>
> MEMORY {<br>
> rom : ORIGIN = 0xC0000000, LENGTH = 8M<br>
> ram : ORIGIN = 0x00000000, LENGTH = 64M<br>
> }<br>
><br>
> INCLUDE linkcmds.base<br>
><br>
> This change makes it necessary to adopt user Makefiles to this new approach.<br>
><br>
> --<br>
> Sebastian Huber, embedded brains GmbH<br>
><br>
> Address : Dornierstr. 4, D-82178 Puchheim, Germany<br>
> Phone : +49 89 189 47 41-16<br>
> Fax : +49 89 189 47 41-09<br>
> E-Mail : sebastian.huber@embedded-brains.de<br>
> PGP : Public key available on request.<br>
><br>
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.<br>
> _______________________________________________<br>
> rtems-devel mailing list<br>
> rtems-devel@rtems.org<br>
> <a href="http://www.rtems.org/mailman/listinfo/rtems-devel">http://www.rtems.org/mailman/listinfo/rtems-devel</a><br>
<br>
_______________________________________________<br>
rtems-devel mailing list<br>
rtems-devel@rtems.org<br>
<a href="http://www.rtems.org/mailman/listinfo/rtems-devel">http://www.rtems.org/mailman/listinfo/rtems-devel</a><br>
</div></font>
</body>
</html>