RTEMS-SS-20011017 Snapshot Available
Rosimildo daSilva
rdasilva at connecttel.com
Thu Oct 18 18:05:12 UTC 2001
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.
>> 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. :-)
Rosimildo.
More information about the users
mailing list