| DeviceMaster Software Developer Kit Using the RedBoot BootloaderDeviceMasters run a bootloader based on RedHat’s RedBoot program. In addition to the DeviceMaster compatible TCP and MAC mode network interfaces RedBoot provides a boot console interface that can be used to perform various functions. This page provides examples of more commonly used RedBoot commands. Refer to the RedBoot Command Overview or the eCos Reference Manual for additional information about commands. These functions are performed via a command-line interface that is accessible via external serial Port 0, the 4-pin debug header (57.6K, 8, none), or by telnet. When connected to the debug header or telnet you should see a RedBoot> prompt.
The external console port will be disabled on power-up. In order to start console services on that port, the string #!DM must be the first thing received on that port after power-up. When that string has been seen, the port will be enabled and a prompt will be displayed. A password is required for telnet access, but no password is required for serial port access. Comtrol DeviceMaster Boot Version 0.01 RedBoot(tm) debug environment - built 17:28:09, Mar 7 2001 Platform: Comtrol DeviceMaster (ARM 7TDMI) Portions Copyright (C) 2000, Red Hat, Inc. Portions Copyright (C) 2001, Comtrol Corp. RAM: 0-7C0000 Id=0089,8897 FLASH: 0x05030000 - 0x05400000, 61 blocks of 0x00010000 bytes each. ks32C5000 eth: 00:C0:4E:0B:FF:FA Hardware CRC IP: 192.168.1.23, Default server: 0.0.0.0 RedBoot> To see a list of available commands, type help followed by a carriage-return. Optionally, you can refer to the RedBoot Procedures section in the DeviceMaster Installation and Configuration Guide. RedBoot> help The board configuration commands are auth, boardrev, ip, mac, model, password, telnet, and timeout. Typing the command displays the current value of that configuration item. The command with a parameter will set the configuration item value.
RedBoot implements a rudimentary file system that allows program and data files to be stored in flash. The are various fis commands that can be used to manipulate this file system. Typing fis followed by a carriage-return will display a list of sub-commands: fis [create [-b base_address] [-l addr] [-s] [-f] [-e] [-r]] [delete] free] [init] [list] [load [-b] [-c] name]
RedBoot> fis
*** invalid ‘fis’ command: too few arguments
Usage:
fis create -b -l [-s] [-f] [-e] [-r]
fis free
fis init [-f]
fis list [-c]
fis load [-b] [-c] name
The fis create command is used to store a region of RAM as a file in flash ROM. The basic form of the command is: RedBoot> fis create -b 0 -l 0x10000 foobar ... Erase from 0x05030000-0x05040000: . ... Program from 0x00000000-0x00010000 at 0x05030000: . ... Erase from 0x053f0000-0x05400000: . ... Program from 0x007a0000-0x007b0000 at 0x053f0000: . fis list RedBoot> fis list Name FLASH addr Mem addr Length Entry point FIS directory 0x053F0000 0x053F0000 0x00010000 0x00000000 foobar 0x05030000 0x00000000 0x00010000 0x00000000 RedBoot> It is also possible to specify a program entry point with the -e option and a specific location for the file in flash ROM with the -f option. If no address or length is specified, it will use the address and length of the S-Record file most recently loaded to RAM via serial port or Ethernet.. The fis delete command is used to delete a file from flash: RedBoot> fis delete default Delete image ‘default’ - are you sure (y/n)? y ... Erase from 0x05030000-0x050b0000: ........ ... Erase from 0x053f0000-0x05400000: . ... Program from 0x007a0000-0x007b0000 at 0x053f0000: . Length Entry point 0x053F0000 0x00010000 0x00000000 RedBoot> fis list Name FLASH addr Mem addr Length Entry point FIS directory 0x053F0000 0x053F0000 0x00010000 0x00000000 RedBoot> The fis list command displays a directory of the files currently stored in flash ROM: RedBoot> fis list Name FLASH addr Mem addr Length Entry point FIS directory 0x053F0000 0x053F0000 0x00010000 0x00000000 default 0x05030000 0x00000000 0x00080000 0x00000384 RedBoot> The FIS directory entry will always be there and is the file in which flash ROM bookkeeping information is stored. The default file is the program that will be run by RedBoot on startup. This is described further in Default Application. The list, delete, and create commands are the most frequently used. The go command is used to execute a program. If no starting address is provided as a parameter to the go command, the entry address of the last file loaded into RAM will be used. go [[-w <timeout>] [entry]] load [[-r] ] [[-h ip] ] [filename] RedBoot> load -r -h 10.0.0.2 socket.bin Defaulting to entry point of 0x00000000. Raw load done: 542101 bytes read Address range: 00000000-00084594, Entry point: 00000000, RedBoot> go ARM DeviceMaster HAL (no virtual vectors) AIOPIC serial driver: 16 channels [...] If you wish to specify an entry point, you may do so: RedBoot> load -r -h 10.0.0.2 socket.bin Defaulting to entry point of 0x00000000. Raw load done: 542101 bytes read Address range: 00000000-00084594, Entry point: 00000000, RedBoot> go 0x384 ARM DeviceMaster HAL (no virtual vectors) AIOPIC serial driver: 16 channels [...]
Controls the type of authentication required for HTTP access. auth { [noaccess] [none] [basic] [md5] [invalid] }
RedBoot> auth Auth: none RedBoot> auth basic Auth: basic RedBoot The value of this setting is not used by RedBoot since it does not contain a web server. This setting is merely saved in I2C EPROM as a service to applications. load [{-r} ] [{-v} ] [{-h <host>}] [{-m {TFTP | xyzmodem}] [{-b <base_addr>} <file_name>] It is possible to load a program or data file into RAM from three sources: serial port (the 4-pin diagnostic header or external Port 0), Ethernet (from a TFTP server or via TCP), or from flash ROM on the DeviceMaster board. Loading from flash ROM is described in fis load. Loading from serial port or Ethernet is done using the load command. Files loaded with the load command default to Motorola S-Record format (which must end with a single “Entry-Point�? record). It is possible to load a binary file with the load command by using the -r and -b options. Loading a file from a TFTP server is done by using the -h option to load: RedBoot> load -v -h 192.168.1.2 socket.srec Entry point: 0x00000384, address range: 0x00000000-0x000718a8 RedBoot> The -v option will cause a spinning status indicator to be displayed as the file is loaded. Do not use the -v option when connected via telnet. If you are loading a raw binary file, use the -r option. Loading a file via TCP can be done by connecting to the telnet server (TCP Port 23), logging in, and issuing a load -m d command. The telnet server will then expect to read an S-record file as input. Each line read will be acknowledged with a single line feed character. When the last line in the S-record file (which must be an Entry-Point record) has been processed, a load summary prints Loading An S-record file via a serial port is done with a load command specify either xmodem or ymodem protocol. RedBoot> Load -m ymodem Start the ymodem transfer program. Entry Point: 0x00000384, Address Range: 0x00000000-0x000718a8 RedBoot> It is also possible to load a binary file via x-modem. binary download will be approximately 2-3 times faster except for sparse files. the entry point for a binary file will be the base address specified in the load command (or a default of 0 if no entry point is specified). For DeviceMaster eCos executables, the base address should be normally 0: RedBoot> Load -b 0 -r -m X Start X-modem Download Crc Mode, 4085(Soh)/0(Stx)/0(Can) Packets, 2 Retries RedBoot> | ||||||||||||||||||||||||||||
02/06/20 | Home | Comtrol Website | |||
Copyright © 2020 Pepperl+Fuchs Comtrol, Inc. |