Arduino IDE + USBasp + ATMega128A UA

Hello!
I need help with this configuration:
I use ARDUINO IDE 1.0.6, USBasp programmer and would like to burn arduino code to atmel ATMega 128A UA.

My boards.txt for board type:

crumbuino128.name=Crumbuino-128 w/ ATmega128
crumbuino128.upload.using=usbasp
crumbuino128.upload.maximum_size=126976

crumbuino128.bootloader.low_fuses=0xFF
crumbuino128.bootloader.high_fuses=0xCA
crumbuino128.bootloader.extended_fuses=0xFF
crumbuino128.bootloader.path=atmega
crumbuino128.bootloader.file=ATmegaBOOT_168_atmega128.hex
crumbuino128.bootloader.unlock_bits=0x3F
crumbuino128.bootloader.lock_bits=0x0F

crumbuino128.build.mcu=atmega128
crumbuino128.build.f_cpu=16000000L
crumbuino128.build.core=arduinocrum
crumbuino128.build.variant=crumbuino128

On this site I found core and variant files.

I would like tu test this BLINK LED code but notthing.
But when I use this code in ARDUINO IDE and upload it , blink led is functioned.

#include <avr/io.h>
#define F_CPU 8000000UL
#include <util/delay.h>

#ifndef cbi
#define cbi(sfr, bit) (sfr &= ~_BV(bit))
#endif
#ifndef sbi
#define sbi(sfr, bit) (sfr |= _BV(bit))
#endif


int main(void)
{      
sbi(DDRA,PA3); //nastavim pin PA3 ako vystupny
    while(1)
    {
sbi(PORTA,PA3); //dam logicku 1 na PA3
_delay_ms(5000);
cbi(PORTA,PA3);
_delay_ms(5000); //dam logicku 0 na PA3
    }
}

Please help me.
Thanks

crumbuino128.build.f_cpu=16000000L vs

define F_CPU 8000000UL

Don't these need to be consistent?

crumbuino128.bootloader.low_fuses=0xFF crumbuino128.bootloader.high_fuses=0xCA crumbuino128.bootloader.extended_fuses=0xFF

Check these against the Fuse description in the Memory Programming section http://www.atmel.com/Images/doc2467.pdf pages 287-288-289 Make sure the fuse settings are compatible with your hardware setup, which you haven't really described.

Hello!
thanks for ansvers

CrossRoads:
crumbuino128.build.f_cpu=16000000L
vs
#define F_CPU 8000000UL

this is mistake. I use only crumbuino128.build.f_cpu=16000000L.
My hardware you can see on picture down.

I use only pure ATmega128A AU with external crystal 16MHZ
I don’t need bootloader. Is it necessary for me when I don’t use bootloader?
My next configuration will may be:

crumbuino128.name=Crumbuino-128 w/ ATmega128
crumbuino128.upload.using=usbasp

crumbuino128.upload.maximum_size=126976

crumbuino128.build.mcu=atmega128
crumbuino128.build.f_cpu=16000000L
crumbuino128.build.core=arduinocrum
crumbuino128.build.variant=crumbuino128

but not function led blink as example on ARDUINO IDE.

int led = 39;

// the setup routine runs once when you press reset:
void setup() {                
  // initialize the digital pin as an output.
  pinMode(led, OUTPUT);     
}

// the loop routine runs over and over again forever:
void loop() {
  digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);               // wait for a second
  digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);               // wait for a second
}

any idea?
Thanks

HI everybody! I solved this problem. Over avr8-burn-o-mat I am check at fuses section in FUSE HEX editor if i have same set of hfuse,lfuse,efuse as in boards.txt in bootloader. I not need to use bootloader pre mna that im am not write it in boards.txt it.

Thanks.

Hello minokovalcik I have a same problem. I'm not sure I understand your solution. Can you please explain me better?