The get_line function in file pic16/device.c is not working right in windows. Without any changes it is having an endless loop in SDCC. This patch changes the open to Binary Read instead of Text Read. It needs tested under Linux and Mac, but the code looks like it should have been binary read for all platforms.
--- sdcc/src/pic16/device.c (revision 5157)
+++ sdcc/src/pic16/device.c (working copy)
@@ -550,7 +550,7 @@
SNPRINTF(&buffer, PATH_MAX, "%s%s%s",
path, DIR_SEPARATOR_STRING, DEVICE_FILE_NAME);
//printf("%s: checking %s\n", __func__, &buffer);
- f = fopen(&buffer, "r");
+ f = fopen(&buffer, "rb");
} // for
} // while
} // if
Log in to post a comment.