Sunday, December 18, 2011

Will the MBEDDR Project save us from using C?

I came across the MBEDDR Project, last night, that seems like it might have some promise to add modern programming practices, such as Closures, Functional Programming, Modules, and others, to C language based embedded systems.

The MBEDDR Language uses JetBrains' Meta Programming System, which is an open source projectional language, as a compiler for the MBEDDR language, that ultimately produces C code to be compiled with your current C compiler.

I have lots of questions myself on this project at this point, such as how easy will it be to get directives like FLASH (IAR) or PROGMEM (AVR-GCC) in the right place? Will it do the Right Thing with volatile? They are also not sure they will open source all of the code; Will they hold back some needed part (FAQ says they might)? Will the code fit in the parts I want to use? At this point it is worth watching and maybe playing with what is currently avaiable.

The project has released code under the Eclipse Public License 1.0. My June 19, 2010 blog entry, I'm Scared, covers my view of Eclipse. It is not a kind one. With Oracles removing its Java from Linux I can't see things improving in the Java area. Any Java code I've ever tried to use has been slow and buggy.


3 comments:

  1. I haven't looked at the MBEDDR Project yet but how does using the Eclipse license make it bad?
    I hope you find time to evaluate this concept and give feedback to the embedded community.

    ReplyDelete
  2. Nothing wrong with the Eclipse Public License to my knowledge.

    IDE's were originally meant to be tools to speed development.

    Alas, in many cases, they have become crutches, substitute for understanding. If someone does not know how to program without an IDE, then they don't know how to program, and should not be programming. That was the point I was trying to make in my "I'm Scared" blog. I'm scared that we are ending up with people that point and click and think they are programming. What kind of quality are we going to end up with? What kind of bloated hardware will be required to run such programs?

    I will post any progress I make with MBEDDR.

    ReplyDelete
  3. Hi,

    I just came across your blog post. I am a member of the mbeddr project. I will try to answer some of your questions.

    Regarding adding directives, it should be very easy. This is exactly the benefit of this approach. The whole language is extensible. Extensions do not require us to change anything in the language. You can build extensions yourself

    Regarding volatile: It should. We don't do any magic to the C code written by a user. It is possible to write normal C code (with a few very minor changes which are on the syntax level)

    Regarding open source: The basic C is (and will be) open source. You can have a look at GitHub where we recently moved this part of the project (a blog post about this will follow soon) The parts which might not be open source (and this just means that it is not decided yet) are some specific extensions or generators for those extensions (an example might be the AUTOSAR generator for components).

    Regarding will it fit into your code: Again, we don't do any magic. We generate plain C code. As long as you are not using the abstractions (such as Statemachines or components) the code we generate is exactly what you've written. If you are using the extensions by default you'll use our generators. However if you don't like what we generate you can always write your own generator and run that one instead of ours. So the whole thing is really a layered approach. You have basic C. You use existing extensions and the "default" generators. You can use existing extensions and custom generators. Or you can build your own extensions and generators. One more important thing here is that if you want to prevent your users form using certain concepts that we build in (even in the very core of the language) you can do so. An example might be preventing users from dynamically allocating memory.

    Regarding I'm scared: You shouldn't :-) This project is designed for programmers. The whole idea is to make you more productive and at the same time allow to assist you while programming (see formal verifications)

    I hope this helps. Currently we are looking for people who want to play around with it and give some early feedback. If you are interested, just drop me a mail.

    Kind regards,
    Bernd

    ReplyDelete