Go Down

Topic: programming an atmega8 with a usbasp requires no serial port but the IDE does (Read 1 time) previous topic - next topic

Dear,

I have problem uploading my code to a standalone atmega8 on a breadboard using a usbasp v2.0.
This programmer does not create a serial device so there is no /dev/ttyUSB0 or any equivalent device.

I can read the device correctly with avrdude:
Code: [Select]
$ avrdude -p m8 -c usbasp

avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e9307
avrdude: safemode: Fuses OK (H:FF, E:CA, L:DF)
avrdude done.  Thank you.


I think this means that all the connections are ok. I can even upload a bootloader via the IDE using my custom boards.txt:
Code: [Select]

atmega8usbasp.name=ATmega8 (uploading with ASBAsp)

atmega8usbasp.upload.protocol=usbasp # was arduino, tried: avrisp, usbasp, stk500, usb
atmega8usbasp.upload.maximum_size=7168
atmega8usbasp.upload.speed=19200
atmega8usbasp.upload.using=usbasp

atmega8usbasp.communication=usb

atmega8usbasp.bootloader.low_fuses=0xdf
atmega8usbasp.bootloader.high_fuses=0xca
atmega8usbasp.bootloader.path=atmega8
atmega8usbasp.bootloader.file=ATmegaBOOT-prod-firmware-2009-11-07.hex
atmega8usbasp.bootloader.unlock_bits=0x3F
atmega8usbasp.bootloader.lock_bits=0x0F

atmega8usbasp.build.mcu=atmega8
atmega8usbasp.build.f_cpu=8000000L
atmega8usbasp.build.core=arduino
atmega8usbasp.build.variant=standard


As I said, the IDE successfully uploads a bootloader using these settings. The problem is: I don't want a bootloader, I just want to upload a sketch, but when I do that I get:
Code: [Select]
Binary sketch size: 914 bytes (of a 7,168 byte maximum)
processing.app.SerialNotFoundException: Serial port 'COM1' not found. Did you select the right one from the Tools > Serial Port menu?
at processing.app.Serial.<init>(Serial.java:191)
at processing.app.Serial.<init>(Serial.java:77)
at processing.app.debug.Uploader.flushSerialBuffer(Uploader.java:77)
at processing.app.debug.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:175)
at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:67)
at processing.app.Sketch.upload(Sketch.java:1671)
at processing.app.Sketch.exportApplet(Sketch.java:1627)
at processing.app.Sketch.exportApplet(Sketch.java:1599)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2380)
at java.lang.Thread.run(Thread.java:724)


Mu best guess at the moment is that this is a bug in de IDE?
Can you confirm this?

Thanks,

tack

This does look like you are still trying to upload via Serial. This may not be the case but check the following.

You must have usbasp chosen in Tools > Programmers, since you say you have set Fuses by uploading bootloader.

When using a programmer you need to specifically choose 'Upload via Programmer', rather than just 'Upload'. IIRC yiu can also hold Shift while clucking the Compile & Upload icon.

Thanks a lot. I was just using the "upload" shortcut button on the action bar:s
I can't test it right now, but I am pretty sure this will fix my problem.

Many thanks for the help!

Go Up