mp-flipper icon indicating copy to clipboard operation
mp-flipper copied to clipboard

Stability of the app & future plans

Open ofabel opened this issue 1 year ago • 11 comments

The frequent bus fault upon application start is reported to the firmware developer team. But this won't cope with the fact, that the application got bigger and bigger due to new features. So RAM space will always be a limited resource.

But I'm thinking about releasing a fork of the original firmware with the MicroPython interpreter as a core service. This would mitigate the memory problem. But could also mean, that I have to remove some other core service.

The app store version would still be around and maintained, but with a limited set of features.

If you have an opinion about what feature should be part of the app version or what should be added to the firmware version, feel free to share your thoughts here.

ofabel avatar Oct 06 '24 15:10 ofabel

You guys are doing good! Thanks for everything.

xHector1337 avatar Oct 08 '24 15:10 xHector1337

Just this ♥️

OliverTahir avatar Oct 09 '24 21:10 OliverTahir

I have never, ever been able to successfully launch microPython, it always reports OOM. Unclear what is filling memory.

MaggieLeber avatar Nov 04 '24 15:11 MaggieLeber

I have never, ever been able to successfully launch microPython, it always reports OOM. Unclear what is filling memory.

Yes, the latest release is a bit more unstable than the previous ones. But according to https://github.com/flipperdevices/flipperzero-firmware/issues/3927#issuecomment-2461285240, the bug is fixed in the firmware. Let's see what the next stable firmware release brings. Otherwise I'll see what I can do about that.

ofabel avatar Nov 07 '24 05:11 ofabel

Possibly of interest: I bought a new Flipper for my wife this week, and while setting it up, on impulse I loaded mPython... And it seems to work fine, although I did not try working it out thoroughly. The two devices are I assume running the same firmware.

MaggieLeber avatar Nov 07 '24 11:11 MaggieLeber

:rocket: :older_man: Good news everyone!

The application seems much more stable with the latest release of the official firmware.

@MaggieLeber did you connect with Bluetooth ? This can lead to the problem because of the memory consumption of the BT stack. But this seems to be fixed with the latest firmware release.

ofabel avatar Nov 12 '24 09:11 ofabel

Seems to be working much better this morning with the new firmware...will exercise it more later.

MaggieLeber avatar Nov 12 '24 13:11 MaggieLeber

I know I'm late, but I vote firmware fork! (Plus HID plz)

ruapotato avatar Nov 26 '24 06:11 ruapotato

I also would love to hear @jamisonderek opinion here on how I can shrink the binary size of this app... Or anyone else who has an idea to share on what feature could be removed to make this app smaller and more stable.

ofabel avatar Jan 19 '25 16:01 ofabel

Sadly, I'm no expert on STM32 binary size. As we get larger apps like uPython and FlipWorld, it seems like an interesting area to learn more about. In the past, when the Firmware + app was just around the limit I had removed "SPEAKER_NOTE_A0-GS8" because it was taking about 2KB of the FAP and that seemed to help.

In video 138 (https://youtu.be/_RDCJ95Ktzo) I recommended...

  • Release build of firmware + app
  • Smaller animation
  • Don't have qFlipper or mobile app running
  • Launching using UFBT COMPACT=1 DEBUG=0 launch helped with memory as well. (Not a great solution if you are using your Flipper mobile, but on OFW it leaves you with about 35KB free.)

I have a theory that if we had a tool that renamed functions to two letters, it might be helpful. I'm sure there must be some existing tools to do that? For example, if you open the FAP in notepad and search for "mp_flipper_logging_get_effective_level" or "mp_flipper_repl_continue_with_input" you will find that text. It takes space in FAP, but not sure if it also impacts a section used during the loading process?

jamisonderek avatar Jan 20 '25 19:01 jamisonderek

Hello! Thanks a lot for your great work, this one is awesome! On momentum fw it works stable (after reboot :))

Can you add support of string slices please? I mean I still can iterate through string with loop, but slices (like s[2:5]) is muuch more clear

Also, if there are more examples can you provide link please?

Thank you once again!

YAKOROLEVAZAMKA avatar Feb 14 '25 03:02 YAKOROLEVAZAMKA