Go Down

Topic: Linux Kernel 3.0 stopped ArduinoISP working (Read 6 times) previous topic - next topic

leo72

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:
Code: [Select]
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)

GregN

Hey, have you tried installing the Arduino IDE through Ubuntu Software Center?

leo72

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.

GregN

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


GregN

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?

leo72

I have an USBtinyISP programmer and the bug does NOT affect it.
So it's a problem related to Arduino as ISP only.

leo72

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).

SurferTim

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.

leo72

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).

Coding Badly


Is the "11.10" hex file different from the "11.04" hex file?

leo72

I didn't check it  :smiley-roll-blue: 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.

GregN

@ leo72; going back to 11.04 seems to have fixed the ISP problems I was having too.

leo72


@ leo72; going back to 11.04 seems to have fixed the ISP problems I was having too.

Thank for your 2 cents  :D


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  ;)

Coding Badly


Unfortunately, to compare them for the nitty-gritty details, you will need to post the elf files.  I apologize for not saying so earlier.

leo72

Don't worry. I will send them as soon as possible.

Go Up