RTEMS Q.

Geoffroy Montel g_montel at yahoo.com
Fri Jul 3 13:20:54 UTC 1998


Hi,

> I am new to RTEMS and I have several questions about it.
Welcome!

> I am using my linux-i586 to produce code for m68k which
> will run on embedded 68008 board. I went through asm 
> code step by step to find out where RTEMS starts.
 
> As you might know m68k boards (without using VBR) have
> vector table and first entry in the table is SSP and second is
> RESET vector thus I was looking for code that would be
> compiled to address 0x00000000 and would contain
> vector table. But all I could find was crt0 in newlib and
> start.s (I think) in RTEMS which contain startup code
> and entry point but no vector table.
> 
> I also looked through several BSPs with no success.
> 
> My questions are :
> 
> - does linker produce appropriate RTEMS vector table
> and jumps to entry point without my intervention,
> does this depends on file format produced?
The linkcmds (a script file passed to the linker) has to reserve some
room in your .bss section for the vector table. You can find the
linkcmds
in the BSP
Then the board initialisation code will assign the VBR register to 
the start of the vector table in RAM.
To put the vector table in 0x0, you just have to tell the linker, with
the linkcmds, that the RAM begins at address 0x0, and that the VBR is
the first thing you'll find in RAM.
I don't know if it depends on the file format produced, I don't think so
At least it should work even for coff or a.out format

> - i would like to produce code that would have
> .text and .data in ROM and .bss in RAM, how do I
> produce pure binary code for my ROM that I can simply
> burn to EPROM and what is common practise to do
> this in embedded systems?
You have to use the linkcmds again :)
You can tell the linker where the different sections should go
For instance,
 1. you put the RAM in 0x0
 2. you put the ROM in 0x10000000
and then you assign CS0 to 0x0 (if CS0 controls the RAM chip) and CS1
to 0x10000000 (if CS1 controls the ROM chip) in the board
initialisation code

> - after I (that'll be tha day) successfuly compile RTEMS what
> form does it takes? Is it a library that I simply link with my
> projects or what? Which are the files that I receive as
> results?
RTEMS consists of a library you link with your program. The resulting
form
is an executable which format is the one you specified in the linkcmds

> - i am using original gcc and have problems with
> ctype.h and stdio.h, are there any problems if I 
> use egcs instead?
No problem, the very-soon-to-be-released version of RTEMS needs egcs

> - I tried to compile RTEMS 3.6.0 unix (linux) emulator
> and almost succed, there were some problems with
> conflicting definitions for __open and __seek inside
> my system defined fcntl.h and RTEMS libio.h which
> I solved using conditional compilation but still
> the compilation ends because of libc problems
> (RTEMS cannot find initialization routine for libc).
Wait for the newest version or ask joel at oarcorp.com

> - How do I tell RTEMS to use Cygnus Newlib library
> and header files instead of my linux ones?
RTEMS 4.0 uses Cygnus Newlib :)

> - Does RTEMS come with its own little libc
> (I saw some .c files) there or are those files just
> wrappers to libc or newlib?
No, it just patches Cygnus Newlib

> - Are there simpler packs for specific platforms
> avaliable? I would kill for motorola 68k dev tools
> binaries and compiled main (not BSP dependent)
> RTEMS parts with GNU debugger support.
dunno

Hope it helps, check the GNU LD documentation for more details about 
linkcmds syntax.

Best regards,

Geoffroy

_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com




More information about the users mailing list