Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avrdude creates srec files in an unnecessarily lax way #1391

Closed
stefanrueger opened this issue Jun 10, 2023 · 1 comment · Fixed by #1392
Closed

Avrdude creates srec files in an unnecessarily lax way #1391

stefanrueger opened this issue Jun 10, 2023 · 1 comment · Fixed by #1392
Assignees
Labels
enhancement New feature or request

Comments

@stefanrueger
Copy link
Collaborator

AVRDUDE takes a relatively liberal interpretation of the Motorola S-Record format when reading them (good) but also when creating them (less good): header and count records are not created, the record types S1/2/3 are freely mixed within a file and always closed off with S9 (but S8 should close S2 and A7 should close off S3). Here a small example:

$ avrdude -qq -p m328p -c dryrun -A -U flash:r:out.srec:s
$ srec_cat out.srec -output out.raw -binary
srec_cat: out.srec: 1: warning: no header record

I suggest creating S-Record files that follow a stricter format, eg, the one in wikipedia, and thus will be usable by more programs.

@mcuee
Copy link
Collaborator

mcuee commented Jun 11, 2023

Indeed there is an issue in git main and PR #1392 fixed the issue.

$ ./avrdude_git -qq -p m2560 -c dryrun -A -U flash:r:out.srec:s

$ srec_cat out.srec -output out.raw -binary
srec_cat: out.srec: 1: warning: no header record

$ ./avrdude_pr1392 -qq -p m2560 -c dryrun -A -U flash:r:out.srec:s

$ srec_cat out.srec -output out.raw -binary
(no more warning messages)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants