Pages: 1 2 3 [4]   Go Down
Author Topic: Linux Kernel 3.0 stopped ArduinoISP working  (Read 5423 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 15
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I hooked up the arduino ISP to a 2 Channel Oscilloscope. Duemilanove board with Uno chip as ISP, and Uno board as target. I had a computer running a 2.6 kernel and arduino 021, and one with ubuntu 11.10 with 3.0 kernel. AVR compiler from repository.

In short my findings:

Arduino ISP (021, 2.6)Arduino ISP (1.0, 3.0)
linux 2.6 control computer, 021
success (0, 1)
fail (6)
linux 3.0 control computer, 1.0
success(2,3)
fail (4,5)


attached are the traces. The number in brackets in the table above correspond to the trace filename. The oscilloscope is an Agilent without an digital capture option. I used the reset as a trigger, channel two is one of the data connections between the boards.

I did not have a close look at the traces yet, but something must go wrong after initial negotiation.

It seems that you need to compile and upload the ISP sketch using 2.6. This can then be used on a 3.0 kernel system. So keep one spare atmega328 as ISP around.

* scope_0.csv (31.77 KB - downloaded 9 times.)
* scope_1.csv (34.48 KB - downloaded 5 times.)
* scope_2.csv (31.96 KB - downloaded 4 times.)
* scope_3.csv (32.45 KB - downloaded 3 times.)
« Last Edit: January 16, 2012, 04:56:53 pm by kfreak » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 15
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

more traces. Seems I forgot to save trace 7, but nothing impressive there.

* scope_4.csv (32.1 KB - downloaded 11 times.)
* scope_5.csv (32.61 KB - downloaded 7 times.)
* scope_6.csv (31.75 KB - downloaded 5 times.)
Logged

"The old Europe"
Offline Offline
Edison Member
*
Karma: 1
Posts: 2005
Bootloaders suck!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

What about 021 on 3.0 ?
Logged

• Upload doesn't work? Do a loop-back test.
• There's absolutely NO excuse for not having an ISP!
• Your AVR needs a brain surgery? Use the online FUSE calculator.
My projects: RGB LED matrix, RGB LED ring, various ATtiny gadgets...
• Microsoft is not the answer. It is the question, and the answer is NO!

0
Offline Offline
Newbie
*
Karma: 0
Posts: 15
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Getting an

Code:
avrdude: error while loading shared libraries: libusb-0.1.so.4: wrong ELF class: ELFCLASS64
when trying to copy the ISP. Don't have time to debug this now.

But I remember that I tried with a different version (023?) on 3.0 before and it failed.
Logged

"The old Europe"
Offline Offline
Edison Member
*
Karma: 1
Posts: 2005
Bootloaders suck!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, as others, I still believe it is a compiler / toolchain issue. It would be interesting if you could install a 3.0 kernel on your older 2.6 system (the one with a working toolchain).

If the kernel of an OS actually had an influence on the outcome of a compilation run... that would be hilarious / insane / madness...

I could understand if the actual transmission were broken (serial driver issues).
Logged

• Upload doesn't work? Do a loop-back test.
• There's absolutely NO excuse for not having an ISP!
• Your AVR needs a brain surgery? Use the online FUSE calculator.
My projects: RGB LED matrix, RGB LED ring, various ATtiny gadgets...
• Microsoft is not the answer. It is the question, and the answer is NO!

Seattle, WA
Offline Offline
God Member
*****
Karma: 11
Posts: 673
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, as others, I still believe it is a compiler / toolchain issue. It would be interesting if you could install a 3.0 kernel on your older 2.6 system (the one with a working toolchain).

If the kernel of an OS actually had an influence on the outcome of a compilation run... that would be hilarious / insane / madness...

In fact, we can presume it's a toolchain problem, and that the kernel rev is a red herring.  No evidence has been presented that it has anything to do with the kernel.
Logged


0
Offline Offline
Newbie
*
Karma: 0
Posts: 15
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I cannot install a 3.0 kernel on my 2.6 machine without dist-upgrade, which I don't want to do at this moment.

Would it help to post the .hex of the working sketch? Or do you need file versions? I can zip all the avr-relevant files and upload somewhere. (but maybe binary, which would be of little help)

Logged

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

I tried a similar test when I used Arch Linux. I installed a kernel from 2.6 branch but got the same errors.
Logged


Seattle, WA
Offline Offline
God Member
*****
Karma: 11
Posts: 673
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I found a reasonable work-around for this problem.  This now works for me on Ubuntu 11.10 64-bit, where it did not previously, simply by changing the baud rate to 9600. Also it works to change the SERIAL_BUFFER_SIZE to 72 in HardwareSerial.cpp.

It seems that the ISP is hanging in fill() getting a buffer overrun.
Logged


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

Sorry, but where did you change the serial speed to let the ArduinoISP sketch working?
Logged


Seattle, WA
Offline Offline
God Member
*****
Karma: 11
Posts: 673
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Line 69 in https://github.com/rsbohn/ArduinoISP/blob/master/ArduinoISP/ArduinoISP.ino

and

Line 35 in https://github.com/maniacbug/mighty-1284p/blob/master/bootloaders/optiboot/Makefile
Logged


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