Skip to main content

Kernel Shell Configuration and Commands

·467 words·3 mins
VxWorks Shell
Table of Contents
Free Training - This article is part of a series.
Part 16: This Article

Learning Objectives
#

After this section you will be able to:

  • Use the help feature of the kernel shell
  • Configure a kernel shell session

Kernel Shell Help Command
#

The kernel shell can be complicated. If you forget how to use a command, or what commands exist, you can use the help command.

Help Commands
#

Type help in the kernel shell for this list:

Help Commands

Additional Help Topics
#

Use these commands for other help topics:

  • dbgHelp - Print debugger help info
  • edrHelp - Print ED&R help info
  • ioHelp - Print I/O utilities help info
  • nfsHelp - Print nfs help info
  • netHelp - Print network help info
  • rtpHelp - Print process help info
  • spyHelp - Print task histogrammer help info
  • timexHelp - Print execution timer help info

With that knowledge, it’s time to learn about the kernel shell configuration.

Kernel Shell Configuration
#

The kernel shell is not included by default. Like many other features you will need to add it to your VIP. This is to keep the initial project overhead low by not adding extra features that you might not want or need.

There are two ways to add the shell to your VIP: through the GUI or the CLI. Both require including the networked kernel shell or standalone kernel shell bundle. Here is how to add them:

The GUI Path
#

Kernel Configuration

First, open the Kernel Configuration inside your VIP Project.

Kernel Configuration Bundles

When the Kernel configuration initially opens, it is set to the components view. You must switch to the bundle view in the bottom left.

Kernel Configuration Filter

Once in the bundle view, click on the “type filter text” and type “BUNDLE_STANDALONE_SHELL”.

Kernel Configuration Add

Right-click on the bundle and select “Add”. Lastly, rebuild the VIP to apply the bundle to it.

The CLI Path
#

Open Development Shell

In Workbench, right click on the VIP project and select “Open VxWorks version Development Shell”. This will open an active terminal for you to use, which opens in the VIP directory.

CLI commands

In the terminal, you will need to use the “vxprj vip bundle add BUNDLE_STANDALONE_SHELL” command to apply the bundle to the project.

To verify that the correct bundle has been added you can use the “vxprj vip bundle list“command.

Lastly, to see all available bundles from the CLI, use the “vxprj vip bundle list all” command .

Kernel Shell Session Configuration
#

The kernel shell configuration variables control various settings in a shell session. These variables can be updated statically or dynamically.

Some of these variables are:

  • INTERPRETER identifies the interpreter, either C (default) or command
  • LINE_EDIT_MODE sets the line edit mode, either vi (default) or Emacs
  • LINE_LENGTH sets the shell line length (default is 256 characters)

Updating the configuration variables dynamically depends on the interpreter you are using.

  • The shConfig() function with the C interpreter
  • The set config command with the command interpreter
Free Training - This article is part of a series.
Part 16: This Article

Related

Command Line Editing and Object Module Loader
·566 words·3 mins
VxWorks Shell
Introduction to the Kernel Shell
·357 words·2 mins
VxWorks Shell
Configuring and Building a Project
·1396 words·7 mins
VxWorks VSB VIP