Example how to call regular int main() from rtems

Joel Sherrill joel.sherrill at oarcorp.com
Fri Nov 24 13:37:13 UTC 2006


Johnny Willemsen wrote:
> Hi,
>
> I have a question, I am porting ACE/TAO to rtems at this moment. I have been
> able to build the ACE library with its tests, but now I want to run some of
> the tests. The tests have all been written in a way that there is a regular
> "int main (int, char*[])" as starting point. I want to have this function as
> starting point on rtems? Has someone an example how to accomplish this? I
> have an rtems_init.c file to have network configuration and other settings,
> but this is a c-file, the main() is in a C++ file.
>
>   
Two ways:

 + Have the default Init() task call main().

Preferred if you need to initialize things at run-time (like networking) 
and setup argc, argv.

 + Override the name of the Init task like this:

#define CONFIGURE_INIT_TASK_ENTRY_POINT main

It will have 0 for argc and no other defined arguments.

> Johnny
>
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.com
> http://rtems.rtems.org/mailman/listinfo/rtems-users
>   




More information about the users mailing list