Trying to Load Code onto an ATtiny84

Hello all,

I have spent the last week trying to upload my arduino code onto the ATtiny84, and can get close, but not quite make it.

Firstly, I have downloaded arduino-tiny-0150-0020.zip from Google Code Archive - Long-term storage for Google Code Project Hosting., and placed it in "arduino-1.0.1\hardware". This contains the board info with fuses and compiler information I believe.

I uploaded the blink sketch to my ATtiny, and everything worked fine.

Next I tried compiling a bigger file, and got several errors that all say "relocation truncated to fit: R_AVR_13_PCREL against symbol `__udivmodsi4' defined in .text.libgcc section"
The internet then said Arduino Tiny - #9 by Coding_Badly - Microcontrollers - Arduino Forum that I just need to download winavr 2010, and replace "hardware/tools/avr" with this folder.
That caused compiling to work fine on all files.
When I tried uploading however, first the "avrdude.conf" file had moved from "/etc" to "/bin", so in the "platform.txt" file (part of the initial download) I have changed the file location to reflect this.

The error I am now getting, is that when I try to upload any file, I get a syntax error from the avrdude.conf file.

In avrdude 5 the error is here:

programmer
  id    = "wiring";
  desc  = "Wiring";
[b]  type  = wiring;[/b]
;

the error states:
.../avrdude.conf:332 unrecognized character: "w"

In avrdude 6 the error is here:

programmer
  id    = "wiring";
  desc  = "Wiring";
  [b]type  = "wiring";[/b]
  connection_type = serial;
;

the error states:
syntax error at .../avrdude.conf:348

So I am assuming I either need a new version of the attiny "platform.txt" file, winavr, or avrdude, but am noit sure what to do about it.

Please advise, thanks in advance,
Shane

Here is "platform.txt"

# Arduino AVR Core and platform.
# ------------------------------

# For more info:
# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification

name=Arduino Tiny
version=1.5.4

# AVR compile variables
# ---------------------

# Default "compiler.path" is correct, change only if you want to overidde the initial value
#compiler.path={ide.path}/tools/avr/bin/..
compiler.c.cmd=avr-gcc
compiler.c.flags=-c -g -Os -w -ffunction-sections -fdata-sections -MMD
compiler.c.elf.flags=-Os -Wl,--gc-sections
compiler.c.elf.cmd=avr-gcc
compiler.S.flags=-c -g -assembler-with-cpp
compiler.cpp.cmd=avr-g++
compiler.cpp.flags=-c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD
compiler.ar.cmd=avr-ar
compiler.ar.flags=rcs
compiler.objcopy.cmd=avr-objcopy
compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0
compiler.elf2hex.flags=-O ihex -R .eeprom
compiler.elf2hex.cmd=avr-objcopy
compiler.ldflags=
compiler.size.cmd=avr-size
# this can be overriden in boards.txt
build.extra_flags=

# AVR compile patterns
# --------------------

## Compile c files
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"

## Compile c++ files
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"

## Compile S files
recipe.S.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.S.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"

## Create archives
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} "{build.path}/{archive_file}" "{object_file}"

## Combine gc-sections, archives, and objects
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -mmcu={build.mcu} -o "{build.path}/{build.project_name}.elf" {object_files} "{build.path}/{archive_file}" "-L{build.path}" -lm

## Create eeprom
recipe.objcopy.eep.pattern="{compiler.path}{compiler.objcopy.cmd}" {compiler.objcopy.eep.flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.eep"

## Create hex
recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex"

## Compute size
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
recipe.size.regex=^(?:\.text|\.data|\.bootloader)\s+([0-9]+).*
recipe.size.regex.data=^(?:\.data|\.bss|\.noinit)\s+([0-9]+).*
recipe.size.regex.eeprom=^(?:\.eeprom)\s+([0-9]+).*


# AVR Uploader/Programmers tools
# ------------------------------

tools.avrdude.cmd.path={runtime.ide.path}/hardware/tools/avr/bin/avrdude
tools.avrdude.config.path={runtime.ide.path}/hardware/tools/avr/bin/avrdude.conf
tools.avrdude.cmd.path.linux={runtime.ide.path}/hardware/tools/avrdude
tools.avrdude.config.path.linux={runtime.ide.path}/hardware/tools/avrdude.conf

tools.avrdude.upload.params.verbose=-v -v -v -v
tools.avrdude.upload.params.quiet=-q -q
tools.avrdude.upload.pattern="{cmd.path}" "-C{config.path}" {upload.verbose} -p{build.mcu} -c{upload.protocol} -P{serial.port} -b{upload.speed} -D "-Uflash:w:{build.path}/{build.project_name}.hex:i"

tools.avrdude.program.params.verbose=-v -v -v -v
tools.avrdude.program.params.quiet=-q -q
tools.avrdude.program.pattern="{cmd.path}" "-C{config.path}" {program.verbose} -p{build.mcu} -c{protocol} {program.extra_params} "-Uflash:w:{build.path}/{build.project_name}.hex:i"

tools.avrdude.erase.params.verbose=-v -v -v -v
tools.avrdude.erase.params.quiet=-q -q
# bwc tools.avrdude.erase.pattern="{cmd.path}" "-C{config.path}" {erase.verbose} -p{build.mcu} -c{protocol} {program.extra_params} -e -Ulock:w:{bootloader.unlock_bits}:m -Uefuse:w:{bootloader.extended_fuses}:m -Uhfuse:w:{bootloader.high_fuses}:m -Ulfuse:w:{bootloader.low_fuses}:m
# bwc...
tools.avrdude.erase.pattern="{cmd.path}" "-C{config.path}" {erase.verbose} -p{build.mcu} -c{protocol} {program.extra_params} -e -Uefuse:w:{bootloader.extended_fuses}:m -Uhfuse:w:{bootloader.high_fuses}:m -Ulfuse:w:{bootloader.low_fuses}:m

tools.avrdude.bootloader.params.verbose=-v -v -v -v
tools.avrdude.bootloader.params.quiet=-q -q
# bwc 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/arduino/avr/bootloaders/{bootloader.file}:i" -Ulock:w:{bootloader.lock_bits}:m
# bwc...
tools.avrdude.bootloader.pattern="{cmd.path}" "-C{config.path}" {bootloader.verbose} -p{build.mcu} -c{protocol} {program.extra_params} 


# USB Default Flags
# Default blank usb manufacturer will be filled it at compile time
# - from numeric vendor ID, set to Unknown otherwise
build.usb_manufacturer=
build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}'

Here is my "boards.txt"

attiny84at1.name=ATtiny84 @ 1 MHz  (internal oscillator; BOD disabled 1.5)

attiny84at1.upload.tool=arduino:arduinoisp

attiny84at1.upload.maximum_size=8192
attiny84at1.upload.maximum_data_size=512

# Default clock (slowly rising power; long delay to clock; 8 MHz internal; divide clock by 8)
# Int. RC Osc. 8 MHz; Start-up time PWRDWN/RESET: 6 CK/14 CK + 64 ms; [CKSEL=0010 SUT=10]; default value
# Divide clock by 8 internally; [CKDIV8=0]
# Brown-out detection disabled; [BODLEVEL=111]
# Preserve EEPROM memory through the Chip Erase cycle; [EESAVE=0]

attiny84at1.bootloader.low_fuses=0x62
attiny84at1.bootloader.high_fuses=0xD7
attiny84at1.bootloader.extended_fuses=0xFF

attiny84at1.bootloader.path=empty
attiny84at1.bootloader.file=empty84at1.hex
attiny84at1.bootloader.tool=arduino:avrdude

attiny84at1.build.mcu=attiny84
attiny84at1.build.f_cpu=1000000L
attiny84at1.build.core=tiny

MusicIsBliss:
Firstly, I have downloaded arduino-tiny-0150-0020.zip from Google Code Archive - Long-term storage for Google Code Project Hosting., and placed it in "arduino-1.0.1\hardware".

For everyone else reading this thread...
The 0150 in the download name indicates it is for Arduino IDE 1.5.x. You need a download that starts with arduino-tiny-0100- or just click Download the latest version for Arduino 1.0 from the home page...
http://code.google.com/p/arduino-tiny/

Instead of trying to modify files just copy avrdude.conf to the etc directory (step #8 from the instructions).

Awesome, this worked (still had to do the winAVR thing, but that is fine).

Thank you so much.

Also, just FYI, as I am newish to forums and this may happen to other users.

Every day I checked "My Latest Posts" to see if there was any responses to my post. There never were, and I was sad.

Finally I decided to reply to my post to bump it up, and to my surprise when the reply went through, you had replied to my post so long ago!

If I had not tried to bump my post, I would have never seen your post, and would have probably never gotten my ATtiny working.

Again, thank you for your help, and just a heads up on that non-noob-friendly button.