NXC, LEJOS, ROBOTC software and EV3 compatibility?

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
skoehler
Posts: 8
Joined: 28 Apr 2011, 10:18

Re: NXC, LEJOS, ROBOTC software and EV3 compatibility?

Post by skoehler »

doc-helmut wrote:John, it almost sounds
- as if you give preference to a gnu Compiler for arm/linux ?
- if yes, is this also good reason for you for establishing an API?
- and if also yes, would you appreciate people to help while it's in development?
It probably a bit early speculating about that, isn't it? I'm not sure, whether LEGO will supply us with some sort of toolchain. It is not obvious whether the toolchain provided by Lego will support C++ or threading, or whether it will be glibc based. Android is an example for a system doesn't use glibc. It uses Bionic as libc, which, unlike glibc, is not C++ compatible. Many things are still in the dark. I can't wait to take the EV3 and it's firmware apart.
afanofosc
Site Admin
Posts: 1256
Joined: 26 Sep 2010, 19:36
Location: Nashville, TN
Contact:

Re: NXC, LEJOS, ROBOTC software and EV3 compatibility?

Post by afanofosc »

I may be making faulty assumptions but an ARM9 processor running Linux sounds to me like a platform I can target with any arm-linux cross compiler toolchain. It seems like the simplest thing would be for LEGO to use a standard Linux OS rather than to build something custom like Android with a different standard C library or things like that. I guess we will all know for sure in the next few months. And regardless of whether a custom toolchain is required or we can use standard Linux toolchains that we build ourselves or get from CodeSourcery it seems like it will be possible to build native ARM executables that run on the EV3 using an IDE like BricxCC.

John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
skoehler
Posts: 8
Joined: 28 Apr 2011, 10:18

Re: NXC, LEJOS, ROBOTC software and EV3 compatibility?

Post by skoehler »

You seem to be optimistic that if you use any arm-linux toolchain, you get something that works on the EV3. That is not always true, in particular if the libraries of the toolchain you use are newer than the libraries installed on the EV3. For example, glibc uses symbol versioning, that allows binaries compiled with older version of glibc to run with newer glibcs at maximum compatibility. But it also prohibits binaries linked against newer versions of glibc to run on system with an older version.
afanofosc
Site Admin
Posts: 1256
Joined: 26 Sep 2010, 19:36
Location: Nashville, TN
Contact:

Re: NXC, LEJOS, ROBOTC software and EV3 compatibility?

Post by afanofosc »

I am definitely not an expert on these matters, but I am fairly confident that once LEGO tells us which version of glibc they use (assuming they use it at all) that I will be able to build or otherwise acquire a cross compiler toolchain that I can launch from BricxCC that will create executables that work with the EV3 Linux OS. Is there any particular reason why you think I should be less confident?

I know for certain that Free Pascal does not dynamically link to libc and that I have already built Free Pascal as a cross compiler for arm-linux and that I can compile my NBC compiler and my other NXT Linux utilities to run on an arm-linux platform. With any luck they will run just fine on the EV3.

It is possible that some difficulty could arise that makes it harder than I imagine it will be but my experience with adding support for brickOS and leJOS for the RCX to BricxCC and building the GCC cross compiler for H8 and the GNU Pascal cross compiler for H8 makes me believe I will be able to overcome any difficulties that do come up.

John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests