Céu Language Integration in the Arduino IDE

66 views
Skip to first unread message

maged rifaat

unread,
Jul 16, 2019, 12:19:33 PM7/16/19
to The Programming Language Céu
Hello everybody,
I am currently working on a project to support "Céu Sketches" in the Arduino IDE.


The way it works so far is that when you open a Céu file in the customized IDE
the IDE recognize it as a ceu sketch, and ensures it is in a folder with the same name (as it does with normal sketches).
The file then is loaded into the editor with all the Céu and C source file that are in the same folder.
Compiling or uploading the sketch first compiles the main Céu file (the one with the same name as the folder)
using the environment files packed with the IDE, then compiles/uploads the environment sketch.

The main issue right now is the céu compiler, I am able to compile on windows using a compiler and a batch file
that came with the project "Céu-maker" but that compiler is probably a bit out-dated and I am not able
to find similar thing for mac or linux, so I need to find the right files to pack with the releases to be able to compile Céu on the different platforms.

Any help or directions would be appreciated.

Regards

Anny Caroline

unread,
Aug 1, 2019, 2:33:29 PM8/1/19
to The Programming Language Céu
Hello, Maged.

I'm currently a MSc student working with Céu and also worked last year on GSoC on Céu-Maker project.  

I tested your IDE and worked like charming for the old examples of Céu. 

The problems:
  • The compiler might be a bit out-dated  
    I think you're using Céu-Maker 0.30 version, am I right? There is a new release, the 0.40. Also, check the develop branch of Céu-Maker repository. It's the most updated one.

  • I don't know how to find a similar compiler for the mac and linux releases
    This last version of Céu-Maker already works on Linux (tested on Ubuntu).  We use a shell file (make-arduino.sh) instead of the batch one.

maged rifaat

unread,
Aug 1, 2019, 4:00:15 PM8/1/19
to The Programming Language Céu
Hello Anny,

Thank you for taking time to try my project and thank you very much for your feedback.
You are right, I was using the version 0.30 of Céu-maker.
I will use the newer one and pack it in the project instead.

I think I will use the same technique as yours for compiling, though I don't fully understand it yet
but I found some leads in the develop branch that I can start from.

Francisco Sant'anna

unread,
Aug 5, 2019, 2:46:17 PM8/5/19
to ceu-...@googlegroups.com
Hi Maged,

I have just tried your IDE on Windows successfully, thanks!

On Thu, Aug 1, 2019 at 5:00 PM maged rifaat <maged...@gmail.com> wrote:

I think I will use the same technique as yours for compiling, though I don't fully understand it yet
but I found some leads in the develop branch that I can start from.

 We'll be happy to help.

I believe the Arduino IDE doesn't yet provide a plug-in architecture to simplify this kind of integration, does it?

Regards,
Francisco

maged rifaat

unread,
Aug 6, 2019, 12:28:20 AM8/6/19
to ceu-...@googlegroups.com
Hello Mr Francisco,

Thanks for taking time to try my project.
Unfortunately, I don't think The Arduino IDE has a plug-in architecture at all.

I have been working with the code for some time and I can see clearly that
the IDE language (C++) and file extensions (.ino) are hard coded either directly or through
the used libraries that mostly supports C-like syntax.

However, I was able to modify this behavior by making it detect Céu extension and
flag the sketch as a Céu sketch when it is opened and used this flag 
to conditionally perform Céu specific tasks when needed (Like performing a Céu compilation before the normal compilation).

I have just finished the new compilation method using the compiler from the latest Céu-maker.
The way it works now is that a batch file is run with the path to the Céu source file as an argument
and the batch file handles invoking the Makefile (A modified version of the Makefile used in Ceu-maker)
And that makes it easy to modify the compilation process from the batch file and the Makefile outside the IDE code.

I will be working on a similar shell file for Linux beside completing the syntax highlighting feature (It is partially implemented now)
then hopefully I will make a new release for both Windows and Ubuntu.

Is it possible for this project to be added to your projects on GitHub when it is finished?

Francisco Sant'anna

unread,
Aug 6, 2019, 6:12:16 AM8/6/19
to ceu-...@googlegroups.com
On Tue, Aug 6, 2019 at 1:28 AM maged rifaat <maged...@gmail.com> wrote:

Is it possible for this project to be added to your projects on GitHub when it is finished?

Sure. Probably inside ceu-maker.

maged rifaat

unread,
Aug 18, 2019, 4:31:10 AM8/18/19
to The Programming Language Céu
Hello Mr Francisco, Anny and everybody,

I have uploaded a release for both windows and Linux.
You can find it here.
The features supported so far are:
  • Opening, Editing, Compiling, and Uploading Céu-Arduino projects directly from the Arduino IDE.
  • Céu files have syntax highlighting specific for the Céu language and not the default syntax highlighting of the IDE.
  • Céu-Arduino Examples can be opened directly from the IDE under File>Examples>12.Ceu menu.
  • Céu Libraries can be directly included from inside the Arduino IDE under Sketch>Include Library>Ceu Libraries menu.
  • The IDE is fully backward compatible and all the features that the original IDE provided are still available and working.
  • The compilation and Upload stages can be fully modified from the batch or shell file that are responsible for compilation without the need to modify the IDE code and rebuild it.
  • The Céu examples and Libraries can be modified as well.
For the last two points I will add steps in the readme of the project on how to do them.
The Windows release is tested on Windows 10 and the Linux release is tested on Ubuntu 18.10.


The release is standalone but I have designed it such that it directly integrates with Céu-maker
by putting the folder "arduino-1.8.8" from this release instead of the corresponding one in the céu-maker release.
The modified IDE is actually based on arduino 1.8.9 but I kept the name as such because
that is what céu-maker's makefile expects.


I am overall satisfied with the results. The only feature that I intended to implement and ended up
skipping is the auto-indentation feature as it proved too hard.
But it is still doable and I might get back and implement it.


Looking forward for your feedback.
Regards,
Maged

Anny Caroline

unread,
Aug 19, 2019, 8:22:11 AM8/19/19
to The Programming Language Céu
Hi, Maged.

I tested the Linux version of the IDE and it worked perfectly.

Francisco Sant'anna

unread,
Aug 19, 2019, 8:59:00 AM8/19/19
to ceu-...@googlegroups.com
On Mon, Aug 19, 2019 at 9:22 AM Anny Caroline <annycar...@gmail.com> wrote:

I tested the Linux version of the IDE and it worked perfectly.

 
Me too, well done! Very convenient to use so far.
Since we already distribute the Arduino binaries with the Céu-Maker release, I believe we'll use your version in the future.

Thanks a lot!


Message has been deleted

maged rifaat

unread,
Aug 19, 2019, 12:15:47 PM8/19/19
to The Programming Language Céu
I am glad it worked well, thanks for your feedback.


On Monday, 19 August 2019 14:59:00 UTC+2, Francisco Sant'Anna wrote:

Since we already distribute the Arduino binaries with the Céu-Maker release, I believe we'll use your version in the future.

That's great news!
I will be more than happy to maintain it if any bugs or features arise.

Job van der Zwan

unread,
Aug 20, 2019, 6:43:27 AM8/20/19
to The Programming Language Céu
Looking forward to trying this out tonight! Let's hope it works out of the box on my Linux machine too! :D

maged rifaat

unread,
Aug 20, 2019, 9:05:16 AM8/20/19
to The Programming Language Céu

On Tuesday, 20 August 2019 12:43:27 UTC+2, Job van der Zwan wrote:
Looking forward to trying this out tonight! Let's hope it works out of the box on my Linux machine too! :D


Let me know how it turns out.
I tested it on a fresh Ubuntu VM so it is expected to work out of the box.

maged rifaat

unread,
Aug 20, 2019, 9:05:26 AM8/20/19
to The Programming Language Céu

On Tuesday, 20 August 2019 12:43:27 UTC+2, Job van der Zwan wrote:
Looking forward to trying this out tonight! Let's hope it works out of the box on my Linux machine too! :D


Maged Rifaat

unread,
Sep 17, 2020, 2:55:16 PM9/17/20
to The Programming Language Céu
Hello everybody,
I would like to give an update on the progress of this project.

This year, I worked on this project in the google summer of code program.
I added a lot of new features to the IDE and it now supports much more of Céu.

The IDE now can work with native Céu scripts as well as Céu-Arduino and pico-Céu projects.
There are also new syntax features for Céu like auto-indentation, auto-formatting and code-folding.

Also, there were some major features added to the IDE itself,
find more about this and how to use the new features here:

And to try it out, grab the latest release from here:
And follow the "getting started" section of the above readme.

I hope you like it.

Regards,
Maged

Job van der Zwan

unread,
Sep 18, 2020, 7:59:06 AM9/18/20
to The Programming Language Céu
Dear maged,

That is amazing progress! Wow. So just to check: you added features to the IDE that the mainline IDE doesn'th have?  Maybe you should submit those as a regular PR to the Arduino IDE!

Cheers,
Job

Maged Rifaat

unread,
Sep 18, 2020, 9:06:43 AM9/18/20
to The Programming Language Céu
Hello Job,

I am glad you liked it.

I have reached out to the Arduino IDE developers before but unfortunately they
aren't open to such new features now specially that they are working on a new IDE.
However, I plan to separate the new IDE features into their own project and maintain
it as a patch to the original IDE.

Regards,
Maged

Francisco Sant'anna

unread,
Oct 2, 2020, 10:39:35 AM10/2/20
to ceu-...@googlegroups.com
On Fri, Sep 18, 2020 at 10:06 AM Maged Rifaat <maged...@gmail.com> wrote:
I have reached out to the Arduino IDE developers before but unfortunately they
aren't open to such new features now specially that they are working on a new IDE.
However, I plan to separate the new IDE features into their own project and maintain
it as a patch to the original IDE.

Maged did a wonderful job in such a small period of time!
We discussed that it would have a higher impact with his plugin architecture integrated with the official IDE.
Unfortunately it was not possible this time.

Reply all
Reply to author
Forward
0 new messages