Skip to main content

Introduction to the Kernel Shell

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

Learning Objectives
#

After this section you will be able to:

  • Describe the functionality of the VxWorks kernel shell
  • Use basic cross-development commands
  • Understand the kernel shell functionality

The kernel shell is a powerful tool that can be used for development, debugging, and deployment of a VxWorks project.

With the concept of the VxWorks kernel shell established, you will now learn how to development with it.

Cross Development Using the Kernel Shell
#

The kernel shell is able to use both the C interpreter and command interpreter. This allows you to write C code straight into the Shell and work with the commands provided.

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 is a powerful option in a VxWorks project. It provides functionality for making and maintaining your project.

The Kernel Shell Functionality
#

Target-Field Tool Functionality
#

The target-field tools are useful for field maintenance. These tools provide the following functionalities and benefits:

  • Ideal for early board support package (BSP) and driver development before the network is up
  • Useful for debugging a deployed system over a serial connection
  • Useful for developing and debugging network protocols
  • Can be used to load kernel modules from a target disk or over the network and run them interactively
  • Provide C functions as built-in commands (see usrLib.c)
  • Provide security
  • Support Telnet and rlogin access

Additional Functionality
#

The kernel shell provides a few other functionalities and features:

  • VxWork 5.5 and 6.x compatibility mode
  • Symbol completion, limited to some file systems (NFS, local, and PassFS)
  • Inactivity timeout of the shell session
  • Configurable shell line length
  • Target-resident show functions are also available to examine object information

Kernel Shell Resource Overhead
#

Adding the kernel shell requires adding additional code to the kernel build image and requires that the symbol table resides on the target you are connecting to. This will substantially increase the overall footprint of your project. This includes a collection of target-resident tool libraries:

  • loadLib
  • unldLib
  • shellLib
  • usrLib
  • dbgLib
Free Training - This article is part of a series.
Part 14: This Article

Related

Configuring and Building a Project
·1396 words·7 mins
VxWorks VSB VIP
Read Only Memory File System
·412 words·2 mins
VxWorks ROMFS
The Vxprj Utility
·307 words·2 mins
VxWorks Vxprj