How to develop a 3rd party module/plugin?

Is there any documentation to start developing your own plugin like the Bluetooth Remote? I can’t find any resources.

Thanks

1 Like

Not yet

The best thing to try right now is to look at the sources of other apps and see how they’re made

In the future we’ll have a modular build system that supports custom user plug-ins, but until then you’ll just need to edit the stock FW’s code

4 Likes

Are the best examples to look at the music player and snake game?

1 Like

Depends on what you want to make. If you’re making a game - yes, those two are great examples. If something more like an app - I would recommend looking at something else to learn how views and view dispatcher work

Thanks for the reply! Where would be the best place to look to find easy to understand examples of the things you mentioned?

Basically, there are 3 ways to make a GUI application for the flipper

  1. The simplest one is just using the ViewPort, you can find examples of it in many debug tools (applications/debug_tools), for example in vibro_test.c and the snake game.
    Pros:
    It’s simple, only one ViewPort instance is required
    It’s fast, Game friendly
    You have full control over what happens on the screen
    Cons:
    Locking is yours
    No navigation helpers
    No reusable Views
  2. Using View with ViewPort, an example of this is the display test debug tool (applications/debug_tools/display_test)
    Pros:
    View with view model provides synchronization
    ViewDispatcher provides ability to switch between views
    Ideal for simple 2 level navigation apps
    A lot of reusable view modules available
    Cons:
    More code
    No complex navigation
  3. Using Scenes, an example can be found in the desktop application (applications/desktop)
    Pros:
    Complex navigation
    Views recycling
    A lot of reusable view modules available
    Cons:
    Takes time to sink in
    Heavy

So, in your case (if I understood you correctly you want to make a game), I would use the first method

9 Likes

Thank you very much for the detailed reply! Is there a way to quickly test new code without having to compile the OS and using the desktop app to update from file? as in, like an emulator or something for faster development?

Edit: i found this video, seems like an easier way to test/debug without having to compile the entire firmware, gonna try it out!

Edit2: They skip through compiling the firmware in the video, heh, so yeah Astra you’re correct, looks like i’ll need to compile the firmware with each attempt

1 Like

There’s no faster way to flash at the moment (the plugins system is sadly not implemented yet), and no emulators exist. In theory if you can make your own version of the ESP32-devboard (or somehow get one), flashing with it will be significantly faster.

After reading a bit of code I notice there is a lot of reference to the furi library. Aside from reading the code in furi.c, is there any documentation about furi and how to use it?

Furi is not documented at the moment as it is constantly changing (and that will continue until we release 1.0.0), so the most I can provide you with are theese two slides from the december hackathon, but they might be a bit outdated in the NFC and other peripheral sections

6 Likes

Oh, and btw, you can buy a cheap STLinkV2 USB dongle and use that to flash the firmware using make flash, that should be much faster

If you decide to get one, the wiring is simple (you’ll only need 4 wires):
STLINK - FLIPPER GPIO

SWCLK → SWC (10)
SWDIO → SIO (12)
GND → Any GND (8, 11, 18)
3.3V → 3V3 (9)

Here’s a random one I found on amazon

4 Likes