drivervxworksbsp

vxWorks 6.9 Driver Development


I am dipping my toes in VxWorks driver development. My problem is that in my Kernel Configuration settings, I can search for my driver-component, but it is always greyed out and will not let me include it. When I right click it and select "check" it says "Undefined reference mydriver.o"

I read through the vxBus driver developer documentation and decided that I would test out the development flow by taking an already-existing/functioning driver and simply modify the file-name/function-name/print strings. I copied and modified the existing *.c, *.h, *.cdf, *.dc, *.dr as appropriate.

I also played around with putting the driver source files in the target/3rdparty directory as done for the "wrsample" driver.

I also tried to just throw in the correct #define statement in my config.h file to try and force the driver to be instantiated, but no luck.

Can anyone provide any help? It seems like I need to pre-build the driver source to generate a *.o file, but I'm not sure how to do this. I could not find a *.o file for the existing-driver that I modified...


Solution

  • Figured it out on my own. I did have to create a makefile and compile the source (in advance...before utilizing the driver in vxWorks). I used the makefile that was auto generated for my WindRiver Tornado as a template to create my driver makefile. I then created a batch file that calls the vxWorks make.

    The reason that there was no object file for the existing driver is because the objects get added to the driver library (*.a) and not just a *.o.

    All driver files exist in the target/3rdparty directory, but I did have to copy the *.cdf, and the *.h files into other directories to get it to work. I made this a step in my batch file.