Search code examples
cheader-filesvxworks

VXWorks adding functions to header files


I'm trying to add my own function to jobQueueLib and step through the lines of code for that, or any of the functions there (which are all EXTERNs).

Stepping through the .h function call goes straight to assembly if I don't put #include <jobQueueLib.h>, which is referring to vxworks-6.9/target/h/wrn/coreip/jobQueueLib.h

With the include added, stepping into a same existing function causes a segmentation violation.

UPDATE: My issue is C, downloadable kernel module project build, or component related (even though I checked it is an included component in the VIP)--as I'm getting a warning at compile time that Module symbols cannot be resolved: jobQueueTerminate, or any other calls to any functions in that .h file (they're all EXTERNS).

Checking with the include statement removed, I still can't call any functions from vxworks-6.9/target/h/wrn/coreip/jobQueueLib.h so I think this is a project level include issue. Here are my DKM project includes (last one is redundant but I don't see a way to remove it):

includes

How do I get the symbols to resolve?


Solution

  • Finally got the flow to run a DKM with your own modified source code:

    Make the changes in whichever C files desire -> make a VSB and build it with that source code included -> make a VIP that's based off this VSB and build it -> use one of the ouput VXWorks binaries of this VIP and "connect to target simulator" -> make your DKM referenced from the VIP (DKM will be subproject of the VIP) -> finally, execute the DKM on the target connection made earlier!

    P.S. I'm using SIMLINUX do the VIP build is LINUX and I used the VXWorks Linux binary output from building the VIP.