Ruth Hendrix

JVM for HCS12

Discussion created by Ruth Hendrix Employee on Jan 28, 2006
This message contains an entire topic ported from a separate forum. The original message and all replies are in this single message. We have seeded this new forum with selected information that we expect will be of value to you as you search for answers to your questions.
 
Posted: Sun Sep 25, 2005 4:24 pm    
 
Hi Guys,
does a JVM for the HCS12 exist? if so can you direct me to it? Is it in any way feasible?
best regards
 
Posted: Sun Sep 25, 2005 11:22 pm    
 
Hmm, good question, though I've never seen a JVM or even heard the question asked before.
 
Posted: Mon Sep 26, 2005 6:58 am    
 
Hello
Few years ago I've seen a sort of JVM implementation for HC11, but haven't looked at it closer. And if you consider thath the TINI from dallas was running the JVM, it should be possible on HCS12.
Take a look at http://www.rtjcom.com
Regards
Posted: Tue Sep 27, 2005 12:15 pm    
 
thanks for the link, it seems exactly what I was looking for.
I will have a closer look.
best regards
 
Posted: Wed Sep 28, 2005 2:00 am    
 
 don't want to throw cold water on this, but the internal model of the JVM is inherantly 32 bits, and the "run everywhere" ability requires that all implementations of the JVM support the 32 bit model. They require "binary compatibility", which is NOT an easy task on a 16 bit CPU.

Of course you can emulate a 32 bit VM on a 16 bit machine, but it would take a lot of RAM, which you don't have.

I considered making my own 16 bit VM (not JVM, but a different kind of VM) and I wrote it up here:
http://www.ericengler.com/downloads/EmbeddedVM.txt

But I am not attempting to implement OO at all because of the tight memory. All my PC coding now uses OO, but there's just not enough RAM for object instances and heaps both, and you really can't do a background garbage collector without a LOT of effort.

However, its a different story if you want to discuss ARM...
Posted: Fri Sep 30, 2005 3:40 pm    
 
In regard to memory size, there is a JVM for the Lego RCX which I believe is 8-bit and has about 27K available. It will run 'standard' Java, threads and all. It is by no means a 'full' JVM though.

Cheers,
 
Posted: Sat Oct 01, 2005 12:48 am    
 
 though he wanted to be able to download an existing class file to an embedded device and run it. This is not possible without binary compatibility, which requires a 32 bit CPU: either real or emulated.

The reasons for using Java revolve around portability and garbage collection. If you don't expect these benefits then you're better off using C. From a practical point of view, it's hard to beat C for small target devices.

There's a new ARM Jazelle device that offers direct bytecode execution and it's 100% JVM compatible:
http://www.arm.com/products/solutions/Jazelle.html

Outcomes