The VxWorks real-time operating system

vxworks rtos, vxworks tutorial, vxworks commands, vxworks reference

Application initialization.

Hi friends,

I am trying to make an application. I want my application to be
started as soon as the shell gets activated. That is it has to start
by itself rather than me giving the name at shell. For this which
configuration file did I have to change and where.

Thanks in advance.

With regards,

Rajneesh

posted by admin in Uncategorized and have Comments (6)

6 Responses to “Application initialization.”

  1. admin says:

    Dear Rajneesh:
        Have a look at usrConfig.c. In that file is a routine called usrRoot.
    The very last statement in that subroutine goes:

    #ifdef INCLUDE_USER_APPL
        /*Startup the users application*/
    USER_APPL_INIT /*must be a valid C statement of block */
    #endif

    This is the traditional place to put startup user code in a vxWorks image.
    What I usually do is to define USER_APPL_INIT in config.h and either add a
    subroutine call in place of USER_APPL_INIT in usrConfig.c or #define
    USER_APPL_INIT to be a function pointer.

    There are other ways, and some of them are more elegant with the GUI Tornado
    interface and I am sure someone else will comment on that nuance.

    Good Luck
    Charles

    "V R R Raju" <vxwo…@india.com> wrote in message
    news:d6e2de0a.0207121035.587fbd08@posting.google.com…

    - Hide quoted text — Show quoted text -

    > Hi friends,

    > I am trying to make an application. I want my application to be
    > started as soon as the shell gets activated. That is it has to start
    > by itself rather than me giving the name at shell. For this which
    > configuration file did I have to change and where.

    > Thanks in advance.

    > With regards,

    > Rajneesh

  2. admin says:

    Hello,

    If you are using Tornado & projects, check out section 4.4 in the
    Tornado User’s Guide: Creating a Bootable Application. That describes
    how to make the application run automatically at boot time from a
    project.

    For the command line/BSP oriented method, read this tech note:

    http://www.windriver.com/windsurf/appnotes/ide/tornado/t2/APN43/WTN43

    (you’ll need a WindSurf account to access this information).

    HTH,

    John…

    vxwo…@india.com (V R R Raju) wrote in message <news:d6e2de0a.0207121035.587fbd08@posting.google.com>…

    - Hide quoted text — Show quoted text -

    > Hi friends,

    > I am trying to make an application. I want my application to be
    > started as soon as the shell gets activated. That is it has to start
    > by itself rather than me giving the name at shell. For this which
    > configuration file did I have to change and where.

    > Thanks in advance.

    > With regards,

    > Rajneesh

  3. admin says:

    Hi,

    do the following
    1. create a bootable application
    2. include your main function (i.e the function name you will type in
    shell) in the file usrAppInit.c like that of the following assuming
    your application starts with the function main().

    void usrAppInit (void)
        {
    #ifdef  USER_APPL_INIT
            USER_APPL_INIT;         /* for backwards compatibility */
    #endif

     main();   /* add application specific code here */
        }

    then your app will be invoked automatically when ever you boot
    vxworks.

    with regards,
    Raja Ganesan G
    Datec Systems (P) Ltd.

    - Hide quoted text — Show quoted text -

    john_94…@yahoo.com (John) wrote in message <news:488e459a.0207121526.19a35c69@posting.google.com>…
    > Hello,

    > If you are using Tornado & projects, check out section 4.4 in the
    > Tornado User’s Guide: Creating a Bootable Application. That describes
    > how to make the application run automatically at boot time from a
    > project.

    > For the command line/BSP oriented method, read this tech note:

    > http://www.windriver.com/windsurf/appnotes/ide/tornado/t2/APN43/WTN43

    > (you’ll need a WindSurf account to access this information).

    > HTH,

    > John…

    > vxwo…@india.com (V R R Raju) wrote in message <news:d6e2de0a.0207121035.587fbd08@posting.google.com>…
    > > Hi friends,

    > > I am trying to make an application. I want my application to be
    > > started as soon as the shell gets activated. That is it has to start
    > > by itself rather than me giving the name at shell. For this which
    > > configuration file did I have to change and where.

    > > Thanks in advance.

    > > With regards,

    > > Rajneesh

  4. admin says:

    > void usrAppInit (void)
    >     {
    > #ifdef  USER_APPL_INIT
    >         USER_APPL_INIT;         /* for backwards compatibility */
    > #endif

    >  main();   /* add application specific code here */
    >     }

    main() …?

    are you sure it will work? EABI prohibits main as a application function
    name …

    dinker

    - Hide quoted text — Show quoted text -

    Raja Ganesan wrote:

    > Hi,

    > do the following
    > 1. create a bootable application
    > 2. include your main function (i.e the function name you will type in
    > shell) in the file usrAppInit.c like that of the following assuming
    > your application starts with the function main().

    > void usrAppInit (void)
    >     {
    > #ifdef  USER_APPL_INIT
    >         USER_APPL_INIT;         /* for backwards compatibility */
    > #endif

    >  main();   /* add application specific code here */
    >     }

    > then your app will be invoked automatically when ever you boot
    > vxworks.

    > with regards,
    > Raja Ganesan G
    > Datec Systems (P) Ltd.

    > john_94…@yahoo.com (John) wrote in message <news:488e459a.0207121526.19a35c69@posting.google.com>…
    > > Hello,

    > > If you are using Tornado & projects, check out section 4.4 in the
    > > Tornado User’s Guide: Creating a Bootable Application. That describes
    > > how to make the application run automatically at boot time from a
    > > project.

    > > For the command line/BSP oriented method, read this tech note:

    > > http://www.windriver.com/windsurf/appnotes/ide/tornado/t2/APN43/WTN43

    > > (you’ll need a WindSurf account to access this information).

    > > HTH,

    > > John…

    > > vxwo…@india.com (V R R Raju) wrote in message <news:d6e2de0a.0207121035.587fbd08@posting.google.com>…
    > > > Hi friends,

    > > > I am trying to make an application. I want my application to be
    > > > started as soon as the shell gets activated. That is it has to start
    > > > by itself rather than me giving the name at shell. For this which
    > > > configuration file did I have to change and where.

    > > > Thanks in advance.

    > > > With regards,

    > > > Rajneesh

  5. admin says:

    - Hide quoted text — Show quoted text -

    Dinker Charak wrote:
    > > void usrAppInit (void)
    > >     {
    > > #ifdef  USER_APPL_INIT
    > >         USER_APPL_INIT;         /* for backwards compatibility */
    > > #endif

    > >  main();   /* add application specific code here */
    > >     }

    > main() …?

    > are you sure it will work? EABI prohibits main as a application function
    > name …

    It will work if your main() function is inside a C language source file.  There may be problems if you put your
    main() function inside a C++ source file (which is probably why it is prohibited).

    David

    - Hide quoted text — Show quoted text -

    > dinker

    > Raja Ganesan wrote:

    > > Hi,

    > > do the following
    > > 1. create a bootable application
    > > 2. include your main function (i.e the function name you will type in
    > > shell) in the file usrAppInit.c like that of the following assuming
    > > your application starts with the function main().

    > > void usrAppInit (void)
    > >     {
    > > #ifdef  USER_APPL_INIT
    > >         USER_APPL_INIT;         /* for backwards compatibility */
    > > #endif

    > >  main();   /* add application specific code here */
    > >     }

    > > then your app will be invoked automatically when ever you boot
    > > vxworks.

    > > with regards,
    > > Raja Ganesan G
    > > Datec Systems (P) Ltd.

    > > john_94…@yahoo.com (John) wrote in message <news:488e459a.0207121526.19a35c69@posting.google.com>…
    > > > Hello,

    > > > If you are using Tornado & projects, check out section 4.4 in the
    > > > Tornado User’s Guide: Creating a Bootable Application. That describes
    > > > how to make the application run automatically at boot time from a
    > > > project.

    > > > For the command line/BSP oriented method, read this tech note:

    > > > http://www.windriver.com/windsurf/appnotes/ide/tornado/t2/APN43/WTN43

    > > > (you’ll need a WindSurf account to access this information).

    > > > HTH,

    > > > John…

    > > > vxwo…@india.com (V R R Raju) wrote in message <news:d6e2de0a.0207121035.587fbd08@posting.google.com>…
    > > > > Hi friends,

    > > > > I am trying to make an application. I want my application to be
    > > > > started as soon as the shell gets activated. That is it has to start
    > > > > by itself rather than me giving the name at shell. For this which
    > > > > configuration file did I have to change and where.

    > > > > Thanks in advance.

    > > > > With regards,

    > > > > Rajneesh

  6. admin says:

    Hi,

    I just showed that for example.

    what ever is your function name you just enter within usrAppInit
    routine and then compile.  like,
    void usrAppInit (void)
         {
    #ifdef  USER_APPL_INIT
             USER_APPL_INIT;         /* for backwards compatibility */
    #endif

      function_name();   /* add application specific code here */
        }

    Regards,
    Raja Ganesan G
    Datec Systems (P) Ltd.

    - Hide quoted text — Show quoted text -

    david lindauer <dlinda…@notifier-is.net> wrote in message <news:3D3868C7.27470484@notifier-is.net>…
    > Dinker Charak wrote:

    > > > void usrAppInit (void)
    > > >     {
    > > > #ifdef  USER_APPL_INIT
    > > >         USER_APPL_INIT;         /* for backwards compatibility */
    > > > #endif

    > > >  main();   /* add application specific code here */
    > > >     }

    > > main() …?

    > > are you sure it will work? EABI prohibits main as a application function
    > > name …

    > It will work if your main() function is inside a C language source file.  There may be problems if you put your
    > main() function inside a C++ source file (which is probably why it is prohibited).

    > David

    > > dinker

    > > Raja Ganesan wrote:

    > > > Hi,

    > > > do the following
    > > > 1. create a bootable application
    > > > 2. include your main function (i.e the function name you will type in
    > > > shell) in the file usrAppInit.c like that of the following assuming
    > > > your application starts with the function main().

    > > > void usrAppInit (void)
    > > >     {
    > > > #ifdef  USER_APPL_INIT
    > > >         USER_APPL_INIT;         /* for backwards compatibility */
    > > > #endif

    > > >  main();   /* add application specific code here */
    > > >     }

    > > > then your app will be invoked automatically when ever you boot
    > > > vxworks.

    > > > with regards,
    > > > Raja Ganesan G
    > > > Datec Systems (P) Ltd.

    > > > john_94…@yahoo.com (John) wrote in message <news:488e459a.0207121526.19a35c69@posting.google.com>…
    > > > > Hello,

    > > > > If you are using Tornado & projects, check out section 4.4 in the
    > > > > Tornado User’s Guide: Creating a Bootable Application. That describes
    > > > > how to make the application run automatically at boot time from a
    > > > > project.

    > > > > For the command line/BSP oriented method, read this tech note:

    > > > > http://www.windriver.com/windsurf/appnotes/ide/tornado/t2/APN43/WTN43

    > > > > (you’ll need a WindSurf account to access this information).

    > > > > HTH,

    > > > > John…

    > > > > vxwo…@india.com (V R R Raju) wrote in message <news:d6e2de0a.0207121035.587fbd08@posting.google.com>…
    > > > > > Hi friends,

    > > > > > I am trying to make an application. I want my application to be
    > > > > > started as soon as the shell gets activated. That is it has to start
    > > > > > by itself rather than me giving the name at shell. For this which
    > > > > > configuration file did I have to change and where.

    > > > > > Thanks in advance.

    > > > > > With regards,

    > > > > > Rajneesh