flipperdevices / flipperzero-firmware

Flipper Zero firmware source code
https://flipperzero.one
GNU General Public License v3.0
12.66k stars 2.7k forks source link

MicroPython or any other scripting language interpreter #72

Closed aprosvetova closed 4 years ago

aprosvetova commented 4 years ago

Is your feature request related to a problem? Please describe. I'm sure it'll be pretty easy to reflash Flipper Zero, especially with OTA over Bluetooth and official iOS/Android apps, but it's still a big deal when it comes to small and easy scripts I need to run just one/two times. Current way also requires to "store" all the plugins in the tightly limited STM32 flash memory.

Describe the solution you'd like Adding a scripting language interpreter with a very basic and very high level API to access main Flipper Zero modules (screen, BLE, NFC, CC1101, 1-Wire, GPIO) would allow people to write very simple scripts (even one-liners for small tasks), share them easily (Flipper Plugins Repository?), install them faster and store them on MicroSD card without any recompiling/reflashing.

It's also easier for newbies to code in Python than in C++ (even with Arduino framework) and would encourage people to write more basic plugins and share them.

Describe alternatives you've considered As I said above, it's possible to make plugin installation easier with OTA over Bluetooth but I have no idea on how to recompile firmware with added plugins right on a mobile device.

We might end up in a situation where Flipper will be totally dependant on PC in terms of plugin installation.

Additional context Looks like https://github.com/micropython/micropython is currently the most popular interpreter for MCUs and it has an STM32 port.

I don't know any other interpreters and I also don't have any experience in such software.

glitchcore commented 4 years ago

Now we work on dynamic linking apps and core so that we don't have to rebuild whole firmware to add plugin.

But in general, add micropython support is good idea. Also we already discuss using micropy and espruino in #35 and placed this task to backlog.