Learning Objectives #
After completing this section, you will be able to:
- Explain the functionality of the VxWorks kernel shell
- Use basic cross-development commands
- Understand kernel shell features and resource considerations
The VxWorks kernel shell is a powerful tool for developing, debugging, and deploying projects. It provides interactive access to both the command and C interpreters, allowing developers to manipulate tasks, run functions, and debug code in real time.
Cross-Development Using the Kernel Shell #
The kernel shell allows direct execution of C code and shell commands. Example operations include:
# Download and link object files
ld < anagram.o
# Run functions
printf("hello\n")
# Spawn new tasks
sp(logMsg, "error\n")
# Debug code at the assembly level
b printf
# Display target state information
i
Using the kernel shell provides powerful project control and is especially helpful for iterative development and troubleshooting.
Kernel Shell Functionality #
Target-Field Tool Capabilities #
Target-field tools are essential for field maintenance and low-level debugging. Key benefits include:
- Early BSP and driver development before network initialization
- Debugging deployed systems over serial connections
- Developing and testing network protocols
- Loading kernel modules from target disk or network for interactive execution
- Providing built-in C functions (see
usrLib.c
) - Security support
- Telnet and rlogin access
Additional Kernel Shell Features #
- Compatibility with VxWorks 5.5 and 6.x
- Symbol completion for NFS, local, and PassFS file systems
- Session inactivity timeout
- Configurable shell line length
- Target-resident show functions for examining object information
Kernel Shell Resource Overhead #
Enabling the kernel shell increases kernel footprint as additional libraries and symbol tables reside on the target. Key libraries included are:
loadLib
– Load and manage modulesunldLib
– Unload modulesshellLib
– Shell command interpreterusrLib
– Built-in C functionsdbgLib
– Debugging utilities
Note: Ensure your target system has sufficient memory and resources to accommodate the additional footprint.
The kernel shell provides flexible and interactive project control, making it an indispensable tool for VxWorks developers.