View previous topic :: View next topic |
Author |
Message |
velociphile n00b
Joined: 29 Oct 2003 Posts: 43 Location: Sydney, Australia
|
Posted: Wed Nov 23, 2011 10:50 am Post subject: Arduino: sketches uploaded from Gentoo crash, from OSX ok |
|
|
Hi,
I have a Gentoo-based desktop and Macbook. If I upload sketches to either of my two Freetronics Elevens (Arduino Uno clone) from the Macbook, all's well. If I upload the exact same sketch from the Gentoo desktop, the Eleven locks up (static D13, no comms with the Arduino IDE over USB.) However, the sketch uploaded from the Gentoo desktop works if I comment out almost everything, so the Linux box is compiling and uploading semi-successfully.
The compiled sketch complete (from the OSX machine) is about 10k, the biggest I've so far got to run from the Linux box is about 5k compiled, stripping out most of the functionality from the code. Obviously both are well away from the 32k limit. I've added/called freeMemory() from memoryFree.cpp posted at http://www.arduino.cc/playground/Code/AvailableMemory, and that reports ~1500 bytes free in the most complete sketch I could get to run when uploaded from the Linux box, so I don't think it's my sketch gobbling RAM.
It looks, to me, as if something in my Gentoo cross-avr toolchain that's using far more flash or RAM memory than it should (or either freeMemory() or the IDE reports), but I don't know really where to start looking. The gentoo toolchain was put together based on the guide at http://www.arduino.cc/playground/Linux/Gentoo, whilst I'm using the 0022 IDE bin from arduino.cc.
Since I can upload from the Macbook all is not lost, but it's a pain - it's my wife's computer really.
Has anyone come across this before?
Thanks,
Tom
PS: also posted on the Freetronics forum: http://forum.freetronics.com/viewtopic.php?f=3&t=101 |
|
Back to top |
|
|
turtles Veteran
Joined: 31 Dec 2004 Posts: 1664
|
Posted: Thu Dec 01, 2011 12:36 am Post subject: |
|
|
Well since nobody has chimed in yet I cant resist. This looks really interesting.
Can I come over and check it out?
I looked at:
http://www.arduino.cc/playground/Linux/Gentoo
There is a note there:
Quote: | 64-bit users
librxtx is reported to cause some problems on gentoo linux because of an overflow, causing the IDE to fail. This problem is noted at rxtx here. Please go here for fixed binaries.
|
Are you a 64bit user? _________________ Donate to Gentoo |
|
Back to top |
|
|
dol-sen Retired Dev
Joined: 30 Jun 2002 Posts: 2805 Location: Richmond, BC, Canada
|
Posted: Fri Dec 02, 2011 2:53 am Post subject: |
|
|
I have an arduino and arduino compatible boards, but have not yet had time to set things up and play.
Looking at the link to fixed binaries, the fixed binaries are dated from a cvs snapshot: Quote: | Based on CVS snapshot of RXTX taken on 2008-12-07. |
The current dev-java/rxtx-2.2_pre2 ebuild in the tree includes those fixes and a few more it looks like. The last change in the source for it is dated Feb. 04, 2009.
So if that is the problem, then accept the ~amd64 keyword and emerge it. _________________ Brian
Porthole, the Portage GUI frontend irc@freenode: #gentoo-guis, #porthole, Blog
layman, gentoolkit, CoreBuilder, esearch... |
|
Back to top |
|
|
velociphile n00b
Joined: 29 Oct 2003 Posts: 43 Location: Sydney, Australia
|
Posted: Wed Feb 01, 2012 11:20 am Post subject: |
|
|
Both responders - thanks very much, sorry the delay in my reply. Not a lot of time for this sort of thing with a 2-year old wanting Youtube'd fire-engines every time I pick up a keyboard.
@dol-sen; I am now using rxtx-2.2_pre2, and have the same results. I don't now think it's the upload stage, I think it's before that, in the compilation/linking:
I've done a little digging, and (sorry, posted on both) result details are on the Freetronics forum (http://forum.freetronics.com/viewtopic.php?f=3&t=101&p=610#p610), so will precis here: the two systems seem to be producing very different (differently-sized) binaries, and the .hex file from the Gentoo box is 35,011 bytes - I assume it will be a problem flashing this into 32,256 bytes of space...
I'm now starting to go through the detailed compile output (produced by adding build.verbose=true to ~/.arduino/preferences.txt), comparing between the two platforms (and look again at my crossdev toolchain installation.) _________________ "1830: Press Return."
Vista will solve all your problems. People keep telling me so it must be true. |
|
Back to top |
|
|
carlocaponi n00b
Joined: 07 May 2012 Posts: 16
|
|
Back to top |
|
|
LubosD Apprentice
Joined: 30 Jun 2005 Posts: 211 Location: Czech Republic
|
Posted: Tue Dec 03, 2013 8:33 pm Post subject: |
|
|
Have you solved this? This is definitely a problem with the toolchain, because when I unpacked avr-gcc from Debian into my Gentoo, it started working flawlessly... Otherwise I had the exactly same problem as you. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|