RTEMS-SS-20011017 Snapshot Available
Joel Sherrill
joel.sherrill at OARcorp.com
Thu Oct 18 16:21:48 UTC 2001
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.
> > + 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
:)
> 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().
> 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