You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some tools produce s-record (or hex) files which have an additonal empty line(s) at the end.
rl78flash will not accept such otherwise perfectly valid file.
It makes much more sense to accept these files than having to edit each file every time a software is released.
Empty lines can be safely ignored.
I am dealing with it by skiping the line if first character is '\r' or '\n':
in srec.c: if ('S' != line[0]) { if ('\r' == line[0] || '\n' == line[0]) { break; } fprintf(stderr, "File format error (\"%s\")\n", line); rc = SREC_FORMAT_ERROR; break; }
(I don't know why github is misformatting the indentation)
similarly for intel hex: if (':' != line[0]) { if ('\r' == line[0] || '\n' == line[0]) { break; } fprintf(stderr, "File format error (\"%s\")\n", line); rc = SREC_FORMAT_ERROR; break; }
(BTW, I wrote some questions in my pull request for intel hex support)
The text was updated successfully, but these errors were encountered:
Related to this issue:
When last line of srec file does not end with a newline character, the error message is misleading:
"Unable to parse file: line is too long\n".
Some tools produce s-record (or hex) files which have an additonal empty line(s) at the end.
rl78flash will not accept such otherwise perfectly valid file.
It makes much more sense to accept these files than having to edit each file every time a software is released.
Empty lines can be safely ignored.
I am dealing with it by skiping the line if first character is '\r' or '\n':
in srec.c:
if ('S' != line[0])
{
if ('\r' == line[0] || '\n' == line[0])
{
break;
}
fprintf(stderr, "File format error (\"%s\")\n", line);
rc = SREC_FORMAT_ERROR;
break;
}
(I don't know why github is misformatting the indentation)
similarly for intel hex:
if (':' != line[0])
{
if ('\r' == line[0] || '\n' == line[0])
{
break;
}
fprintf(stderr, "File format error (\"%s\")\n", line);
rc = SREC_FORMAT_ERROR;
break;
}
(BTW, I wrote some questions in my pull request for intel hex support)
The text was updated successfully, but these errors were encountered: