Alternative languages for embedded programming

2020-02-26 03:49发布

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.

18条回答
Explosion°爆炸
2楼-- · 2020-02-26 04:30

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.

查看更多
够拽才男人
3楼-- · 2020-02-26 04:32

You can write code in C# under .NET. You must use .NET Micro Framework. But I preffer C language for this stuff like things. I writing in C on ARM7Cortex-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)

查看更多
不美不萌又怎样
4楼-- · 2020-02-26 04:33

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

查看更多
等我变得足够好
5楼-- · 2020-02-26 04:33

For Python there used to be an interesting project: Deeply Embedded Python, but I think it has been dead for sometime now.

查看更多
不美不萌又怎样
6楼-- · 2020-02-26 04:33

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...).

查看更多
【Aperson】
7楼-- · 2020-02-26 04:34

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?".

查看更多
登录 后发表回答