Italy
Offline
Brattain Member
Karma: 219
Posts: 16495
Don't know what I do
|
 |
« on: October 20, 2011, 10:56:52 am » |
It seems to me that with distros based on new Kernel 3.0 the Arduino as ISP programmer stopped working. I mean that I have 2 computers with Xubuntu 11.04. I used an Arduino UNO with ArduinoISP sketch to flash my Tiny micros over some boards (with Optifix bootloader). Before the upgrade everything worked fine... After upgrading to Xubuntu 11.10 the first one and Arch Linux the second one, with both of them I started to have problems using Arduino as ISP. The sketchs compiled but when I tried to upload them to the destination micros I got: avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x11 avrdude: failed to write flash memory, rc=-4 avrdude: stk500_getsynch(): not in synch: resp=0x15 Now the curious thing is that both of those systems use the relatively new Kernel 3.0. If I try to use the Arduino as an ISP programmer from the terminal with avrdude, i strangely get that the sketch is written on the Arduino itself and not to the destination micro! I still be able to use the USBtinyISP programmer, so this is not related to other HW but only to Arduino. Other users have similar problems (i.e.: read here)
|
|
|
|
|
Logged
|
|
|
|
|
South Africa
Offline
Jr. Member
Karma: 0
Posts: 65
|
 |
« Reply #1 on: October 22, 2011, 10:22:08 am » |
Hey, have you tried installing the Arduino IDE through Ubuntu Software Center?
|
|
|
|
|
Logged
|
|
|
|
|
Italy
Offline
Brattain Member
Karma: 219
Posts: 16495
Don't know what I do
|
 |
« Reply #2 on: October 23, 2011, 03:57:45 pm » |
It's not a problem related to "where" the Arduino software comes, but to the OS itself. On my Xubuntu 11.04 I used Arduino IDE from Arduino site; after upgrading the system, ArduinoISP stopped working.
On my brand-new laptop, bought 10 days ago, I installed Arch Linux, and the ArduinoISP doesn't work too. Both of them, curiously, use Kernel 3.0: Xubuntu 11.04 used 2.6.38.
Today I tried a Luigino328 on my Arch system and it showed the same error. Then I tried my UNO on a netbook with Mint Linux with kernel 2.6.38 and... it worked!!!
At work, I have a PC with Ubuntu 10.4 (kernel 2.6.xx) and ArduinoISP works.... so the problem is related to most recent distros with new kernel.
I mean, ArduinoISP isn't compatible with something from that kernel, something different that drives the USB ports, but I don't know what.
|
|
|
|
|
Logged
|
|
|
|
|
South Africa
Offline
Jr. Member
Karma: 0
Posts: 65
|
 |
« Reply #3 on: October 23, 2011, 06:27:06 pm » |
Ah sorry I made the mistake of skimming through your post, I haven't tried using my Arduino as an ISP programmer with 11.10 yet. I am writing an exam in a couple of hours so I will try write after that!
Just as a matter of interest can you upload sketches such as 'Blink' to your board? Basic compiling and all communication to my board were the first problems since I upgraded to 11.10
|
|
|
|
|
Logged
|
|
|
|
|
South Africa
Offline
Jr. Member
Karma: 0
Posts: 65
|
 |
« Reply #4 on: October 24, 2011, 08:52:13 am » |
I have the same problem  , I have managed to find fixes for all the other problems with my 11.10 so far but can't find anything on this. Do you know if the problem is strictly with the Arduino as an ISP programmer, or are there problems with other ISP's too?
|
|
|
|
|
Logged
|
|
|
|
|
Italy
Offline
Brattain Member
Karma: 219
Posts: 16495
Don't know what I do
|
 |
« Reply #5 on: October 24, 2011, 08:57:01 am » |
I have an USBtinyISP programmer and the bug does NOT affect it. So it's a problem related to Arduino as ISP only.
|
|
|
|
|
Logged
|
|
|
|
|
Italy
Offline
Brattain Member
Karma: 219
Posts: 16495
Don't know what I do
|
 |
« Reply #6 on: November 02, 2011, 04:50:25 am » |
Update. Yesterday I installed the Kernel 2.6.32 LTS from Arch repo and... nothing changed! Strange to me, but it seems that the kernel doesn't matter so it could be a problem to the OS itself.... I noticed that the ArduinoISP does fuses operations but does NOT flash sketches. I'm starting to think that it could be related to the fact that Arch Linux uses bugged versions of binutils-avr and gcc-avr and to have them working I had to downgrade them to previous versions (as reported in this thread).
|
|
|
|
|
Logged
|
|
|
|
|
Miramar Beach, Florida
Offline
Faraday Member
Karma: 50
Posts: 3451
|
 |
« Reply #7 on: November 02, 2011, 05:15:31 am » |
It does not sound like this has anything to do with avr-gcc and avr-libc. If the other programmer is working, then the program is being compiled correctly. Have you tried the code with the USB/bootloader?
Just a warning: Be careful about the version of avr-libc you downgrade to. You could be adding more problems to your situation. When you went back to a previous version, did you back up to avr-libc-1.7.0, that has a bad delay() bug? Or avr-libc-1.6.9 that won't start the serial function? I think v1.6.8 is the only other recent version that works.
|
|
|
|
|
Logged
|
|
|
|
|
Italy
Offline
Brattain Member
Karma: 219
Posts: 16495
Don't know what I do
|
 |
« Reply #8 on: November 04, 2011, 10:58:42 am » |
Another bit of tests.
On Ubuntu/Kubuntu/Xubuntu 11.10 I got the same errors. ArduinoISP compiled correctly and uploaded without problems. But when I try to use it, I got a strange thing. I noticed that ArduinoISP is able to read/write microcontrollers' fuses (Atmega328/Attiny85/Attiny84 etc...) but when it comes the time to flash the Flash memory the out of synch error comes up.
With Ubuntu/KUbuntu/Xubuntu 11.04 no errors. ArduinoISP is compiled correctly and it works perfectly.
More over, I got an Arduino UNO with ArduinoISP compiled and flashed under Kubuntu 11.04 and it worked PERFECTLY as ISP under Kubuntu 11.10. So I can tell for sure that something under Ubuntu/Kubuntu/Xubuntu 11.10 and Arch Linux is wrong (and the only thing that they share is kernel 3.0).
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Dallas
Offline
Shannon Member
Karma: 119
Posts: 10165
|
 |
« Reply #9 on: November 04, 2011, 03:47:31 pm » |
Is the "11.10" hex file different from the "11.04" hex file?
|
|
|
|
|
Logged
|
|
|
|
|
Italy
Offline
Brattain Member
Karma: 219
Posts: 16495
Don't know what I do
|
 |
« Reply #10 on: November 04, 2011, 06:14:35 pm » |
I didn't check it  and I don't have Ubuntu 11.10 anymore... Tomorrow I can check the differences from the hex generated under Arch and under Kubuntu 11.04 : I think it's the same thing 'cause neither the sketck compiled under Arch works.
|
|
|
|
|
Logged
|
|
|
|
|
South Africa
Offline
Jr. Member
Karma: 0
Posts: 65
|
 |
« Reply #11 on: November 05, 2011, 07:06:23 am » |
@ leo72; going back to 11.04 seems to have fixed the ISP problems I was having too.
|
|
|
|
|
Logged
|
|
|
|
|
Italy
Offline
Brattain Member
Karma: 219
Posts: 16495
Don't know what I do
|
 |
« Reply #12 on: November 05, 2011, 09:35:39 am » |
@ leo72; going back to 11.04 seems to have fixed the ISP problems I was having too.
Thank for your 2 cents  Is the "11.10" hex file different from the "11.04" hex file?
They ARE different. Attached at this post you will find 2 different hex files. ArduinoISP_working.cpp.hex, compiled under Ubuntu 11.04 (librxtx 2.2pre2-3, gcc-avr 4.3.5-1, binutils-avr 2.20.1-1) ArduinoISP_NOT_working.cpp.hex, compiled under Arch Linux (librxtx 2.2pre2-2, gcc-avr 4.6.0, binutils-avr 2.20.1) Wait for your reply 
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Dallas
Offline
Shannon Member
Karma: 119
Posts: 10165
|
 |
« Reply #13 on: November 05, 2011, 01:27:24 pm » |
Unfortunately, to compare them for the nitty-gritty details, you will need to post the elf files. I apologize for not saying so earlier.
|
|
|
|
|
Logged
|
|
|
|
|
Italy
Offline
Brattain Member
Karma: 219
Posts: 16495
Don't know what I do
|
 |
« Reply #14 on: November 05, 2011, 04:49:02 pm » |
Don't worry. I will send them as soon as possible.
|
|
|
|
|
Logged
|
|
|
|
|
|