Update the primary redboot flash image – Comtrol eCos User Manual

Page 184

Advertising
background image

Chapter 4. Updating RedBoot

RedBoot> fis create RedBoot[RAM]

An image named ’RedBoot[RAM]’ exists - continue (y/n)? y

* CAUTION * about to program ’RedBoot[RAM]’

at 0x00020000..0x000369c7 from 0x06020000 - continue (y/n)?y

... Erase from 0x00020000-0x00040000: ..

... Program from 0x06020000-0x060369c8 at 0x00020000: ..

... Erase from 0x00070000-0x00080000: .

... Program from 0x0606f000-0x0607f000 at 0x00070000: .

RedBoot> fis lock RedBoot[RAM]

... Lock from 0x00000000-0x00020000: ..

Update the primary RedBoot flash image

An instance of RedBoot should now be running on the target from RAM. This can be verified by looking for the
mode identifier in the banner. It should be either [RAM] or [ROMRAM].

If this is the first time RedBoot is running on the board or if the flash contents has been damaged, initialize the FIS
directory:

RedBoot> fis init -f

About to initialize [format] FLASH image system - continue (y/n)? y

*** Initialize FLASH Image System

... Erase from 0x00020000-0x00070000: .....

... Erase from 0x00080000-0x00080000:

... Erase from 0x00070000-0x00080000: .

... Program from 0x0606f000-0x0607f000 at 0x00070000: .

It is important to understand that the presence of a correctly initialized FIS directory allows RedBoot to automati-
cally determine the flash parameters. Additionally, executing the steps below as stated without loading other data or
using other flash commands (than possibly fis list) allows RedBoot to automatically determine the image location
and size parameters. This greatly reduces the risk of potential critical mistakes due to typographical errors. It is
still always possible to explicitly specify parameters, and indeed override these, but it is not advised.

Note: If the new RedBoot image has grown beyond the slot in flash reserved for it, it is necessary to change the
RedBoot configuration option CYGBLD_REDBOOT_MIN_IMAGE_SIZE so the FIS is created with adequate
space reserved for RedBoot images. In this case, it is necessary to re-initialize the FIS directory as described
above, using a RAM mode RedBoot compiled with the updated configuration.

Using the load command, download the new flash based image from the host, relocating the image to RAM::

RedBoot> load -r -b %{FREEMEMLO} redboot_ROM.bin

Raw file loaded 0x06046800-0x06062fe8, assumed entry at 0x06046800

80

Advertising