Quite often during development, you may need to rebuild a part of the VxWorks kernel for instance a driver or a part of the boot code, to add more debug or to make a change to the source code. Rather than making the change and waiting hours for the whole thing to recompile, the use of VSB_DIR will allow any source file to be recompiled easily.
Building for UP (Single Processor)
For example, to build a src file from a VxWorks development shell for a X86 target, modify the file and then cd into the directory. In this example, we are also adding debug to the image (for a gnu target).
cd C:/WindRiver/vxworks-6.9/target/src/boot (or whatever) make CPU=PENTIUM4 ADDED_CFLAGS+="-g -O0" TOOL=gnu VSB_DIR=<MY-VSB>
Then rebuild your VxWorks Image Project and you should have the updated kernel src.
For a diab build use
cd C:/WindRiver/vxworks-6.9/target/src/boot (or whatever) make CPU=PENTIUM4 ADDED_CFLAGS+="-g -Xoptimized-debug-off" TOOL=gnu VSB_DIR=<MY-VSB>
This works on VxWorks 6 and VxWorks 7, so long as you have built your own VxWorks Source Build (VSB).
Build for SMP (Symmetric Multi Processing)
There are two possible types of library in VxWorks : UP Single Processor and SMP Multi Processor. The above builds for UP, to build for SMP merely add VXBUILD=SMP
make CPU=PENTIUM4 ADDED_CFLAGS+="-g -O0" TOOL=gnu VSB_DIR=<MY-VSB> VXBUILD=SMP
Build a VSB layer in VxWorks 7
The above VSB_DIR command wont work if you are building a ui layer for example.
This will work instead:
cd C:/WindRiver/workspace/your_VSB_project vxprj vsb build FBDEV
To list the layers:
vxprj vsb listAll