RTEMS-SS-20011017 Snapshot Available
Joel Sherrill
joel.sherrill at OARcorp.com
Thu Oct 18 18:01:58 UTC 2001
Rosimildo daSilva wrote:
>
> From: Joel Sherrill <joel.sherrill at OARcorp.com>
> To: Rosimildo daSilva <rdasilva at connecttel.com>
> Cc: rtems-users at OARcorp.com <rtems-users at OARcorp.com>
> Date: Thursday, October 18, 2001 12:08 PM
> Subject: Re: RTEMS-SS-20011017 Snapshot Available
>
> >Rosimildo daSilva wrote:
> >>
> >> From: Joel Sherrill <joel.sherrill at OARcorp.com>
> >> To: rtems-users at OARcorp.com <rtems-users at OARcorp.com>;
> >> rtems-snapshots at OARcorp.com <rtems-snapshots at OARcorp.com>
> >> Date: Thursday, October 18, 2001 10:53 AM
> >> Subject: RTEMS-SS-20011017 Snapshot Available
> >>
> >> >Content-Type: text/plain; charset=us-ascii
> >> >Content-Transfer-Encoding: 7bit
> >> >X-UIDL: 49fb161aabe3747f4e982107d3db1dd9
> >> >
> >> >18 October 2001
> >> >
> >> >The 20011017 snapshot has a number of modifications including:
> >> >
> >> > + C++ constructors now called by 1st task to execute.
> >>
> >> Is this the main's ?
> >
> >Could be.. or it could be Init(). The code runs in the
> >RTEMS _Thread_Handler() and does the CTORs before invoking
> >the entry point for the first task to execute.
>
> Ok.
>
> >> > + main() is now in user space and a default configuration
> >> > is in librtemsall.a. Together these mean that the
> >> > classic hello world program can be linked and should run
> >> > ignoring object format conversions needed to download.
> >>
> >> Cool. This means that:
> >>
> >> int main()
> >> {
> >> printf( "hello from RTEMS\n" );
> >> return 0;
> >> }
> >>
> >> should compile and run !!!!.
> >
> >Yep. I tested this on the sparc simulator and the following
> >command (from memory) produces a directly useable (simple)
> >executable.
> >
> >sparc-rtems-gcc -B/opt/rtems/sparc-rtems/erc32/lib/ -specs \
> > bsp_specs -qrtems hello.c -o hello.exe
> >
> >sparc-rtems-gdb hello.exe
> >(gdb) tar sim
> >(gdb) load
> >(gdb) run
> >
> >:)
>
> Super cool.
I am glad to hear you say that. Given all the code you
have ported, would this type of thing have helped?
I think it would be neat if each BSP had a wrapper script
that hid that complicated invocation as "sparc-rtems-sis-gcc"
of sis-gcc or something. You would similarly need some
other wrappers (g++) and a script to convert a native
ELF/COFF file into a downloadable image. This might
be another step to simplifying *.cfg out of existence.
> >> What needs to be done to everwrite the default config ?
> >
> >Just use confdefs.h or write your own and use the same names.
> >The default is generated using confdefs.h like this:
> >
> >/* configuration information */
> >
> >#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
> >#define CONFIGURE_MAXIMUM_TASKS 10
> >#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
> >#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20
> >#define CONFIGURE_INIT_TASK_ENTRY_POINT (void *)main
> >
> >#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
> >#define CONFIGURE_INIT
> >
> >#include <confdefs.h>
> >
> >Note that it isn't perfect because we are not passing
> >arguments to main().
>
> it is going to be perfect for the majority of the users. :-)
That is nice to hear. I want the default configuration
to be good enough to run gcc's test suites.
> Rosimildo.
>
>
--
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