
This implements the boot loader. It can be used to flash new firmware to node.


How it works
============


Whenever the MCU reboots the bootloader is started. The first thing it does is to send a FLASH_READY message to the bus
containing its UID (if any) as well as a device info block (containing manufacturer, device id and version).

If no FLASH_START message is received for the UID of the device then the bootloader tries to start the main firmware.

If a FLASH_START message is received from manager software (e.g. on a Linux machine) the MCU responds with a positive FLASH_RESPONSE
message.
After that the manager software sends FLASH_DATA messages to which the MCU responds with positive or negative FLASH_RESPONSE messages.
The last flash page is followed by a FLASH_END message.
Then the MCU tries to start the freshly installed firmware.

If at any point in the flashing process an unrecoverable error occurrs the bootloader is restarted, waiting again for a FLASH_START
message.


