Cirrus Logic ARM EP7211 Development Board Hardware Setup

eCos comes with two Flash ROM images that provide GDB support for the Cirrus Logic EP7211 Development Board (also known as the EDB7211).. Note that on some board revisions, the board is silk-screened as EDB7111-2. The first Flash ROM image provides a port of the CygMon ROM monitor, which includes a command-line interface and a GDB remote stub. The second Flash ROM image provides a remote GDB stub only.

Both ROM images are provided in the directory loaders/arm-edb7211 under the root of your eCos installation. CygMon images are prefixed with the name 'edb7211_cygmon' and are provided in a number of formats including binary (.bin extension) and SREC (.srec) extension. GDB stub ROM images are given the prefix 'edb7211_gdb_module'.

The ROM images provided for the EP7211 Development Board must be programmed into the FLASH. Please refer to the section titled "Loading the ROM image into On-Board flash" on how to program the ROM onto the board.

Both Cygmon and GDB Stub ROMS allow communication with GDB via the serial connector labelled 'UART 1'. 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. Connection to the host computer should be made using a null modem cable. A gender changer may also be required. Note that the GDB Configuration tool uses the serial port identifiers 0 and 1 to identify the EB7211 serial ports UART1 and UART2 respectively.

Both eCos and the ROM images assume the core clock is generated with a 3.6864 MHz PLL input. The CPU will be configured to run at 73.728MHz.

Note: The EP7211 CPU needs a two step RESET process. After pressing the `URESET' pushbutton, the `WAKEUP' pushbutton must be pressed to complete the process.

Note: When an eCos program is run on an EDB7211 board fitted with either CygMon or a GDB stub ROM, then the code in ROM loses control. This means that if you require the ability to remotely stop execution on the target, or want thread debugging capabilities, you must include GDB stub support when configuring eCos.

Building programs for programming into FLASH

If your application is to be run directly from FLASH, you must configure eCos appropriately for "ROM" startup. This can be done in the eCos Configuration Tool by setting the "Startup type" HAL option to "ROM". If using the ecosconfig utility, set the user_value of the CYG_HAL_STARTUP option in ecos.ecc to "ROM".

When you have linked your application with eCos, you will then have an ELF executable. To convert this into a format appropriate for the Cirrus Logic FLASH download utility, or the dl_7xxx utility on Linux, you can use the utility arm-elf-objcopy, as in the following example:

$ arm-elf-objcopy -O binary helloworld.exe helloworld.bin

This will produce a binary format image helloworld.bin which can be downloaded into FLASH.

Building the GDB Stub FLASH ROM images

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

CygMon images are prefixed with the name 'cygmon' and GDB stub ROM images are given the prefix 'gdb_module'. Images may be provided in a number of formats including ELF (.img extension), binary (.bin extension) and SREC (.srec extension).

Building the ROM images 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 "Cirrus Logic development board" hardware.

  3. While still displaying the Build -> Templates dialog box, select either the "stubs" package template to build a GDB stub image, or the "cygmon" template to build the CygMon ROM Monitor. 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. GDB stub ROM images have the prefix "gdb_module". CygMon images have the prefix "cygmon".

Building the ROM images with ecosconfig

  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 edb7xxx stubs

    or to build a CygMon ROM monitor image, enter the command:

    $ ecosconfig new edb7xxx cygmon
  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. GDB stub ROM images have the prefix "gdb_module". CygMon images have the prefix "cygmon".

Loading the ROM Image into On-board Flash

Program images can be written into Flash memory by means of a bootstrap program which is built into the EDB7211. This program communicates with a support program on your host to download and program an image into the Flash memory.

Cirrus Logic provides such a program for use with Windows/DOS. eCos comes with a similar program which will run under Linux. The basic operation of both programs is the same.

  1. Connect a serial line to 'UART 1'.

  2. Power off the EDB7211.

  3. Install jumper 'PROGRAM ENABLE' which enables this special mode for downloading Flash images. Note that some board revisions have this jumper labelled “BOOT ENABLE”.

  4. Power on the EDB7211.

  5. Execute the Flash writing program on your host. On Linux, this would be:

         # dl_edb7xxx <PATH>/gdb_module.bin

    where '<PATH>' is the path to the binary format version of the ROM image you wish to load, either as built in the previous section or the "loaders/arm-edb7211/" subdirectory of your eCos installation. The download tool defaults to 38400 baud and device /dev/ttyS1 for communication. To change these, specify them as parameters, e.g.

    # dl_edb7xxx <PATH>/gdb_module.bin 9600 /dev/ttyS0
  6. The download program will indicate that it is waiting for the board to come alive. At this point, press 'RESET' and then 'WAKEUP' switches in order. There should be some indication of progress, first of the code being downloaded, then of the programming process.

  7. Upon completion of the programming, power off the EDB7211.

  8. Remove the 'PROGRAM ENABLE/BOOT ENABLE' jumper.

  9. Power on the EDB7211, press 'RESET' and 'WAKEUP'. The new ROM image should now be running on the board.

  10. The GDB debugger will now be able to communicate with the board to download and debug RAM based programs. 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 GDB Stub ROM/CygMon in Flash, so you would have to reload the GDB Stub ROM/CygMon to return to normal RAM-startup program development.

Building the Flash Downloader on Linux

eCos provides a Flash download program suitable for use with the EP7211 Development Board which will run on Linux. Follow these steps to build this program. Note: at the time of the writing of these instructions, the download program is built directly within the eCos source repository since it is not configuration specific.

  # cd <eCos install dir>/packages/hal/arm/edb7xxx/<version>/support
  # make

(where '# ' is your shell prompt)

Note: this program was adapted from the Cirrus Logic original DOS program and still contains some vestiges of that environment.

Developing eCos Programs with the ARM Multi-ICE

The EP7211 Development Board supports use of the ARM Multi-processor EmbeddedICE(tm), also known as the Multi-ICE. Full instructions on how to install and use the Multi-ICE in conjunction with GDB are provided in the "GNUPro Toolkit Reference for eCos ARM/Thumb" manual. However, the following platform-specific details should be noted.

You will need an ARM Multi-ICE Server configuration file for the EP7211 Development Board. Here is a suggested configuration file to use:

======== File "720T.cfg" ======== 
;Total IR length = 4 
Multi-ICE configuration for EP7211 
[TAP 0] 

You must ensure that the board has the appropriate soldered connections. For the EP7211 this involves connecting TEST0 and TEST1 of the EP7211 to ground. To do this you must solder a wire from ground at JP33 to TP8 and TP9.

With respect to using multiple devices simultaneously, note that the EP7211 is not ID sensitive.

If you wish to view diagnostic output from your program that was downloaded via the Multi-ICE, you will note that by default the output on the serial line (as viewed by a terminal such as Hyperterm in Windows, or cu in Unix) is in the form of GDB packets.

To get legible output, the solution is to set the "GDB Serial port" to a different device from the "Diagnostic serial port", and you should use the Diagnostic serial port to view the diagnostic output.

Warning: The multi-ice-gdb-server will fail on startup if the board has not been both reset and awakened before running the server.

To resolve this, it is necessary to free up the connection from within the ARM Multi-ICE server itself. However when this happens, the next time you use GDB to load the program into the board, you will see lots of "Readback did not match original data" messages in the output of the multi-ice-gdb-server program. This indicates your program did not load correctly, and you should restart the multi-ice-gdb-server program, taking care to reset the board correctly before reconnecting.

As a reminder, you must specify --config-dialog to the multi-ice-gdb-server program to connect to the board correctly. If you do not, the multi-ice-gdb-server program will not be able to connect.