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

Inherited workaround in avrdude.conf causes upload fail to ATmega8 #272

Open
Cheesus13 opened this issue Dec 20, 2021 · 1 comment
Open

Comments

@Cheesus13
Copy link

Cheesus13 commented Dec 20, 2021

When I tried to upload my code in ATmega8 using usbasp I got the error:

avrdude: safemode read 1, efuse value: ff
avrdude: safemode read 2, efuse value: d9
avrdude: safemode: Sorry, reading back fuses was unreliable. I have given up and exited programming mode
avrdude: usbasp_close()

avrdude done.  Thank you.

*** [upload] Error 1

This mistake caused by the inherited workaround from Arduino IDE.
The lines 6517-6522 of the avrdude.conf from .platformio/packages/tool-avrdude/:

    # Required for Arduino IDE
    # see: https://github.com/arduino/Arduino/issues/2075
    #      https://github.com/arduino/Arduino/issues/2075#issuecomment-238031689
    memory "efuse"
        size            = 0;
      ;

After removing these lines the problem was solved:

avrdude: safemode: lfuse reads as BF
avrdude: safemode: hfuse reads as C4
avrdude: safemode: Fuses OK (E:FF, H:C4, L:BF)

avrdude done.  Thank you.
@MCUdude
Copy link
Contributor

MCUdude commented Jan 18, 2022

@valeros this issue can be resolved by removing

    # Required for Arduino IDE
    # see: https://github.com/arduino/Arduino/issues/2075
    #      https://github.com/arduino/Arduino/issues/2075#issuecomment-238031689
    memory "efuse"
        size            = 0;
      ;

from the Avrdude.conf fine used by avrdude. It's a hacky workaround t get it working with Arduino IDE, and not needed by PlatformIO.

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

No branches or pull requests

2 participants