navigation
home
 
simpleRTJ info
 
download
 
about us
 
 6811 version
features
 
showcase
  
download
 
 
6811 showcase
MIT Handy Board
 
Grifo GPC-114
 
RS485 network card
 
 
Assembly Version for 68HC11

Note: Assembly version of the simpleRTJ for the 68HC11 is not supported anymore and no further development is carried on. This version of simpleRTJ is available free of charge.


The 68HC11 was the first microcontroller for which the simpleRTJ was implemented. The main objective during the Java VM development was to implement as much of the Java language as possible. Motorola 68HC11 was selected because of it's popularity and because it's instruction set (indexed and indexed with offset addressing) allowed to implement Java run-time environment in a relatively small space. The current version of the Java VM - Beta 2 requires only 7.5KB of code space and about 100 bytes of data memory to run. Of course, additional memory is required for the Java application and the run-time objects it creates.

In order to achieve the smallest possible size the Java VM has been entirely written in the 68HC11 assembler using the GNU ASxxxx assembler/linker tools. 

The target system is not required to run any real-time operating system. In fact, the Java VM for 68HC11 has been designed to run on its own as a miniature standalone operating system that can execute Java control applications in the multi threaded run-time environment. 

Any of the available development tools (JDK 2, JDK1.1.x, JBuilder, etc.) can be used to create and compile Java control applications. 
 

The ClassLinker
Another important part of the development process was to design a tool that would allow link Java binary 'class' files into the final output file. This final application file is then loaded (together with the native code) into the memory of the target device.

The size of the final output file is being minimized by including only referenced components (fields, methods, classes, etc.). Symbolic references within the class files are also resolved during the link phase and are replaced with the relative offsets and indexes. This action significantly simplify and, more importantly, speed up the bytecodes execution by the 68HC11 microcontroller. It was also necessary to write an optimized set of java.lang classes to provide functionality that is relevant to the environment on which the Java VM runs.

The ClassLinker was written in Java to allow application development on any computer system that supports Java language.
 

Threads
The thread support is provided. Number of threads that can run simultaneously depends on the processor performance. Typically, 4 to 8 threads can be handled by the 68HC11 with 8MHz crystal clock. The real-time interrupt timer handler activates the time sliced pre-emptive thread switching. The pre-emption is implemented on the Java bytecodes execution level.

 

Garbage Collector
Java VM - Beta 2 now adds support for the collection of unused objects on the application heap. Garbage collection is invoked automatically whenever memory resources are too low. In addition to automatic collection, user application can check for the amount of available memory and explicitly invoke garbage collection.

The three color mark and sweep garbage collector code has been implemented in less than 640 bytes!
 

What's missing
Due to the very limited memory resources and computational performance of 68HC11 some functionality of the Java language has been omitted. For example, using the 64-bit long and double arithmetic is not supported as well as multidimensional arrays. Thread synchronization is not yet fully implemented.

Java application development process 
Click here to view the diagram showing the Java application development process.

 
Features
Specially optimized to run on the embedded systems with limited memory resources (from 48KB). On average the simpleRTJ will not require more than 18-23KB of code space to run.
Designed to run as a stand-alone miniature Java operating system. No other RTOS is required to be present in the memory.
Implemented thread support with object's monitor locking and wait/notify synchronization. A timer interrupt should be available to provide VM with time base for the pre-emptive time sliced thread scheduler.
Uses optimized java.lang package to preserve small memory footprint of the Java applications.
Implements support for the javax.events package. This package allows to handle responses to asynchronous events (some interrupts, comms, keypad,...) in Java code. Also included are classes for creating software timers (single shot and periodic).
Supports String and StringBuffer objects.
Exception handling is fully implemented.
Interfaces are fully supported.
Multidimensional arrays are supported.
Includes compacting, three color mark & sweep automatic garbage collector.
Uses simplified native interface to provide fast invocation time for the native methods.
Large number of startup configuration options for specifying the heap size, number of references, threads, software timers, etc.
The simpleRTJ code can be built separately from the native code. This feature allows VM to be programmed into the EPROM/FLASH and the native code and Java application loaded into the RAM when needed.
Number of compilation options allow to control the size of char data type, inclusion of floating point, presence of garbage collector, etc. These options can be used to tailor VM to specific needs of the target platform and the Java applications. 
Supports the following memory models:
- linear 64KB
- banked 64KB
- linear up to 16MB
Can execute Java applications of up to 16MB in size

Limitations
Java language package java.lang was optimized (minimized) to include only classes and methods that are relevant to this implementation of the Java VM.
64-bit double and long arithmetic is not supported
Divide ( / ) and modulo ( % ) operators works at the moment only on 16-bit numbers.
Thread support doesn't yet provide synchronization on synchronized methods and code sections. java.lang.Object class doesn't implement thread synchronization methods wait and notify.
Multi-dimensional arrays are not supported.
Performance of the application written in Java and run under VM is slower than applications written in C. This limits the use of Java VM to applications which do not require fast responses from the control program. However, interrupts are are always serviced as soon as they are registered by the processor. Furthermore, it is always possible to write time critical operations in the native code and that way balance the slower execution of the main program.
JNI is not supported. Instead, there is a simple and fast native interface provided.

Showcase
  
RS-485 Networking Card RS485 networking card
68HC11A1 with 7.3728MHz crystal clock
32KB of battery backed-up SRAM

This card is being used in the field since June 1998.
  

MIT HandyBoard MIT HandyBoard controller
68HC11A0 with 8MHz crystal clock
32KB of battery backed-up SRAM.
number of peripheral interfaces for controlling robots
  
GPC114 Universal Controller Grifo GPC-114 universal controller
68HC11A1 with 8MHz crystal clock
16-32KB of EPROM
24KB RAM + 22KB battery backed-up SRAM
Abaco bus, RS485/232, RTC
  

 
Download
 
Read the installation instructions and the system requirements for additional information you may need to know before you start using the Java VM for 68HC11.
 
simpleRTJ version Beta 2
 
vm11_b2.exe (self extracting zip archive) 771KB
vm11_b2.zip  742KB

Documentation

The documentation is distributed with the VM and as such it doesn't need to be downloaded.
However, up to date version of the User Guide can be separately downloaded (217KB) for offline reading.


Installation instructions

The Java VM - Beta 2 is distributed as a self-extracting zip archive for the Windows95/98/NT or as a zip file for extracting on other platforms.

To install the Java VM follow these steps:
Download the vm11_b2.exe into temporary folder on your computer by clicking on corresponding link above.
Run the vm11_b2.exe  by double-clicking the file from the Explorer
Specify the new installation folder if the default one is not suitable and select the Unzip button
Self-extracting program will copy all Java VM files into the specified folder. When installation of the files completes select the Close button.
In the root of installation folder open the readme.html for up to date information about this realease of Java VM.

To uninstall the Java VM from your computer remove (delete) all files in the installation folder.


System requirements

Target device
8MHz or faster 68HC11 with at least 32KB of battery backed-up RAM for program and data storage. If EPROM/RAM configuration is used then at least 16KB of EPROM and 16KB of RAM is required.
Current version of Java VM will require less than 7.5KB (or 9.8KB with FP support) of code memory and less that 100 bytes of data memory to run. Of course, additional memory is required for your java application and the run-time objects.
68HC11 real-time interrupt (RTI) available for thread switching
Serial port (with RS232 interface) for loading java application and VM from the PC

Application development
PC with Windows95/98/NT (or any other computer) and enough memory to run the development tools
Native code development tools to produce the binary images of the startup code, native methods and the Java VM.
The GNU ASxxxx assembler/linker for 68HC11 is recommended as it has been used to build Java VM binaries.
Executables for the Windows platform can be downloaded from here. Visit the ASxxxx homepage to download software for other platforms.
JDK 1.1.x or JDK 1.2 to compile your java application and to run the ClassLinker. Other development tools that can also be used include Visual J++, JBuilder, Visual Cafe, etc.
Sun's CommAPI 2.0 if you want to use AppLoad - the Java application for loading binaries via 68HC11 bootstrap mode.


AppLoad11 (1.0) for Win9x/2000/XP
Screen shots   1 2
 

AppLoad11 is a 32-bit application for Windows environment providing easy way to upload executable files into devices based on Motorola 68HC11.

Features:

  • graphical user interface
  • supports upload several files in one session
  • accepts input files in Motorola S and Intel Hex formats
  • fully configurable selection of COM port, boot loader, booting and loading baud rate, etc.
  • operating parameters can be specified via command line arguments

Downloading instructions

After downloading the AppLoad11-1.0.zip (287K) unzip the archive into desired directory. No further installation is required.
See the readme.html for additional instructions.

AppLoad11 source code and project files for Borland C++ Builder 4 are available upon request here.

 

Mem11 (1.0) for Win9x/2000/XP
Screen shots   1 2 3  
 
Mem11 is a 32-bit application for Windows environment providing simple commands to inspect memory in devices based on Motorola 68HC11.

Features:

  • graphical user interface
  • Available commands: 
    - read 
    - write
    - fill
    - log output into disk file
  • recent commands history
  • fully configurable selection of COM port, boot monitor, booting and operating baud rate, etc.
  • operating parameters can be specified via command line arguments

Downloading instructions

After downloading the Mem11-1.0.zip (305K) unzip the archive into desired directory. No further installation is required.
See the readme.html for additional instructions.

Mem11 source code and project files for Borland C++ Builder 4 are available upon request here.

 

appload11 v0.1 for Linux
Screen shots   1 2  
 
appload11 is an application for Linux environment running the KDE window manager. It provides easy way to upload executable files into devices based on Motorola 68HC11.

Features:

  • graphical user interface
  • supports upload several files in one session
  • accepts input files in Motorola S and Intel Hex formats
  • fully configurable selection of COM port, boot loader, booting and loading baud rate, etc.
  • operating parameters can be specified via command line arguments

Downloading instructions

After downloading the appload11-0.1.tar.gz (153K) and untaring the archive into desired directory run the following commands to build appload11 for your environment: 

./configure
make
make install  (as root)

See the README file for further details.

You will also need one of the following bootloader files:

 
Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc., and all other
trademarks and logos are trademarks or registered trademarks of their respective owners.
 

Copyright 2000-2002, RTJ Computing. All rights reserved.