Tutorial: Running ERIKA on Mico32 and FPG-EYE
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).
Below mentioned paths are all relative paths of the local ERIKA Enterprise repository.
Create Mico32 Library for fpg_eye_mico32 platform
Make sure to select the correct target hardware by selecting ee\examples\mico32\demo\platforms\fpg_eye_isplever\msb\soc\fpg_eye_mico32.msb if you are using ispLever tools else ee\examples\mico32\demo\platforms\fpg_eye_diamond\msb\soc\fpg_eye_mico32.msb if are using Diamond tools. 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_isplever\library (if you use ispLever tools) while ee\trunk\ee\examples\mico32\demo\platforms\fpg_eye_diamond\library (if you use Diamond tools)
and fpg_eye_mico32 as project name:
Build the brand new project:
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.
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:
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:
To synchronize the script with the bootloader, hold down Button 1 and push the reset button.
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.
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.
Open a web browser window and type in the address bar http://192.168.0.2:
Test demo_camera application
In the Erika repository you can find a application called demo_camera more simpler than web_camera. The demo uses the camera and the uart serial port without the ethernet interface. Its location, in the Erika repository, is as follows: /ee/examples/mico32/demo/sw_projects/demo_camera. To use this demo you have to follow the same steps described above about web_camera application. The picture than you can downloading is in 640x480 b/w format. Once the program has been launched via bootloader, open HyperTerminal connection with 115200 bps, 8N1 (on the right serial port on your pc). Now a communications with the application is now possible. The program asks you if you want download the picture:
Now click on Text acquired... in the Transfer menu voice.
Now please select the place, in your file system, where you want storage the camera picture. Important: the file extension must be PMG!!! (something like this: <file_name>.pmg).
After press any key on the keyboard, the picture downloading starts:
At end of the downloading you can close the Text acquired..., and then with a program graphics open the picture (GIMP in this case):
If you're using Linux you not have available the program HyperTerminal. In this case you can use another good program called minicom. Minicom is a text-based modem control so, maybe, it's a bit more complicate to use than HyperTerminal. Minicom starts with the follow shell command (sudo minicom):
After entering the password (evidence), minicom is ready to accept commands:
With Ctrl-A and Z the Minicom enters in menu configuration:
Please press the O key for cOnfigure minicom:
Now select the serial port setup:
The Bps/Par/Bits must be value: 115200 8N1, Hardware Flow Control value No and Software Flow Control value Yes. While for the Serial Device you have to see where your VM has connected to the serial port on your PC.
Minicon is configured and it is now possible to communicate with fpg_eye application.
To capture in the file the image, follow these steps. With Ctrl-A and Z the Minicom enters in menu configuration, then press the the L key (voice Capture on/off .... L).
Now please the file name where you want storage the camera picture. Important: the file extension must be PMG!!! (something like this: <file_name>.pmg).
At end of the downloading you can close the minicom, and then with a program graphics open the picture (GIMP in this case):