Java based Microcontrollers? [closed]

二次信任 提交于 2020-07-17 06:16:47

问题


I have been looking into micro-controllers and was wondering if the majority of them are C/C++ based? I am quite proficient in java and want to ask you guys if anyone knows of a good cost efficient, java-based micro-controller I could look into.

All answers are appreciated!


回答1:


The difference between a language like java (or c#) and a lower level language like c or c++ is the fact that they have a virtual machine. This has many advantages, like making the application platform-independent. But it also means that each platform has to have the vm for it.

Now, microcontrollers are not uniform and vary in power, memory, and many other features. So adopting the JVM (java's virtual machine) for them is not easy even when possible. Most of the time its just impossible - most of the uc have very low memory capacity (part of what makes them cheap) - this would make fitting any general-purpose JVM there impossible, not to mention also with the application code.

I am aware of some partial-implementations of java for microcontrollers. For example "java-based" sim cards (which have a very small controller inside) are there, but they have a very limited version of java.

So basically I think your best bet to write "embedded java" (especially if you're a novice) is to work on top of microcontrolers that are basically a small fully functioning computer, that runs a proper OS that already has a JVM. Just look into one of the new "micro computer" open source projects like raspberry pi or beaglebone. Both cost around 2x of an arduino and are much more powerful.

Hope I helped.




回答2:


Have a look at the Java-ready STM32 microcontrollers or Renesas RX.

As an alternative, you can run a stripped-down JVM on AVR/Arduino using Haiku-VM, NanoVM or uJ.

You can also write Arduino sketches in Java and cross-compile them to C using VBB.




回答3:


JArduino might be a good starting point for you, as it would allow you to write Java programs that interact with an Arduino board. The Java API provided by JArduino is fully aligned with the Arduino API. Then, once you get used to the Java API, it should be easy to switch to plain Arduino programming (as pointed out, the C/C++ -based Arduino is not that far from Java, anyway). Be aware that with JArduino you do not really program the micro-controller itself (your main logic would run on your PC and the Arduino would simply be "controlled" without any advanced logic running on the board).




回答4:


There are Java alternatives, but I think they are costly. For example ST Microelectronics has this java IDE based on eclipse:

Java SDK

I have no experience with java on microcontrollers, but Java have many similarities (C based language) to C++ (which is more supported with microcontrollers), but it is still C that is dominating. It should be possible to learn this quite fast if you already know Java.

Arduino uses C++ and are easy to use for people inexperience with C/C++.

I suggest you also try the STM32 Java forum to see if there are users already sharing their experiences:

STM32 Java forum




回答5:


You can look at Java on a Chip (JoC Module) is the java programmable controller-module

JoC have a reference Board Javaino for easy development

Also Demmel iLCD product have the Java VM on board, it's a smart display with JVM



来源:https://stackoverflow.com/questions/20103318/java-based-microcontrollers

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!