Hi,
I was just looking over the fmt_autodetect() function. When checking for
a binary file, it is possible (although unlikely) that ever byte in the
file has value < 128.
Wouldn't it make sense to just not even check for binary files? Just
check for recognizable format (ihex, srec, etc.) and if nothing is
found, just default to binary (and issue a warning).
I believe this is what bfd does and it seems to work well enough when we
use it with avarice.
Attached is a patch which should make all reads/writes via fileio.c be
binary and changes the above noted behaviour.
Can someone on a windows box try this to see if I borked anything? Does
it fix the mangled binary upload problem?