Go Down

Topic: BUG: Arduino IDE 1.8.11 ATtiny85 USBasp (Read 5087 times) previous topic - next topic

abveost

The IDE has problems with this part using this programmer.

When trying to burn the bootloader output is:

avrdude: set SCK frequency to 187500 Hz
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: set SCK frequency to 187500 Hz
avrdude: warning: cannot set sck period. please check for usbasp firmware update.

Uploading a sketch using programmer:

Sketch uses 3006 bytes (36%) of program storage space. Maximum is 8192 bytes.
Global variables use 108 bytes (21%) of dynamic memory, leaving 404 bytes for local variables. Maximum is 512 bytes.
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: warning: cannot set sck period. please check for usbasp firmware update.

The bootloader and compiled sketch can be flashed successfully from the command line using the avrdude binary bundled with the IDE

In the IDE, changing the board to ATmega8 and connecting an ATmega8 to the usbasp allows for successfully burning of bootloader and sketch.

Test environment is Microsoft Windows 10 Home 10.0.18362 Build 18362

pert

This is normal with the common USBasp clones and does not indicate a problem. Just ignore it.

abveost

So you're saying it's normal that the IDE works perfectly fine with an ATMega8 and fails when using an ATtiny85?  Using exactly the same USBasp.  And I should ignore it and what?  Not use ATtiny85s?  We either have very different definitions of the term "problem" or I didn't do a good enough job of explaining the problem.  What do I need to do to convince you that this is a problem?

pert

What do I need to do to convince you that this is a problem?
Either post an error message or provide a detailed description of the failure. All you've done so far is post the normal output from a successful Burn Bootloader or Upload Using Programmer process when using a Chinese USBasp. Those "cannot set sck period. please check for usbasp firmware update." warnings are normal and expected.

abveost

I posted the entire message the software provided.  What more details would be of use to you?  How about the message the software gives when burning the bootloader using the exact same USBasp, connection, and the board changed to ATmega8? How about the output from the avrdude binary included with IDE using the hex generated by the IDE and the IDE conf?  You will see the problem has nothing to do with the USBasp and is strictly a problem with the IDE using the ATtiny25/45/85 board.

abveost

Here's the output for uploading a sketch from the command line to an ATtin85.  The output from the IDE will have to wait due to the limitations of this forum, which requires I split it into multiple posts and wait 5 minutes between posting them.  The irony of asking for more details with these limitations isn't lost on me.


D:\Program Files (x86)\Arduino\hardware\tools\avr\bin>avrdude -u -c usbasp -p t85 -P usb -B 0.5 -U flash:w:"C:\Users\User\AppData\Local\Temp\led\led.ino.hex":a  -C "D:\Program Files (x86)\Arduino\hardware\tools\avr\etc\avrdude.conf"

avrdude: set SCK frequency to 1500000 Hz
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.22s

avrdude: Device signature = 0x1e930b (probably t85)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
     To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: set SCK frequency to 1500000 Hz
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: reading input file "C:\Users\User\AppData\Local\Temp\led\led.ino.hex"
avrdude: input file C:\Users\User\AppData\Local\Temp\led\led.ino.hex auto detected as Intel Hex
avrdude: writing flash (1264 bytes):

Writing | ################################################## | 100% 1.16s

avrdude: 1264 bytes of flash written
avrdude: verifying flash memory against C:\Users\User\AppData\Local\Temp\led\led.ino.hex:
avrdude: load data flash data from input file C:\Users\User\AppData\Local\Temp\led\led.ino.hex:
avrdude: input file C:\Users\User\AppData\Local\Temp\led\led.ino.hex auto detected as Intel Hex
avrdude: input file C:\Users\User\AppData\Local\Temp\led\led.ino.hex contains 1264 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.80s

avrdude: verifying ...
avrdude: 1264 bytes of flash verified

avrdude done.  Thank you.

pert

The irony of you complaining about a five minute delay when it took you four days to respond to my request for more information isn't lost on me.

The five minute restriction goes away at your hundredth post. So if you stick around it won't be an annoyance for too long.

abveost

avrdude: Version 6.3-20190619
       Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
       Copyright (c) 2007-2014 Joerg Wunsch

       System wide configuration file is "C:\Users\User\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.0.3/avrdude.conf"

       Using Port                    : usb
       Using Programmer              : usbasp
       AVR Part                      : ATmega8
       Chip Erase delay              : 10000 us
       PAGEL                         : PD7
       BS2                           : PC2
       RESET disposition             : dedicated
       RETRY pulse                   : SCK
       serial program mode           : yes
       parallel program mode         : yes
       Timeout                       : 200
       StabDelay                     : 100
       CmdexeDelay                   : 25
       SyncLoops                     : 32
       ByteDelay                     : 0
       PollIndex                     : 3
       PollValue                     : 0x53
       Memory Detail                 :

                                Block Poll               Page                       Polled
         Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
         ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
         eeprom         4    20   128    0 no        512    4      0  9000  9000 0xff 0xff
         flash         33    10    64    0 yes      8192   64    128  4500  4500 0xff 0x00
         lfuse          0     0     0    0 no          1    0      0  2000  2000 0x00 0x00
         hfuse          0     0     0    0 no          1    0      0  2000  2000 0x00 0x00
         efuse          0     0     0    0 no          0    0      0     0     0 0x00 0x00
         lock           0     0     0    0 no          1    0      0  2000  2000 0x00 0x00
         calibration    0     0     0    0 no          4    0      0     0     0 0x00 0x00
         signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

       Programmer Type : usbasp
       Description     : USBasp, http://www.fischl.de/usbasp/

avrdude: auto set sck period (because given equals null)
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9307 (probably m8)
avrdude: erasing chip
avrdude: auto set sck period (because given equals null)
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: reading input file "0x3f"
avrdude: writing lock (1 bytes):



abveost

avrdude: Version 6.3-20190619
      Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
      Copyright (c) 2007-2014 Joerg Wunsch

      System wide configuration file is "C:\Users\User\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.0.3/avrdude.conf"

      Using Port                    : usb
      Using Programmer              : usbasp
Writing | ################################################## | 100% 0.00s

avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x3f:
avrdude: load data lock data from input file 0x3f:
avrdude: input file 0x3f contains 1 bytes
avrdude: reading on-chip lock data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 1 bytes of lock verified
avrdude: reading input file "{bootloader.extended_fuses}"
avrdude: writing efuse (0 bytes):

Writing | ################################################## | 100% -0.00s

avrdude: 0 bytes of efuse written
avrdude: verifying efuse memory against {bootloader.extended_fuses}:
avrdude: load data efuse data from input file {bootloader.extended_fuses}:
avrdude: input file {bootloader.extended_fuses} contains 0 bytes
avrdude: reading on-chip efuse data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 0 bytes of efuse verified
avrdude: reading input file "0b11000100"
avrdude: writing hfuse (1 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0b11000100:
avrdude: load data hfuse data from input file 0b11000100:
avrdude: input file 0b11000100 contains 1 bytes
avrdude: reading on-chip hfuse data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 1 bytes of hfuse verified
avrdude: reading input file "0b10111111"
avrdude: writing lfuse (1 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0b10111111:
avrdude: load data lfuse data from input file 0b10111111:
avrdude: input file 0b10111111 contains 1 bytes
avrdude: reading on-chip lfuse data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 1 bytes of lfuse verified

avrdude done.  Thank you.

      AVR Part                      : ATmega8
      Chip Erase delay              : 10000 us
      PAGEL                         : PD7
      BS2                           : PC2
      RESET disposition             : dedicated
      RETRY pulse                   : SCK
      serial program mode           : yes
      parallel program mode         : yes
      Timeout                       : 200
      StabDelay                     : 100
      CmdexeDelay                   : 25
      SyncLoops                     : 32
      ByteDelay                     : 0
      PollIndex                     : 3
      PollValue                     : 0x53
      Memory Detail                 :

                               Block Poll               Page                       Polled
        Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
        ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
        eeprom         4    20   128    0 no        512    4      0  9000  9000 0xff 0xff
        flash         33    10    64    0 yes      8192   64    128  4500  4500 0xff 0x00
        lfuse          0     0     0    0 no          1    0      0  2000  2000 0x00 0x00
        hfuse          0     0     0    0 no          1    0      0  2000  2000 0x00 0x00
        efuse          0     0     0    0 no          0    0      0     0     0 0x00 0x00
        lock           0     0     0    0 no          1    0      0  2000  2000 0x00 0x00
        calibration    0     0     0    0 no          4    0      0     0     0 0x00 0x00
        signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

      Programmer Type : usbasp
      Description     : USBasp, http://www.fischl.de/usbasp/

avrdude: auto set sck period (because given equals null)
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9307 (probably m8)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
      To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: auto set sck period (because given equals null)
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: reading input file "C:\Users\User\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.0.3/bootloaders/optiboot_flash/bootloaders/atmega8/16000000L/optiboot_flash_atmega8_UART0_115200_16000000L.hex"
avrdude: writing flash (8192 bytes):

Writing | ################################################## | 100% -0.00s

avrdude: 8192 bytes of flash written
avrdude: verifying flash memory against C:\Users\User\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.0.3/bootloaders/optiboot_flash/bootloaders/atmega8/16000000L/optiboot_flash_atmega8_UART0_115200_16000000L.hex:
avrdude: load data flash data from input file C:\Users\User\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.0.3/bootloaders/optiboot_flash/bootloaders/atmega8/16000000L/optiboot_flash_atmega8_UART0_115200_16000000L.hex:
avrdude: input file C:\Users\User\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.0.3/bootloaders/optiboot_flash/bootloaders/atmega8/16000000L/optiboot_flash_atmega8_UART0_115200_16000000L.hex contains 8192 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 8192 bytes of flash verified
avrdude: reading input file "0x0f"
avrdude: writing lock (1 bytes):

Writing | ################################################## | 100% 0.02s

avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x0f:
avrdude: load data lock data from input file 0x0f:
avrdude: input file 0x0f contains 1 bytes
avrdude: reading on-chip lock data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 1 bytes of lock verified

avrdude done.  Thank you.


D:\Program Files (x86)\Arduino\hardware\tools\avr\bin>avrdude -u -c usbasp -p t85 -P usb -B 0.5 -U flash:w:"C:\Users\User\AppData\Local\Temp\led\led.ino.hex":a  -C "D:\Program Files (x86)\Arduino\hardware\tools\avr\etc\avrdude.conf"

avrdude: set SCK frequency to 1500000 Hz
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.22s

avrdude: Device signature = 0x1e930b (probably t85)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
      To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: set SCK frequency to 1500000 Hz
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: reading input file "C:\Users\User\AppData\Local\Temp\led\led.ino.hex"
avrdude: input file C:\Users\User\AppData\Local\Temp\led\led.ino.hex auto detected as Intel Hex
avrdude: writing flash (1264 bytes):

Writing | ################################################## | 100% 1.16s

avrdude: 1264 bytes of flash written
avrdude: verifying flash memory against C:\Users\User\AppData\Local\Temp\led\led.ino.hex:
avrdude: load data flash data from input file C:\Users\User\AppData\Local\Temp\led\led.ino.hex:
avrdude: input file C:\Users\User\AppData\Local\Temp\led\led.ino.hex auto detected as Intel Hex
avrdude: input file C:\Users\User\AppData\Local\Temp\led\led.ino.hex contains 1264 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.80s

avrdude: verifying ...
avrdude: 1264 bytes of flash verified

avrdude done.  Thank you.

pert

I don't understand the point of the output you're posting.

I see a partial output from programming an ATmega8 in post #7. Then it looks like maybe the rest of the Burn Bootloader process for the ATmega8 at the start of post #7. But you said that you are having no problems with ATmega8, and the output shows no problems, so I don't understand why you would post this.

Then we have what appears to be the output from writing a compiled sketch file to an ATtiny85 from the command line at the end of post #8. But you already posted that output in post #5 and said you're having no problems writing compiled sketches from the command line to ATtiny85, so I don't understand why you would post this.

What I need is for you to explain the problem you're having (which I believe is Burn Bootloader or Upload Using Programmer to ATtiny85 via the Arduino IDE). I don't need output from the processes that are working fine.

Please do this:
  • (In the Arduino IDE) File > Preferences
  • Check the checkbox next to "Show verbose output during: upload".
  • Click the "OK" button.
  • Do a "Burn Bootloader" to your ATtiny85.
  • After the Burn Bootloader process fails, you'll see a button on the right side of the orange bar: "Copy error messages". Click that button.
  • In a forum reply here, click on the reply field.
  • Click the </> button on the forum toolbar. This will add the forum's code tags markup to your reply.
  • Press "Ctrl + V". This will paste the Burn Bootloader output between the code tags.
  • Move the cursor outside of the code tags before you add any additional text to your reply.



abveost

The point of that output is to show you that this isn't a problem with hardware it's a problem with that board in the IDE

You see a partial programming because of forum limitation on post length, as per previous posts.   This, and the first part of the next post is output from the IDE using the same USBasp as in everything else I've posted.  It shows that the problem is not with the hardware.  It also shows that the verbose output setting has already been set.

The ATtiny85 output is duplicated in post #8 because I accidentally copied and pasted too much.  Mystery solved.

Clearly you do need output from things that are working fine.  I posted all the output, such as it is, from the failed bootload and sketch upload and you jumped to the incorrect conclusion that it was perfectly normal and was a problem with the hardware.  It seems we're not going to make much progress until that has been undone.

I'm sorry I can't provide you the details you need but that's because the IDE doesn't provide them to me.  Perhaps that's the real bug here.  Maybe the programming problem could easily be solved if that information was available.  I see there's a new version of the IDE so when I get a chance I'll do a fresh install with that and see if it solves the problem.  In the meantime, if there's any information I can provide, within the limits of this apparent bug in the IDE output, just let me know.

Also, the reason it took me 4 days to respond is because I didn't receive a notification that you replied.  Fix that bug and I'll respond as quickly as I can.  I already have a workaround using a script that monitors for compiled sketches and uploads using avrdude but I'm happy to do whatever tests I can to resolve the problem.

pert

I posted all the output, such as it is, from the failed bootload and sketch upload
I could be wrong, but I still think there would be more output if you followed the instructions I provided in my last reply.


if there's any information I can provide, within the limits of this apparent bug in the IDE output, just let me know.
I still don't understand the problem. You say:
fails when using an ATtiny85?
But I don't know what you mean by "fails". Are you seeing an error message? If so, what does it say?

Also, the reason it took me 4 days to respond is because I didn't receive a notification that you replied.
Isn't that annoying? I had the same problem when I first started using this forum. It seems the default forum settings are for notifications to be disabled. I suspect that quite a few people who ask questions here assume they never got an answer because they don't get notifications.

You can enable notifications by:
  • Hover the mouse pointer over your avatar in the top right corner of any arduino.cc page.
  • Click "Profile".
  • Click "Forum Settings > Edit".
  • Click the "Settings" tab.
  • Click "Notifications".
  • Configure the notifications settings according to your preferences.
  • Click the "Save settings" button.


Fix that bug and I'll respond as quickly as I can.
I very much wish I could, but I don't have the necessary access.

Go Up