using "bare" bsp option
Joel Sherrill
joel.sherrill at OARcorp.com
Wed Aug 9 20:41:06 UTC 2000
Ahmet Akkas wrote:
>
> Hi everybody,
>
> Before I ask my question, I want to tell you what I had right now.
> I built the RTEMS using Lucent's tools (compiler, assmbler, etc.) for
> a Lucent's 16000 DSP processor. Right now I have not created any bsp
> for it but I used bare bsp option to build the RTEMS's kernel.
>
> My question is the following: Is bare bsp option sufficent to able to
> compile a simple application and put it into the Lucent's simulator?
No. The bare bsp has no io facilities, linker script, etc. Look
in a recent snapshot at i960sim, sim68000, or h8sim for very simple
BSPs. i960sim and h8sim use "magic" devices inside the simulator to
get console IO.
> I should point out two things at this level. First, I realized that
> the shared library (under the ../c/src/lib/libbsp/shared )is not compiled
> and added to the built RTEMS library. As you know this library has
> initialization and console routines. I am planning to compile the files
> in this directory and add them into built RTEMS libraries.
libbsp/shared is POTENTIALLY shared files. They are picked up via
VPATH in the BSPs that use them. You choose whether or not to use
them on a per BSP basis. Look at one of the 68k BSPs
startup/Makefile.am
and what how it uses VPATH to get some things from .,
libbsp/m68k/shared,
and libbsp/shared. :)
> Second, right now I am not sure how to handle crt0.o file. In the RTEMS
> documentation, it is said that startsim.o will be used instaed of crt0.o.
crt0.o is only really responsible for a handful of things:
+ zeroing uninitialized memory
+ setting up a stack
+ calling boot_card. Using arguments (0,0,&environ)
seems to work best overall.
+ (optional) copying initialized data from a ROM location
so you can rerun.
Again one of the simulators above is a good example.
> There is aslo crti.o file.
I think this is an artifact of the way gcc does some things on
some targets. If you are going to do C++, then you will have
to make the magic for global constructors happen with your
toolset -- but first, survive a context switch. :)
> Please let me know your suggestions. I really appreciate it.
Sounds like you are making progress. Has the C4x port in
the recent snapshots had any hints for another DSP port?
I would expect that by now you have a pile of comments for the
porting guide also. :)
> Thanks,
>
> Ahmet Akkas
--
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