Skip to main content

Introduction to the VxWorks Kernel Shell

·320 words·2 mins
VxWorks Shell Kernel Development Debugging
Table of Contents
Free Training - This article is part of a series.
Part 14: This Article

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 modules
  • unldLib – Unload modules
  • shellLib – Shell command interpreter
  • usrLib – Built-in C functions
  • dbgLib – 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.

Free Training - This article is part of a series.
Part 14: This Article

Related

Configuring and Building VxWorks Projects: VSB, VIP, and Applications
·651 words·4 mins
VxWorks VSB VIP Workbench RTP DKM
VxWorks ROMFS: Read-Only Memory File System Explained
·330 words·2 mins
VxWorks ROMFS File System Workbench
Mastering the Vxprj Utility in VxWorks
·371 words·2 mins
VxWorks Vxprj CLI Workbench