Automatically generated bindings (or "externs") for Flipper Zero Fw with some little hand-crafted wrappers and additions as upper abstraction layer.
Current state of the project is WiP. Highlly & dirty work-in-progress.
Supported (means "tested with") fw version: 0.68.1 but should work normally with any 0.68.x without prebuild
feature.
nightly
supported)thumbv7em-none-eabihf
libclang
for bindgenfbt
to easily get itAdd this as dependency to your cargo manifest file:
[dependencies.flipper0]
version = "0.1"
default-features = false # disable prebuild
To build just add FLIPPER_REPO_PATH
to your ENV anyhow (config, build-script, shell-rc, etc..), for example run:
FLIPPER_REPO_PATH=~/path/to/flipperzero-firmware/ cargo build --release
FLIPPER_REPO_PATH
: optional, needed when feature prebuild
disabled, points to root of working copy of the firmware repo;ARM_TOOLCHAIN
: optional, if omitted build-script will search it in the working copy of the firmware repo. Typically should points to "arm-none-eabi" directory.allocator
: default, include global allocator implementationpanic
: default, include global panic & OoM handlerprebuild
: default, use pre-generated bindingsprebuild
is default feature just for ability to build crate out-of-the-box.
Any contribution are appreciated.
TODO:
- [ ] logger & logging feature
- [ ] wrapper for stdout
- [ ] wrapper for threading
- [ ] wrapper for fs
- [x] impl panic handler
- [x] impl global alocator
- [ ] get from web by api_symbols.csv with opaque types
- [x] gen from source
- [ ] gen from built firmware
- [ ] gen from product of fbt sdk_tree
- [ ] tool for apps to build & link elf (with or without fbt)
- [ ] examples
- [ ] proper documentation
- [ ] split api to modules under feature-gates, like "furi" or "gpio".
- [ ] tests
- [ ] CI/CD
- [ ] update to latest fw version