StrongARM EBSA-285 Hardware Setup

The eCos Developer’s Kit package comes with a ROM image which provides GDB support for the Intel® StrongARM® Evaluation Board EBSA-285. Both eCos and the Stub ROM image assume the clocks are: 3.6864 MHz PLL input for generating the core clock, and 50MHz osc input for external clocks. An image of this ROM is also provided at loaders/arm-ebsa285/gdbload.bin under the root of your eCos installation.

The ROM monitor image (an eCos GDB stub) provided for the EBSA-285 board must be programmed into the flash, replacing the Angel monitor on the board. Please refer to the section titled "Loading the ROM Image into On-Board flash" on how to program the ROM onto the board.

The Stub ROM allows communication with GDB via the serial connector on the bulkhead mounting bracket COM0. The communication parameters are fixed at 38400 baud, 8 data bits, no parity bit and 1 stop bit (8-N-1). No flow control is employed.

Building the GDB Stub FLASH ROM images

Pre-built GDB stubs images are provided in the directory loaders/arm-ebsa285 relative to the root of your eCos installation, but here are instructions on how to rebuild them if you should ever need to.

Building the GDB Stubs with the eCos Configuration Tool

  1. Start with a new document - selecting the File -> New menu item if necessary to do this.

  2. Choose the Build -> Templates menu item, and then select the StrongARM EBSA285 hardware.

  3. While still displaying the Build -> Templates dialog box, select the "stubs" package template to build a GDB stub image. Click OK.

  4. Build eCos using Build -> Library

  5. When the build completes, the image files can be found in the bin/ subdirectory of the install tree. The GDB stub ROM images have the prefix "gdb_module".

Building the GDB Stub ROMs with ecosconfig

(See “Using ecosconfig on UNIX” on page 72)

  1. Make an empty directory to contain the build tree, and cd into it.

  2. To build a GDB stub ROM image, enter the command:

    $ ecosconfig new ebsa285 stubs

  3. Enter the commands:

    $ ecosconfig tree
    $ make

  4. When the build completes, the image files can be found in the bin/ subdirectory of the install tree. The GDB stub ROM images have the prefix "gdb_module".

Loading the ROM Image into On-board Flash

There are several ways to install the eCos gdb stub ROM image in the EBSA board’s flash memory. Once installed, the gdb stub ROM provides standard eCos download and debug via the EBSA board"s serial port. The options available include the Linux based EBSA flash upgrade utility provided by Red Hat, direct writing of the flash via MultiICE (JTAG) hardware debugger, and other flash management utilities from Intel (these only support DOS, and proprietary ARM tools and image formats). Only the Red Hat flash upgrade tool is supported and tested in this release.

The flash upgrade tool requires the EBSA board to be configured as a PCI slave (rather than a master, its normal operating mode) and plugged into a Linux host computer"s PCI bus.

Configuring the board for flash loading: Follow the instructions in the EBSA-285 Reference Manual, pages A-2 and A-3 to configure the board as an add-in card, and enable flash blank programming. Briefly: assuming the board was in the default setting to execute as a bus master ("Host Bridge") make jumper 9 (J9), move jumper 10 (J10) to external reset (PCI_RST), and move jumper 15 (J15) link 4-6-5 to connect 5-6 instead of 4-6.

Configuring the board for execution of eCos programs: Follow the instructions in the EBSA-285 Reference Manual, pages A-2 and A-3 to configure the board as a "Host Bridge" with "Central Function". Briefly: unset J9, move J10 to on-board reset (BRD_RST), and set J15 to make 4-6 instead of 5-6 (see page A-8 also). Plug the card into its own PCI bus, not the Linux PC used for the flash-programming process.

Building the Linux software: the Linux software sources are in directory

      <BASE_DIR>/packages/hal/arm/ebsa285/v1_3/support/linux/safl_util

in the eCos source repository. There are two parts to the system: a loadable kernel module and the flash utility. The loadable kernel module is safl.o and the utility is sa_flash. To build:

cd to this directory, or a copy of it.

make

This builds safl.o and sa_flash. The kernel module must be installed, and a device file created for it. Both of these operations require root permissions. Create the device file by:

      % mknod /dev/safl c 10 178

Programming the flash: switch off the EBSA-285, and remove the EBSA-285 board from its PCI bus. Take appropriate anti-static precautions. Configure it for flash loading as above, halt your Linux system and turn it off. Install the EBSA-285 board in the PCI bus of the Linux system and boot it up. (Single user is good enough, assuming your image and safl_util build dir are on a local disc partition.) Change directory to the safl_util directory, then, to load the kernel module and flash an image onto the eval board (as root):

       % insmod safl.o
       % sa_flash <image_file>

Halt and turn off the Linux machine and remove the EBSA-285 card. Take appropriate anti-static precautions. Configure it for execution of eCos programs as above, and plug it into its own PCI bus. Restart the Linux machine however you wish.

This information is replicated in the README file within the safl_util directory and its parents, and in the EBSA-285 Reference Manual from Intel, appendix A "Configuration Guide". If in doubt, please refer to those documents also.

This procedure also applies for loading ROM-startup eCos programs into the on-board flash memory, given a binary format image of the program from arm-elf-objcopy. Loading a ROM-startup eCos program into flash will overwrite the StubROM in flash, so you would have to reload the StubROM to return to normal RAM-startup program development.

Running your eCos Program Using GDB and the StubROM

Note: You must first load the StubROM image into the flash memory on the EBSA-285 board before doing this. See “Loading the ROM Image into On-board Flash”, page 93 for details.

Connect to the StubROM in the board and run your eCos program <PROGRAM> as

follows:

      $ arm-elf-gdb -nw <PROGRAM>
      (gdb) set remotebaud 38400
      (gdb) target remote <DEVICE>

Where <DEVICE> is /dev/ttyS0 or COM1: or similar, depending on your environment and how you connected your serial line to the host computer. Expect some output here, for example:

      Remote debugging using /dev/ttyS0
      0x410026a4 in ?? ()

then, to load the program

        (gdb) load
    

which will report locations and sizes of sections as they load, then begin execution using

      (gdb) continue

If you have no eCos program yet, but you want to connect to the board just to verify serial communications, tell gdb "set endian little" before anything else, so that it understands the board (GDB normally infers this from information within the eCos program).

Note: When an eCos program is run on the EBSA-285 board, the GDB stub in ROM loses control. This means that if you require the ability to stop execution on the target remotely, or want thread debugging capabilities, you must include GDB stub support when configuring eCos.