Giter Site home page Giter Site logo

flipperdevices / flipperzero-firmware Goto Github PK

View Code? Open in Web Editor NEW
11.1K 263.0 2.5K 108.94 MB

Flipper Zero firmware source code

Home Page: https://flipperzero.one

License: GNU General Public License v3.0

C++ 0.15% C 98.60% Assembly 0.03% Shell 0.03% Python 1.18% Batchfile 0.01% PowerShell 0.01% POV-Ray SDL 0.01% JavaScript 0.01%
nfc rfid subghz stm32 armv7m ble onewire flipper flipperzero firmware

flipperzero-firmware's Introduction

A pixel art of a Dophin with text: Flipper Zero Official Repo

Flipper Zero Firmware

Contributing

Our main goal is to build a healthy and sustainable community around Flipper, so we're open to any new ideas and contributions. We also have some rules and taboos here, so please read this page and our Code of Conduct carefully.

I need help

The best place to search for answers is our User Documentation. If you can't find the answer there, check our Discord Server or our Forum. If you want to contribute to the firmware development, or modify it for your own needs, you can also check our Developer Documentation.

I want to report an issue

If you've found an issue and want to report it, please check our Issues page. Make sure the description contains information about the firmware version you're using, your platform, and a clear explanation of the steps to reproduce the issue.

I want to contribute code

Before opening a PR, please confirm that your changes must be contained in the firmware. Many ideas can easily be implemented as external applications and published in the Flipper Application Catalog. If you are unsure, reach out to us on the Discord Server or the Issues page, and we'll help you find the right place for your code.

Also, please read our Contribution Guide and our Coding Style, and make sure your code is compatible with our Project License.

Finally, open a Pull Request and make sure that CI/CD statuses are all green.

Development

Flipper Zero Firmware is written in C, with some bits and pieces written in C++ and armv7m assembly languages. An intermediate level of C knowledge is recommended for comfortable programming. C, C++, and armv7m assembly languages are supported for Flipper applications.

Firmware RoadMap

Firmware RoadMap Miro Board

Requirements

Supported development platforms:

  • Windows 10+ with PowerShell and Git (x86_64)
  • macOS 12+ with Command Line tools (x86_64, arm64)
  • Ubuntu 20.04+ with build-essential and Git (x86_64)

Supported in-circuit debuggers (optional but highly recommended):

Flipper Build System will take care of all the other dependencies.

Cloning source code

Make sure you have enough space and clone the source code:

git clone --recursive https://github.com/flipperdevices/flipperzero-firmware.git

Building

Build firmware using Flipper Build Tool:

./fbt

Flashing firmware using an in-circuit debugger

Connect your in-circuit debugger to your Flipper and flash firmware using Flipper Build Tool:

./fbt flash

Flashing firmware using USB

Make sure your Flipper is on, and your firmware is functioning. Connect your Flipper with a USB cable and flash firmware using Flipper Build Tool:

./fbt flash_usb

Documentation

Project structure

  • applications - applications and services used in firmware
  • assets - assets used by applications and services
  • furi - Furi Core: OS-level primitives and helpers
  • documentation - documentation generation system configs and input files
  • firmware - firmware source code
  • lib - our and 3rd party libraries, drivers, etc.
  • scripts - supplementary scripts and python libraries home

Also, see ReadMe.md files inside those directories for further details.

Links

flipperzero-firmware's People

Contributors

aku-plooks avatar albkharisov avatar aloneliberty avatar aprosvetova avatar astrrra avatar bettse avatar disasm avatar doomwastaken avatar drunkbatya avatar drzlo13 avatar glitchcore avatar gmman avatar gornekich avatar gsurkov avatar hedger avatar hp197 avatar itsyourbedtime avatar karator avatar leptopt1los avatar lomalkin avatar mauimauer avatar minchogaydarov avatar nminaylov avatar rebornedbrain avatar rusdacent avatar skorpionm avatar skotopes avatar willy-jl avatar xmasterx avatar zhovner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flipperzero-firmware's Issues

Welcome from Evgeniy N

About me

Hi everyone, I'm Evgeniy, an embedded systems engineer.

I have some good experience with digital circuits (schematics, layout, debugging), have some tools for that (oscilloscope, logic analyzer).

I feel comfortable with low-level programming, but lack experience with high-level architectural stuff.

I also have some experience managing development teams (wore a Scrum Master hat for some time) and a set of soft skills that may be useful for organizing project backlog, workflows etc, all that project management stuff.

How can I help

I can't really be helpful before the stack and architecture is chosen and fixed, and unfortunately can't help with choosing and fixing one.

When it's done, i can start as a 'handyman' developer to help with small tasks before I get comfortable with the project

What help I need

Possibly some guidance and clear small tasks in the beginning

Extensions or add-ons for the case

Since we have the ability to expand the functionality via GPIO, we must provide the ability to attach additional modules directly to the Flipper case. These can be sensors, LEDs, or even additional outputs. For example, I want to show devices from the past:

Example

https://www.youtube.com/watch?v=ZJ1GR9mQamI (see 13:50, VGA output)

As proof-of-concept, we can create such dockstation with VGA output and RS232 convertors on it.

Demo devices connected to GPIO

Let's think about what simple devices a user can assemble without great expense and connect to Flipper. Purpose: To show in the ad how cool it is to have a GPIO and that Flipper is not a toy.

Requirements:

  1. The simplest assembly
  2. Availability of components
  3. Installation without complicated tools

Came up with:

  1. Cycling computer (just a set of reed switches) - enter the diameter of the wheel, and it just counts the ticks / kilometers / reptilians
  2. GPS navigator - we just hook some cheap uBlox via UART, in the demo firmware we just display the coordinates and 10 points to save. Demonstration of API for UART, storage and custom controls (drawing an undermap with adjacent points)
  3. Thermometer - just connect the ds18b20 and the dolphin begins to measure the temperature
  4. Lora demo - in a simple version, we just hook a ready-made module through the UART and make a primitive chat on our own. In a complex version, you can connect it as a network transport and use Laura through the entire application stack. Chat can be a system utility that will allow chatting through any available transport
  5. Rangefinder - just plug in the ready-made module with Ali, make the simplest gui for measurements.
  6. LED strip or matrix. We are looking for what is there on Aliexpress with a small number of pins and preferably SPI. At worst, just a 2812 tape and some perlin noise as a demo.
  7. Alcohol meter - similarly, just a ready-made module with Ali

...

Github/git flow setup

I feel lack of experience with github. There are several fundamental tasks (I may not be able to correctly formulate the request and I hope for your experience):

  1. Branches naming, branches rules. We have "Area:" tags, maybe branches should name like it to bind branch to wiki section.
  2. Need to discuss and design some rules about code ownership: who can approve/merge PR for example. We also have "maintainers" assigned to wiki sections, it would be cool to add some integration here.

Unit testing environment

  • Unit testing stack, using make for unit tests
  • Add simple example unit tests
  • Writing wiki pages on unit testing guides
  • Integration into github pipeline for verification

(from @officialdarksheao suggestion #39)

Emulator for app developers

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):

  • IDE running in browser, exposing you their SDK, with examples and docs
  • live emulator, right in the browser!
  • you could also debug your apps live on the watch: your code was compiled (probably somewhere on the backend), then sent to the pebble app on the phone, which in turn was transferring the app to the watch. And even in reverse: you was able to see debug logs from your watch in the bowser!
  • publish your apps in their app store

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:

  • they used stm32 MCU
  • they used customized FreeRTOS (not open-source), but there's a open-source re-implementation
  • had quite low-res screen
  • seems like they were using qemu for emulation

Welcome from Strokov Andrew

About me

  • embedded FW and schematic developer
  • C — good level, Rust, C++ — medium level
  • Many experience with hardware debugging, RF, analog and digital schematic

You can find more information at strokov.org

What tasks I can take

  • organizing people to make environment: CI/CD, github, some integrations (no estimate)
  • choose core technology (#17) (no estimate)
  • making FURI: tool for control application flow and making dynamically linked interaction between app. (#14) (~16 h)
  • Create API documentation and examples (#15) (~20 h)
  • Add old prototype code (~8 h)
  • Writing wiki pages for core and features (no estimate)

What I need

I need help from people who know how to setup team development on GitHub, some devops skills to make CI/testing and automation.

FURI: fix bugs

One of the most important component of Flipper Core is FURI (Flipper Universal Registry Implementation). It helps control the applications flow, make dynamic linking and interaction between applications.

In fact, FURI is just wrapper around RTOS thread management and mutexes, and callback management.

We have draft implementing of it, but there are some issues:

  • value mutex not implemented (test_furi_concurrent_access failed)
  • any API returns bool or pointer | NULL, maybe add enum with error statuses
  • function furi_open has 6 arguments, maybe pass bitmask of flags
  • at furiac_start we have array for task stack and descriptor and don't reuse its elements after some task ends
  • you can subscribe to changing record state by passing state_callback to furi_open but it is not used (test_furi_mute_algorithm, part 3 failed). Also I suggest leave 1 callback for data and state (with "type" argument)
  • test_furi_nonexistent_data not implemented
  • part of test_furi_mute_algorithm not implemented
  • Mute algorithm only partially implemented, if you want to do this, contact @glitchcore and get some vision from my mind
  • Opened records not close on app exit.

Also I think about implement FURI completely in Rust

We have 2 limitations here:

  • You cannot "send some data and get answer" (only take pointer to function and call it)
  • Bidirectional pipes.

Example: Want to make Flipper Zero software emulator

About me

  • Linux userspace development
  • Python — good level, C— medium level
  • Experience in access control systems development and penetration testing

What tasks I can take

I would like to write emulator running in browser using web assembly. Here is how I plan to do it:

  • Create the hardware abstraction (30 hours)
  • Creating user interface (10 hours)
  • Firmware upload mechanism (20 hours)

What I need

I will need a help from developers who understand the firmware core subsystem.

You can also read Andrew Strokov welcome and Create your own

Add linting/codestyle control

Nobody want to work with dirty code and I suggest:

  • Automatic formatting code tool that allow check C/C++ and Rust code style or make formatting by one command
  • CI pipeline to prevent merge of pull requests if the style check was not successful

Also need to add information about code style checking to contribution guide.

I hear about clang format

Welcome from Pavel Kosenkov

About me

  • Focused on hardware development, manufacturing, supply logistic, manufacturing automation, overall project management
  • Experience with mass production project economic calculation and supply chain setup at Russian federation, schematic and topology development, device mockups with some lab stuff, new board sample assembly with accurate starting and testing, high precise soldering, project management and negotiating process with clients and suppliers.
  • Over 10 years of embedded contract development
  • The main role in the project's code developing project was management. My personal level about google-coding junior.
  • Have a compact HW development laboratory with bunch of tools, materials and a lot stocked components for fast prototyping.

Here if my open "porfolio" http://flexibity.com/en/projects/
Last big project https://www.youtube.com/watch?v=JRnNvlcwwhA
Time by time I share some thoughts at https://t.me/EngineersNotes.

What tasks I can take

  • Any HW preproduction check (Need access to determine workflow and current status of hw artifacts)
  • Any assembly and manufacturing tasks (have a personal lab)
  • Component stocking search and negotiations with vendors (have close direct contacts with Intel, ST, Espressif, Broadcom, EBV, Arrow, Compel and PCB manufacturing and assembly company in Shenzhen)
  • Schematic and topology development (I used to work with the team and have couple freelancers for time and financial critical uses also with AD full license)
  • Project organization, manufacturing economic calculation automation
  • SW architecture and management

What I need

I used to work in clear and understandable projects about reward. And here I can make efficient tasks by my self just in way to help collaborative works, but in some time there can be a situation that I cant spread my self and have to chose some profitable side work to keep my family on an ensured level. At these moments I still can take in work some tasks, but need in someone who can in case insure and, if necessary, intercept the task in order to complete it on time.

Wiki widgets

I suppose we will have some problem with plain list of many issues.

I suggest to attach all issues/PR to wiki pages. User can browse wiki and read description of some component of Flipper HW, FW or some environment features (equal to wiki page or sections), and simultaneously see open issues and PR and kind of "status" of each component. Also user can create issue for any pages/sections by clicking button at wiki page.

To bind issues/PR and wiki I suggest use "Area:" labels.

Welcome from Sergey Gavrilov

About me

  • Firmware and hardware freelance developer
  • C/C++ - good
  • Experience with STM32, hardware debuggers, OS development, analog circuitry, EDA's, CAD's, CNC, oscilloscopes and logic analyzers
  • I have a small electronics lab, CNC & manual machinery for cases & PCB prototyping.

How can I help

  • Im in love with high-level architecture design, but i also enjoy making clean low level code modules.
  • Anything related with user-app subsystems (my home project is a dsp synthesizer with ability of loading user binary apps, so i have good experience in this area).
  • Anything associated with UI and displays (check out my pet project "huimk").

What help do you need

  • A job :3.

Animated Character Framework

Here I want to collect and discuss guidelines for creating a graphic base of the main character. It is the graphic part (animation), and not its character, the process of growth or internal states that affect the process of personality development.

In the demos we have already shown a couple of states of the dolphin: "connecting" and "connected". I suggest making a list of basic requirements and a list of states / animations here. You can talk about the format of bitmaps or workflow interaction with the artist (s).

I suggest the following links as a reference:

  1. https://docs.microsoft.com/en-us/windows/win32/lwef/agent-states - about character design for Microsoft Agent. Here is an interesting list of his states, we do not all need them (our character does not work with a microphone and it seems like it is not necessary for him to "listen", although this animation could be used to "listen" to radio waves). Some states are interesting, such as do magic 1/2, which are called immediately before any action.
  2. https://urokikino.ru/emotion_theory_1/ - a list of basic emotions. It would be very cool to draw all these states. The red graph can be used as a list of transitions between states, but this will already be an outrageous burden on the artist / animator.
  3. https://skillbox.ru/media/design/kak_sozdat_personazha_vosem_etapov/ - basic rules for character creation, which would also be nice to use.

character_design__emotion_states_by_kiralng_d9zpqiw-fullview

I do not attach a list of poses from the Kama Sutra, and it will be difficult to draw a dolphin with all these poses. But I would like to ...

For an artist / artists, if there are a lot of them, you can try to make rigs:

  1. converter of animations in 128x64, with different dithers and filters. Then they will be able to finish what they need pixel by pixel, and before that, let them use their favorite animation packages with morphs and bones.
    2.player in HTML5, where you could upload animations and metadata for them

I suggest using GIF as the final data storage format used on the device - it provides acceptable compression, allows you to crop unused areas of the image, supports animation and timings between frames. As the icing on the cake, you can add a few proprietary frames to the format containing data on the states of the character and the transition graph: such a file will easily play all animations in the browser, but few can edit it, a kind of challenge for future hackers.

Network subsystem "FlipperNet"

Since we have a rich set of radio modules, and also IR transport on board, I have an idea to create a set of simple transports that would be integrated into Flipper's system.

For the user:
This is a simple and easy way to connect with any other Flipper or mobile phone and build your own mesh network. The user does not need to deal with each individual radio path, it is just enough to establish a connection. The disadvantage here may be leaky abstractions. But it gives simplicity.

For the developer:
Possibility to screw on an external communication module (Lora) or communication protocol (Telegramm or jabber) and use all network capabilities.

We must invent:

  1. Addressable abstractions (some kind of UUID by which one can distinguish one device from another), analogue of Mac
  2. Addressable channels on the device, analog of ports
  3. Beautiful api for connections, search, pairing, declline

...

Integration with IDE

Now we're using docker for build. It have some pros:

  • user doesn't need to setup environment: install compilers, libraries, etc.
  • container can be used for CI

I use sublime editor for programming, but I understand that many people used to use IDE like CLion/Eclipse/etc. How do we make integration?

Welcome from Evgeny Dontsov

Hello everyone!

About me

Software

Writing on C, C++, Python drivers for SCADA system. I know a lot of industrial protocols as Modbus, MQTT, OPC, HTTP (libcurl), XMLRPC and etc. Also have a huge experience with low level binary proprietary protocols: electricity meters, access control systems, security and fire systems and so on.
Working with Ethernet, UART(RS232, RS485), SPI, I2C lines.

Develop & maintain my pet project: https://waterius.ru (Django, nginx, uwsgi, PostgreSQL, InfluxDB, Grafana).

OpenSource and good UI/UX lover.

Hardware

Hardware experience is a hobby. Schematics design and PCB tracing (Eagle CAD). Soldering (not hot air) is't a problem.
Use Platformio for hardware projects.

Testing

Have experience with CI (Ansible, TeamCity, Docker), Unit- & Integration- tests.
Written small lib for GPIO, I2C tests by Python througth Wi-Fi & ESP8266: https://github.com/dontsovcmc/metf-python-client

Other

Photography and Layout (InDesign, Figma) experience (https://vostnod.com).

What tasks I can take

Maybe I can help in drivers core level.
Also I can test some Flipper functions manually, cause I have RFID/iButton hardware devices on hand.
Will see...

What help I need

Free time. As I have a job and pet project, I don't have enough time.

Welcome from Henry Paulissen

About me

  • Nick: hp197
  • HAM Radio Call: PD0OM

Soft skills

  • Platform architect
  • Strong automation skills
  • C, Python, Perl -> good, C++ Medium (Templating is something what im not really used to)
  • Have contributions in the mainline linux kernel (mainly in the sunxi drivers).
  • Lots of linux skills, but not a windows hater (even some minor .net experience!)

Hard skills

  • I have a decent sized home electronics lab (soldering, hotair, 200Mhz oscilloscope, spectrum analyzer, SDR's)
  • I design pcb's as well, so have the necessary software and experience with kicad and eagle
  • Have hardware debuggers/programmers for a multitude of platforms (stm, atmel, arm, xilinx)
  • As a licensed ham radio operator I have radio (testing) equipment.

What tasks I can take

  • WIP (will update this later)
  • #16 Wiki automation (easy pick)
  • #45 Wiki links update (easy pick)
  • Everything I feel like my input is viable

What help do i need

  • UX is not my strong point
  • Sometimes I am that stubborn autistic guy, please tell me when i am, im not doing it on purpose and dont always realize it.

What I need

  • Free time ;-)

What I dont need

  • A job, my contributions are done as hobbyist.

Wiki automation

  • If you want to update wiki, you need to call dummy ./wiki-deploy.sh. I want to make github pipeline to automate this.
  • Also I suggest doing automatical widget to show code owner, related code folder, opened issues and "create issue" button in every wiki section. moved to #66

Remote debug/test bench

We discuss integration tests and automated remote test bench here.

We have flipper board and control board (for example, Raspberry PI). How Rpi can interact with Flipper to perform tests? Also remote debugging tool will be heplful.

@lomalkin promise to write down his vision by end of this week.

Demo Applications to Demonstrate SDK Features

Many Arduino packages come with examples. As a usual, these are all sorts of "Hello World" or the simplest demos, such as flying stars. Here I propose to collect a list of applications that would be at least slightly useful to the user, while using most of the SDK.

  • Mobile phone backup. It will connect via bluetooth and pick up some files from the mobile phone. I don't know much about the bluetooth stack, but I remember there was a file exchange, a phone book exchange and all that. And if this is not in modern phones, no one bothers to write their own application for the mobile phone.
  • Clock-timers-stopwatches, preferably on interrupts in high resolution
  • TV remote control with a large database, adding new signals and custom menu layout (do not dump all TV functions into a small screen, but display only the ones selected by the user)

...

MicroPython or any other scripting language interpreter

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.

Hardware isolation of user applications

The main idea: a separate processor for the "periphery", drivers and part of the framework, and another separate processor for "user" applications. For example, ESP32. There are bluetooth and Wi-Fi, as well as enough RAM to run software interpreters of user applications, such as lua, micropithon, espduino, j2me. Surely users will want to run some kind of emulators of other platforms, such as Z80 - this is also possible. The firmware of this microcontroller is not user changeable, but can be upgraded as whole system update.

When a user wants to launch his own custom application (one of thousands), the code for this application is taken from the SD card and sent to the RAM of the second microcontroller. Perhaps it will be some of the STM series. If an application hangs, does an incorrect operation, or something unexpected happens, the processor can be restarted without restarting the shell from the main processor.

Thus, the user has complete freedom to control the hardware. The user can choose any operating system or even use bare metal. The user is not limited by the number of device flashing and can do it on the fly.

Communication between microcontrollers can be carried out through UART, which will include interfaces for drawing UI, working with a SD card, radio modules and other peripherals.

Welcome from Lesha Lomalkin

About me - experience

Hello, guys!

Software

  • Geek, OpenSource and command-line lover. Bad-UI/UX hater.
  • Linux advanced user (This is my only OS from 2009). Have some Linux server administration experience. Nowadays, I have some possible intention to DevOps.
  • I can write and edit code in couple of programming languages (PHP, C, Python, Bash scripting, etc...), but deep programming it's not my main strong suit.
  • I am interested in information security and unconventional data transfer methods.

Hardware / Electronics:

  • Schematics design and PCB tracing (KiCAD).
  • For the last 5 years I have been developing simple consumer electronic devices, have launched a few products production at the Chinese factories.
  • Now I have a small home lab for working with electronics (prototyping, assembling, debugging, burning down, etc...).
  • Last years I keen on designing testing tools for production line (Automatical hardware unit/module and integration testing, etc...).
    • What about Flipper's remote debugging tool? I guess it will be helpful (#26 (comment)).

How can I help

  • For a start - remote debugging tool for Flipper. Maybe related to #26 (It's too difficult to estimate now. Let it be from 30 to 60 hours.)
  • I can also test manually most part of functions, since I have a lot of some peripherals on hand (like RFID/iButton, RF433 and so on).
  • Find UI/UX bugs too.
  • Will see...

What help I need

I like, when work and hobby is the same thing. In this case inexhaustible energy of activity allows to make everything possible.
However the mortgage won't pay itself, so if the pretty dolphin gives me a fin on it, I fully willing to accept Flipper as my only job and hobby for future months.

Первые предложения

  1. Произвести инвентаризацию уже сделанного. Все нарисованные кадры с дельфином, все нарисованные интерфейсы, рамочки и тому подобное выложить в виде картинок. Весь код, даже если он еще не работает или уже не работает, задокументировать хотя бы в формате "говно1 - должно пукать и какать, требует 16кб памяти, 5 таймеров и менее чем на 100 мегагерцах не запустится".

  2. Все фичи по возможности оформить в виде отдельных "программ" или "плагинов", которые можно было бы безболезненно удалить или разрабатывать отдельно. Никаких монолитов. Возможно, некоторые фичи можно порезать на несколько независимых частей. К примеру, дельфина можно разрезать на 2 части: гуй (эмоции, анимации, всплывающие облака) и логика (изменения характера в зависимости от производимых действий). Это позволит художнику рисовать анимации отдельно, а программистам извращаться над логикой отдельно, причем тестировать это можно хоть в браузере (логика не привязана к железу, а вызов отрисовки быстро переписывается хоть на ЖС).

  3. На стадии вылизывания (ведь нам всем стыдно выкладывать "непричесанный" код) по возможности использовать свое собственное SDK и не использовать напрямую вызовы библиотек от микроконтроллера (как это сделано в Ардуине). Это позволит не только не зависеть от камня, но и сделать "виртуальное" окружение, чтобы можно было девелопить в режиме эмулятора у себя на десктопе, не занимаясь перепрошивкой каждые 2 минуты. К тому же это будут великолепные примеры использования апи.

  4. Подумать, какие именно фичи вы наобещали в комьюнити и определить минимальный набор того, что надо сделать.

  5. Исходя из потребностей пункта 4, примерно определиться с наборами своих API для создания своего SDK. Что-то вроде:
    flipper_character.h
    flipper_gui.h
    flipper_ir.h
    flipper_nfc.h
    flipper_keys.h
    Причем пользователю можно дать возможность подключить все разом через flipper.h, да и сами инклюды могут включать друг друга в себя, к примеру flipper_gui.h включает в себя flipper_character.h, так как не может без него существовать. В приложении же пользователь может написать что-то вроде:
    flipper_alert("Fuck them all!", FLIPPER_CHARACTER_ANGRY);
    Что приведет не только к выводу сообщения, но и смене картинки персонажа. Дополнительно в коде может быть вызван любой другой модуль, вроде:
    flipper_character_hackpoints(2);
    Что "прокачает" нашего героя на 2 условных пункта. Это лишь пример, легкий набросок будущего апи, как его представляю себе я.

Список далеко не полный, буду потом пополнять. Пока же хочу услышать предложения или критику, может я вообще не туда зашел.

Welcome from Olzhas Yergaliyev

About me

Hi team, my name is Olzhas, I'm working as senior qa engineer in automation & software tester.

I have great experience in testing of web based and mobile (iOS, Android) applications and performance testing as well. I really like to automate things, mostly I'm using Java, Selenide, Moon, Allure and other tools to make sure that application works great, also I have extensive experience in manual & automated testing, cross-platform/browser testing, design and execution of test cases, review software behavior and logic, search defects and update to respective stack holders & software engineers to make sure the system bug and error-free.

In my work I am responsible for the final step in the development of a website, mobile app, and software applications before it is released to the end-users. I look for flaws and weaknesses in the program and create test plans on any system problems or glitches to hunt down and fix software bugs.

How can I help

I can help with manual/automated testing of Flipper's mobile applications and on other platforms as well, also I would like to have experience in configuring CI/CD and testing of Flipper's firmware.

What help I need

Would be great if in the begining I will get some advice on what to start with and how exactly I can help to the project.

Request: integration with smart home systems

With toys like https://www.blinkstick.com/

Purpose: to show Flipper's integration into any ecosystem. Or to show Flipper's transformation into a remote control for the whole house, if any HomeAssistant is deployed. And when Flipper knows how to hack TVs, but have no Idea at home - this definitely fail.

Since we are still having a hard time with network capabilities, it is supposed to communicate with a computer / mobile phone via bluetooth, and then transfer data to a large machine. In the first version, you can communicate via Wi-Fi.

Request: Pong Game for Two

Classic Pong game played by 2 players

The game starts by scanning available devices / connections / transports, looking for an opponent. An invite for the game is sent to him. If he agrees, then there is a transfer to the game screen. If not, the dolphin says that it would be necessary to find someone else and the "back" button is available.

The playing field can be customizable, the rackets can be either left-right or top-bottom. Perhaps in the version for 4 people, all 4 sides can be played. The middle of the playing field is empty, or filled with blocks (arkanoid), enemies (advanced arkanoid, krackout, batty). Points, lives, bonuses, new levels, achievements, speed, bosses.

The game supports observer mode so that anyone can connect to the game and be a passive observer. Toudu: we need to think over the mechanism of game sessions, because games are fleeting, and collecting invites for each round is cumbersome.

As a client, not only Flipper himself can act, but also an Android application connected via bluetooth. In future versions with Wi-Fi, you can host an HTML5 page with the playing field and the current situation. Yes, double work. But such is fate.

Purpose:

  1. Demonstration of network capabilities
  2. Demonstration of integration with mobile applications
  3. Demonstration of the graphics subsystem
  4. Demonstration of sound effects
  5. Demonstration of SDK capabilities

Whenever possible, all code uses only SDK calls and its size is kept to a minimum. Loading sprites, working with the network and GUI - we leave it to the SDK. The documentation is as thorough as possible so that it can be used as a template for other projects.

Basic application

Add some examples/basic application from old firmware. Adapt it to using current API.

  • FURI application control example: creating/killing task/switching between tasks.
  • FURI functionality test/example: create dummy "display" and make concurrent access to it, with mute/unmute.
  • OS test/example
  • Simple HAL examples
  • button debounce
  • led control
  • battery level measuring
  • backlight control
  • Clock-timers-stopwatches (as good example)

Welcome from Pavel Demin

Hi,

In relation to this project, I am mainly interested in the programming of the microcontroller. I can do it in C at the CMSIS level.

I would be interested in discussing the organization of the core system (#17).

I would also be interested in the development of a remote test bench (or even a remote development machine) based on Raspberry Pi (#26). I already use one myself and it works well for me.

I have P-NUCLEO-WB55 (a board with STM32WB55) and X-NUCLEO-NFC06A1 (a board with ST25R3916). So I can do some developments and tests related to Bluetooth and NFC.

Cheers,

Pavel

Welcome from Anatoly Karpenko

About

  • Linux/Windows advanced user. Linux/Windows server administration experience
  • Bash scripting, Groovy, PowerShell
  • QEMU, KVM, VMWare, Docker, etc
  • CI/CD, Securing DevOps (DevSecOps), Static Analysis code (use for many languages and experience in the development for C and ABAP)
  • Ansible, Terraform, Chef
  • GitLab CI, Jenkins, TeamCity
  • Quality Assurance
  • Some experience with CUnit/CppUnit
  • Little experience with firmware and hardware
  • "DevOps" at https://hacktory.ai/

How can I help

  • Configure pipelines for different actions
  • Manual/automation testing applications/firmare/UI/IDE integrations etc
  • Unit, Integration, Smoke, Fuzzing and other types of testing
  • All I can do to help the project :)

Nikita Eshkeev

About:

  • I'm a programming language agnostic, so C, C++, Rust are all familiar to me. I'm good with shell scripts too;
  • 10+ years of experience in IT (mostly java), I learn and read a lot about Linux system programming in my spare time.
  • I have basic knowledge in QEMU, gem5
  • I work for JetBrains, so I believe I can be a good fit to work on IDE support for Flipper devices;
  • no experience with firmware and hardware

What tasks I can take

I can work on:

  • #18 Integration with IDE
  • #22 Emulator for app developers
  • CI/CD

I can't give any estimations yet, I need to find out what is needed to be done, so I participate in the discussions

What help I need

None

FURI implementation

Add simple FURI implementation for show proof-of-concept firmware

  • FURI Application control: create/kill task
  • FURI Application control: switch between task and back to task. Needs registry, in progress.
  • FURI Records implementation

Choose a communication tool

We need some instant messaging (or char) for quick communication and discussions. I can offer some tools for this.

Please vote using the specific emoji in reaction in this post.

Telegram 🚀

+ Very popular in Russia
+ Lightweight chat tool
+ attachments, message formatting
- No group voice calls

Discord 🎉

+ Audio chat
+ Simple adding many rooms in one server
- Bad chats

Slack 👀

+ Chat and voice
- Limited in free edition

Mumble❤️

+ Opensouce
+ Totally free
+ You don't need any phone number
- Unpopular

Please vote using the specific emoji

Interpreter for user apps ?

Just a question:

@glitchcore have you considered executing user apps with an interpreter like micropython or espruino (JS)? This way the firmware may stay completely isolated from user apps, no need to build anything etc.

Choose an OS/HAL

At this stage of the project I want to discuss what technology stack (OS/HAL/etc.) we will use for Flipper. Now, changing key components is not so painful, but it can bring benefits in the future.

Current solution: STM CubeMX for generating target code, STM HAL/LL for interact with hardware and FreeRTOS.

+ simply get all necessary files for build
+ complex functions like clock, GPIO functions/alternate, timers etc. can be configured in GUI mode with real time constrains control
+ FreeRTOS is well-known (for me), it has big community
+ FreeRTOS has very rich API for thread control and IPC.

- CubeMX GUI complicates CI and development processes
- FreeRTOS itself has no infrastructure and no "best practices"
- Make as build system forces the developer to poke around in makefiles

ChibiOS

+ OS, HAL and many additional feature in one
+ HydraBus project use it, It is very relevant project for me and I'm going to use a lot of code from this one.

- I have no experience with Chibi.

RIOT OS

+ Cool infrastructure: semihosting, in-box building for linux, application build system

- At first glance it seemed to me that it has a poor API

Rust, embedded-hal, Tock OS

+ More safety in core of Flipper
+ Many community crates for additional features, without being tied to a specific operating system/HAL implementation
+ Nice build system
+ Using Rust in Flipper may be big contribution to the community

- I have some question to embedded-hal API itself
- Perhaps not many people are willing to support Rust

Bugs in F1B1C0.0

Describe the bug

  1. Pullup resistor on USB D+ is not needed: both old and new MCUs have a programmable internal pullup. In fact, this resistor will break enumeration if USB driver is not active because it makes host think that the device is present and ready to work.

  2. BAT_LVL voltage divider consumes a lot of current (about 100uA), it's better to increase resistor values.

  3. iButton contact is not protected from ESD, it's better to install protection diodes to prevent this line from going outside the 0..3.3V interval.

User apps subsystem

Problem

Flipper zero must run user applications.

Constrains

Static storage: solved, recently we get a sd card.
Executable storage: we have only 128k ram. Flash storage is not an option because according to the datasheet inner mcu flash has only 10k rewrites.
Speed: user apps must run native code, because some protocols require tight gpio timings, eg.

By speed constrains we can't use any of script-driven languages for apps. By exec storage constrains we can't design all systems like a user-app.

Solution

  1. Divide apps by two groups. First — "embedded" apps, its a "basic functionality" like a iButton emulator app, and this group embedded into firmware. Second group — real "user" app. It limited in, says, 100k of ram+rom (i think 28k of ram for core is enough), because it will be loaded and executed in ram.
  2. Load and exec only one user app at a time. Sounds bad, but I don't see any real cases for running two user applications at the same time. It free us of dynamic ram manager and ram defragmentation problem.
  3. Load user apps from .elf with dynamic linking on load, so we get more flexibility in core api. Also we can get more ram in future, so in theory loading two and more user apps is not a problem (besides defragmentation).

My role

I can design and implement dynamic linking because I have a lot of experience in this area.

Welcome from Philip

About Me

  • Web and Application engineer, working with tech stacks using c, c++, c#, Java, PHP and node
  • regularly configuring docker images and integrating ci/cd
  • some industrial prototyping experience using the Arduino stack

What tasks I can take

  • #12 Linting/Codestyle, integrations with clang format or artistic style for c stack, rustc linting OR an alternative rust linter, for automated style checks on pull requests and a docker image that can be used to watch local codebases and auto-format if desired. Code style must be defined for implementing with these tools. (25 hours after style defined)
  • #26 Unit testing stack, using make for unit tests and writing wiki pages on unit testing guides, integration into github pipeline for verification, and optionally code to determine newly added functions in pull requests and warn or reject if unit tests not added (no estimate overall, initial setup and guides ~20 hours, verification rules for new code without unit tests would be deterministic on what is decided is reasonable)
  • #26 Smoke testing, I could write a python or ruby script fairly quickly to interact and parse through standard i/o for at least rudimentary smoke testing (8 hours) This process could be integrated with automated CI to smoke test firmware on pull requests. (8 hours)
  • #26 Integration/Hardware testing, I suggesting using a control board, my preferred would be Arduino, to connect to and interact with the hardware pins with the firmware in a "testing" mode so extra debug messages and user/sensor input simulations could be communicated with the control board, and through serial into a docker based testing service. Integrations between this and the front end of a hardware emulator would be awesome to get the simulated input polished. (no estimate)
  • #29 Rust additions to build image, I am very new to rust but I am experienced with adding capabilities to docker images. Adding rust support, cargo, test code, cbindgen: (16 hours) Integrating with current building: (no estimate, would need to complete prerequisite setup and would have a better idea of time then)

What help do you need

I lack experience in doing hardware emulation and I am very new to rust. Determining and setting up the code style would be something I would want the team to determine and agree on, what one thinks is best code style can differ greatly. The concept of "acceptable code coverage" is subjective, too high and it discourages change, too low and things get sloppy, so that would need to be discussed.

Welcome from Marcus Beltman

Hello everyone, I'm Marcus. I live in Everett, WA, USA.

About me

  • Embedded test systems developer
  • C - good, Python - medium, C++ - medium, Rust - aspiring
  • Some hobby level experience with STM32.
  • I have a basic electronics lab space.

What tasks I can take

  • Test harness/test host for automating integration tests on hardware.
    • Model device capabilities and interfaces as unit-under-test, define test / data load APIs (5-15h)
    • Create application to bridge device model used by test API to hardware (either through JTAG or some bespoke test harness) (20-50h)
    • Setup CI on hardware (10-20h)
  • Random integration testing and system testing related tasks.
  • Random solid modeling?

What help do you end

One goal I'd like to pursue is a clean environment for writing integration tests, that works for both core development and for plugin developers, that can run against the proposed simulator or against real hardware. I'm interested in thoughts from anyone who has an idea of what that might look like.

If this goal is shared by others on the project, then right now I'd like to talk to anyone working on modeling the device; as a unit-under-test, or as a target for simulation. This might be similar to what @zhovner proposed under "create the hardware abstraction" for simulation.

Welcome from Vadim Kaushan

About me

  • Software development at work, firmware and hardware development as a hobby
  • Rust - good level, C/C++ - medium
  • Experience with STM32, hardware debuggers, KiCad, oscilloscopes and logic analyzers

How can I help

  • I mostly interested in developing everything that could be done with Rust (firmware, applications, drivers, API)
  • Topics relevant to firmware/application uploading experience
  • USB stack
  • RTOS-application interaction (API, loaders, ...)
  • As for "Tasks for phase 1", I'd like to work on the "Make basic code examples" task

What help do you need

No idea at the moment.

CubeMX regenerating broke some files

We have some patch in automatically generated files. Need to fix it:

  • remove patch to flipper-specified files
  • change CubeMX project to match with code
  • (extremal case) add script to automatically patch files after regenerating code
  • maybe remove CubeMX from project and switch to another HAL :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.