"Building a VxWorks Downloadable Kernel Module"
Disclaimer: This is an inital attempt at these instructions, please feel free to point out inconsistances, inacuracies, typos etc. [ahmadjee@gmail.com]
One asks Why?? Well, this is the method you will use o build all the different projects you will do in the labs and probably for the project. According to the Wind River documentation:
"You can separately build the modules, then run and debug them on a target running VxWorks, loading, unloading, and reloading on the fly. Once your development work is complete, the modules can be statically linked into the kernel or added to a file system if one is present. "
Basically it means, it saves you time ti build the entire vxWorks kernel every time you make a change. Once you are comfortable with your project, you basically include it in your vxWorks image. This method also allows sharing of a single target among different students (to a certain extent).
In the following example, you will build task_two.c file and then load it on the simulator built earlier.
1. Click on File->New->VxWorks Downloadable Kernel Module Project
2. In the Project Wizard Window, pick a folder name where your project files will be saved. By default this will create another directory inside the workspace directory but feel free to browse and save it else where. Click Next.
3. In the 'Build Specs' wizard window, make sure you pick the 'Active Build Spec' you used to build the kernel. In our case it was GNU.
4. Use default settings under the 'Build Setup Default' and 'Build Support' wizard windows by clicking Next.
5. Under 'Build Target' wizard window, make sure 'Linker' is selected. This will allow you to download the module to the kernel.
6. For the 'Static Analysis' wizard window, use defaults and click Finish. Your new project should apear in the project navigator window, as shown below:
7. Go to the source folder for examples and download the task_two.c file and save it in the folder you made for this module. In this example, that will be under WindRiver\workspace\Two_Task_Module folder. Then Right click on the project under the Project Navigator and click Build Project. Note that the task_two.c file automatically gets added to the project and builds.
Note: There are other ways, which I found more painful, to add files to a project. If you find a more convinient way, please shre it with the rest of the class. The only thing that comes close to this is: right click your project (Two_Task_Module) in the Project Navigator, then clicking New, and then File.
8. Notice in the above image there is a Two_Task_Module.out file. Right click on it and select download from the menu, as shown below:
9. In the pop up window box that apears, click OK and the file will be downloaded to the target kernel selected. In this case SIMNT.
You can now use moduleShow and lkup on the target shell.