Dynamic load real-time tasks

Joel Sherrill joel at rtems.org
Mon Jun 26 15:03:56 UTC 2017


On Mon, Jun 26, 2017 at 3:34 AM, Павел Жданов <paul.alex.zhdanov at gmail.com>
wrote:

> Hello everyone.
>
> I'm interested in dynamic loading and have the following situation:
>
>    1. There are two files init.c and dl.c.
>    2. dl.с defines rtems_main function . This function just print some
>    string using printf fuction. It complied to dl.o but not linked against
>    standard libraries so printf symbol is unresolved.
>    3. I want to load dl.o from init.с and use rtems_main function (with
>    dl_open and so on). Final init.exe is linked against standard libraries so
>    it has printf symbol resolved.
>    4. dl.o is loaded from the dos partition.
>    5. At the moment a can load dl.o and call rtems_main only if it
>    doesn't use printf or functions from other libraries.
>
> My questions are:
>
>    1. Is this scenario possible?
>    2. How to link dl.o with init.exe to resolve printf (and may be other
>    functions that are used by rtems_main and resolved in init.exe)?
>
> The general "trick" is to figure out which common methods/symbols should
be
in the base image onto which dl.o is loaded. Chris may have other tricks but
I would start with the "--undefined" argument to ld and add symbols.

Otherwise, each dl object will end up with pieces of the C library linked
into it
and you have to manage the dependencies.


> Platfrom: i386, pc486. I tried to use rtems-ld and i386-rtems4.11-ld but
> could not resolve necessary symbols.
>

Beyond the libdl supporting you architecture, it shouldn't matter but good
to know.

--joel


>
> Best regards,
> Pavel Zhdanov.
>
> С уважением, Жданов Павел.
>
> On Wed, May 3, 2017 at 1:24 PM, Павел Жданов <paul.alex.zhdanov at gmail.com>
> wrote:
>
>> Hi.
>> Really, is it possible to load tasks dynamically in runtime? I'm
>> interested in software updating. So far I think that final executable file
>> in RTEMS is monolithic image. It's big and it's take a lot of time to
>> upload it via serial port. If it's not modular then I can't upload new task
>> and start it. Can you suggest some methods that can be used to update RTEMS
>> task at runtime? For example update some of its functions using the dynamic
>> linker (dlopen, ...).
>>
>> Best regards,
>> Pavel Zhdanov
>>
>> С уважением, Жданов Павел.
>>
>> On Wed, Apr 5, 2017 at 10:22 AM, xuelin.tian at qkmtech.com <
>> xuelin.tian at qkmtech.com> wrote:
>>
>>> Dear all,
>>> Can I load real-time tasks using real-time loader?
>>> In my opinion, loading real-time tasks means that I can append my own
>>> application tasks to the interrupt ISR, and this task can be invoked based
>>> on a predefined frequency.
>>> In VxWorks, I need to disable interrupt first, using sysAuxClkDisable,
>>> and enable this interrupt after install my application tasks.
>>> Do we have the same mechanism in RTEMS?
>>>
>>> ------------------------------
>>> Best wishes,
>>> xuelin.tian at qkmtech.com
>>>
>>> _______________________________________________
>>> users mailing list
>>> users at rtems.org
>>> http://lists.rtems.org/mailman/listinfo/users
>>>
>>
>>
>
> _______________________________________________
> users mailing list
> users at rtems.org
> http://lists.rtems.org/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20170626/e1199d5a/attachment-0002.html>


More information about the users mailing list