The edge devices connected to the Cloud that constitute the Internet of Things (IoT) require support for building blocks, standards and frameworks like those provided by the Eclipse Foundation projects: Californium, Paho, Leshan, Kura, Mihini, etc. Because of the large deployment of Java technology in the Cloud, on the PC, mobile and server sides, most projects above are implemented in Java technology. Deploying these technologies on embedded devices requires a scalable IoT software platform that can support the hardware foundations of the IoT: microcontrollers (MCU). MCU delivered by companies like STMicroelectronics, NXP+Freescale, Renesas, Atmel, Microchip, etc. are small low-cost low-power 32-bit processors designed for running software in resource-constraint environments: low memory (typically KB), flash (typically MB) and frequency (typically MHz).
The Edje project defines a standard high-level Java API called Hardware Abstraction Layer (HAL) for accessing hardware features delivered by microcontrollers such as GPIO, DAC, ADC, PWM, etc. that can directly connect to native libraries, drivers and board support packages provided by silicon vendors with their evaluation kits.
MicroEJ® Operating System (OS) is a scalable OS for resource-constrained embedded and IoT devices running on 32-bit microcontrollers or microprocessors. MicroEJ OS allows devices to run multiple and mixed Java and C software applications.
This talk aims at presenting the packages that constitute the core of Edje and its reference implementation developed over MicroEJ OS on a STM32F7 discovery kit.
2. eclipsecon France 2016
PRESENTER
Stéphane Mainchain
Director, Customer Care
stephane.mainchain@microej.com
The information contained herein is not warranted to be error-free.
IS2T® and MicroEJ® and all relative logos are trademarks or registered trademarks of IS2T S.A. in France and other Countries.
Java™ is Sun Microsystems’ trademark for a technology for developing application software and deploying it in cross-platform, networked
environments. When it is used in this site without adding the “™” symbol, it includes implementations of the technology by companies other
than Sun. Java™, all Java-based marks and all related logos are trademarks or registered trademarks of Sun Microsystems Inc, in the United
States and other Countries.
Other trademarks are proprietary of their respective owners.
4. eclipsecon France 2016
ABOUT MICROEJ
Independent Software Vendor, global player in the IoT industry
• http://www.microej.com/about
• Software tool & runtime licenses
• Professional services, training & consulting
KEY FINANCIALS
• $5M Series B funding end 2011 – $20M R&D total investment
Offices in France, Germany, USA
Partnerships with key IoT, silicon, embedded SW and HW (EMS) vendors
Expertise in embedded, virtualization, software engineering & process
5. eclipsecon France 2016
OPERATING SYSTEMS FOR ENABLING THE IOT
RTOS Linux
Volume
75%
IoT = “sub-gig” things:
• Processor < GHz
• Memory < GB
25%
SW Foundation
MPU (>$10 ASP)MCU ($1-6 ASP)
7. eclipsecon France 2016
EDJE PROJECT
The Hardware Abstraction Java API for the IoT embedded systems
• Peripheral management
• Controller Communication Interfaces (Serial connection, CAN, SPI, I²C)
• Digital and Analog I/O (GPIO, ADC, DAC)
Scope
• Target resource-constrained micro-controller
• Provide ready-to-use software packages for target hardware
• Define a modular and easy to port framework
Project Status
• Eclipse IoT project
• Incubation
• Initial contribution in review
8. eclipsecon France 2016
IOT TOPOLOGY
IOT DEVICES GATEWAY SERVER
8/16/32-bit MCU Mono-Core
Frequency: < 200 MHz
Flash: < 1 MB
RAM: < 512 KB
32/64-bit MPU Multi-Core
Frequency: in GHz
Flash: in GB
RAM: in GB
MCU
MPU
10. eclipsecon France 2016
EDJE APPLICATION FIELD
Sensors/Actuators
Local Network
Internet
A library at the edge of the IoT for
sensor hubs and devices
12. eclipsecon France 2016
List of Java API
• The minimum execution environment provided by an Edje compatible
device
• Intersection between Java SE, Java SE Embedded, MicroEJ and Android
• Includes java.lang, java.util, java.io, …
EDJE DEVICE CONFIGURATION
J2SE
J2SE
Embedded
MicroEJ Android
Edje
13. eclipsecon France 2016
List of Java API
• The minimum execution environment provided by an Edje compatible
device
• Intersection between Java SE, Java SE Embedded, MicroEJ and Android
• Includes java.lang, java.util, java.io, …
EDJE DEVICE CONFIGURATION
Edje Device Configuration
Edje API
Edje Application
Library
Execution
Environment
15. eclipsecon France 2016
EDJE API
Edje comes with the following services
Controller
Communication
Interfaces
Serial Port
CAN
Digital and
Analog I/O
GPIO
Peripheral
Management
LCD
USB Devices
Analog Input
16. eclipsecon France 2016
EDJE API
Peripheral Management
• List the peripherals of a platform
o MCU peripherals (UART, timer, USB controller, …)
o Board peripherals (screen, button, LED, sensors, …)
o External peripherals (USB devices, bluetooth devices, …)
• Peripheral plug/unplug notification system
17. eclipsecon France 2016
EDJE API
Controller Communication Interfaces
• Some peripherals can establish a connection to external devices
o Serial Connection (UART)
o Serial Peripheral Interface (SPI)
o Inter-Integrated Circuit (I²C)
o Controller Area Network (CAN)
• The peripheral implements Connectable interface
• Connection is described by a String
• Example with serial ports:
List<SerialPort> serialPorts = PeripheralManager.list(SerialPort.class);
for(SerialPort serialPort : serialPorts){
Connection connection = serialPort.openConnection("baudrate=115200;bitsperchar=8");
…
connection.close();
}
18. eclipsecon France 2016
EDJE API
Digital and Analog I/O
• Manage controller pins
• API inspired from Arduino C API
• General Purpose Input/Output (GPIO)
o LED, Buzzer, Button
• Analog to Digital Converter (ADC)
o Potentiometer, Temperature Sensor, Light Sensor
• Digital to Analog Converter (DAC)
o Speaker, Light Dimmer
• Pulse Width Modulation (PWM)
o Motor
22. eclipsecon France 2016
REFERENCE IMPLEMENTATIONS
Features
• Peripheral Management
• UART, USB CDC, GPIO, DAC, ADC
PC Simulation
• Java® SE
• Hardware In the Loop Simulation (HIL)
Execution
Flow
Ethernet
or Serial