3 ms·
You can only afford to run Java on an embedded system when you are making limited-run devices, i.e. where the cost of the processor & RAM etc are negligible. F
by TickleSteve 8y ago
You can only afford to run Java on an embedded system when you are making limited-run devices, i.e. where the cost of the processor & RAM etc are negligible.
For most embedded devices, this is not true.
When you're paying for every device the code runs on... and that code wastes 80% of your cycles in abstractions and indirections then forces you to have 200% more RAM than the equivalent C code, that changes your mind.
Saving a tiny amount on a processor adds up when the multiplier is (say) 1 million units.
- pjmlp 8y agoDepends if you only consider embedded PICs with 8KB or such then yes. Otherwise anything of ARM Cortex M class does have Java compilers available. Garmin devices use Monkey, which is their own Java like language. Ricoh and Xerox copiers use Java on OS stack for third party integration. Likewise Cisco conference call systems have their own Java flavour. Blu Ray players, Gemalto intelligent electricity meters, and plenty more of other examples are available.
- TickleSteve 8y agoThe same applies regardless of the processor (size). Less overhead will allow a cheaper device. Its worth noting that the java support on Cortex-Ms (Jazelle) is deprecated. If you're using a cortex-m class device, chance are you don't want to be running java on it. Note that I'm talking in general terms, there are always exceptions to the rule (such as for the rare sandboxed application).
- pjmlp 8y agoWhy are you talking about Jazelle?! There is this little feature of all commercial Java toolchains for embedded development called AOT compilation to native code.
- TickleSteve 8y agoof course aot exists, was just pointing out that java is not much of a use case in embedded sw, to the extent that once major features are now deprecated.
- pjmlp 8y agoYet plenty of companies do use it, go figure.
- ashrk 8y ago> Garmin devices use Monkey, which is their own Java like language. "Monkey C" (name apparently chosen only for the pun) didn't strike me as especially Java-like when I used it, and given the memory constraints placing such a low limit on the practical max size of Garmin watch applications, that it was OO at all seemed more a hindrance than an aid. I kept wishing it was just C, and I'm not even that good at C.