how do I launch a CPP user application using usrAppinit with multi-downloadable projects. - VxWorks

This is a discussion on how do I launch a CPP user application using usrAppinit with multi-downloadable projects. - VxWorks ; I am trying to get my vxworks 5.5 to launch my user application using usrAppinit. My application is written in cpp. My project is setup in three parts Master, Project1, Project2. -Master is vxworks OS. Has usrAppinit.cpp -Project1 is downloadable ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: how do I launch a CPP user application using usrAppinit with multi-downloadable projects.

  1. how do I launch a CPP user application using usrAppinit with multi-downloadable projects.

    I am trying to get my vxworks 5.5 to launch my user application using
    usrAppinit. My application is written in cpp.

    My project is setup in three parts Master, Project1, Project2.
    -Master is vxworks OS.
    Has usrAppinit.cpp
    -Project1 is downloadable application module.
    Has foo.cpp and foo.h
    -Project2 is downloadable application module.
    Has goo.cpp and goo.h

    (this project setup is based on "Tornado User's guide (Windows
    Version) 2.2 section 4.2.3

    I made a demo application to show what i am trying to do...
    - MCI_Start() is the entry point
    -I renamed usrAppinit.c to usrAppinit.cpp
    -My code compiles
    -if i comment out MCI_Start() in usrAppinit.cpp, then the build takes
    place without problems, however when I insert MCI_Start() in
    usrAppinit.cpp, I get the following linker error.

    Thanks
    Pat

    /**********linker error start*************/
    ldppc -X -N -e _sysInit -Ttext 001A0000 \

    dataSegPad.o partialImage.o ctdt.o symTbl.o \

    -T C:\Tornado2.2\target\h\tool\gnu\ldscripts\link.RAM -o vxWorks

    partialImage.o: In function `usrAppInit':

    c:\delme\Master\default\..\usrAppInit.cpp:30: undefined reference to
    `MCI_Start'

    c:\delme\Master\default\..\usrAppInit.cpp:30: undefined reference to
    `MCI_Start'

    make: *** [vxWorks] Error 0x1



    Done.
    /**********linker error end*************/

    /************START CODE PASTE************/
    /**********usrAppinit.cpp***************/
    #include "foo.h"



    extern "C" void usrAppInit (void)

    {

    #ifdef USER_APPL_INIT

    USER_APPL_INIT; /* for backwards compatibility */

    #endif



    /* add application specific code here */



    MCI_Start();

    }
    /*****************foo.cpp*************/
    #include "foo.h"

    #include "goo.h"



    void MCI_Start(void)

    {

    Test2();

    }
    /*****************foo.h***************/
    //extern to the vxworks



    extern "C" void MCI_Start(void);
    /*****************goo.cpp*************/
    #include



    void Test2 (void)

    {

    cout << "\n";

    cout << "patrick\n";

    cout << "ouellette\n";

    }
    /*****************goo.h***************/
    void Test2 (void);

    /************END CODE PASTE**************/


  2. Re: how do I launch a CPP user application using usrAppinit with multi-downloadable projects.

    BTW,
    I'm using vxworks 5.5 under Tornado 2.2.1

    I was able to get this to link now (I think). At least now i do not
    see "undefined reference to 'MCI_Start' by doing the following...

    I added the following lines to the Master Build...
    .../../Project1/PPC604/Project1.pl
    .../../Project1/PPC604/Project1.pl
    in the 'Master build' -> 'Macros' -> 'EXTRA_MODULES'

    Pat


+ Reply to Thread