FlintVN / FlintESPJVM

MIT License
1 stars 1 forks source link

Hardware peripherals, dynamic class loading #2

Open maxbrito500 opened 5 days ago

maxbrito500 commented 5 days ago

Hello,

Thank you for publishing this project. I think most capable Java developers can write C++ code but it isn't exactly the same when you are used to the tooling and easier code writing of Java. Your project really gives fresh air for ESP32.

Have a few questions before going deeper into the project:

I know this project is still fresh, but what are the plans for loading classes or jar files dynamically from memory cards? Right now a limitation ESP32 is the need to flash the firmware or use some tricks for app loading as seen recently at Flipper. Since this is a JVM, would assume that you've solved this heavy limitation on ESP32. We can now compile the class files and then run them on ESP32 devices with ease.

The second question are the basic peripherals. If we can dynamically load classes from memory cards, then connection to WiFi, bluetooth and basic things like controling the pixels/texts on displays comes next.

How can we help add these functionalities?

Thank you!

ElectricThanhTung commented 3 days ago

Hi @maxbrito500

This method can be used with all ESP32 chips. But if your ESP32 supports USB communication like ESP32-S2 or ESP32-S3. It is simpler, you just need to press the boot button on the board then it will switch to USB storage mode (wait about 2s). Press again if you want to return to run mode. image

And I'm also developing a tool to support file browsing via UART. I'll let you know when it's up and running. image

maxbrito500 commented 3 days ago

This is looking so good!! :-)

So basically just drag and drop new classes instead a very long compilation toolchain and need to upload a new firmware for every little change. Plus we get the debug environment and easy code programming as Java developers enjoy on the IDE.

What about Wi-Fi, bluetooth and memory card integration, I imagine there is way to incorporate C libraries into java libraries?

ElectricThanhTung commented 3 days ago

And about:

ElectricThanhTung commented 3 days ago

Hi @maxbrito500 "What about Wi-Fi, bluetooth and memory card integration, I imagine there is way to incorporate C libraries into java libraries?" I think I will do that.

maxbrito500 commented 3 days ago

Thank you for the invitation. I'm not an expert on C but will gladly be around here to help writing code.

Will just ask a lot of questions until I can learn and understand better, hope you don't mind. In return, I will write these notes as documentation to help others get started. We don't have a forum here, so I will open new issues with the questions if that is OK.