View unanswered posts | View active topics It is currently Thu Dec 18, 2014 9:33 pm






This topic is locked, you cannot edit posts or make further replies.  [ 8 posts ] 
why need a RobotC VM for EV3 ? 
Author Message
Guru
User avatar

Joined: Sat Mar 01, 2008 12:52 pm
Posts: 1030
Post why need a RobotC VM for EV3 ?
@all developers @ robomatter:

why do you need a RobotC VM for EV3?

RobotC is almost C by syntax.

So all you would need is a C compiler for Linux and implement the RobotC API.
The C/C++ compiler plus toolchains is already here (gpp for Linux (CSLite) which is open-source),
the module interface library is already availabe (Lego lms_2012.h).

By this all the modules are already all accessable (screen, buttons, sound, motors, sensors: it has already been shown by Linux programmers like Lauro Ojeda from RobotNav.com and John Hansen on top of CSLite 2009).

EV3 Linux executables are insanely fast (80x faster than NXC/NXT VM, probably >100x faster than RobotC/NXT VM, 5x faster than nxtOSEK/C executables, this has been shown by my benchmark test).

And all at once you'll have almost all and everything, out of the box:
C syntax
stdio.h file I/O
higher level sensor and motor APi interfaces (you can build it on top of file I/O)
pointers,
recursion,
dynamic memory allocation,
up to 9-dim array algebra
64 bit arithmetics (double)
multithreading (by pthread)
OOP by C++
access to the whole gobs of memory.

you may use your RobotC editor / IDE for gpp C as well,
gpp already provides a linker, a compiler, and a debugger.

you'll only need to build 2 things which is currently only supported by the Lego VM:
USB slave interface for EV3-PC communication
USB master interface for daisy-chaining

If the standard Linux distribution is shaky in respect to multitasking and thread-safety:
build it upon Debian Linux, and ANSI C/C++ by C11 appears on the screen, featuring C11 multithreading and more.

We see that you have a problem supporting the EV3,
but actually, where is the problem?
The decisive role here is played by your API - simply implement it to gpp C !

So Houston to RoboMatter:
drop your VM,
the time is ripe to land Aquarius.

In 2 weeks it could be completed. 8)

_________________
regards,
HaWe aka Ford
#define S sqrt(t+2*i*i)<2
#define F(a,b) for(a=0;a<b;++a)
float x,y,r,i,s,j,t,n;task main(){F(y,64){F(x,99){r=i=t=0;s=x/33-2;j=y/32-1;F(n,50&S){t=r*r-i*i;i=2*r*i+j;r=t+s;}if(S){PutPixel(x,y);}}}while(1)}


Sat Jan 18, 2014 5:43 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3297
Location: Rotterdam, The Netherlands
Post Re: why need a RobotC VM for EV3 ?
Quote:
why do you need a RobotC VM for EV3?

Because ROBOTC is more than a simple compiler and you have obviously never used gdb or you would not be making these statements.

= Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Mon Jan 20, 2014 7:02 am
Profile WWW
Guru
User avatar

Joined: Sat Mar 01, 2008 12:52 pm
Posts: 1030
Post Re: why need a RobotC VM for EV3 ?
no, I didn't use gdb because I didn't need it to, but surely it could be made more user-friendly by RobotC if wishful or needed.
But not gdp is the point, but a RobotC compiler for the EV3, because obviously some things seem to be stalling or quite shaky:

tfriez wrote:
Our current progress is:
- The ROBOTC VM is not running on the EV3 yet, but we're close
- We're updating the ROBOTC IDE to support EV3 and also use the USB Port Communication to detect hardware - we've made good progress with this so far.
- The initial ROBOTC VM will be an add-on to the existing LEGO implementation. There's too much hacking and slashing to do to solve all of the issues that the EV3 has for the first release - not to mention we would have to recreate everything like the GUI and such.
- Initial release will more than likely be USB only and support out of box issues.
- We're actively working with NI to have a common solution for both ROBOTC and LabVIEW to exist on the same brain (but not run at the same time)
- Initial implementation will be on par with the NXT in terms of memory, variable space, and performance... it'll take a much bigger overhaul to be able to really take advantage of the gobs of memory on the EV3 (we've never had this much RAM/Flash before).

We're hoping to have something to release and workable within a month's time in a VERY BETA form - moving from greenfield/embedded systems to a Linux runtime is proving more complex than expected, especially when fitting into an existing environment such as the EV3 - not to mention squeezing everything in with other platforms and features being developed at the same time.

_________________
regards,
HaWe aka Ford
#define S sqrt(t+2*i*i)<2
#define F(a,b) for(a=0;a<b;++a)
float x,y,r,i,s,j,t,n;task main(){F(y,64){F(x,99){r=i=t=0;s=x/33-2;j=y/32-1;F(n,50&S){t=r*r-i*i;i=2*r*i+j;r=t+s;}if(S){PutPixel(x,y);}}}while(1)}


Mon Jan 20, 2014 7:08 am
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3297
Location: Rotterdam, The Netherlands
Post Re: why need a RobotC VM for EV3 ?
Quote:
...because obviously some things seem to be stalling or quite shaky

You base this on your intuition, a crystal ball or actual facts?

= Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Mon Jan 20, 2014 7:13 am
Profile WWW
Guru
User avatar

Joined: Sat Mar 01, 2008 12:52 pm
Posts: 1030
Post Re: why need a RobotC VM for EV3 ?
my crystal ball says:
crystal ball wrote:
- The ROBOTC VM is not running on the EV3
- There's too much hacking and slashing to do to solve all of the issues that the EV3 has for the first release - not to mention we would have to recreate everything like the GUI and such.
- Initial implementation will be on par with the NXT in terms of memory, variable space, and performance... it'll take a much bigger overhaul to be able to really take advantage of the gobs of memory on the EV3 (we've never had this much RAM/Flash before).

_________________
regards,
HaWe aka Ford
#define S sqrt(t+2*i*i)<2
#define F(a,b) for(a=0;a<b;++a)
float x,y,r,i,s,j,t,n;task main(){F(y,64){F(x,99){r=i=t=0;s=x/33-2;j=y/32-1;F(n,50&S){t=r*r-i*i;i=2*r*i+j;r=t+s;}if(S){PutPixel(x,y);}}}while(1)}


Mon Jan 20, 2014 7:15 am
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3297
Location: Rotterdam, The Netherlands
Post Re: why need a RobotC VM for EV3 ?
So how do you distil from that the development is stalled or shaky? I can assure you that it is not.

= Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Mon Jan 20, 2014 7:19 am
Profile WWW
Guru
User avatar

Joined: Sat Mar 01, 2008 12:52 pm
Posts: 1030
Post Re: why need a RobotC VM for EV3 ?
not stalled but stalling in the meaning of "prolonged".
it's referred to an follow-up posting of another thread where tfriez wrote
Quote:
Quote:
Do I understand you correctly that the EV3 will not be much more powerful than currently the NXT when running RobotC?
But hopefully this restriction for performance and memory is only for the very first test release?

That's the intent. It'll be for the initial releases, but as the product matures, so will ROBOTC. Our goal is to utilize the full capabilities of the hardware, but I think you guys might want to see something released in 2014, right?

In my understanding, if the EV3 will not be much more powerful than the NXT when running RobotC and can't use the memory and don't have "double" fp at least in 2014, then there must be something "prolonged" or "shaky" in the sense of "immature".

So my TOP was meant to be helpful in order to think over the strategies of development... :roll:

_________________
regards,
HaWe aka Ford
#define S sqrt(t+2*i*i)<2
#define F(a,b) for(a=0;a<b;++a)
float x,y,r,i,s,j,t,n;task main(){F(y,64){F(x,99){r=i=t=0;s=x/33-2;j=y/32-1;F(n,50&S){t=r*r-i*i;i=2*r*i+j;r=t+s;}if(S){PutPixel(x,y);}}}while(1)}


Mon Jan 20, 2014 7:29 am
Profile
Site Admin
Site Admin

Joined: Wed Jan 24, 2007 10:42 am
Posts: 616
Post Re: why need a RobotC VM for EV3 ?
We're continuing development on the EV3 - no one ever said that the ROBOTC VM wouldn't be living on the EV3, it just isn't today because we're still working on it.

As for the functionality - ROBOTC has been developed with much smaller processors in mind (the largest to date being 384K flash with 32Kb of RAM) - there will need to be some evolution of the VM to support all of the features in a much larger system like the EV3.

The EV3 is running linux, and you can easily make your own compiler/VM/programs that run native on the brick itself using GCC or the likes. This would probably be your best method if you're looking to take advantage of the full capabilities of the EV3 hardware today.

I'm locking this thread as it's not really a productive conversation.

_________________
Timothy Friez
ROBOTC Developer - SW Engineer
tfriez@robotc.net


Mon Jan 20, 2014 11:00 am
Profile
Display posts from previous:  Sort by  
This topic is locked, you cannot edit posts or make further replies.   [ 8 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


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 post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.