flipperdevices / flipperzero-firmware Goto Github PK
View Code? Open in Web Editor NEWFlipper Zero firmware source code
Home Page: https://flipperzero.one
License: GNU General Public License v3.0
Flipper Zero firmware source code
Home Page: https://flipperzero.one
License: GNU General Public License v3.0
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:
test_furi_concurrent_access
failed)bool
or pointer | NULL
, maybe add enum with error statusesfuri_open
has 6 arguments, maybe pass bitmask of flagsfuriac_start
we have array for task stack and descriptor and don't reuse its elements after some task endsstate_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 implementedtest_furi_mute_algorithm
not implementedAlso I think about implement FURI completely in Rust
We have 2 limitations here:
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.
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
Please fill the right folders structure in README.
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.
We have some patch in automatically generated files. Need to fix it:
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.
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
Possibly some guidance and clear small tasks in the beginning
Add guideline to Conribution guide how to become a maintainer of some app/component.
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):
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.
+
Very popular in Russia
+
Lightweight chat tool
+
attachments, message formatting
-
No group voice calls
+
Audio chat
+
Simple adding many rooms in one server
-
Bad chats
+
Chat and voice
-
Limited in free edition
+
Opensouce
+
Totally free
+
You don't need any phone number
-
Unpopular
Please vote using the specific emoji
I would like to write emulator running in browser using web assembly. Here is how I plan to do it:
I will need a help from developers who understand the firmware core subsystem.
You can also read Andrew Strokov welcome and Create your own
Произвести инвентаризацию уже сделанного. Все нарисованные кадры с дельфином, все нарисованные интерфейсы, рамочки и тому подобное выложить в виде картинок. Весь код, даже если он еще не работает или уже не работает, задокументировать хотя бы в формате "говно1 - должно пукать и какать, требует 16кб памяти, 5 таймеров и менее чем на 100 мегагерцах не запустится".
Все фичи по возможности оформить в виде отдельных "программ" или "плагинов", которые можно было бы безболезненно удалить или разрабатывать отдельно. Никаких монолитов. Возможно, некоторые фичи можно порезать на несколько независимых частей. К примеру, дельфина можно разрезать на 2 части: гуй (эмоции, анимации, всплывающие облака) и логика (изменения характера в зависимости от производимых действий). Это позволит художнику рисовать анимации отдельно, а программистам извращаться над логикой отдельно, причем тестировать это можно хоть в браузере (логика не привязана к железу, а вызов отрисовки быстро переписывается хоть на ЖС).
На стадии вылизывания (ведь нам всем стыдно выкладывать "непричесанный" код) по возможности использовать свое собственное SDK и не использовать напрямую вызовы библиотек от микроконтроллера (как это сделано в Ардуине). Это позволит не только не зависеть от камня, но и сделать "виртуальное" окружение, чтобы можно было девелопить в режиме эмулятора у себя на десктопе, не занимаясь перепрошивкой каждые 2 минуты. К тому же это будут великолепные примеры использования апи.
Подумать, какие именно фичи вы наобещали в комьюнити и определить минимальный набор того, что надо сделать.
Исходя из потребностей пункта 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 условных пункта. Это лишь пример, легкий набросок будущего апи, как его представляю себе я.
Список далеко не полный, буду потом пополнять. Пока же хочу услышать предложения или критику, может я вообще не туда зашел.
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.
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.
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.
Nobody want to work with dirty code and I suggest:
Also need to add information about code style checking to contribution guide.
I hear about clang format
Hello everyone!
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 experience is a hobby. Schematics design and PCB tracing (Eagle CAD). Soldering (not hot air) is't a problem.
Use Platformio for hardware projects.
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
Photography and Layout (InDesign, Figma) experience (https://vostnod.com).
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...
Free time. As I have a job and pet project, I don't have enough time.
(from @officialdarksheao suggestion #39)
Describe the bug
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.
BAT_LVL voltage divider consumes a lot of current (about 100uA), it's better to increase resistor values.
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.
Hello everyone, I'm Marcus. I live in Everett, WA, USA.
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.
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.
Hello! I senior android engineer in SnapСhat AR team and have some expertise in STM32/ARM
Now I develop/manage Android repo: https://github.com/Flipper-Zero/Flipper-Android-App
With firmware I want to implement BT sync:
flipperdevices/Flipper-Android-App#15
Now I need a Flipper prototype with BT module.
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.
Add simple FURI implementation for show proof-of-concept firmware
I can work on:
I can't give any estimations yet, I need to find out what is needed to be done, so I participate in the discussions
None
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:
Came up with:
...
General discussion about ideology, organization and roadmap
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:
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.
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.
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:
...
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.
+
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
+
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.
+
Cool infrastructure: semihosting, in-box building for linux, application build system
-
At first glance it seemed to me that it has a poor API
+
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
Now we're using docker for build. It have some pros:
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?
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.
...
You can find more information at strokov.org
I need help from people who know how to setup team development on GitHub, some devops skills to make CI/testing and automation.
I want to move page "Basic features" to UI page — it already have section about pin-code.
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:
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:
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.
Hello, guys!
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.
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:
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.
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.
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.
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.
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 emulationFlipper zero must run user applications.
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.
I can design and implement dynamic linking because I have a lot of experience in this area.
Add some examples/basic application from old firmware. Adapt it to using current API.
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.
./wiki-deploy.sh
. I want to make github pipeline to automate this.No idea at the moment.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.