SEARCH
TOOLBOX
LANGUAGES
modified on 3 April 2012 at 19:00 ••• 56,942 views

Download Code Example Eagle SBC

From Manuals

Revision as of 19:00, 3 April 2012 by Support (Talk | contribs)
Jump to: navigation, search

Contents

Downloading Firmware using EWARM

EWARM can be configured to download firmware using a variety of different debuggers. The following section explains how to set-up EWARM for using the J-Link, optional USB Debugger, and the picoJTAG.

Steps for using the J-Link and EWARM

  • 1. Select "Projects>Options" from the drop down menu.
  • 2. Select the "Debugger" category.
  • 3. On the "Setup" tab select “J-Link/J-Trace”.
  • 4. Make sure "Run to" has a check next to it and "main" is written in the text box.
  • 5. On the "Download" tab make sure "Verify download" and "Use flash loader(s) are checked
  • 6. Click the "OK" button.
  • 7. Select "Projects>Download and Debug" from the drop down menu.
  • 8. Select "Debug>Go" from the drop down menu.

Steps for using the optional USB Debugger and EWARM

  • 1. Select "Projects>Options" from the drop down menu.
  • 2. Select the "Debugger" category.
  • 3. On the "Setup" tab select “LMI FTDI”.
  • 4. Make sure "Run to" has a check next to it and "main" is written in the text box.
  • 5. On the "Download" tab make sure "Verify download" and "Use flash loader(s) are checked
  • 6. Click the "OK" button.
  • 7. Select "Projects>Download and Debug" from the drop down menu.
  • 8. Select "Debug>Go" from the drop down menu.

Steps for using the picoJTAG and EWARM

Please see the picoJTAGs Wiki: http://wiki.micromint.com/index.php/PicoJTAG_Manual/Getting_Started#IAR_Plugin

Downloading Firmware using the CoFlash Flash Programmer and the picoJTAG

CooCox CoFlash is a stand-alone Cortex M Flash Programming software for PCs running Microsoft Windows. It can be downloaded from the following website: http://www.coocox.org/CoFlash_Programmer.htm

Follow these steps to program a Cortex M microcontroller using CoFlash and the picoJTAG:

  • 1. Open the CoFlash programmer
Flash Programmer
Figure 2.9: Flash Programmer
  • 2. Select picoJTAG as the Adpater
  • 3. Select the microcontroller being used
  • 4. Select the Command tab
  • 5. Browse for the binary or elf file
  • 6. Verify that the sector offset and sectors are properly selected. See below figures for further details
Flash Programmer
Figure 2.10: CoFlash Programmer set-up for Eagle SBC with bootloader
Flash Programmer
Figure 2.11: CoFlash Programmer set-up for Eagle SBC without bootlader
Flash Programmer
Figure 2.2: CoFlash Programmer set-up for Lincoln SBC
  • 7. Click on the Program button

Downloading Firmware using the Ethernet Bootloader

The Eagle 50E 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 50E’s Ethernet port to the network.
  • 2. Apply power to the Eagle 50E.
  • 3. Press and hold the Eagle 50E’s “USER” button.
  • 4. Press and release the Eagle 50E’s “RESET” button.
  • 5. Release the “USER” button. The Eagle 50E’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.9
  • 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 50E’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.10.
  • 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.9: Ethernet Bootloader Flash programmer configuration
Ethernet download
Figure 2.10: Ethernet Bootloader flash programmer download

Ethernet bootloader 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 50E 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.

Downloading Firmware using the Serial Bootloader

The Eagle 50 is shipped with a Serial bootloader that can be used to update the firmware on the board from a Serial connection. To place the bootloader in update mode you need to press and hold the user button while the board is starting up, e.g. via power up or when pressing the reset button. After the board starts up release the user button and you will see the user LED blinking approximately once per second. That indicates the board is ready to receive a firmware update via a Serial connection.

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 Serial port.

Follow the below steps to set up the LM Flash Loader:

  • 1. Open the LM Flash Programmer
  • 2. Select the "Setup" tab and you will see a screen similar to Figure 2.11
  • 3. For "Interface" select "Serial Interface"
  • 4. For "COM Port:" select the COM port that is assigned to "Stellaris Virtual COM Port" in the "Device Manager" for the Optioanl USB Debugger or the COM port that you will be using
  • 5. The baudrate should be set to 115200
  • 6. Set the transfer size to 76
  • 7. Select the "Program" tab and you will see a screen similar to Figure 2.12
  • 8. Set the "Program Address Offset" to 2000
  • 9. Click the "Browse" button and locate the application to be downloaded
Serial configuration
Figure 2.11: Serial bootloader flash programmer configuration
Serial download
Figure 2.12: Serial bootloader flash programmer download

The application can be downloaded using the LM Flash Programmer and the optional USB Debugger by following these steps:

  • 1. If you are powering the board via USB put a jumper on JP1
  • 2. Make sure there is a jumper on JP6
  • 3. Connect the USB cable to the computer and the board
  • 4. Press and hold the "USER" pushbutton on the board
  • 5. Press and release the "RESET" pushbutton on the board and the LED should start blinking around once a second
  • 6. Release the "USER" pushbutton
  • 7. Click on the "Program" button

The application can be downloaded using the LM Flash Programmer and COM1 by following these steps:

  • 1. If you have an optional USB debugger make sure there is NOT a jumper on JP6
  • 2. Connect the serial cable to COM1 (J3)
  • 3. Power the board
  • 4. Press and hold the "USER" pushbutton on the board
  • 5. Press and release the "RESET" pushbutton on the board and the LED should start blinking around once a second
  • 6. Release the "USER" pushbutton
  • 7. Click on the "Program" button

Downloading Firmware from the Command Line

The TI Flash Programmer can also be invoked from the command line. The command line allows you to program the Eagle SBC though Ethernet Bootloader, Serial Bootloader, or FTDI JTAG. This section provides a step by step procedure for each programming method. Follow these steps to program the board using the command line and the Ethernet Bootloader. The Eagle 50E and Eagle 100 comes with the Ethernet Bootloader.

  • 1. Put the board in bootload mode by hold the user pushbutton while pressing and releasing the reset pushbutton. The user LED will blink when it is in bootload mode.
  • 2. Enter the following command line example with your own parameters. Where 192.168.1.201 is the IP address of the computers Ethernet Port and 192.168.1.210 is a free IP address of the network the Eagle SBC is on. 00-21-A3-00-01-02 is the MAC address of the Eagle SBC. The MAC address is also the board’s serial number which is on the bottom of the board.
lmflash -i ethernet -n 192.168.1.201,192.168.1.210,00-21-A3-00-01-02 blinky.bin
  • 3. The command line will give you status while the board is programming.

Follow these steps to program the board using the command line and the Serial Bootloader. The Eagle 50 comes with the Ethernet Bootloader.

  • 1. Put the board in bootload mode by hold the user pushbutton while pressing and releasing the reset pushbutton. The user LED will blink when it is in bootload mode.
  • 2. Enter the following command line example with your own parameters. Where COM7 is the COM port that is connected to the Eagle 50 SBC
lmflash -i serial -d -p COM7 -b 115200 -o 0x2000 -r blinky.bin
  • 3. The command line will give you status while the board is programming.

Follow these steps to program the board using the command line and the USB Debug Port

  • 1. Connect the USB Debug Port to the computers USB port.
  • 2. Enter the following command line example with your own parameters

lmflash –I ftdi –r –o 0x2000 blinky.bin 3. The command line will give you status while the board is programming.

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