I`m looking for alternatives programming languages (from assembly, C, C++ and basic) to embedded (microcontroller) programming.
Is it possible for example, to program microcontrollers in C# or Java? Maybe Ruby or Python?
If possible, please post development tools and hardware used.
If you're programming microcontrollers you will almost always want C or Embedded C++, anything else just takes up too much valuable on chip flash. Those are the only two languages I would recommend, if you're not hand assembling things (and really, who does that these days?)
I use Embedded C++ just like everyone else, on Arduino for instance, I also use C for the most part on an ARM board I make use of.
You can write code in
C#
under.NET
. You must use .NET Micro Framework. But I prefferC
language for this stuff like things. I writing inC
onARM7Cortex-M3
processor with Keil Framework and this working good, this framework supports many programming interfaces and processor's.Note: Micro Framework is NOT a realtime OS (by Matthew Whited from comments)
FORTH has been popular in embedded systems for a long time. I have no specific experience with it but it is very cleverly designed to provide a lot of functionality in a small amount of space even on difficult micro controllers, using threaded code interpretation methods. It is even pretty fast for what amounts to an interpreter. It is easy to get development environments for FORTH, and it is pretty easy to port it to new systems.
People love or hate it, because it insists that you code in a reverse polish notation (basically its a stack machine with a big pile of predefined operators).
This SO thread seems relevant: https://stackoverflow.com/questions/122292/forth-love-if-honk-then
For Python there used to be an interesting project: Deeply Embedded Python, but I think it has been dead for sometime now.
You can take a look at very powerful AvrCo Multitasking Pascal for AVR. You can try it at http://www.e-lab.de. MEGA8/88 version is free. There are tons of drivers and simulator with JTAG debugger and nice live or simulated visualizations of all standard devices (LCD, 7SEG, 14SEG, LEDDOT, KEYBOARD, RC5, SERVO, STEPPER...).
There are several physically small devices that run a more-or-less full version of Linux. You can program them in pretty much any programming language that runs on Linux, i.e., practically any programming language known to mankind.
For microcontrollers with tiny amounts of RAM, far too small to run Linux, see StackOverflow: "What are the available interactive languages that run in tiny memory?".