Go Down

Topic: Help getting Arduino working on Arch Linux 64 (Read 4396 times) previous topic - next topic

niadh

Hi all I am currently trying to get my arduino board to work under Arch Linux 64 bit. Now I have the IDE up and running and I can upload programs (apparently) but when the arduino starts up after being programmed under Linux led13 just stays on and wont do anything.

I have tried loading the standard blink example but this changes nothing.

Now I know it's not the arduino itself, or at least I don't think it is. As the blink sketch loads under windows and runs fine, also any of my custom sketches work as expected.

So I can only conclude at this point that I have configured my arduino wrong for linux.

I enable the ftdi_sio and cdc-asm drivers at boot, I am a member of the uucp group and uploading the blink sketch as root makes no difference.

The version of the software is 22 and the arduino I have is an Uno.

Thanks in advance.

mellis

What happens when you upload under Linux?  Can you post the verbose output (hold down shift while clicking the upload button).  Do the RX and TX LEDs on the board flash during the upload?  What program are you uploading?

It may be a bug in your avr-gcc version that causes the delay() function to work incorrectly.  Can you do "avr-gcc --version" on the command line?  If it's 4.5.x, that might be the issue.

niadh

Ok well first it IS 4.5.X:
avr-gcc (GCC) 4.5.2

So that could be the first indication.

What happens is that after uploading the blink example the led stays on with no other lights blinking, it could be the delay bug you spoke of but I wouldn't know, I am pretty new to this. All I know is that it did work, then it didn't it's possible I applied an update to avr-gcc and thats what caused it to not work.

It is just the basic blink program from the examples I have tried to upload to the board.

The output file was too big to attach so I have pastebinned it: http://pastebin.com/QTnu4PLu


mellis

That looks like a successful upload to me.  If you switch the digitalWrite(HIGH) and the digitalWrite(LOW) does the LED stay off?  If so (and anyway), I think it's probably an issue with the version of avr-gcc.  You want 4.3.something.

niadh

Ok so I have compiled gcc-avr 4.3.0 and have tried the blink sketch again, but to no avail. I can also confirm that if i switch the high and low statements the LED does stay off.

mrtaylor


niadh



niadh

Ok I have recompiled gcc-avr (as its known on arch linux) 4.3.5 and it's not made a difference either. The highs and lows still respond in weird ways. So I am really note sure how to make this work. It used to work but now doesn't, I cant figure it out.

mrtaylor


niadh

An Uno, I have also DFU programmed it to have an updated firmware. This was because I wrote a sketch that read serial data too quickly and bricked my board. Under a windows virtualmachine though the arduino receives sketches correctly so I can only assume it's not anything to do with the firmware, but I feel I should mention it anyway.

stimmer

#11
Mar 07, 2011, 09:45 pm Last Edit: Mar 07, 2011, 09:48 pm by stimmer Reason: 1
This sounds like the no data section/ no initialised globals bug. There are a couple of threads here about it somewhere. The bug was in avr-binutils, not gcc.

I think the solution was to downgrade/recompile binutils version 2.20 with Debian patches applied.
Due VGA library - http://arduino.cc/forum/index.php/topic,150517.0.html

freezway

I'm running 64 bit arch with gcc version 4.5.2 and can report the same problem. I have a duemilanove (sp) with a 168.

Kojans

Hi niadh,

Seems to me we're working on the same problem! Only I'm on 32-bit Arch. Did you try the "BlinkWithoutDelay"-sketch? See my posts "Blink does not blink". There seems to be a specific problem with the delay() function.

Ko

finarfin

I have the same problem.
Doing some tests between windows and archlinux i noticed something:
1. The problem seems to be only on PIN 13
2. The blink on PIN13 in linux is present but the led seems turned off (but if you look very close to the led you can notice a very weak light).
3. It seems ok with delay.

I tried to use delay on other pins and it seems to work fine. 

Go Up