I never really noticed it but the m328p is the same way. The boards.txt has the Uno, efuse=0x05.
We, at the italian section, have finally found the way to let the Tiny core works under IDE 1.5.4.
Just do these steps:
1- download the Tiny core 0100-0017
2- install as usual
3- Now we need a file from the original Arduino core. Look for the file /hardware/arduino/avr/platform.txt and copy it under /hardware/tiny/avr/
4- open it with a text editor and change the line #8 in
name=Tiny AVR Boards
and line #87 in
tools.avrdude.bootloader.pattern="{cmd.path}" "-C{config.path}" {bootloader.verbose} -p{build.mcu} -c{protocol} {program.extra_params} "-Uflash:w:{runtime.ide.path}/hardware/{build.core}/avr/bootloaders/{bootloader.path}/{bootloader.file}:i" -Ulock:w:{bootloader.lock_bits}:m
5- now you have to check if your avrdude.conf has the fix to read the lock bit for ATtiny85. As we are editing the file, we add the entries to remove the warnings about PAGEL and BS2. So, open /hardware/tools/avr/etc/avrdude.conf and look for the code block introduced by:
#------------------------------------------------------------
# ATtiny85
#------------------------------------------------------------
6- change the first lines under it like below, adding the defs for PAGEL & BS2:
#------------------------------------------------------------
# ATtiny85
#------------------------------------------------------------
part
id = "t85";
desc = "ATtiny85";
has_debugwire = yes;
flash_instr = 0xB4, 0x02, 0x12;
eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
0xBC, 0x02, 0xB4, 0x02, 0xBA, 0x0D, 0xBB, 0xBC,
0x99, 0xE1, 0xBB, 0xAC;
## no STK500 devcode in XML file, use the ATtiny45 one
stk500_devcode = 0x14;
## avr910_devcode = ?;
## Try the AT90S2313 devcode:
avr910_devcode = 0x20;
signature = 0x1e 0x93 0x0b;
reset = io;
chip_erase_delay = 4500;
pagel = 0xB3;
bs2 = 0xB4;
6- Now look for the line memory "lock" and change it like below:
memory "lock"
size = 1;
write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
"x x x x x x x x 1 1 i i i i i i";
read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
"0 0 0 0 0 0 0 0 o o o o o o o o";
8- after renaming the Prospective boards.txt into boards.txt, you need to add a couple of lines at the boards you intend to use. Here is the example for Attiny85 @ 1 MHz:
attiny85at8.name=ATtiny85 @ 8 MHz
# The following do NOT work...
# attiny85at8.upload.using=avrispv2
# attiny85at8.upload.using=Pololu USB AVR Programmer
# The following DO work (pick one)...
attiny85at8.upload.using=arduino:arduinoisp
attiny85at8.upload.tool=arduino:arduinoisp
# attiny85at8.upload.protocol=avrispv2
# attiny85at8.upload.using=pololu
attiny85at8.upload.maximum_size=8192
# Default clock (slowly rising power; long delay to clock; 8 MHz internal)
# Int. RC Osc. 8 MHz; Start-up time PWRDWN/RESET: 6 CK/14 CK + 64 ms; [CKSEL=0010 SUT=10]; default value
# Brown-out detection disabled; [BODLEVEL=111]
# Preserve EEPROM memory through the Chip Erase cycle; [EESAVE=0]
attiny85at8.bootloader.low_fuses=0xE2
attiny85at8.bootloader.high_fuses=0xD7
attiny85at8.bootloader.extended_fuses=0xFF
attiny85at8.bootloader.unlock_bits=0xFF
attiny85at8.bootloader.lock_bits=0xFF
attiny85at8.bootloader.path=empty
attiny85at8.bootloader.file=empty85at8.hex
attiny85at8.bootloader.tool=arduino:avrdude
attiny85at8.build.mcu=attiny85
attiny85at8.build.f_cpu=8000000L
attiny85at8.build.core=tiny
Look at the added lines:
attiny85at1.upload.tool=arduino:arduinoisp
attiny85at1.bootloader.unlock_bits=0xFF
attiny85at1.bootloader.lock_bits=0xFF
attiny85at1.bootloader.tool=arduino:avrdude
reply them for the other boards you need to use.
9- save everything, and try to burn the bootloader on an ATttiny85.
10- If everything was correct, the IDE should perform the operations without issues (I remember that burning bootloader is just used to change the fuses of the MCU).
You can also download additional files in the first post here --> Compilare sketch per ATtiny su IDE 1.5.8 - Generale - Arduino Forum
If, in the boards.txt file, you add this line the IDE will print the RAM available into the micro:
attiny85at1.upload.maximum_data_size=512
Thankyou italian section,
It worked without any problems on the first try
Coding Badly - is your advise to upgrade WinAVR is still valid for Arduino IDE 1.0.5? I am getting those odd error messages "R_AVR_13_PCREL" and a failure to finish the build.
gv445:
Coding Badly - is your advise to upgrade WinAVR is still valid for Arduino IDE 1.0.5? I am getting those odd error messages "R_AVR_13_PCREL" and a failure to finish the build.
See here:
gv445:
Coding Badly - is your advise to upgrade WinAVR is still valid for Arduino IDE 1.0.5?
I've been installing / using the latest toolset from Atmel...
I am getting those odd error messages "R_AVR_13_PCREL" and a failure to finish the build.
Any of the three (Atmel toolset, WinAVR, Tom Carpenter's patch) will get you past that problem.
Can't get ld.exe from github. The link supposed to download the file installs some piece of software called GitHub. Strange site this github :~ ... Tells nothing about its purpose. Had to go to Wikipedia to find out what it does and what is it for... Maybe I'm too stupid.
Downloaded toolchain from atmel. However it unzipps a lot of folders without any instructions how to transfer them to Arduino IDE. It just explains how to configure the toolchain in Atmel Studio. Do I just find this file ld.exe in Atmel download and transfer it to approriate Arduino IDE directory?
In italian section
Win --> [WIN] Aggiornam. compilatore IDE 0022-0023-1.0 all'ULTIMA VERSIONE ATMEL - Megatopic - Arduino Forum
Mac --> [MAC] Aggiornamento IDE 1.0x all'ultima versione Atmel Toolchain - Megatopic - Arduino Forum
gv445:
Downloaded toolchain from atmel. However it unzipps a lot of folders without any instructions how to transfer them to Arduino IDE.
With the Atmel toolset and the WinAVR toolset you just copy the entire folder to the correct location under the Arduino IDE...
http://forum.arduino.cc/index.php/topic,60649.0.html
OK, thanks a lot.
Is there source code for or a description of the "empty" bootloaders available anywhere? I'm trying to get microtherion's fork working for my 43U, but it has neither an entry for it in boards.txt/Prospective Boards.txt (which is easy enough to fix) nor an empty bootloader for the 43U at any frequency (which... is what I'm asking about). Thanks.
The empty bootloader can be simply a blank hex file - it is there purely to get the Arduino IDE to set the fuses. I think the current ones are just a 'Blink' sketch.
ivazquez:
Is there source code for or a description of the "empty" bootloaders available anywhere?
http://code.google.com/p/arduino-tiny/source/browse/#git%2Fcores%2Fempty
http://code.google.com/p/arduino-tiny/source/browse/cores/empty/main.cpp
Ah, thanks. I figured it had to be something simple like that.
The core is no longer compatible with the new IDE 1.5.7.
It should be an update of the file platform.txt.
is there a way to use the attiny2313 with a external crystal? do i just modify the fuse bit in the board file to use the external crystal or there is any thing else to be done?