RTEMS with post-boot code.

Robin Kirkham Robin.Kirkham at mlb.dmt.csiro.au
Wed Oct 29 02:26:40 UTC 1997


On Tue, 28 Oct 1997, Jacob W Janovetz write:
>    Does the RTEMS build structure already support a system which 
> will allow the user to send processes to the board after it has
> been built?  In other words, say I have RTEMS compiled with a 
> simple monitor-like program.  After the board has booted to this
> program, I'd like to send another program to the board and run it.
> This other program should have access to all of RTEMS.
> ...
>    It gets down to wanting to send other programs to the board
> through a serial connection (or later, an ethernet connection).
> Then I can solidify my boot code and just write other application
> programs.

What you refer to is called dynamic linking, and is available on operating
systems similar in general design to RTEMS, such as vxWorks.

In this arrangement, you first boot the operating system, then load a
program as one or more relocatable object modules. The kernel dynamically
links them into the running executable (itself), performing all the relocation
fixups that the ordinary linker normally does. To work, the kernel must keep
its symbol table in memory, and add to it as new objects are loaded.

Such an arrangement is on the surface useful, and could presumeably be
implemented in RTEMS, with a fair deal of work. There are some general
problems, however:

    o what it you load the same module twice? Which one runs?
    o how do you "unload" modules? They could be still running!
    o precise version match between kernel and module is required,
      but tricky to enforce
    o etc

On the whole, having used vxWorks for many years, I find the RTEMS way of
bundling the application with whatever parts of an OS it requires into a
single executable unit is in many ways cleaner and easier. Maybe it's not
so good for repeated compile/test/debug cycles, but it is much better for
managing systems in the field. (It is also the traditional embedded systems
approach).

Cheers,

Robin Kirkham			CSIRO Manufacturing Science and Technology
Project Engineer		Locked Bag 9, Preston 3072, Australia
robin.kirkham at mlb.dmt.csiro.au	Phone: +61 3 9662-7756  Fax: +61 3 9662-7851



More information about the users mailing list