https://github.com/flintvn/flintespjvm
FlintESPJVM brings the power of Java to ESP32. Allows you to run and debug Java programs directly on the ESP32 hardware
https://github.com/flintvn/flintespjvm
esp32 flint flintespjvm flintjvm java jvm
Last synced: 2 months ago
JSON representation
FlintESPJVM brings the power of Java to ESP32. Allows you to run and debug Java programs directly on the ESP32 hardware
- Host: GitHub
- URL: https://github.com/flintvn/flintespjvm
- Owner: FlintVN
- License: mit
- Created: 2024-07-25T12:57:45.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2026-04-05T07:03:25.000Z (2 months ago)
- Last Synced: 2026-04-05T08:25:38.488Z (2 months ago)
- Topics: esp32, flint, flintespjvm, flintjvm, java, jvm
- Language: C++
- Homepage: https://esp.flint.vn
- Size: 14.6 MB
- Stars: 59
- Watchers: 4
- Forks: 7
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
## FlintESPJVM
FlintESPJVM brings the power of Java to ESP32 devices by implementing [FlintJVM](https://github.com/FlintVN/FlintJVM) on the ESP-IDF framework. This enables running and debugging JVM-based languages such as Java, Kotlin, Scala, Groovy, Clojure, JRuby, and Jython on ESP32 hardware.

## Key Features
- Supports most Java bytecode instructions.
- Supports debugging with [FlintJVM Debug](https://marketplace.visualstudio.com/items?itemName=ElectricThanhTung.flintjvm-debugger) VS Code extension via serial port.
## How to use
### 1. Supported Boards
FlintESPJVM is compatible with a variety of ESP32 boards, including:
| Board | Cores | Flash | SRAM | PSRAM |
| ----------------- | ------------------------- | ----- | ----- | ----- |
| **Generic ESP32** | 240MHz Xtensa Dual-core | 4MB | 520KB | ❌ |
| **ESP32-C3FH4** | 160MHz RISC-V Single-core | 4MB | 400KB | ❌ |
| **ESP32-C6FH4** | 160MHz RISC-V Single-core | 4MB | 512KB | ❌ |
| **ESP32-C6FH8** | 160MHz RISC-V Single-core | 8MB | 512KB | ❌ |
| **ESP32-S2FN4R2** | 240MHz Xtensa Single-core | 4MB | 320KB | 2MB |
| **ESP32-S3FH4R2** | 240MHz Xtensa Dual-core | 4MB | 512KB | 2MB |
| **ESP32-S3N4RX** | 240MHz Xtensa Dual-core | 4MB | 512KB | ✅ |
| **ESP32-S3N8RX** | 240MHz Xtensa Dual-core | 8MB | 512KB | ✅ |
| **ESP32-S3N16RX** | 240MHz Xtensa Dual-core | 16MB | 512KB | ✅ |
### 2. Flashing the Firmware
To get FlintESPJVM up and running on your board:
- Quick Flash: Use the [ESP Web Tool](https://esp.flint.vn) for an easy, browser-based flashing experience.
- Manual Build: Prefer building it yourself? Utilize the ESP-IDF framework to compile and flash the project manually.
### 3. Building Java Projects for FlintESPJVM
To develop Java applications for FlintESPJVM:
- Project Setup: Use the [FlintJDK](https://github.com/FlintVN/FlintJDK) module to access core Java libraries compatible with FlintJVM.
- Debugging: Install the FlintJVM Debug extension in VS Code.
Refer to the [FlintExample](https://github.com/FlintVN/FlintExample) project, which provides a simple and clear template to help you get started with building Java apps for FlintJVM.
### 4. Dependencies and Cloning
- This project requires ESP-IDF v5.5.0 or later to build.
- Run the following command to clone this repository and include all dependent submodules:
```sh
> git clone --recurse-submodules https://github.com/FlintVN/FlintESPJVM.git
```
## Benchmark
Below are the performance benchmarks of several different programming languages on the ESP32, focusing on.
- Execution time of 10 million iterations using `for` and `while` loops.
- Maximum toggling frequency of GPIO when driven by the CPU.
| Language | Platform | `for` loop (10M) | `while` loop (10M) | GPIO toggle frequency |
| ------------- | --------------------- | ---------------- | ------------------ | --------------------- |
| C | IDF v5.5.0 | 375 ms | 375 ms | 2.2 MHz |
| Java | FlintJVM v1.1.7 | 9254 ms | 9254 ms | 295 KHz |
| MicroPython | MicroPython v1.26.0 | 43677 ms | 79582 ms | 107 KHz |
| C# | NanoFramework v1.12.4 | 77656 ms | 77660 ms | 2.4 KHz |
The source code of this test can be viewed at [ESP32-Perfomance](https://github.com/FlintVN/ESP32-Perfomance).