SEARCH
TOOLBOX
LANGUAGES
modified on 22 December 2011 at 15:01 ••• 35,495 views

Eagle-100 Manual/Getting Started

From Manuals

Revision as of 15:01, 22 December 2011 by Support (Talk | contribs)
Jump to: navigation, search

Contents

Installation

The Eagle 100 SBC is shipped with the Serial-to-Ethernet (S2E) example application from the Luminary DriverLib. This application implements the lwIP TCP/IP stack, a web server and a telnet server directly managing the COM1 serial port. It can be used to test the board functionality and also provide Ethernet connectivity to legacy controllers that have a serial interface but no network interface. After connecting the power supply and Ethernet adapter, the board will obtain an address from a DHCP server on the network. Opening the assigned address on a web browser will produce a screen similar to that in Figure 2.1. The assigned address can also be accessed via telnet. Full source code for the Serial-to-Ethernet application is included so you can modify it to suit your application requirements.

Serial-to-Ethernet
Figure 2.1: Web interface for Serial-to-Ethernet application

Programming Language Support

After testing the board with the example application, you should become familiar with development tools used to take advantage of the board’s functionality. The Eagle 100 Board Support Package (BSP) includes examples to use the board functionality with several development tools. Currently the following compilers and programming languages are supported:

  • IAR Embedded Workbench for ARM (ewarm) 5.20
  • GNU Toolchain (gcc) for ARM 4.2.3 – CodeSourcery G++ 2008q1
  • GNU Toolchain (gcc) for ARM 4.3.0 – devkitARM 23b or WinARM 20080331
  • Jumentum BASIC 0.94
  • Lua 5.1.3

The tools included in the CDs shipped with the board include a kickstart version of the IAR Embedded Workbench for ARM, one of the GNU Toolchains for ARM, a BASIC interpreter and a LUA interpreter. Project files are included to build C, Assembler and DriverLib applications with both the IAR and CodeBlocks IDEs.

The Eagle 100 Setup CD includes tools and example applications to get you started with the Eagle 100 SBC functionality. The main menu is shown in Figure 2.2. Please select the tools button corresponding to the programming language you will be using and install the required components.

Setup CD Menu
Figure 2.2: Eagle Setup CD Main Menu

The IAR Kickstart CD installs a 32 KB code-sized limited version of the IAR C/C++ compiler and debugger. The IAR compiler generally produces the smallest code sizes for ARM targets and has excellent debugging capabilities. To install it select the "Install IAR Embedded Workbench" option from the CD main menu shown in Figure 2.3. Follow the instructions in the installation application. We suggest that you use the default directories, and the "Full" installation option.

IAR Setup Menu
Figure 2.3: IAR Kickstart CD Main Menu

Compiling Applications with IAR EWARM

To load the DriverLib workspace in the IAR IDE, select Programs> Micromint Eagle> IAR> DriverLib Examples from your Windows Start menu. The IAR Embedded Workbench for ARM will start and you will see a screen similar to that on Figure 2.4. Select the Blinky project by right clicking the project name and selecting "Set as Active". To rebuild the project select the "Make" button on the toolbar. You can also right click on the project name to select "Make" or "Rebuild". This will build a binary (.BIN) image file on the "ewarm\Exe\" directory of the project. To run the file you can select use of the firmware download procedures outlined later in this chapter. If the build and download is successful, the user LED on the Eagle SBC will start blinking.

IAR EWARM
Figure 2.4: Using the DriverLib projects with the IAR EWARM IDE

Compiling Applications with the GNU Toolchain

To load the DriverLib workspace in the CodeBlocks IDE, select Programs> Micromint Eagle> CodeBlocks> DriverLib Examples from your Windows Start menu. The CodeBlocks IDE will start and you will see a screen similar to that on Figure 2.5. Select the Blinky project by right clicking the project name and selecting "Activate project". To rebuild the project select the "Rebuild" button on the toolbar. You can also right click on the project name to select "Build" or "Rebuild". This will build a binary (.BIN) image file on the "gcc\" directory of the project. To run the file you can select use of the firmware download procedures outlined later in this chapter. If the build and download is successful, the user LED on the Eagle SBC will start blinking.

Codeblocks
Figure 2.5: Using the DriverLib projects with the CodeBlocks IDE

Compiling Applications from the Command Line

All example programs include a Makefile that allows you to build binary images from the command line using the GNU toolchain. The GNU "make" utility is installed as part of the GNU toolchain on the Eagle Setup CD. To build an image using the command line, just change to the project directory and execute "make".

Firmware Updates using the JTAG

The simplest way to download files to the Eagle SBC is by using a JTAG debugger probe that is supported by IDE in use. When you start a debugging session, the binary image file will be loaded automatically to the board. Using a JTAG debugger also allows you to place breakpoints and watch variables to find problem areas in your application. To use the J-Link debugger with IAR EWARM, select Projects> Options> Debugger with the project name selected in the workspace. On the "Setup" tab select "J-Link/J-Trace" as the driver and "main" as the location to run to start the debugger after a reset. Then select the "Download and debug" button on the toolbar and then the "Go" button to execute.

Firmware Updates using the Ethernet Bootloader

The Eagle 100 is shipped with an Ethernet bootloader that can be used to update the firmware on the board from an Ethernet connection. The bootloader uses the BOOTP and TFTP protocols to temporarily acquire an IP address and copy the binary image to the board. The LM Flash Programmer implements a small BOOTP and TFTP server to do this.

The bootloader uses the first 8 KB of the flash address space (0x00000000 to 0x00001fff). Programs loaded with the bootloader should be linked to start at address 0x00002000. That is done automatically if you use the “ewarm/application.icf” or “gcc/application.ld” linker scripts used in the examples.

You can overwrite the bootloader if you so desire by using the “ewarm/standalone.icf” or “gcc/ standalone.ld” linker scripts and downloading your binary image via the JTAG. Currently the bootloader cannot be overwritten via the Ethernet port.

Follow the below steps to use the LM Flash Programmer and the Ethernet bootloader:

  • 1. Connect the Eagle 100’s Ethernet port to the network.
  • 2. Apply power to the Eagle 100.
  • 3. Press and hold the Eagle 100’s “USER” button.
  • 4. Press and release the Eagle 100’s “RESET” button.
  • 5. Release the “USER” button. The Eagle 100’s “USER LED” should now be blinking approximately once a second.
  • 6. Open the LM Flash Programmer
  • 7. Select the "Setup" tab and you will see a screen similar to Figure 2.6
  • 8. For "Interface" select "Ethernet"
  • 9. For "Ethernet Adapter:" select the adapter that is connected to the computers network.
  • 10. For “Client IP Address:” enter an IP address that is on the same subnet as your Ethernet adapter. The last octet must be different than the Ethernet Adapters.
  • 11. For “Client MAC Address:” enter the Eagle 100’s serial number. It can be found on the bottom of the board and should start with 0021A3. Make sure to separate the octets with dashes (00-21-A3).
  • 12. Select the "Program" tab on the LM Flash Programmer software and you will see a screen similar to Figure 2.7.
  • 13. Click the “Browse” button and locate the application to be downloaded.
  • 14. Click on the “Program” button. It generally takes several seconds for the program to start downloading.
Ethernet configuration
Figure 2.6: Ethernet Bootloader Flash programmer configuration
Ethernet download
Figure 2.7: Ethernet Bootloader flash programmer download

Troubleshooting guide:

  • 1. Temporarily turn off the computers firewall. If this works add the LM Flash programmer to the Firewalls Exceptions list.
  • 2. Try bypassing the network by connecting the Eagle 100 directly to the computer Ethernet port. A regular CAT5 cable will work. Make sure to close the LM Flash Programmer software and start at step 2 in the above procedure.

Firmware Updates from the Command Line

The Luminary Flash Programmer can also be invoked from the command line. The following command line is equivalent to the procedure in the previous section but uses a command line interface instead of a GUI interface.

lmflash -i ethernet -n 192.168.1.201,192.168.1.210,00-21-A3-00-01-02 blinky.bin

To see all options available from the command line, use “lmflash –h”.


NEXT: Hardware

PREVIOUS: Introduction