[riot-devel] HotSpot JVM on RIOT-OS?

Zac Harvey zharvey at pobox.com
Wed Aug 12 04:38:44 CEST 2015


Thanks Marc, I appreciate the candid input.  I have a few final (I 
promise) followups here that are more for my edification/learning than 
anything else.

You say that RIOT is meant for *small* systems, and I think I'm 
beginning to understand what that means. But regardless of what RIOT is 
*typically* used for, are there any inherent limitations in RIOT that 
would prevent me from deploying/flashing it to a sophisticated MCU that 
*could* run Java? In other words, say I have an MCU that has a crazy 
amount of ROM/RAM on it that has the stats to handle a full bore JVM 
app...does RIOT itself have any limitation/constraints that would 
prevent me from choosing it (nevermind *why* I would choose it in the 
first place!)?

Also, I get that MCU ROM is the memory where the executable is flashed 
to. And I understand that because of this, in order for a non-running 
executable to "fit" on an MCU, it must have a file size that is smaller 
than the amount of ROM (obviously). But I'm still not understanding why 
the RAM (that is, the memory allocated to the running executable) can't 
be scalable by somehow attaching additional storage (flash/whatever) to 
the MCU. In other words, if the sam3x8e has 512KB ROM and only 96KB RAM, 
if my entire JVM executable (which includes *everything*) is somehow 
magically less than 512KB, it will fit on the MCU.  So why can't I then 
"get around" the 96KB RAM limitation by (somehow) integrating that 
onboard 96KB RAM with, say, an 8GB solid state drive, or something 
thereabouts.  I just feel like there *must* be a way to scale the RAM 
and perhaps even the ROM. Ideas?

Thanks again, if I can get answers to these I should be all set!

Best,
Zac

On 8/11/15 5:19 PM, Marc Sissom wrote:
> Hi Zac,
>
> Have you looked at the sam3x8e datasheet? Right on the front page it says it has 512KB of flash (AKA ROM or nonvolatile program and data storage). The chip has 96KB of RAM. Looking into task manager on Windows 7 I see a javaw.exe that is occupying 133MB of RAM and my JRE takes up 153MB of disk. Admittedly this is not a perfect comparison, but surely these numbers mean something to you.
>
> RIOT is meant for *small* systems. Not SMALL or S M A L L but small systems. Some of these systems are so small that they can't do "Hello World" because the "printf" code takes up too much space.
>
>> Thoughts? Criticisms? Hate mail?
> In other words, you're nuts!
>
>    ;-)
>
> Given that, here's a true Java bytecode chip that I worked with a few years back:
>
>     http://www.ajile.com/index.php?option=com_content&view=article&id=2&Itemid=6
>
> Here's an FPGA core:
>
>     http://www.jopdesign.com/
>
> And an ARM product:
>
>     https://en.wikipedia.org/wiki/Jazelle
>
> In other words, you are not the first to think of this, and in some cases it's not a bad idea. On the other hand, I think you can safely forget Akka on RIOT.
>
> You also mentioned Python; have a look here:
>
>      http://micropython.org/
>
> Enjoy!
>
>
> Marc Sissom
> Krypton Solutions
>
> -----Original Message-----
> From: devel [mailto:devel-bounces at riot-os.org] On Behalf Of Zac Harvey
> Sent: Tuesday, August 11, 2015 3:23 PM
> To: RIOT OS kernel developers
> Subject: Re: [riot-devel] HotSpot JVM on RIOT-OS?
>
> Thanks Kaspar and Joakim,
>
> I'm not trying to be difficult here (I promise!) I'm just trying to see the forest through the trees.
>
> When you say that "The OpenJDK would probably require many megabytes of both ROM and RAM, this means it will not run on the sam3x8e...", why? Is it because it would require "many megabytes", or because it requires ROM, which I'm guessing isn't supported by RIOT-OS?
>
> And yes, I will definitely dive into Darjeeling/LLVM, but am trying to see if I can't brute force an easier solution first. :-)
>
> Thanks again!
>
> _______________________________________________
> devel mailing list
> devel at riot-os.org
> https://lists.riot-os.org/mailman/listinfo/devel



More information about the devel mailing list