PORTLAND, Ore. Advanced Cybernetics Group Inc. claims to have developed a "write anywhere, run anywhere" technology, called Eclipse, that compiles Java programs into an embedded-C program that has no operating system. Next, ACG intends to compile the C program as software not only for embedded microcontrollers but also for hardware field-programmable gate arrays. Eventually, the company wants to program every chip in a system not just the CPU with Java.
"I am making a very big claim here I'm saying, 'Write anywhere' in either C or Java, and I can run it anywhere," said Advanced Cybernetics Group (ACG; San Jose, Calif.) founder and chief technology officer Francis daCosta.
According to daCosta, the low-footprint technology can disassemble Java byte codes to identify the needed OS services, then convert that Java into monolithic C modules. Eclipse takes those C modules, plus any others that are already written in C, and statically links them with the company's OS components library. By thus incorporating the code, which answers the application's service requests, Eclipse outputs processor-independent C code that can be compiled into an OS-less executable for any target processor with a C compiler.
"How can I get away with this claim? Because target compilers for all the different processors already exist, so all I need to do is convert Java code into a statically bound version in C," said daCosta.
ACG's technology could eventually close the rift between software and hardware engineers by enabling them to use the same high-level language (Java) to describe their designs, daCosta said.
"The software and hardware engineers have never spoken the same language before, but the nice thing is that at the op-code level, processors don't care," he said.
So far, the company has only created software with Eclipse's smaller embedded code size for its OS-less microcontrollers, but daCosta has plans to tackle hardware next by putting its technology on FPGAs.
"I'm not saying a Verilog compiler would produce optimal FPGAs from our C; you would have to bring in a hardware engineer to fiddle with it," said daCosta. "But the potential is there."
For now, dozens of companies, including IBM and Seagate Technology LLC, are using embedded microcontrollers based on the OS-less Eclipse program. "When you are designing embedded systems you don't have the luxury of an entire operating system at your behest," daCosta said.
Most applications depend on the operating system to provide the resources it needs from the hardware. The OS layer enables programmers to change their code on the fly without worrying about reallocating hardware resources, because the OS layers below it take care of all the application's needs.
"This held for both enterprise and embedded systems, with embedded systems relying on a microkernel of OS services rather than an enterprise OS. But then Java came along, and all sensible engineers embraced its concept of 'one development environment, multiple-deployment environments,' " said daCosta. "That works fine for enterprise computers, but for embedded systems you need not only a microkernel layer but also a virtual-machine layer"
Having to add yet another virtual-machine layer around a microkernel OS inflated his embedded footprint so much that daCosta got to thinking about getting rid of the OS altogether. So he asked himself, "What is the underlying difference between having a virtual machine plus microkernel layer and having no virtual machine or OS at all?"
His answer: "The fundamental difference is the difference between doing dynamic calls, which are linked to OS resources at run-time, and static calls to the hardware resources of the embedded system."
Compilers traditionally perform the function of identifying the static system resources that an application needs and binding them to the dynamic variables in a program. But Java's interleaved virtual machine eliminates the need for compiling. So for embedded systems, daCosta set out to design his Eclipse technology to eliminate the need for the virtual machine by translating Java op codes into C macros that can be compiled.
"In the real world, compilers always expect a particular OS; but in the ideal world, if a compiler was designed to link into an application just the components it needed from a modular OS, then that would be exactly what we are doing," said daCosta.
Down to the FPGA
Technically speaking, this static binding of modular components melds just the OS services an application needs into the block of monolithic C code. The result is an OS-less, high-level C program that can be compiled for any processor. Usually an embedded processor will be its target, but because the code is self-contained, daCosta envisions a day when his Java programs will compile down to FPGAs.
"I do a static binding to kernel services, as opposed to the usual dynamic binding. So what's the big deal? The big deal is that I'm taking the operating system out of the equation. In essence, I'm creating a chip it's a software chip, but it's a chip," daCosta said.
To achieve its goal of OS-less embedded applications, AGC has mapped all 224 Java op codes to its own library of C macros. The op codes, which were intended for a Java virtual machine, link into AGC's service library, which answers the application's calls.
The result is a statically bound C object that can be compiled for any processor. The resulting low-footprint C code runs in the embedded target environment with no OS.