Add missing includes

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Avoid global fd_serial and xsvf_file variables

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Pass device and xsvf filename as command arguments

And report on file open errors.

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Clean up Makefile

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Do not write to zero tdo pointer in shift()

This fixes hardware faults on STM32

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Merge pull request #1 from tormodvolden/fixes

Fixes