Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
September 27, 2021 04:38 pm GMT

Getting Started with MicroEJ

Based on my first contact with MicroEJ technology and a little bit of research, I decided to make a short introduction to this interesting technology. I am going to talk a little bit about the history behind it, where it can be used and how to install and run a Hello World example.

Who is MicroEJ?

MicroEJ is a French company who has created a development application kit focused on embedded systems and IoT, using C, Java technologies and recently JavaScript as a programming language. The main objective of this development kit is to help developers create applications for devices which require a high level of performance, compact size, energy efficiency, while still enjoying all the benefits of a high level language such as, Java or JavaScript.

Currently, MicroEJ has three products available:

MICROEJ VEE: A virtual machine that can run on devices with very low computing power, including microcontrollers, microprocessors and SoT. It includes free libraries and MEJ32.
MICROEJ SDK: An application development kit, that involves a complete pack of tools and a library, to develop applications that will run on the MICROEJ VEE virtual machine. As well as that, it is possible to create embedded systems simulators called Virtual Devices.
MICROEJ Forge: A cloud technology that helps developers and companies to store applications, assets, libraries and more.

History:

MicroEJ was founded in 2004, by Fred Rivard PhD. and went by the name of Industrial Smart Software Technology (IS2T). After a first phase of research and development, the company grew and raised investment with Innovacom at the end of 2011. The company was renamed to MicroEJ, with the challenge of building a virtualization core that needed to be 1000 times lower than Android, to standardize and viabilize the development of applications to more than 10 billion devices that are fabricated every year, embedded devices and IoT.

Currently, MicroEJ technology runs on 100 million devices, in various industry sectors across manufacturing, smart home, wearables, retail, healthcare, metering, utilities, industrial, consumer, defense, etc.

Installation on Windows(7, 8, 8.1, 10):

To start the installation, first you have to go to the official MicroEJ download page and download the SDK. The site has all the necessary information for installation, including the necessary requirements and information about what comes installed in the SDK. For the SDK to run on your computer, you will need to have JRE8 installed on your PC.

Get Started

Then just follow the standard Windows installation by clicking next, accept the terms of use, and follow the process by clicking next until you complete the steps and the IDE installation is finished.

Step one of the installation

Step two

Step three

Step four

Step five

Step six

Running the basic Hello World in Java:

After starting the IDE, creating a MicroEJ program is quite simple, just go to "File" > "New" > "Standalone Application Project"

creating a project

Then, give the name of the project and the module name will be filled automatically

building the project

When you click "Finish", the Main.java class is built

Main class built

Since this is a Main class with Hello World, to run it just right-click on the file, "Run As" > "MicroEJ Application".

Run as MicroEJ application

After running, the console will display the following message:

Hello World!=============== [ Completed Successfully ] ===============SUCCESS

Hello World with MicroEJ Template and Emulator

To run the MicroEJ Hello World template, first, you need to install one of the virtual device emulators, in this case, I'll use the NXP OM13098. After downloading it, save it in your workspace. Run the MicroEJ IDE, go to "Window" > "Preferences" > "MicroEJ" > "Virtual Device menu".

Virtual Devices

The next step is to import the emulator and select the directory where the emulator is saved.

Select the directory

Directory

After selection, simply accept the terms of use of the emulator, click "finish", wait for the import process to finish and click "apply and close".The emulator will be installed and ready for use.

License Agreement

Importing the Device

Device ready to use

To demonstrate the execution of the virtual device, I will use the Hello World template provided by MicroEJ for download. The template comes ready to run, you only need to import the file to the IDE after unzipping it. Unlike the HelloWorld in the first example, this one has to be executed by right-clicking on the folder as it contains more than one file. Follow the same steps: Run As > MicroEJ Application.

Run as MicroEJ Application

This should be the result in the NXP OM13098 virtual device:

Result in the NXP OM13098 virtual device

Remember that MicroEJ supports execution on various types of simulators, such as STM32, ESP32 and more.

Conclusion:
MicroEJ is a very interesting technology, focused on development for embedded devices, that makes it possible to run Java technology on microcontrollers with low computing power and even IoT. It has a very easy installation and setup due to the Java programming language used. Also the IDE is well known by software developers as they use Eclipse, and they provide a well-organized forum and specific site for developers in addition to its own repository. This provides a great help for those who are starting out or are just curious to know more about how to create Java applications for MCUs.

I am Oderlan Freire from Ocara, Cear. I started working at TotalCross in 2021, a student of Information Systems at the Federal University of Cear, and I participated in the SharinAgro project, one of the top projects selected for the Microsoft contest IA for Earth.


Original Link: https://dev.to/oderlanfreire/getting-started-with-microej-13k0

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To