Eagle-100 Manual/Getting Started
From Manuals
(→Steps to Getting Started) |
|||
| Line 9: | Line 9: | ||
* 4. [http://wiki.micromint.com/index.php/Eagle-100_Manual/Getting_Started#Install_the_Chosen_Compiler_and_IDE Install the Chosen Compiler and IDE] | * 4. [http://wiki.micromint.com/index.php/Eagle-100_Manual/Getting_Started#Install_the_Chosen_Compiler_and_IDE Install the Chosen Compiler and IDE] | ||
* 5. [http://wiki.micromint.com/index.php/Eagle-100_Manual/Getting_Started#Compile_a_Code_Example Compile a Code Example ] | * 5. [http://wiki.micromint.com/index.php/Eagle-100_Manual/Getting_Started#Compile_a_Code_Example Compile a Code Example ] | ||
| - | * 6. [http://wiki.micromint.com/index.php/Eagle-100_Manual/Getting_Started#Download_the_Code_Example_to_the_Eagle_50.2F50E Download the Code Example to the Eagle | + | * 6. [http://wiki.micromint.com/index.php/Eagle-100_Manual/Getting_Started#Download_the_Code_Example_to_the_Eagle_50.2F50E Download the Code Example to the Eagle 100] |
==Run the Preloaded Application== | ==Run the Preloaded Application== | ||
Revision as of 19:53, 3 April 2012
Steps to Getting Started
Getting started with the Eagle 100 can be done in just 6 steps.
- 1. Run the Preloaded Application
- 2. Install the Eagle Code Examples
- 3. Choose a Compiler and IDE (Integrated Development Environment)
- 4. Install the Chosen Compiler and IDE
- 5. Compile a Code Example
- 6. Download the Code Example to the Eagle 100
Run the Preloaded Application
The Eagle 100 come from the factory preloaded with an application called enet_io that demonstrates web-based I/O control. The preloaded applications should be run to test the board after receiving it. The full source code for the application is provided on the Eagle's Wiki. http://wiki.micromint.com/index.php/Eagle_Documentation
Eagle SBC enet_io Application
The Eagle Single Board Computer's (SBC) with Ethernet are shipped with the enet_io example application from the TI Stellarisware Library. This example application demonstrates web-based I/O control using the Ethernet controller and the lwIP TCP/IP Stack. DHCP is used to obtain an Ethernet address. If DHCP times out without obtaining an address, a static IP address will be chosen using AutoIP. The address that is selected will be shown on COM1, allowing access to the internal web pages served by the application via a normal web browser. Figure 2.1 shows the web page that will first be displayed.
In order to demonstrate this application on an Eagle SBC without the optional USB Debug Port you will need the following software and equipment:
- 1. A Personal Computer (PC) with a serial port or a USB to serial port adapter
- 2. A DB9 to 2x5 adapter cable if using an Eagle SBC where COM1 is a 2x5 pin header
- 3. A null modem cable
- 4. A terminal program such as Putty, HyperTerminal, or TeraTerm
- 5. A web browser
- 6. One Ethernet cable
- 7. One +5V power supply
Please follow these steps to run the enet_io application on an Eagle SBC without the optional USB Debug Port:
- 1. If the Eagle SBC's COM1 port to the computer using the null modem cable. NOTE: Use the 2x5 adapter cable if COM1 is a 2x5 pin header.
- 2. Connect the Eagle SBC's Ethernet port to an Ethernet Network.
- 3. Start and set-up the terminal program with the following settings.
- a. Baudrate – 115200
- b. Data Bits – 8
- c. Parity – None
- d. Stop Bits – 1
- e. Flow Control – None
- 4. Apply power to the board.
- 5. The Eagle SBC will transmit the boards IP address to the terminal
- 6. Open a web browser.
- 7. Type the IP address into the web browsers address bar and the web page in Figure 2.1 should load.
- 8. Click on “I/O Control Demo 1 (HTTP Requests)”.
- 9. Click on the “Toggle LED” button to turn the User LED on.
In order to demonstrate the enet_io application on an Eagle SBC with the optional USB Debug Port you will need the following software and equipment:
- 1. A Personal Computer (PC) with a USB port
- 2. A terminal program such as Putty, HyperTerminal, or TeraTerm
- 3. A web browser
- 4. One USB A to micro USB cable (Supplied with Eagle SBC with USB Debug Port)
- 5. One Ethernet cable
Please follow these steps to run the enet_io application on an Eagle SBC with the optional USB Debug Port:
- 1. Make sure two jumpers are set correctly to enable power to come from the Debug port and enable the virtual COM port. The Eagle 50 jumpers are JP1 for power and and JP6 for the virtual COM port.
- 2. Connect the Eagle SBC's Ethernet port to an Ethernet Network.
- 3. Connect the Eagle SBC to the PC by using the USB A to micro USB cable.
- 4. Wait until the USB drivers have been installed. The USB drivers can be found in the Software Updates section on the Eagle's Wiki. http://wiki.micromint.com/index.php/Eagle_Documentation
- 5. Find out what COM port the Eagle SBC's virtual COM port is by looking in Windows Device Manager’s PORTS (COM & LPT). The Eagle SBC's COM port is the one that says Stellaris Virtual COM Port.
- 6. Start and set-up the terminal program for the COM port that the Eagle SBC is on and with the following settings.
- a. Baudrate – 115200
- b. Data Bits – 8
- c. Parity – None
- d. Stop Bits – 1
- e. Flow Control – None
- 7. Press the Reset button.
- 8. The Eagle SBC will transmit the boards IP address to the terminal.
- 9. Open a web browser.
- 10. Type the IP address into the web browsers address bar and the web page in Figure 2.1 should load.
- 11. Click on “I/O Control Demo 1 (HTTP Requests)”.
- 12. Click on the “Toggle LED” button to turn the User LED on.
Install the Eagle Code Examples
The Eagle Code Examples are generated from Stellarisware and may be downloaded from the Software Updates section of the Software Updates section of the Eagle Wiki. After they are downloaded unzip them into a directory of your choice. Descriptions of the examples can be viewed on the Eagle Examples Page.
Choose a Compiler and IDE (Integrated Development Environment)
Choosing a Compiler
The Code Examples currently supports the following C and C++ compilers :
- IAR Embedded Workbench for ARM (ewarm) 5.40
- GNU Toolchain (gcc) for ARM 4.4.1 – CodeSourcery G++ 2010q1
- GNU Toolchain (gcc) for ARM 4.4.3 – devkitARM 30
The IAR EWARM C/C++ compiler generally produces the smallest code sizes for ARM targets and has excellent integrated debugging capabilities versus the GNU Toolchain. If a GNU chain is used then an IDE needs to be chosen.
Choosing an IDE
An IDE installs when the IAR C/C++ Compiler is installed where the GNU tool chains do not install one. Code::Blocks IDE and the Eclipse IDE are the IDEs currently supported by the Code Examples. Debugging is currently not supported in the Code::Blocks IDE. If a debug environment is needed the Eclipse IDE should be use.
Install the Chosen Compiler and IDE
Installing EWARM
The IAR EWARM Kickstart Edition is a 32 KB code-sized limited version of the IAR C/C++ compiler and debugger. It can be downloaded from IAR's website.
After downloading the EWARM-KS-CD click on the application to install the IAR Embedded Workbench for ARM. Select the “Install IAR Embedded Workbench” option from the Applications main menu as shown in Figure 2.4. Follow the instructions in the installation application. We suggest that you use the default directories, and the “Full” installation option.
Installing a GNU Compiler and IDE
The Code Examples currently support two GNU tool chains:
- GNU Toolchain (gcc) for ARM 4.4.1 – EABI CodeSourcery G++ Lite 2010q1
- GNU Toolchain (gcc) for ARM 4.4.3 – devkitARM 30
Installing the Sourcery CodeBench Lite Edition for ARM EABI GNU Compiler
Download the Sourcery G++ Lite 2010q1 for ARM EABI version of Sourcery CodeBench Lite Edition for ARM from Mentor Graphics website. When it is finished downloading click on the application to install it and a screen similar to Figure 2.5 should appear. We suggest that you use the default directories during the installation.
If make is not installed on the computer then perform the following steps:
- 1. Open a command prompt
- 2. Type "cd\program files\codesourcery\sourcery g++ lite\bin"
- 3. Press enter
- 4. Type "copy cs-make.exe make.exe"
- 5. Press enter
Installing the devkitARM GNU Compiler
Installing the devkitARM GNU Compiler can be done in 6 steps.
- 1. Download the devkitARM compiler from the sourceforge website by clickin the following link: http://sourceforge.net/projects/devkitpro/files/devkitARM/
- 2. Create a folder called devkitPro on the C drive.
- 3. Extract the contents into the "C:\devkitPro" folder. It should create a folder called "devkitARM".
- 4. Download the msystools from the sourceforge website by clicking the following link: http://sourceforge.net/projects/mingw/files/MSYS/Base/msys-core/msys-1.0.10/MSYS-1.0.10.exe/download
- 5. Run the msystools installer.
Installing the Eclipse IDE
Eclipse is a Java application and has the potential to be run on a wide variety of hardware and operating systems. Eclipse may install on systems with as little as 64MB of memory, however, we recommend to have 1GB of memory or more.
Follow these steps to install the Eclipse IDE:
- 1. Install the desired GNU ARM Toolchain (EABI CodeSourcery G++ Lite 2010q1 or devkitARM 30).
- 2. Be sure the Java Runtime Environment (JRE) is installed.
- 3. The Eclipse SDK includes the Eclipse Platform is provided as an archive and can be downloaded on the following website: http://www.eclipse.org/cdt/downloads.php
- 4. Extract the Eclipse SDK to its desired directory (commonly ‘C:\Program Files\’).
- 5. Start Eclipse by double clicking on the "eclipse.exe" file where the Eclipse SDK was extracted to.
- 6. Select the workspace directory. "StellarisWare\boards\eagle" for the Eagle and "Lincoln\CMSIS\projects" for the Lincoln.
- 7. Click on the "Help" drop down menu and select "Install new software…".
- 8. Expand "CDT Main Features" and check "Eclipse C/C++ Development Tools"
- 9. Click the "Next" button.
- 10. Copy http://opensource.zylin.com/zylincdt and paste it into the "Work with:" box.
- 11. Click the "Add" button.
- 12. Check "Zylin Embedded CDT".
- 13. Click the "Next" button.
- 14. Copy http://sourceforge.net/projects/gnuarmeclipse/files/Eclipse/updates/ and paste it into the "Work with:" box.
- 15. Click the "Add" button.
- 16. Check "CDT GNU Cross Development Tools".
- 17. Click the "Next" button.
Installing the CodeBlocks IDE
Codeblocks is a cross-platform IDE built around wxWidgets, designed to be extensible and configurable. It can be downloaded from the Codeblocks website by clicking the following link: http://www.codeblocks.org/downloads
Install Codeblocks by clicking on the downloaded executable.
Compile a Code Example
Compiling Code Examples with EWARM
Follow these steps to compile an example using EWARM.
- 1. Open IAR Embedded Workbench for ARM (EWARM).
- 2. Click "File|Open|Workspace..." from the drop down menu.
- 3. Browse to the "StellarisWare\boards\eagle" directory and select the eagle workspace. The work space should look similar to the one in Figure 2.5.
- 4. Right click on the desired project and select "Set as Active".
- 5. Right click on the project and select "Rebuild".
Compiling Examples with the GNU Toolchain
Compiling Examples with the Code::Blocks IDE
Follow these steps to compile an example using the Code::Blocks IDE.
- 1. Open the Code::Blocks IDE.
- 2. Click "File" from the drop down menu.
- 3. Click "Open".
- 4. Browse to the "StellarisWare\boards\eagle" directory and select the eagle workspace. The work space should look similar to the one in Figure 2.6.
- 5. Right click on the desired project and select "Activate project".
- 6. Right click on the project and select build.
Compiling Examples with the Eclipse IDE
Follow these steps to compile an example using the Eclipse IDE.
- 1. Open the Eclipse IDE.
- 2. When prompted browse to the "StellarisWare\boards\eagle" directory.
- 3. Click 'OK'.
- 4. Press the 'F5' key on the keyboard to refresh the files.
- 5. Close all of the open projects by right clicking on the project and selecting "Close Project".
- 6. Open a project by right clicking on the desired project and selecting "Open Project". If the Sourcery G++ Lite compiler is not installed and devkitARM is installed then click on "Window>Preferences>C/C++>Build>Environtment" and add a variable called "COMPILER" with the value set to "devkitARM".
- 7. Right click on the project and select build.
Compiling Examples with the GNU Toolchain 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”. To build the image for blinky you would perform the following:
- 1. Open a command prompt.
- 2. Type “CD\Program Files\Micromint\Eagle\StellarisWare\boards\eagle\blinky”.
- 3. Press “Enter”.
- 4. Type “make”.
- 5. Press “Enter”.
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 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 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”.










