Rtems for a space project

Chris Johns chrisj at rtems.org
Wed Jan 14 23:53:04 UTC 2009


Hi Massimo,

I have headed back to the start of the thread to see if we can correct the 
impression this thread may have made and to get you sorted out. I am sorry 
about the delay in getting something concrete to work with and to test with.

Massimo Tipaldi wrote:
> 
> In any case, it would have been nice to use RTEMS with a Windows host, 
> but it seems so far that it is not possible. Executable files compiled 
> on a Windows host are not compatible with the elf/multiboot 
> specifications (surely for what we have seen in the last weeks).
> 

This statement is incorrect. The tools work correctly and build for the pc586 
target correctly and further boot as a multiboot image with qemu.

> Moreover, it would be even nice to me
> 1) to write down this issue and to try to solve it in the next RTEMS 
> versions or,
> 2) if it is somehow already possible, to show the steps to generate a 
> RTEMS application on a Windows host in an ELF format.

I assume a correctly set up MinGW and MSYS with an updated M4. I then downloaded:

  http://www.rtems.org/ftp/pub/rtems/windows/4.9/build-5/rtems4.9-tools-5.exe

and ran it and installed the i386 tools. I then downloaded:

  http://www.rtems.org/ftp/pub/rtems/4.9.1/rtems-4.9.1.tar.bz2

then opened an RTEMS Tools window. I did this from the Start menu and the 
RTEMS 4.8 menu. There is an entry called RTEMS Tools. This is a specially set 
up Windows Command shell (cmd.exe). In the shell I ended up at:

  c:\opt\rtems-4.9

I then:

  cd ..
  mkdir src
  cd src
  mkdir rtems
  cd rtems
  mkdir 4.9
  cd 4.9
  tar jxf /c/downloads/rtems/rtems-4.9.1.tar.bz2

Please note you may need to vary the path to the RTEMS source code depending 
on where you downloaded it. I then configured, built and installed RTEMS:

  mkdir i386
  cd i386
  sh ../rtems-4.9.1/configure --target=i386-rtems4.9 --enable-rtemsbsp=pc586
  make
  make install

I then went to this page in the documentation:

http://www.rtems.org/onlinedocs/releases/rtemsdocs-4.9.1/share/rtems/html/started/started00063.html

and set the variable in the RTEMS Tools Windows Command shell:

  set RTEMS_MAKEFILE_PATH=c:\opt\rtems-4.9\i386-rtems4.9\pc586

I then download the examples:

  http://www.rtems.org/ftp/pub/rtems/4.9.1/examples-4.9.1.tar.bz2

unpacked them and built hello:

  mkdir examples
  tar jxf /c/downloads/rtems/examples-4.9.1.tar.bz2
  cd examples-4.9.1\hello_world_c
  make

This created a 'o-optimize\hello.exe' and I could run this with my qemu set up 
  detailed here:

  http://www.rtems.org/wiki/index.php/QEMU

Using the qemu.bat file and once at the grub prompt I entered:

  multiboot (hd0,0)/o-optimize/hello.exe
  boot

and hello world ran and completed.

Please try this and let me know how it goes.

Regards
Chris



More information about the users mailing list