Chapter 2. RedBoot Commands and Examples

Table of Contents
Introduction
RedBoot Editing Commands
Common Commands
Flash Image System (FIS)
Persistent State Flash-based Configuration and Control
Executing Programs from RedBoot

Introduction

RedBoot provides three basic classes of commands:

Given the extensible and configurable nature of eCos and RedBoot, there may be extended or enhanced sets of commands available.

The basic format for commands is:

RedBoot> COMMAND [-S] [-s val]operand
Commands may require additional information beyond the basic command name. In most cases this additional information is optional, with suitable default values provided if they are not present. The type of information required affects how it is specified:
 [-S]
An optional switch. If this switch is present, then some particular action will take place. For example in the command
RedBoot> fis init -f
the -f switch indicates to perform a full file system initialization.
 [-s val]
An optional switch which requires an associated value. For example the command:
RedBoot> load -b 0x00100000 data_file
specifies downloading a file (via TFTP) into memory, relocating it to location 0x00100000.
operand
This format is used in a case where a command has one operand which must always be present (no -s is required since it is always implied). For example the command
RedBoot> go 0x10044
specifies executing the code starting at location 0x10044.

The list of available commands, and their syntax, can be obtained by typing help at the command line:

RedBoot> help
Manage aliases kept in FLASH memory
      alias name [value]
Set/Query the system console baud rate
      baud [-b <rate>]
Manage machine caches
      cache [ON | OFF]
Display/switch console channel
      channel [-1|<channel number>]
Display disk partitions
      disks
Set/Query DNS server IP address
      dns [IP]
Display (hex dump) a range of memory
      dump -b <location> [-l <length>] [-s]
Manage flash images
      fis {cmds}
Manage configuration kept in FLASH memory
      fconfig [-i] [-l] [-n] [-f] [-d] | [-d] nickname [value]
Execute code at a location
      go [-w <timeout>] [entry]
Help about help?
      help [<topic>]
Set/change IP addresses
      ip_address [-l <local_ip_address>] [-h <server_address>]
Load a file
      load [-r] [-v] [-d] [-c <channel>] [-h <host>] [-m {TFTP | xyzMODEM | disk}]
      [-b <base_address>] <file_name>
Network connectivity test
      ping [-v] [-n <count>] [-t <timeout>] [-i <IP_addr]
      -h <host>
Reset the system
      reset
Display RedBoot version information
      version
Display (hex dump) a range of memory
      x -b <location> [-l <length>] [-s]
Commands can be abbreviated to their shortest unique string. Thus in the list above, d,du,dum and dump are all valid for the dump command. The fconfig command can be abbreviated fc, but f would be ambiguous with fis.

There is one additional, special command. When RedBoot detects '$' or '+' (unless escaped via '\') in a command, it switches to GDB protocol mode. At this point, the eCos GDB stubs take over, allowing connections from a GDB host. The only way to get back to RedBoot from GDB mode is to restart the platform.

NOTE: Multiple commands may be entered on a single line, separated by the semi-colon “;” character.

The standard RedBoot command set is structured around the bootstrap environment. These commands are designed to be simple to use and remember, while still providing sufficient power and flexibility to be useful. No attempt has been made to render RedBoot as the end-all product. As such, things such as the debug environment are left to other modules, such as GDB stubs, which are typically included in RedBoot.

The command set may be also be extended on a platform basis.