Getting version of rtems, and writing files

Peter Dufault dufault at
Thu Oct 17 17:22:08 UTC 2019

> On Oct 17, 2019, at 02:07 , Chris Johns <chrisj at> wrote:
> On 17/10/19 4:20 am, Shane Thomas wrote:
>> I had a question, I inherited a system that uses rtems
> Welcome.
>> and I am not sure how to
>> edit files on that system.   There is no vim or vi.  I telnet into them and then
>> get a message right away that says:
>> for help (which does't work) but help() does show some commands like
>> cat, pwd, home, mod = ld("filename")
> The cexp shell is a 3rd party shell package that is not formally part of RTEMS.
> A lot of people use it however I do not and do not know anything about it. Sorry.
>> etc...
>> but nothing that would let me edit files that are on that system.  Also no
>> ftp/sftp to let me edit locally and then move them to that system.   I am not
>> sure the version of rtems this is running even (not sure how to get that).
>> Signed up to this mailing list just to ask this question, not sure what
>> else/where else to look.
> I use the shell RTEMS provides in the cpukit/libmisc/shell directory and we have
> documented, see and click on the shell documents.
> To transfer files on to and off boards I set up a machine in the lab as an NFS
> server and then mount it in RTEMS using the mount command:
> $ cd /
> $ mkdir net
> $ mount -t nfs foo:/bar /net
> If I need to edit text files on a target I add the `edit` shell command. It is
> OK at performing small editing tasks on the target. Saving, exiting etc are
> mapped to function keys.
> I hope this helps.
> Chris
> _______________________________________________
> users mailing list
> users at

"cexpr()" originated at SLAC (Stanford Linear Accelerator) and is frequently used as part of the EPICS ( system.  "cexpr()" is a "C" language expression parser, for better or worse, so you can call any C function from the command line.  Be sure to include the decimal point (3.0 not 3) if you're passing a floating point!

The 'mod = ld("filename")' message shows it supports dynamic loading as well.

Typically you do not edit files on those systems.  Usually the will use NFS to mount remote file systems so that you can edit files on the host system.  Try 'lkup("mount")'

Are you sure there isn't an RTEMS version in the boot-up text?  I have access to an old system that uses "cexpr()" and it prints out the version:

   Welcome to rtems-4.7.1(PowerPC/PowerPC 7455/beatnik) ($Name: R_beatnik_20060214 )
   Build Date: Sat Sep 22 14:10:53 EDT 2007
   Board Type: MVME5500-0161 (S/N E1834D9)

Here's an example of using "cexpr()" to figure out the version on that system:

=====  In module 'SYSTEM' (0x01ad43d8) =====:
  0x20fa3c[     0]: VOID                          void        _RTEMS_version
  0x271028[     0]: VOID                          void        __fdlib_version
   0xdaf1c[     4]:                               long (*)()  _bfd_elf_slurp_version_tables

0x00000000 (0)
cexp_main>printf("%s\n",(char *)&_RTEMS_version)
rtems-4.7.1(PowerPC/PowerPC 7455/beatnik)
0x0000002a (42)

- Do you have the source?
- Can you say what the board support package and application are?

Peter Dufault
HD Associates, Inc.      Software and System Engineering

This email is delivered through the public internet using protocols subject to interception and tampering.

More information about the users mailing list