eCos Home

RedBoot Home


About eCos

Supported Hardware

Downloading and Installation

Documentation

FAQ

Mailing lists

Problems

Licensing

Anonymous CVS

Contributions and Third Party Projects

eCos
(Category) (Category) eCos FAQ :
Using RedBoot
Questions about using the RedBoot monitor and its command line interface
Subcategories:
(Category) Networking
(Category) Downloading programs

Answers in this category:
(Answer) FLASH configuration checksum error

(Category) (Category) eCos FAQ : (Category) Using RedBoot :
Networking
Issues relating to the networking support in RedBoot
jskovATredhatDOTcom
Subcategories:

Answers in this category:
(Answer) I get "Can't get BOOTP info for device !"
(Answer) Is BOOTP required for network debugging

(Answer) (Category) eCos FAQ : (Category) Using RedBoot : (Category) Networking :
I get "Can't get BOOTP info for device !"
This happens if the target has been configured to use BOOTP (see the fconfig options) but there is no BOOTP/DHCP deamons answering the target's request for an IP address.

There are two solutions to this problem:

  1. Make the target use a static IP address using either the CYGDAT_REDBOOT_DEFAULT_IP_ADDR CDL option (in which case that address is built in to the RedBoot binary) or if your target supports FLASH, by using the fconfig command.
  2. Set up a BOOTP/DHCP server on the network

See http://sources.redhat.com/ecos/docs-latest/redboot/configuring-the-redboot-environment.html for details.
jskovATredhatDOTcom, jlarmourATredhatDOTcom

(Answer) (Category) eCos FAQ : (Category) Using RedBoot : (Category) Networking :
Is BOOTP required for network debugging
No, the target's IP address can also be assigned statically. As long as RedBoot's ethernet is working, you should be able to use it for debugging.
jskovATredhatDOTcom
(Category) (Category) eCos FAQ : (Category) Using RedBoot :
Downloading programs
Issues to do with loading applications onto a target using RedBoot, either directly with x/y-modem, TFTP, or disk, or by using GDB.
jlarmourATredhatDOTcom
Subcategories:

Answers in this category:
(Answer) Downloading is slow

(Answer) (Category) eCos FAQ : (Category) Using RedBoot : (Category) Downloading programs :
Downloading is slow
There are a number of factors which influence the speed here. Most RedBoot ports run from FLASH which is often slow. Also, the network stack used by RedBoot was designed to be as simple and small as possible, not necessarily as fast as possible. Also, GDB sends relatively small packets while downloading. This adds a lot of overhead.

The biggest problem with GDB is the size of the packets that GDB uses and the associated overhead. If you use RedBoot to download code directly (using TFTP and the 'load' command), you'll see much faster download times. I just tested it on one of our platforms here and the difference was pretty large:

   GDB - 153k (bits/sec)
   RedBoot via 'load' - 700k (bits/sec)
So the problem is not really with RedBoot's networking code, but the additional overheads involved with the GDB protocol.

However, there are some knobs in gdb which can be used to improve the situation. By default, gdb will send relatively small packets during download.

  (gdb) set download-write-size xxx
asks gdb to try using xxx bytes per download packet. There is interaction with the memory-write-size knob which may limit the download size. For my xscale toolchain, I see:
  (gdb) show remote memory-write-packet-size 
  The memory-write-packet-size is 0. Packets are limited to 399 bytes.
You can force gdb to use a larger memory-write-packet-size with:
 
  (gdb) set remote memory-write-packet-size 800
  The memory-write-packet-size is 800. Packets are limited to 399 bytes.
Notice how gdb still limits it to 399. Force gdb to use the previously entered 800:
  
  (gdb) set remote memory-write-packet-size fixed
  The target may not be able to correctly handle a memory-write-packet-size
  of 800 bytes. Change the packet size? (y or n) y
(gdb) show remote memory-write-packet-size The memory-write-packet-size is 800. Packets are fixed at 800 bytes.
Now the problem is that the target side has to be able to handle packets of up to 800 bytes. Unfortunately, the ARM HAL cannot handle packets larger than (NUMREGBYTES * 2)+32 bytes, where NUMREGBYTES is defined in:
   hal/arm/arch/include/arm_stub.h
As an experiment, I commented out the NUMREGBYTES define in arm_stub.h so that a default gdb stub buffer of 2k was used. I then downloaded an app using the default gdb settings and got 155K/sec. I then used:
  (gdb) set download-write-size 1000
  (gdb) set remote memory-write-packet-size 1000
  (gdb) set remote memory-write-packet-size fixed
  The target may not be able to correctly handle a memory-write-packet-size
  of 1000 bytes. Change the packet size? (y or n) y
I then reloaded the app and saw 320K/sec.
jlarmourATredhatDOTcom
(Answer) (Category) eCos FAQ : (Category) Using RedBoot :
FLASH configuration checksum error
A common message from RedBoot is:
  FLASH configuration checksum error or invalid key

This is not really an error, but just a warning.  RedBoot can keep
configuration information in FLASH (or EEPROM).  This is a database
which must be initialized before use.  The warning simply means
that somehow the database is not valid, probably because it has
never been initialized.

To remedy this, simply initialize the database!  For example:
  RedBoot> fconfig -i
  Initialize non-volatile configuration - continue (y/n)? y
  Run script at boot: false
  Use BOOTP for network configuration: true
  DNS server IP address: 
  Network hardware address [MAC]: 0x00:0x23:0x31:0x37:0x00:0x1C
  GDB connection port: 9000
  Force console for special debug messages: false
  Network debug at boot time: false
  Default network device: at91rm9200_eth
  Update RedBoot non-volatile configuration - continue (y/n)? y

 
garyATmlbassocDOTcom
Previous: (Category) Using eCos
Next: (Category) Got Problems?
This document is: http://ecos.sourceware.org/fom/ecos?file=12
[Search] [Appearance] [Show Top Category Only]
This is a Faq-O-Matic 2.719.

Send any queries about the contents of this FAQ to the ecos-discuss mailing list
Send any operational queries about this FAQ to the eCos maintainers