274c12fc56
* Streams: string stream * String stream: updated insert/delete api * Streams: generic stream interface and string stream implementation * Streams: helpers for insert and delete_and_insert * FFF: now compatible with streams * MinUnit: introduced tests with arguments * FFF: stream access violation * Streams: copy data between streams * Streams: file stream * FFF: documentation * FFStream: documentation * FFF: alloc as file * MinUnit: support for nested tests * Streams: changed delete_and_insert, now it returns success flag. Added ability dump stream inner parameters and data to cout. * FFF: simplified file open function * Streams: unit tests * FFF: tests * Streams: declare cache_size constant as define, to allow variable modified arrays * FFF: lib moved to a separate folder * iButton: new FFF * RFID: new FFF * Animations: new FFF * IR: new FFF * NFC: new FFF * Flipper file format: delete lib * U2F: new FFF * Subghz: new FFF and streams * Streams: read line * Streams: split * FuriCore: implement memset with extra asserts * FuriCore: implement extra heap asserts without inventing memset * Scene manager: protected access to the scene id stack with a size check * NFC worker: dirty fix for issue where hal_nfc was busy on app start * Furi: update allocator to erase memory on allocation. Replace furi_alloc with malloc. * FuriCore: cleanup memmgr code. * Furi HAL: furi_hal_init is split into critical and non-critical parts. The critical part is currently clock and console. * Memmgr: added ability to track allocations and deallocations through console. * FFStream: some speedup * Streams, FF: minor fixes * Tests: restore * File stream: a slightly more thread-safe version of file_stream_delete_and_insert Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com> |
||
---|---|---|
.github | ||
applications | ||
assets | ||
bootloader | ||
core | ||
debug | ||
docker | ||
documentation | ||
firmware | ||
lib | ||
make | ||
scripts | ||
.clang-format | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
.gitmodules | ||
Brewfile | ||
CODE_OF_CONDUCT.md | ||
CODING_STYLE.md | ||
CONTRIBUTING.md | ||
docker-compose.yml | ||
LICENSE | ||
Makefile | ||
ReadMe.md |
Flipper Zero Firmware
Welcome to Flipper Zero's Firmware repo! Our goal is to create nice and clean code with good documentation, to make it a pleasure for everyone to work with.
Update firmware
Get Latest Firmware from Update Server
Flipper Zero's firmware consists of three components:
- Core2 firmware set - proprietary components by ST: FUS + radio stack. FUS is flashed at factory and you should never update it.
- Core1 Bootloader - controls basic hardware initialization and loads firmware.
- Core1 Firmware - HAL + OS + Drivers + Applications.
All 3 of them must be flashed in order described.
With STLink
Core1 Bootloader + Firmware
Prerequisites:
- Linux / macOS
- Terminal
- arm-gcc-none-eabi
- openocd
One liner: make flash
Core2 flashing procedures
Prerequisites:
- Linux / macOS
- Terminal
- STM32_Programmer_CLI (v2.5.0) added to $PATH
One liner: make flash_radio
With USB DFU
-
Download latest Firmware
-
Reboot Flipper to Bootloader
- Press and hold
← Left
+↩ Back
for reset - Release
↩ Back
and keep holding← Left
until blue LED lights up - Release
← Left
- Run
dfu-util -D full.dfu -a 0
Build with Docker
Prerequisites
- Install Docker Engine and Docker Compose
- Prepare the container:
docker-compose up -d
Compile everything
docker-compose exec dev make
Check dist/
for build outputs.
Use flipper-z-{target}-full-{suffix}.dfu
to flash your device.
Build on Linux/macOS
macOS Prerequisites
Make sure you have brew and install all the dependencies:
brew bundle --verbose
Linux Prerequisites
gcc-arm-none-eabi
toolchain="gcc-arm-none-eabi-10.3-2021.10"
toolchain_package="$toolchain-$(uname -m)-linux"
wget -P /opt "https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.10/$toolchain_package.tar.bz2"
tar xjf /opt/$toolchain_package.tar.bz2 -C /opt
rm /opt/$toolchain_package.tar.bz2
for file in /opt/$toolchain/bin/* ; do ln -s "${file}" "/usr/bin/$(basename ${file})" ; done
Optional dependencies
- openocd (debugging/flashing over SWD)
- heatshrink (compiling image assets)
- clang-format (code formatting)
- dfu-util (flashing over USB DFU)
- protobuf (compiling proto sources)
For example, to install them on Debian, use:
apt update
apt install openocd clang-format-13 dfu-util protobuf-compiler
heatshrink has to be compiled from sources.
Compile everything
make
Check dist/
for build outputs.
Use flipper-z-{target}-full-{suffix}.dfu
to flash your device.
Flash everything
Connect your device via ST-Link and run:
make whole
Links
- Discord: flipp.dev/discord
- Website: flipperzero.one
- Kickstarter page: kickstarter.com
- Forum: forum.flipperzero.one
Project structure
applications
- Applications and services used in firmwareassets
- Assets used by applications and servicesbootloader
- Bootloader source codecore
- Furi Core: os level primitives and helpersdebug
- Debug tool: GDB-plugins, SVD-file and etcdocker
- Docker image sources (used for firmware build automation)documentation
- Documentation generation system configs and input filesfirmware
- Firmware source codelib
- Our and 3rd party libraries, drivers and etc...make
- Make helpersscripts
- Supplementary scripts and python libraries home
Also pay attention to ReadMe.md
files inside of those directories.