Programming without bootloader

I have been referring to this page: http://arduino.cc/en/Hacking/Programmer to try and program my Mega2560 without a bootloader.

I have edited the preferences.txt and boards.txt files as indicated. I am using the USBasp from ProtoStack.
I have selected USBasp as the programmer from the IDE.
Whenever I try to upload, I get an error that Serial "" cannot be found.

Any ideas what I can check?

I tried uploading a sketch with no bootloader plugged in to see what happens.
Under Tools:Board, I selected Mega2560
Under Tools:Programmer, I selected USBasp

I wrote a minimal sketch:
void setup(){}
void loop(){}

I selected
File: Upload Using Programmer

and got this sequence back, none of which refers to Serial anything. I am wondering if you are selecting the right thing to program the sketch?

Binary sketch size: 666 bytes (of a 258,048 byte maximum)
C:\Arduino-1.0.1\hardware/tools/avr/bin/avrdude -CC:\Arduino-1.0.1\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega2560 -cusbasp -Pusb -Uflash:w:C:\Users\Owner\AppData\Local\Temp\build3847455316696164343.tmp\sketch_jun26a.cpp.hex:i

avrdude: Version 5.11, compiled on Sep 2 2011 at 19:38:36
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch

System wide configuration file is "C:\Arduino-1.0.1\hardware/tools/avr/etc/avrdude.conf"

Using Port : usb
Using Programmer : usbasp
avrdude: error: could not find USB device "USBasp" with vid=0x16c0 pid=0x5dc

avrdude done. Thank you.

I was not choosing File -> Upload Using Programmer. I was clicking on the Upload button on the toolbar.

Thank you for pointing out my mistake!

Glad to help.

Oh, is that how you do it?

I thought it was just broken. :slight_smile: