Go Down

Topic: Arduino/Atmel and Linux challenge...solved? (Read 2983 times) previous topic - next topic

SurferTim

Aug 02, 2011, 02:15 pm Last Edit: Aug 06, 2011, 06:11 pm by SurferTim Reason: 1
Greetings all!

I am tired of using Windows!!

Is Arduino or Atmel interested in Linux users? Or are we being pushed to the back burner? I have challenged Atmel to show up here, and see what is happening with their latest 8-bit compiler. Let's see what they do!  :)

EDIT: If by some chance they do show up here, this is the topic. See reply#10:
http://arduino.cc/forum/index.php/topic,67519.0.html

BTW, I do not believe the problem with Linux is Arduino. I firmly believe this is an Atmel challenge, and I am hoping that Arduino can put more pressure on Atmel than I can.

MarkT

As far as I know there are a lot of Linux Arduino users out there - since the Arduino software is open source,  designed to be portable, packaged for download for 3 OS's I guess Arduino cares too..
[ I won't respond to messages, use the forum please ]

AntonioM

Hey, I've been using linux since 4 years (work and home) and doing Arduino stuff since a year and never had a problem at all. When something fails is programmer's issue, not hardware nor compiler. I have a ethernet shield, used a lot of sensors, displays and more and everything worked well. Not to be afraid ;)

HugoPT

I also just use linux it is more easy to deal on arduino, better fast compiling and upload code and dont give stupid errors when change usb port like windows. :smiley-yell:
I realy hate windows it is just a big disapointeness.I prefer MAC and linux
If you trie it is like drive a fiat and then change to a ferrari:)
Debian,Mint,Ubuntu
Arduino Mega 2560
Arduino Nano
Arduino Duemilanove
MAC OS Montain Lion
Raspberry PI Model B

SurferTim

#4
Aug 03, 2011, 12:20 pm Last Edit: Aug 03, 2011, 03:23 pm by SurferTim Reason: 1
Quote
When something fails is programmer's issue,

This is a programmer's issue. Atmel's programmer's issue. The newest release will not compile anything if not modified. Period.
Not only does it not, but the way it is coded, it shouldn't. Trying to force it to compile will only generate faulty code. I had to make two modifications to get it to compile at all. And relatively easy bugs to find.

I have the same code working great on  Windows compiled program on the same Mega2560.

I will NOT go back to version 4.3.4. We are supposed to be moving FORWARD here! I'm on avr-gcc V4.5.1.

Thanks for all your input, guys, but according to my scorecard at the bottom of the first inning (or end of the first period):
Arduino 0
Atmel 0


EDIT: One of these companies could score the first point by posting this:
"Hi, I work for _______, and we are looking into it".

I should start a poll. Am I the only user that can compile programs with avr-gcc V4.5.1?
Without modification, it will not compile "blink".

I am not just shouting accusations at anyone. If you take a look at the other subject, you will see I know where the two bugs are, and I know how to remove them. I have not had time to dig into the client.read() problem yet. I have work to do.


SurferTim

#5
Aug 04, 2011, 03:30 pm Last Edit: Aug 04, 2011, 03:56 pm by SurferTim Reason: 1
I wondered why, when I first posted this, that nobody suggested that I should "upgrade to the latest version of avr-gcc".

Now I know why.

Who besides me is using the latest version compiler downloaded from the Atmel website?
http://www.atmel.com/dyn/products/tools_card.asp?tool_id=17311&category_id=163&family_id=607&subfamily_id=760
I selected the 8 bit compiler for a Linux 32 bit system.
You must register to download it.
Code: [Select]
avr-gcc --version
If you have the latest version, it should respond with 4.5.1

How many tried it and couldn't get it to work?

Nothing from Arduino? Doesn't V0022 kinda like depend on that just a little? And your version of avr-gcc?

madworm

I don't think that the requirement to register is strictly legal (and by legal I mean what the common people think, not some kind of lawyer), at the very least it is a very bad habit.

The compiler IS open source. Therefore access to it should not require anything except clicking on the download link.
• 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!

SurferTim

#7
Aug 04, 2011, 05:47 pm Last Edit: Aug 05, 2011, 01:42 pm by SurferTim Reason: 1
Thanks, madworm. I am still in the world of EULA (the "accept or go away" Windows thing).

Have you tried the latest version? It seems like I am so close, but the Ethernet C++ code is a bit of a mystery to me.

I would really like to say to new users "please download the latest compiler from Atmel first".  :)

EDIT: I would like to say that, but I can't. It does not compile anything, not even "blink".

SurferTim

#8
Aug 04, 2011, 06:01 pm Last Edit: Aug 04, 2011, 06:19 pm by SurferTim Reason: 1

Hey I couldn't agree more with you! I always tell my students the same thing  :smiley-mr-green:


Hey, I've been using linux since 4 years (work and home) and doing Arduino stuff since a year and never had a problem at all. When something fails is programmer's issue, not hardware nor compiler. I have a ethernet shield, used a lot of sensors, displays and more and everything worked well. Not to be afraid ;)



And you are using the latest Atmel compiler?
Code: [Select]
avr-gcc --version

My bad. I did not intend to sound so short. Some older versions apparently work fine.
But if you were to start TODAY, with the programs you have available on the internet, could you compile Atmel code?
Arduino V0022
Atmel V4.5.1

EDIT: This has been on here for a while, and I do not see a single post that says "I use V4.5.1, and it works fine right out of the box!".

AntonioM

Code: [Select]
$ avr-gcc --version
avr-gcc (GCC) 4.3.5


This is what I have from the Debian squeeze repositories. It work, I don't see why I need the lastest version.

SurferTim

#10
Aug 04, 2011, 06:39 pm Last Edit: Aug 04, 2011, 08:11 pm by SurferTim Reason: 1
You don't need anything. That is what I just said. Some previous versions work FINE!

EDIT: Let me be a little more specific here. DO NOT download the new compiler. It does not work!

But the version in my repository (V4.4.2), and the current version that you would download TODAY from the Atmel website (V4.5.1), will NOT compile Atmel code. This is specific to the current versions you download TODAY!

The question is still open. Does anyone besides me have avr-gcc V4.5.1 compiling and running "blink"?
Mine does. Blink - blink - blink
This is Atmel's current compiler and I'm just a newbie!  :smiley-eek:

SurferTim

#11
Aug 06, 2011, 03:11 pm Last Edit: Aug 06, 2011, 03:53 pm by SurferTim Reason: 1
For those compiling V4.5.1 from scratch, as it were, the bugs are here:
Bug #1
avrlibc-1.7.1/include/util/delay.h.in

At line 40, add this:
Code: [Select]
#include <math.h>

Bug #2 (EDIT: use the new Bug#2 fix below)
avrlibc-1.7.1/include/math.h

At line 426, remark out the declaration like this:
Code: [Select]
// extern double round (double __x) __ATTR_CONST__;

Then at least you will be up with me.  :)

madworm

Wouldn't it be better to disable the round macro in 'wiring.h' (arduino territory), instead of in the low-level avr-libc?
• 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!

SurferTim

#13
Aug 06, 2011, 03:30 pm Last Edit: Aug 07, 2011, 03:14 pm by SurferTim Reason: 1
Probably!  Thank YOU!! :)

I could not understand why that declaration wouldn't work. I did not know about the macro.

That is in wiring.h? I'll check!

EDIT: That's it! It did fine with the math.h version of round.

This is the new
Bug #2:
arduino-0022/hardware/arduino/cores/arduino/wiring.h
remark out line 79 (round macro).

Thanks!

NOW we are together, right?

If you have a spare Linux box to test with, give it a try to see if all is working ok for your code.
Mine has an ethernet challenge.

EDIT: I'll start another post about the ethernet bug.

All I have tried in the standard Atmel v4.5.1 package has worked.
So now it is down to the Arduino-0022 Linux library.

Please post something here if you find a library that doesn't function.


SurferTim

SCOOOOORRRRRE!! The Arduino team draws first blood. A moderator responded.
The score at the bottom of the second inning (end of the second period)
Arduino 1
Atmel 0

@ moderators: Thanks for not locking this subject and throwing me off the forum. I should give you a free point just for that. I can be a pain in the backside.

Go Up