This example program uses generic Linux SPI driver (/dev/spidev#.#) as transport layer.

how to build:
1. Build the SiRFFlashEngineEP library by running "make" at
   ..../sw/host/library/builds/linux_gcc/SiRFflashEngineEP/spi_via_kernel_driver/
2. Build this program by running "make"

how to test:

prgflash_spi <binary_image_name> <spi_dev_name> <speed> [-e] -x

 - Flash image should be binary image (not S-record)
 - You can find spi_dev_name under /dev/spidev<bus_num>.<cs_num>.
 - Optimal speed values are in the range of 1000000 and 2000000 
 - The program doesn't handle control signal (on/off, reset, boot mode pin,..), so SS5 should be in the boot mode before executing program
 - By default, only the necessary sectors are erased prior to flashing.
   To erase the whole flash prior to flashing use the -e option
   
Requirement:
1. This was tested with Beaglebone Black kit using gcc-linaro-arm-linux-gnueabihf
   toolchain. Change the CC variable in makefile to the path of desired toolchain used.
