scripts: add support script for 'make flash' over DFU

Flashing the Arduino 101 board over DFU can be tricky: the
dfu-util command line is cumbersome, and the reset button
must be pressed at the right time.

This script brings the convenience of 'make flash' for the
Arduino 101 board and for other boards that support the DFU
protocol. It checks whether the board is in DFU mode, and
prompts the user to reset it when needed.

The dfu-util command line is constructed from the following
environment variables, to be exported from the Makefile:
- DFUUTIL: path to the dfu-util executable, default: dfu-util
- DFUUTIL_PID: vendor_ID:product_ID of the board in DFU mode
- DFUUTIL_ALT: alternate setting name of the DFU interface
- DFUUTIL_IMG: path to the binary image sent to the board

Change-Id: Ia9577ec96102a92d4c60481f980f30f4f6e7cd9e
Signed-off-by: Patrice Buriez <patrice.buriez@intel.com>
1 file changed