Tutorial: Running ERIKA on Mico32 and FPG-EYE

From ErikaWiki

Revision as of 09:35, 8 November 2011 by Salva (Talk | contribs)
Jump to: navigation, search

Contents

Introduction

This tutorial shows how to compile and program the webserver_camera demo application on the FPG-EYE bord (the one that is pre-loaded on the board).

To begin with this tutorial: install Mico32/FPG-EYE development environment, get a local copy of ERIKA Enterprise repository and then follow the Tutorial: Building a Mico32 platform for FPG-EYE.


Below mentioned paths are all relative paths of the local ERIKA Enterprise repository.

Create Mico32 Library for fpg_eye_mico32 platform

After importing fpg_eye_mico32 platform in LatticeMico System software, switch to C/C++ Perspective. Right click to open the C/C++ Project View and select New->Mico32 Library Project command:

C/C++ New Mico32 Library Project

Make sure to select the correct target hardware by selecting ee\examples\mico32\demo\platforms\fpg_eye_mico32\msb\soc\fpg_eye_mico32.msb file. To compile the fpg_eye_mico32 demo without making any changes to the project files, select the follow directory as library location ee\trunk\ee\examples\mico32\demo\platforms\fpg_eye_mico32\library

C/C++ Mico32 System Library Project Wizard

and fpg_eye_mico32 as project name:

C/C++ Mico32 System Library Project Wizard (Project name wrote)

Build the brand new project:

Compile the Mico32 library

Create webserver_camera demo project

Create a Mico32 Standard Make C Project in ee\examples\mico32\demo\sw_projects\webserver_camera directory, and build it.

New C/C++ Mico32 Standard Make C Project
C/C++ Mico32 Standard Make C Project Wizard
 Please note that lm32-elf-objdump may fail with a segmentation fault. You can run make output/out.elf
 (where output is the output folder) instead of make all to avoid the execution of the objdump step.

Program the flash with send_prog.py bootloader script

Before flashing the application with send_prog.py bootloader client script, you need to connect the FPG-EYE board with a serial cable too you computer. Use serial-to-usb coverter if required:

FPG-EYE Board serial connector
FPG-EYE custom serial cable

After connecting the board with serial cable, get the send_prog.py script from FPG-EYE Software Packet and copy it in a directory under your cygwin environment path. Open a cygwin shell in webserver_camera project directory output and execute the following command:

send_prog.py --flash /dev/comX out.elf

Note: Change the comX value to that of your actual com port value.

When the script is launched, it is not synchronized with the bootloader, and it should look like:

Bootloader-script synchronization

To synchronize the script with the bootloader, hold down Button 1 and push the reset button.

FPG-EYE Buttons


The application is saved on FPG_EYE external flash as shown below, and the bootloader is ready to read and copy it in XP2 ram.

FPG-EYE Application Flash Success

Test webserver_camera demo application

Connect Ethernet cable to the FPG-EYE board. The webserver_camera demo has ethernet address to 192.168.0.2. Change your local net address to the same subnet of the FPG-EYE board.

How Change LAN Address

Open a web browser window and type in the address bar http://192.168.0.2:

web_server camera demo application screenshot
Personal tools