Go Down

Topic: Problem with Burning Bootloader to ATTiny13 (Read 89 times) previous topic - next topic

Josh_Blackburn

I've been using the incredibly cheap ATTiny13 microcontroller recently and, for one of my projects, I would like to change the clock speed from the default 4.8 MHz it came with.  To do this, I believe, one simply burns the desired bootloader to the chip.  I should mention that I'm programming the chip using the ArduinoISP sketch with an Arduino Uno and the MicroCore board files.  I am able to program the ATTiny13 just fine, all four that I have at the moment, but when I try to burn the bootloader, I get the following error:

avrdude: ser_open(): can't open device "unknown": The system cannot find the file specified.

I don't really know what this means, but it seems to be saying that it can't find the .hex file that should contain the bootloader.  I also cannot find any hex files in the MircoCore files.  Anyone have any idea what is wrong?

Coding Badly


Post the verbose output.  Please use [code] [/code] tags.


marco_c

The Microcode 'bootloader' is just setting the fuses, not actually loading a boot loader (not enough memory to waste).

I had some problems with this when I was using a USB connected programmer. It worked for me when I switched over to ArduinoAsISP programmer setup (documented here).

How are you connecting between the PC/IDE and the ATTiny?
Arduino Libraries https://github.com/MajicDesigns?tab=Repositories
Parola for Arduino https://github.com/MajicDesigns/Parola
Arduino++ blog https://arduinoplusplus.wordpress.com

Josh_Blackburn

Coding Badly, I'm not entirely sure what the 'verbose output' is, but this is the entire error message:
Code: [Select]
C:\Users\Josh\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino8/bin/avrdude -CC:\Users\Josh\AppData\Local\Arduino15\packages\MicroCore\hardware\avr\1.0.1/avrdude.conf -v -pattiny13 -cstk500v1 -B32 -PCOM5 -b19200 -e -Ulock:w:0x3f:m -Uhfuse:w:0xfb:m -Ulfuse:w:0x2A:m

avrdude: Version 6.3, compiled on Dec 16 2016 at 13:33:19
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\Josh\AppData\Local\Arduino15\packages\MicroCore\hardware\avr\1.0.1/avrdude.conf"

         Using Port                    : COM5
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
         Setting bit clk period        : 32.0
         AVR Part                      : ATtiny13
         Chip Erase delay              : 4000 us
         PAGEL                         : P00
         BS2                           : P00
         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        65     5     4    0 no         64    4      0  4000  4000 0xff 0xff
           flash         65     6    32    0 yes      1024   32     32  4500  4500 0xff 0xff
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          2    0      0     0     0 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel STK500 Version 1.x firmware
         Hardware Version: 2
         Firmware Version: 1.18
         Topcard         : Unknown
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x1e9007 (probably t13)
avrdude: erasing chip
avrdude: reading input file "0x3f"
avrdude: writing lock (1 bytes):

Writing | ################################################## | 100% 0.01s

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.01s

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

Writing | ################################################## | 100% 0.01s

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

C:\Users\Josh\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino8/bin/avrdude -CC:\Users\Josh\AppData\Local\Arduino15\packages\MicroCore\hardware\avr\1.0.1/avrdude.conf -v -pattiny13 -cstk500v1 -B32 -Ulock:w:0x3e:m
Reading | ################################################## | 100% 0.01s

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

Writing | ################################################## | 100% 0.01s

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

Reading | ################################################## | 100% 0.01s

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

avrdude done.  Thank you.


avrdude: Version 6.3, compiled on Dec 16 2016 at 13:33:19
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\Josh\AppData\Local\Arduino15\packages\MicroCore\hardware\avr\1.0.1/avrdude.conf"

         Using Port                    : unknown
         Using Programmer              : stk500v1
         Setting bit clk period        : 32.0
avrdude: ser_open(): can't open device "unknown": The system cannot find the file specified.



avrdude done.  Thank you.

Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.


marco_c, I am using a simple programming shield on an Ardunio Uno.  I use the example ArduinoISP sketch.  The ATTiny13 is connected as shown below:



I am able to program the ATTiny13s without any issues, the only problem I'm getting is with the bootloader.

Coding Badly

#4
Jan 25, 2017, 07:57 pm Last Edit: Jan 25, 2017, 08:59 pm by Coding Badly
Coding Badly, I'm not entirely sure what the 'verbose output' is...
What you posted.


First pass...
Code: [Select]

...
         Using Port                    : COM5
...


Second (mystery) pass...
Code: [Select]

...
         Using Port                    : unknown
...


The first pass, which is setting the fuses, works perfectly.

The second (mystery) pass, which did not output the command line so I have no idea what it is doing, fails because a serial port was not specified.  The boards.txt, programmers.txt, or platform.txt file that came with the core you are using has a mistake.  I suggest contacting the person who created the core.

Or, you can post a link to the core in the hopes someone here can help.


marco_c

#5
Jan 25, 2017, 08:30 pm Last Edit: Jan 25, 2017, 10:39 pm by marco_c
Your fuses are programmed correctly. I have ignored this message and everything seems to work fine.

EDIT: This problem was reported on the MicroCore issues on Github https://github.com/MCUdude/MicroCore/issues/10
Arduino Libraries https://github.com/MajicDesigns?tab=Repositories
Parola for Arduino https://github.com/MajicDesigns/Parola
Arduino++ blog https://arduinoplusplus.wordpress.com

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy