Pages: [1] 2 3 4   Go Down
Author Topic: Linux Kernel 3.0 stopped ArduinoISP working  (Read 4852 times)
0 Members and 1 Guest are viewing this topic.
Global Moderator
Italy
Offline Offline
Brattain Member
*****
Karma: 313
Posts: 21645
Logic is my way
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
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 Offline
Jr. Member
**
Karma: 0
Posts: 65
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Global Moderator
Italy
Offline Offline
Brattain Member
*****
Karma: 313
Posts: 21645
Logic is my way
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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 Offline
Jr. Member
**
Karma: 0
Posts: 65
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 Offline
Jr. Member
**
Karma: 0
Posts: 65
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have the same problem  smiley-cry, 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

Global Moderator
Italy
Offline Offline
Brattain Member
*****
Karma: 313
Posts: 21645
Logic is my way
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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


Global Moderator
Italy
Offline Offline
Brattain Member
*****
Karma: 313
Posts: 21645
Logic is my way
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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 Offline
Faraday Member
**
Karma: 115
Posts: 5386
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Global Moderator
Italy
Offline Offline
Brattain Member
*****
Karma: 313
Posts: 21645
Logic is my way
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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 Offline
Shannon Member
*****
Karma: 176
Posts: 12286
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


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

Global Moderator
Italy
Offline Offline
Brattain Member
*****
Karma: 313
Posts: 21645
Logic is my way
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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


South Africa
Offline Offline
Jr. Member
**
Karma: 0
Posts: 65
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Global Moderator
Italy
Offline Offline
Brattain Member
*****
Karma: 313
Posts: 21645
Logic is my way
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

@ leo72; going back to 11.04 seems to have fixed the ISP problems I was having too.
Thank for your 2 cents  smiley-grin

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  smiley-wink

* ArduinoISP_working.cpp.hex (13.21 KB - downloaded 7 times.)
* ArduinoISP_NOT_working.cpp.hex (12.96 KB - downloaded 5 times.)
Logged


Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 176
Posts: 12286
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


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

Global Moderator
Italy
Offline Offline
Brattain Member
*****
Karma: 313
Posts: 21645
Logic is my way
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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


Pages: [1] 2 3 4   Go Up
Jump to: