RTEMS Version

Joel Sherrill joel.sherrill at OARcorp.com
Mon Jun 26 14:36:28 UTC 2000


William Meadows wrote:
> 
> Is there a standard way to determine which version is installed on your
> machine?

There is a version string in the librtemsall.a library.  This
string should also be in the file 
<INSTALL_POINT>/<BSP>/include/rtems/sptables.h.

It is of the form:

  "RTEMS RELEASE " RTEMS_VERSION
     "(" CPU_NAME "/" CPU_MODEL_NAME "/@RTEMS_BSP@)";

You can also call uname() and print the provided information
doing something like this when POSIX is enabled.

#include <stdio.h>
#include <assert.h>
#include <sys/utsname.h>

void print_info()
{
  struct utsname  uts;
  int             status;

  status = uname( &uts );
  assert( !status );
  printf( "Init: uts.sysname: %s\n", uts.sysname );
  printf( "Init: uts.nodename: %s\n", uts.nodename );
  printf( "Init: uts.release: %s\n", uts.release );
  printf( "Init: uts.version: %s\n", uts.version );
  printf( "Init: uts.machine: %s\n", uts.machine );
  puts("");
}

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985



More information about the users mailing list