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

&& echo OK does not work after -c urclock #1192

Closed
mcuee opened this issue Nov 23, 2022 · 2 comments · Fixed by #1194
Closed

&& echo OK does not work after -c urclock #1192

mcuee opened this issue Nov 23, 2022 · 2 comments · Fixed by #1194
Labels
bug Something isn't working

Comments

@mcuee
Copy link
Collaborator

mcuee commented Nov 23, 2022

Reference:

It is strange that && echo OK does not work after -c urclock. No pronlems with -c arduino.

It is the same under Linux.

mcuee@UbuntuSwift3:~/build/avr/avrdude_bin$ ./avrdude -c arduino -P /dev/ttyUSB0 -p m328p
 -U ./Blink.ino.standard.hex -qq && echo OK
OK

mcuee@UbuntuSwift3:~/build/avr/avrdude_bin$ ./avrdude -c urclock -P /dev/ttyUSB0 -p m328p
 -U ./Blink.ino.standard.hex -xbootsize=512 -qq && echo OK

mcuee@UbuntuSwift3:~/build/avr/avrdude_bin$ 
@mcuee mcuee added the bug Something isn't working label Nov 23, 2022
@stefanrueger
Copy link
Collaborator

-c arduino pretends chip erase works (but does nothing), so no error is being shown.

-c urclock correctly assumes the non-native bootloader won't have CE, so delayes CE to be dealt with by filling the remaining space with 0xff on the next -U flash upload, but marks the shell exitrc value provisionally as 1 (error, no echo OK) as at this point it does not know whether there will be a correct -U flash upload later

The bug is that this then never reset to 0 on successful -U to flash.

Will repair

@mcuee
Copy link
Collaborator Author

mcuee commented Nov 24, 2022

@stefanrueger
Thanks for the detailed explanation why the issue happened. I can confirm PR #1194 fixed the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants