Discussion:
Eiffel->C for uController
(too old to reply)
Yosifov Pavel
2011-04-22 02:40:57 UTC
Permalink
Does it possible to translate Eiffel->C for microcontroller: without
OS (or something like FreeRTOS), code should be small, no main() - for
embedding, linking with Eiffel libs as C:

Eiffel libs ---------> C \
my Eiffel code --> C } -- C compiller --> HEX-file
my C code -------> /

What Eiffel compiller is good for this?

/Poul
ccwu
2011-04-22 04:45:12 UTC
Permalink
I'm still using SmartEiffel 1.2r8 for a hard real time application and
hope one day I can replace SmartEiffel with GOBO Eiffel.
SmartEiffel 1.2r8 has a compiler option -no_main.

SmartEiffel may be good for embedding, but its runtime needs functions
from OS, and there is no further development now.


Cheng-Chang Wu
Post by Yosifov Pavel
Does it possible to translate Eiffel->C for microcontroller: without
OS (or something like FreeRTOS), code should be small, no main() - for
Eiffel libs ---------> C  \
my Eiffel code --> C  } -- C compiller --> HEX-file
my C code ------->     /
What Eiffel compiller is good for this?
/Poul
Yosifov Pavel
2011-04-22 05:17:28 UTC
Permalink
Wu, thanks a lot! I tried SmartEiffel on Windows now (I haven't any
experience with Eiffel early) - it's seems good for Windows:
small .exe (73Kb of "Hello world" vs 25Kb of the same on C), one .C
and one .H file.
1) Does "Gobo" depends on OS calls?
2) Looks like "Gobo" is abandoned like SmartEiffel, isn't it?
3) "Gobo" translate to .C files like SmartEiffel?
ccwu
2011-04-29 00:55:05 UTC
Permalink
Post by Yosifov Pavel
Wu, thanks a lot! I tried SmartEiffel on Windows now (I haven't any
small .exe (73Kb of "Hello world" vs 25Kb of the same on C), one .C
and one .H file.
1) Does "Gobo" depends on OS calls?
Yes, you can easily found on which it depends by examining its
runtime.
Post by Yosifov Pavel
2) Looks like "Gobo" is abandoned like SmartEiffel, isn't it
It is stilled maintained by its authors.
Post by Yosifov Pavel
3) "Gobo" translate to .C files like SmartEiffel?
Yes.
Emmanuel Stapf [ES]
2011-04-27 23:42:09 UTC
Permalink
Post by Yosifov Pavel
Does it possible to translate Eiffel->C for microcontroller: without
OS (or something like FreeRTOS), code should be small, no main() - for
Eiffel libs ---------> C \
my Eiffel code --> C } -- C compiller --> HEX-file
my C code -------> /
What Eiffel compiller is good for this?
Eiffel is not just a language, it includes also memory management,
design by contract, exceptions, file manipulations and various other
things. If you do not need all of those, then there is not much benefit
in using Eiffel in the first place. Still, if you really need to write
Eiffel code for your micro controller, you can tune the Eiffel Software
runtime and remove from the core libraries whatever you do not need, and
you will have to provide routines for performing the memory management.

Regards,
Manu
Cesar Rabak
2011-04-28 19:50:45 UTC
Permalink
Post by Emmanuel Stapf [ES]
Post by Yosifov Pavel
Does it possible to translate Eiffel->C for microcontroller: without
OS (or something like FreeRTOS), code should be small, no main() - for
Eiffel libs ---------> C \
my Eiffel code --> C } -- C compiller --> HEX-file
my C code -------> /
What Eiffel compiller is good for this?
Manu,
Post by Emmanuel Stapf [ES]
Eiffel is not just a language, it includes also memory management,
design by contract, exceptions, file manipulations and various other
things. If you do not need all of those, then there is not much benefit
in using Eiffel in the first place.
This reply surprises me. One of the citations on ISE Eiffel site is
"Eiffel is the perfect embedded language..."¹; also in the
http://www.eiffel.com/products/studio/ you'll find: "Because of
EiffelStudio's simplicity, it is ideal for the embedded developer.
Industrial machines, automobiles, medical equipment, cameras, household
appliances, airplanes, vending machines, as well as the more obvious
cellular phone and PDA, are among the myriad of possible hosts for an
Eiffel embedded system."
Post by Emmanuel Stapf [ES]
Still, if you really need to write
Eiffel code for your micro controller, you can tune the Eiffel Software
runtime and remove from the core libraries whatever you do not need, and
you will have to provide routines for performing the memory management.
I would expect a version of EiffelStudio existed or at least be already
engineered so eliding the need of the "you" part in above paragraph.

--
Cesar Rabak


[1] In /Eiffel for embedded systems at Hewlett-Packard/ interview of
Christopher Creel, HP CCD (Color laserjet and Consumables Division).
Emmanuel Stapf [ES]
2011-05-03 18:28:18 UTC
Permalink
Post by Cesar Rabak
Post by Emmanuel Stapf [ES]
Eiffel is not just a language, it includes also memory management,
design by contract, exceptions, file manipulations and various other
things. If you do not need all of those, then there is not much benefit
in using Eiffel in the first place.
This reply surprises me. One of the citations on ISE Eiffel site is
"Eiffel is the perfect embedded language..."¹; also in the
http://www.eiffel.com/products/studio/ you'll find: "Because of
EiffelStudio's simplicity, it is ideal for the embedded developer.
Industrial machines, automobiles, medical equipment, cameras, household
appliances, airplanes, vending machines, as well as the more obvious
cellular phone and PDA, are among the myriad of possible hosts for an
Eiffel embedded system."
The OP was talking about a micro controller which are for me a very low
level embedded system with barely any rom or ram. Our default Embedded
support is for system with at least 128KB of rom and 256KB of RAM and
this includes a complete Eiffel implementation. If your requirements are
less than that, you need to start removing features from the language
and this is where you start loosing some of the benefits of Eiffel.
Post by Cesar Rabak
I would expect a version of EiffelStudio existed or at least be already
engineered so eliding the need of the "you" part in above paragraph.
Eiffel Software provides it for you on demand, but if you are using the
Open Source version you are on your own.

Regards,
Manu
Cesar Rabak
2011-05-03 20:06:17 UTC
Permalink
Post by Emmanuel Stapf [ES]
Post by Cesar Rabak
Post by Emmanuel Stapf [ES]
Eiffel is not just a language, it includes also memory management,
design by contract, exceptions, file manipulations and various other
things. If you do not need all of those, then there is not much benefit
in using Eiffel in the first place.
This reply surprises me. One of the citations on ISE Eiffel site is
"Eiffel is the perfect embedded language..."¹; also in the
http://www.eiffel.com/products/studio/ you'll find: "Because of
EiffelStudio's simplicity, it is ideal for the embedded developer.
Industrial machines, automobiles, medical equipment, cameras, household
appliances, airplanes, vending machines, as well as the more obvious
cellular phone and PDA, are among the myriad of possible hosts for an
Eiffel embedded system."
The OP was talking about a micro controller which are for me a very low
level embedded system with barely any rom or ram. Our default Embedded
support is for system with at least 128KB of rom and 256KB of RAM and
this includes a complete Eiffel implementation.
I see.
Post by Emmanuel Stapf [ES]
If your requirements are less than that, you need to start removing features
from the language and this is where you start loosing some of the
benefits of Eiffel.
OK.
Post by Emmanuel Stapf [ES]
Post by Cesar Rabak
I would expect a version of EiffelStudio existed or at least be already
engineered so eliding the need of the "you" part in above paragraph.
Eiffel Software provides it for you on demand, but if you are using the
Open Source version you are on your own.
Thanks,

--
Cesar Rabak

Loading...