Pages: [1]   Go Down
Author Topic: Problem uploading to MEGA 2560 with Raspberry Pi B  (Read 752 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello!

I am running Raspbian Wheezy on my new Raspberry Pi Model B.  I installed the Arduino IDE.  I am able to upload the Blink sketch, using the Pi, to an Arduino Uno with no problem.  However, when I connect a MEGA 2560 to the same USB cable instead, and change the Board selection under Tools to "Arduino Mega 2560 or Mega ADK", uploading the same sketch fails.  Here are the errors provided:

/home/pi/arduino-1.0/hardware/arduino/cores/arduino/HardwareSerial.cpp:91:41: error: attempt to use poisoned "SIG_USART0_RECV"
/home/pi/arduino-1.0/hardware/arduino/cores/arduino/HardwareSerial.cpp:101:15: error: attempt to use poisoned "SIG_USART0_RECV"
/home/pi/arduino-1.0/hardware/arduino/cores/arduino/HardwareSerial.cpp:132:15: error: attempt to use poisoned "SIG_USART1_RECV"
/home/pi/arduino-1.0/hardware/arduino/cores/arduino/HardwareSerial.cpp:145:15: error: attempt to use poisoned "SIG_USART2_RECV"
/home/pi/arduino-1.0/hardware/arduino/cores/arduino/HardwareSerial.cpp:158:15: error: attempt to use poisoned "SIG_USART3_RECV"

I am able to upload sketches to this Mega board just fine if I use the IDE on my iMac.

Thanks so much for your help!

Claudia
« Last Edit: January 20, 2013, 01:10:27 am by ClaudiaH » Logged

Offline Offline
Edison Member
*
Karma: 29
Posts: 2047
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, my only comment is,  thats novel !   I have never seen that before, myself.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

At least, you could work Ide Arduino on Raspberry Pi.
I couldn't make it work. I installed Arduino and when I connected Arduino Uno Board, I got this message:

Exception in thread "main" java.lang.ClassFormatError: Truncated class file
   at sun.misc.FloatingDecimal.<clinit>(FloatingDecimal.java:1870)
   at java.lang.Double.toString(Double.java:196)
   at java.lang.String.valueOf(String.java:2985)
   at java.security.Provider.putId(Provider.java:433)
   at java.security.Provider.<init>(Provider.java:137)
   at sun.security.jca.ProviderList$1.<init>(ProviderList.java:71)
   at sun.security.jca.ProviderList.<clinit>(ProviderList.java:70)
   at sun.security.jca.Providers.<clinit>(Providers.java:56)
   at sun.security.util.ManifestEntryVerifier.<clinit>(ManifestEntryVerifier.java:47)
   at java.util.jar.JarFile.initializeVerifier(JarFile.java:331)
   at java.util.jar.JarFile.getInputStream(JarFile.java:403)
   at sun.misc.URLClassPath$JarLoader$2.getInputStream(URLClassPath.java:706)
   at sun.misc.Resource.cachedInputStream(Resource.java:77)
   at sun.misc.Resource.getByteBuffer(Resource.java:160)
   at java.net.URLClassLoader.defineClass(URLClassLoader.java:266)
   at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
   at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:205)[/font][/color]
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I fixed my problem, with the help of some info here:  http://arduino.cc/forum/index.php?action=printpage;topic=92364.0

I couldn't for the life of me find the avr include files that I needed to look at, because I think the entire avr directory tree was installed as "hidden".  Once I uncovered it - by default, the include files are under /usr/lib/avr/include/avr - I found the file io.h, which includes iom2560.h for the Mega2560.  iom2560.h then includes the very obscure file iomxx0_1.h.  In THAT file, I added the line

#define __AVR_LIBC_DEPRECATED_ENABLE__ 1

near the bottom of the file, right before that flag is tested.  If __AVR_LIBC_DEPRECATED_ENABLE__ is not defined, then a long list of #pragma's are run to "poison" certain references, including the ones that were flagged as "poisoned" during the compile, causing fatal errors.  The Blink sketch uploads and operates just fine now on the Mega....I may have caused myself new problems down the road, but for now, I'm happy, and can move on to bigger and better things!

oscarB, I suspect that your error listing is caused by X11 on your Pi either having crashed, or not ever started.  The IDE needs X11 to be running on the Pi, or the IDE won't start.  I am actually logging on to the Pi from my Mac, using a remote shell over my local network - I use the Terminal in Mac OS, and run the ssh command with a -X flag.  The -X flag starts X11 on the Pi....you can also use other means to start X11 on the Pi directly, such as the "startx" command.   Hope this helps....
Logged

Pages: [1]   Go Up
Jump to: