Closed enurseitov closed 4 years ago
I personally dislikes any apps in web, why you need any qemu emulation on backend, when you can just compile it offline on your machine, but instead real hardware, link it with emulator, written with SDL? It simple, fast, and not required "brave web world".
compile it offline on your machine, but instead real hardware, link it with emulator, written with SDL
this is very good solution for doing some integration tests because you can mock any hardware behaviour and frees you from proceedings with the features of the emulation itself
not required "brave web world".
web page is a simplest UI I can imagine.
We have some experience with building fw for linux and forwarding all UI commands (display transactions, LED state and button events) to/from simple web page.
I'm thinking about some sort of IDE + QEMU based emulator so it provides developers with the same UX as Android Studio does. We can build everything on top of Intellij IDEA, WDYT? Is it overkill?
I think using QEMU is more difficult than create mocked HAL. Also if we have version of FW that don't require any hardware, we can complie it for WebAssembly target and run in web browser, or build it for docker-container-linux and run (how target_lo
already does).
Also I think we have two different task:
I'm thinking about some sort of IDE + QEMU based emulator so it provides developers with the same UX as Android Studio does. We can build everything on top of Intellij IDEA, WDYT? Is it overkill?
And what about UI in your case? Maybe I need to see some examples how It may looks like.
I think using QEMU is more difficult than create mocked HAL.
You might be right, if we aim to build an MVP quickly then a mocked HAL is reasonable way to go, but for a more mature solution QEMU is a good choice since it provides infrastructure for debugging, network interfaces and other hardware. It also encapsulates the emulated hardware, so, in theory, if there is a new Flipper device's architecture, then we can quickly pick it up since only a new frontend for QEMU is required. I haven't coded any custom frontend for QEMU yet, so this idea is worth exploring first.
Also if we have version of FW that don't require any hardware, we can complie it for WebAssembly target and run in web browser
About a year ago I heard that you cannot place a wasm file on a CDN (content delivery network), correct me if I am wrong.
Create IDE in browser
And what about UI in your case?
I looked up for the Android Emulator Architecture, it uses OpenGL to draw UI. We might consider to use Vulkan as it is more modern graphic API which will allow us to draw anything we want.
About QEMU: today I learned about Renode and it looks good for emulating (authors compare themselves to QEMU)
I have an experience working on code from a web browser (cloud9) and it is really inconvenient
To be fair, I also don't think that write some code in web-browser is a good idea, at least now, when we have limited community of developers and no need hyped and ultra available dev tool.
I have some plan about emulation and testing process:
I implemented this idea in my other commercial project and I have some environment for this. Also it close to huimk
project by @DrZlo13
I see that #26 and #22 have very close subject and maybe we should refactor this discussion
I add https://github.com/Flipper-Zero/flipperzero-firmware-community/wiki/Environment page and create #97 for UI emulator. This task for FW emulating (QEMU) and for web-based IDE and I place it to backlog.
Back in time, there was pebble watch. They had amazing toolset for developers who wanted to create apps or watchfaces for the pebble watch (besides traditional offline SDK):
Frankly this was the most user-friendly environment for an embedded device I've ever seen. Maybe it explains why pebble was so popular: there were tons of apps in their app store, entirely driven by community.
Unfortunately, pebble does not exist anymore, however there seem to be sources survived which could give some inspiration. Some facts:
qemu
for emulation