*****************************************************************************
** ChibiOS/RT port for ARM-Cortex-M4 STM32F407.                            **
*****************************************************************************

** TARGET **

The demo runs on an Olimex STM32-E407 board.

** The Demo **

The demo provides a command shell using a virtual com port (CDC) on OTG1
The green LED flashes using a thread and serves HTTP requests 
at address 192.168.1.20. FatFs integrated using SDIO.

Known issues: 
tree command reported "File System not mounted".
ping command does not finish and board has to be reset.
iperf cannot serve more than 2 parallel connections.

** Build Procedure **

Unzip ext/fatfs-0.10b-patched.zip into ext/fatfs
Unzip ext/lwip-1.4.1_patched.zip into ext/lwip
Default IP and MAC addresses and current LwIP settings can be changed 
in os/various/lwip_bindings/lwipthread.h and lwipopts.h files.
Makefile CIBIOS Eclipse variable has to point ChibiOS location.

DHCP can be enabled but os\various\lwip_bindings\lwipthread.c has to be changed
like in used\LWIP-FATFS-USB_Changes\os\various\lwip_bindings\lwipthread.c

uHTTP library (https://github.com/aegiryy/uHTTP) located in web/uhttp can be moved to 
os/ext/uhttp but UHTTP variable in Makefile has to be changed accordingly. To move 
back to built-in ChibiOS web server simply comment #define USE_HTTPD line in main.c.

Web site files are located in used/crurom/htdocs and used/crurom/crurom.exe 
can be used to (re-)build UROM FS. Then copy used/crurom/htdocs.c over 
web/htdocs.c and rebuild the project. File names are case sensitive.

Network performance can be measured by running used/jperf-2.0.2/jperf.bat 
but ChbibiOS shell command iperf has to be issued before Run IPerf!

The demo has been tested by using the free Gnu Tools for ARM Embedded 
processors ver. 4.7.4 20140401 (https://launchpad.net/gcc-arm-embedded).
It is verified that with ver. 4_8-2014q3 application does not work properly.
Just modify the TRGT line in the makefile in order to use different GCC ports.

** Notes **

- The Olimex STM32-E407 has several incompatible hardware revisions.  You must
  choose the appropriate board file for your revision in the Makefile:
    Revs A,B,C: OLIMEX_STM32_E407  (default)
    Rev D: OLIMEX_STM32_E407_REV_D
    Rev E: Not yet supported

Some files used by the demo are not part of ChibiOS/RT but are copyright of
ST Microelectronics and are licensed under a different license.
Also note that not all the files present in the ST library are distributed
with ChibiOS/RT, you can find the whole library on the ST web site:

                             http://www.st.com
