Hi,
there is a similar thread but I don't want to borrow it, so i make my new and own one:
My Problem:
Upload a sketch to a raw ATMEGA328P
I tried several hints I found in diverse threads and forums.
My board is Arduino UNO ATMEGA 328P
My Programmer is a clone AVRISPmkII "mySmartUSB light" uses stk500v2
My system is ubuntu 11.04
Arduino IDE 1.0
I want to use Arduino IDE to flash the sketch onto the raw device without changing the fuses (keep the internal oscillator alive) and thus use no bootloader
"avrdude" which i installed to linux using "apt-get install avrdude" connects to both
my raw 328P and the one on the UNO board at least reading, so I can download
the fuse settings and flash content and the like.
But using the IDE I get the well known ".... programmer does not respond" error
in this thread http://arduino.cc/forum/index.php/topic,96715.0.html an answer was:
There is no need to modify anything in IDE 1.0. Just
- connect your AVRISP mkII six-pin header to Uno,
- set Tools - Board - Uno,
- set Tools - Programmer - AVRISP mkII,
- make sure Uno has power.
You must upload using File - Upload using programmer instead of File - Upload.
So I did and here is what i get
Setting the correct serial port : /dev/ttyUSB0
Setting the correct board : UNO
Setting the programmer to : avrispmkII
Verifing the sketch OK
Upload via button or File->Upload returns
sometimes 'avrdude: stk500_getsync(): not in sync: resp=0x1b'
mostly 'avrdude: stk500_recv(): programmer is not responding'
Upload via File->"Upload using programmer" returns
'avrdude: usbdev_open(): did not find any USB device "usb" '
Assumptions:
In the installation directory of arduino /arduino-1.0/hardware/tools is an avrdude located which is used by the arduino ide 1.0 and may be different from the linux installed avrdude.
Possible solutions:
1)
Make the bitstream from the sketch (and find it on the harddisk)
and upload it using the linux installed avrdude
To do(try) this I need to know where the bitstream (hex file) ist located.
So where ist the hex file of the sketch located so I could try 1)
Replace the arduino avrdude by the linux avrdue (litterally) (I did not try this)
Was this done by someone , any experience?
with the arduino avrdude came a avrdude.conf which might need some tweaking
but I don't know what would make the difference in there
Too much possibilities to tweak at?
Did anybody tweak the /arduino-1.0/hardware/tools/avrdude.conf
What was done to get the programmer responding, if this is the reason??
Upload via File->"Upload using programmer" returns
'avrdude: usbdev_open(): did not find any USB device "usb" '
Why is this, when the correct settings in the tools menu are all done?
Where does ardunio get the avrdude -P parameter (which seems to be wrong)?
thanks a ton for your reading and possible replies
Martin