<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><span>>I did wonder if this was the approach. It does still seem a little fragile.<br></span></div><div><span><font class="Apple-style-span" size="3">yes it's fragile. Because of this i'm finding better way.</font></span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><span><br></span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; ">>Is this to occur without RTEMS restarting ?</div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; ">Yes, without restarting.</div><div style="font-family: 'times new roman', 'new
 york', times, serif; font-size: 12pt; "><br>>Where is the code to manage this located and what happens with the heap.</div><div><font class="Apple-style-span" size="3">this code is located in main task (the task what starting and manage all another tasks). About heap. In the simple examples everything okay. Maybe i should rewrite the heap manager to </font>consider<font class="Apple-style-span" size="3"> the memory "segmentation". </font><br><blockquote style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; border-left-width: 2px; border-left-style: solid; border-left-color: rgb(16, 16, 255); margin-left: 5px; padding-left: 5px; "><div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "><div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "><font size="2" face="Arial"><hr size="1"><b><span style="font-weight:bold;">From:</span></b> Chris Johns
 <chrisj@rtems.org><br><b><span style="font-weight: bold;">To:</span></b> Oleg Moroz <oleg_moroz@yahoo.com><br><b><span style="font-weight: bold;">Cc:</span></b> Rtems <rtems-users@rtems.org><br><b><span style="font-weight: bold;">Sent:</span></b> Monday, September 26, 2011 12:23 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: Отв.: Shared library link<br></font><br>On 26/09/11 5:05 PM, Oleg Moroz wrote:<br>> Thanks for answer. Sorry for my english.<br><br>I understand. I will attempt to clearly state any assumptions on my part.<br><br>><br>>  >What happens when the size of the code changes ?<br>><br>> I'm developing my application with memory "segmentation". I mean:<br>><br>> 0x40000000<br>> --------------<br>> main task<br>> --------------<br>><br>> 0x40001000 (for example)<br>> -------------<br>> second task<br>> -------------<br>><br>> 0x40002000<br>>
 -------------<br>> third task<br>> -------------<br>><br>> 0x4000f000<br>> ------------<br>> functions like printf() and other common functions and data<br>> ------------<br>><br>><br>> 0x40001000-0x40000000 > sizeof(main task)<br>> 0x40002000-0x40001000 > sizeof(second task)<br>> ......<br>><br>> I mean what i must manually locate all of this tasks in memory, and<br>> allocate memory "segment" for every task.<br><br>I did wonder if this was the approach. It does still seem a little fragile.<br><br>> It will be doing by main task<br>> that could load task code from EEPROM. I'm trying to create mechanism to<br>> dynamicallyloading and unloading tasks like it did in usual OSes with<br>> processes.<br><br>Is this to occur without RTEMS restarting ?<br><br>Where is the code to manage this located and what happens with the heap.<br><br>> This mechanism need not be universally. It only for
 this<br>> project now.<br><br>Understood.<br><br>><br>>>I suggest you take a look at:<br>>><br>>><a href="http://www.rtems.org/ftp/pub/rtems/people/chrisj/rtl/" target="_blank">http://www.rtems.org/ftp/pub/rtems/people/chrisj/rtl/</a><br>><br>> Thanks. Now i'm downloading archive from this directory, and will see<br>> what is it.<br>><br><br>Please remember there is another package which is a host linker to be <br>uploaded. It is a C++ application with classes to manage some of what I <br>suspect you are attempting to do. It is a work in progress and I wish to <br>change some parts.<br><br>><br>>>In the traditional definition dynamic and static libraries are not the<br>> same type of code. They can varying depending on the specific method<br>> used by the operating system. As Joel stated RTEMS is a single address<br>> space or processes and will not support the Unix<br>>>(ELF) shared library
 model. It adds overhead for no gain. Given this I<br>> am not sure I understand your sentence. For example have you built<br>> shared RTEMS libraries (the tools will let you do this) and static<br>> libraries and are you attempting to mix the results ?<br>><br>> I will try.<br><br>I would not. Any shared code with RTEMS requires -PIC code as per Linux.<br><br>Chris<br><br><br></div></div></blockquote></div></div></body></html>