Skip to content

Arduino SDK on linux ARM #1124

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Oygron opened this issue Nov 19, 2012 · 7 comments
Closed

Arduino SDK on linux ARM #1124

Oygron opened this issue Nov 19, 2012 · 7 comments
Assignees
Labels
Component: Toolchain The tools used for compilation and uploading to Arduino boards
Milestone

Comments

@Oygron
Copy link

Oygron commented Nov 19, 2012

Hi,

I work on embedded systems and we use an ARM board with an Arch Linux embedded. This board must be able to reconfigure an Arduino board.

The problem is I cannot build from sources the Arduino SDK on my board.
In facts, the file build/build.xml is not able to detect an ARM linux as a linux32. Consequently, the installer fails to find the right folder, and stops.

I fixed it replacing every ${platform} by linux32 but it is not very clean, and will be overrided on each update. Doing this, the software compiles and run.

Would that be possible to add ARM platforms (mine is armv7h) as detected platforms?

Thanks in advance.

Oygron

@cmaglie
Copy link
Member

cmaglie commented Nov 21, 2012

Can you add a condition to build.xml that sets ${platform} to linux32 when armv7h is detected?

@Oygron
Copy link
Author

Oygron commented Nov 21, 2012

Hi,
For an armv7h, the os.name is "Linux" and os.arch is "arm". Thus leading to the following lines to detect it as linux32:

Thanks,
Oygron

@Oygron
Copy link
Author

Oygron commented Nov 21, 2012

The xml tags of my answer made the lines invalids.
So I said that to make the arm plateform detected as a linux32, one should use the same two lines in build.xml as the ones for i386, replacing "i386" by "arm".

But the tests I am running now are suggesting that it shouldn't be detected as linux32.
If I understood well, this arch detection is to "patch" correctly the "avr" library to avoid the poison definition of SIG_USART0_*. And this patch is compiled for linux32.

So the next question is: would that be possible to add a compatibility for arm for this "patch"? If yes, how can I help you to do this?

Thanks,
Oygron

@cmaglie
Copy link
Member

cmaglie commented Nov 30, 2012

The architecture is detected to select the avr_tools archive to unpack into the tools folder, for example:

linux32 uses avr_tools_linux32.tar.bz2
linux64 uses avr_tools_linux64.tar.bz2

you should check which one is suitable for your platform (i guess linux32), and add the corresponding condition line into build.xml:

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

This doesn't work for you?

@Oygron
Copy link
Author

Oygron commented Dec 3, 2012

Hi,
Putting linux32 as platform for my arm device allows me to compile the github source, that's why I said in my first post that arm should be detected as linux32.

The problem comes when I try to compile sources for the Arduino device: I get a lot of "poison" errors. My hypothesis is that the Arduino installer is not able to "patch" avr, because of the ./build/linux/dist/tools/avrdude and ./build/linux/dist/lib/librxtxSerial.so binaries that are compiled for linux32 and not for arm. (binaries are not compatible between these architectures).

So my guess is that one have to build these two binaries for arm and declare a new platform in the build.xml if we want to be able to fully use the Arduino SDK on ARM. Work on which I can help if someone explains me how to do it.

Thanks in advance,

Oygron

Edit: I didn't check the content of avr_tools_linux32.tar.bz2, but it is also full of binaries that won't be compatible with arm architecture. These ones too will have to be recompiled.

@cmaglie
Copy link
Member

cmaglie commented May 3, 2013

The poison errors should be fixed now.

BTW the issues you're having was caused by a different gcc compiler version. Arduino uses an unpatched avr-gcc 4.3.2, newer versions may cause some weird issue on the compiled binary.

@ffissore ffissore added the New label Feb 27, 2014
@ffissore ffissore self-assigned this Jul 1, 2015
@ffissore
Copy link
Contributor

ffissore commented Aug 6, 2015

Some work on going. See #3549 and #3334. Closing to avoid duplication

@ffissore ffissore closed this as completed Aug 6, 2015
@ffissore ffissore added the Component: Toolchain The tools used for compilation and uploading to Arduino boards label Aug 6, 2015
@ffissore ffissore added this to the Release 1.6.6 milestone Aug 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Toolchain The tools used for compilation and uploading to Arduino boards
Projects
None yet
Development

No branches or pull requests

4 participants