Porting of Arduino IDE 1.5.x for the ARMv7 Platform

Hi all,
I have a Wandboard (with an ARMv7 processor) and I bought recently an Arduino Due.

I wanted to connect my board with Arduino, and work with the IDE on it.
Unfortunately the source isn’t configured to support such architecture, so I tried to modify it.

Adding this line in the build.xml and I replacing librxtxSerial.so with an ARM version, it compiles, and the GUI works:

<condition property="platform" value="linux32"><os family="unix" arch="arm" /></condition>

Problem: I noticed that the CodeSourcery compiler for SAM3X is pre-compiled for x86/64, so i can’t compile sketches on my machine with it.

I tried to modify hardware/arduino/sam/platform.txt linking the arm-linux-gnueabi default compiler installed on the device.

I managed to get something, but it doesn’t work.

It seems to be an incompatibility between architectures in an AR file in the source.

     [exec] /usr/bin/ar rcs /tmp/build7753227687903815174.tmp/core.a /tmp/build7753227687903815174.tmp/wiring_pulse.cpp.o 
     [exec] /usr/bin/ar rcs /tmp/build7753227687903815174.tmp/core.a /tmp/build7753227687903815174.tmp/IPAddress.cpp.o 
     [exec] /usr/bin/ar rcs /tmp/build7753227687903815174.tmp/core.a /tmp/build7753227687903815174.tmp/variant.cpp.o 
     [exec] /usr/bin/g++-4.6 -Os -Wl,--gc-sections -mcpu=cortex-m3 -T/home/ubuntu/Desktop/Arduino-1.5.4/build/linux/work/hardware/arduino/sam/variants/arduino_due_x/linker_scripts/gcc/flash.ld -Wl,-Map,/tmp/build7753227687903815174.tmp/sketch_jan01a.cpp.map -o /tmp/build7753227687903815174.tmp/sketch_jan01a.cpp.elf -L/tmp/build7753227687903815174.tmp -lm -lgcc -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -Wl,--start-group /tmp/build7753227687903815174.tmp/syscalls_sam3.c.o /tmp/build7753227687903815174.tmp/sketch_jan01a.cpp.o /home/ubuntu/Desktop/Arduino-1.5.4/build/linux/work/hardware/arduino/sam/variants/arduino_due_x/libsam_sam3x8e_gcc_rel.a /tmp/build7753227687903815174.tmp/core.a -Wl,--end-group 
     [exec] collect2: ld terminated with signal 11 [Segmentation fault]
     [exec] /usr/bin/ld: error: syscalls_sam3.c.o: Conflicting architecture profiles M/A
     [exec] /usr/bin/ld: failed to merge target specific data of file syscalls_sam3.c.o
     [exec] /usr/bin/ld: error: sketch_jan01a.cpp.o: Conflicting architecture profiles M/A

Can you help?

arduino.log (15.7 KB)

I didn’t saw your post before.

But I was doing the same thing and I’m having the same problem :smiley: But, I’m using an UDOO Quad board.

Thanks,

Wagner Sartori Junior

I tried to modify hardware/arduino/sam/platform.txt linking the arm-linux-gnueabi default compiler installed on the device.

Due needs arm-none-eabi, and I wouldn't expect arm-linux-eabi to come close to working. You're lucky the compiler realized that the sam3x isn't compatible with linux startup code and gave you the error, rather than simply producing a binary that expected linux to be on the target (when it isn't.)

Hi all, and thanks for reply!

But I was doing the same thing and I'm having the same problem But, I'm using an UDOO Quad board.

I found a modified version of the Arduino IDE and a working arm-none-eabi compiler on the UDOO website (http://www.udoo.org/downloads). They make it work!

Take a look!

Ek5