uf2tool portability issues
I don't see what platforms uf2tool builds for but it looks specifically written for osx and won't build on linux. This should probably be noted in the README.
[tom@z400 uf2tool]$ make mkdir -p ../built cc -g -Wall tool.c ../hidapi/mac/hid.c -I../../uf2-samd21/inc -I../hidapi/hidapi -I. -framework IOKit -framework CoreFoundation -o ../built/uf2tool cc: error: IOKit: No such file or directory cc: error: CoreFoundation: No such file or directory cc: error: unrecognized command line option '-framework' cc: error: unrecognized command line option '-framework' make: *** [Makefile:3: all] Error 1 [tom@z400 uf2tool]$
I tried tidying the Makefile but the hidapi seems also to be reverting to osx. . . ../hidapi/mac/hid.c:25:36: fatal error: IOKit/hid/IOHIDManager.h: No such file or directory #include <IOKit/hid/IOHIDManager.h>
I am running archlinux.
[tom@z400 uf2tool]$ uname -a Linux z400 4.10.10-1-ARCH #1 SMP PREEMPT Wed Apr 12 18:50:28 CEST 2017 x86_64 GNU/Linux
edit This line builds ok for linux.
$(CC) -g -Wall tool.c ../hidapi/linux/hid.c -I../../uf2-samd21/inc -I../hidapi/hidapi -ludev -lpthread -o ../built/uf2tool
I ran into this also, decided to look at the Python implementation (see: https://github.com/microsoft/uf2/issues/42 also).