mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-22 12:33:11 +00:00
[FL-870] Auto-generated firmware documentation take two (#2944)
* Add doxygen and doxygen-awesome css, cleanup docs files * Ignore more libraries and remove leftover local variables * Create an actual intro page * .md files linting * Add doxygen action * Fix Doxygen path * Fix doxyfile path * Try to upload * Change docs branch * Add submudules checkout * Disable doxygen on PR * Mention the firmware docs in the readme * More dev docs mentions in the readme * Fix runner group, add tags * Test dev in PR * Disable running on PR * Fix a typo in the doxyfile * Try upload to S3 * Fix local path * Fix S3 ACL * Add delete flag, unifying dev and tags * Update ignored directories * More ignored directories * Even more ignored directories * Fix submodule * Change S3 uploader * Change S3 uploader version * Fix aws sync flags * Fix ACL * Disable ACL * Improve ignores, add WiFi devboard docs * TEMP: generate dev docs * TEMP: generate 0.89.0 docs * Disabling PR trigger * Enable submodules and test build * Enable test build * Disable test build * Change docs directory structure * Fix accidentally committed submodule * Fix submodules * Update links to the developer documentation * Markdown linting * Update workflow, enable test build * Fix doxygen dir path * Update Doxyfile-awesome.cfg * Change paths * Fix upload docs path * Disable pull_request debug trigger * Disable tags building * Remove autolinks and namespaces * Establish basic documentation structure * Add missing changes * Improve stylesheet, move some files * Improve examples * Improve the main page * Improve application dev docs * Improve system programming docs * Improve development tools docs * Improve other docs * Improve application examples * Fix formatting * Fix PVS-studio warnings * Improve visuals * Fix doxygen syntax warnings * Fix broken links * Update doxygen action Co-authored-by: DrunkBatya <drunkbatya.js@gmail.com> Co-authored-by: あく <alleteam@gmail.com> Co-authored-by: Georgii Surkov <georgii.surkov@outlook.com> Co-authored-by: Georgii Surkov <37121527+gsurkov@users.noreply.github.com>
This commit is contained in:
parent
5e47048369
commit
ecab4d53d2
89 changed files with 1208 additions and 254 deletions
56
.github/workflows/docs.yml
vendored
Normal file
56
.github/workflows/docs.yml
vendored
Normal file
|
@ -0,0 +1,56 @@
|
|||
name: 'Generate documentation with Doxygen'
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
|
||||
env:
|
||||
TARGETS: f7
|
||||
DEFAULT_TARGET: f7
|
||||
|
||||
jobs:
|
||||
doxygen:
|
||||
if: ${{ !github.event.pull_request.head.repo.fork }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 'Wipe workspace'
|
||||
run: find ./ -mount -maxdepth 1 -exec rm -rf {} \;
|
||||
|
||||
- name: 'Checkout code'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
fetch-depth: 1
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
|
||||
- name: 'Get commit details'
|
||||
id: names
|
||||
run: |
|
||||
if [[ ${{ github.event_name }} == 'pull_request' ]]; then
|
||||
TYPE="pull"
|
||||
elif [[ "${{ github.ref }}" == "refs/tags/"* ]]; then
|
||||
TYPE="tag"
|
||||
else
|
||||
TYPE="other"
|
||||
fi
|
||||
python3 scripts/get_env.py "--event_file=${{ github.event_path }}" "--type=$TYPE"
|
||||
|
||||
- name: 'Generate documentation'
|
||||
uses: mattnotmitt/doxygen-action@v1.9.8
|
||||
with:
|
||||
working-directory: 'documentation/'
|
||||
doxyfile-path: './doxygen/Doxyfile-awesome.cfg'
|
||||
|
||||
- name: 'Upload documentation'
|
||||
uses: jakejarvis/s3-sync-action@v0.5.1
|
||||
env:
|
||||
AWS_S3_BUCKET: "${{ secrets.FW_DOCS_AWS_BUCKET }}"
|
||||
AWS_ACCESS_KEY_ID: "${{ secrets.FW_DOCS_AWS_ACCESS_KEY }}"
|
||||
AWS_SECRET_ACCESS_KEY: "${{ secrets.FW_DOCS_AWS_SECRET_KEY }}"
|
||||
AWS_REGION: "${{ secrets.FW_DOCS_AWS_REGION }}"
|
||||
SOURCE_DIR: "./documentation/doxygen/build/html"
|
||||
DEST_DIR: "${{steps.names.outputs.branch_name}}"
|
||||
with:
|
||||
args: "--delete"
|
||||
|
5
.gitmodules
vendored
5
.gitmodules
vendored
|
@ -37,4 +37,7 @@
|
|||
url = https://github.com/STMicroelectronics/stm32wbxx_hal_driver
|
||||
[submodule "lib/stm32wb_copro"]
|
||||
path = lib/stm32wb_copro
|
||||
url = https://github.com/flipperdevices/stm32wb_copro.git
|
||||
url = https://github.com/flipperdevices/stm32wb_copro.git
|
||||
[submodule "documentation/doxygen/doxygen-awesome-css"]
|
||||
path = documentation/doxygen/doxygen-awesome-css
|
||||
url = https://github.com/jothepro/doxygen-awesome-css.git
|
||||
|
|
2
.vscode/ReadMe.md
vendored
2
.vscode/ReadMe.md
vendored
|
@ -1,4 +1,4 @@
|
|||
# Visual Studio Code workspace for Flipper Zero
|
||||
# Visual Studio Code workspace for Flipper Zero {#vscode}
|
||||
|
||||
## Setup
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
- [Flipper Zero Official Website](https://flipperzero.one). A simple way to explain to your friends what Flipper Zero can do.
|
||||
- [Flipper Zero Firmware Update](https://update.flipperzero.one). Improvements for your dolphin: latest firmware releases, upgrade tools for PC and mobile devices.
|
||||
- [User Documentation](https://docs.flipperzero.one). Learn more about your dolphin: specs, usage guides, and anything you want to ask.
|
||||
- [Developer Documentation](https://developer.flipper.net/flipperzero/doxygen). Dive into the Flipper Zero Firmware source code: build system, firmware structure, and more.
|
||||
|
||||
# Contributing
|
||||
|
||||
|
@ -18,7 +19,7 @@ Our main goal is to build a healthy and sustainable community around Flipper, so
|
|||
|
||||
## I need help
|
||||
|
||||
The best place to search for answers is our [User Documentation](https://docs.flipperzero.one). If you can't find the answer there, check our [Discord Server](https://flipp.dev/discord) or our [Forum](https://forum.flipperzero.one/).
|
||||
The best place to search for answers is our [User Documentation](https://docs.flipperzero.one). If you can't find the answer there, check our [Discord Server](https://flipp.dev/discord) or our [Forum](https://forum.flipperzero.one/). If you want to contribute to the firmware development, or modify it for your own needs, you can also check our [Developer Documentation](https://developer.flipper.net/flipperzero/doxygen).
|
||||
|
||||
## I want to report an issue
|
||||
|
||||
|
@ -95,7 +96,8 @@ Make sure your Flipper is on, and your firmware is functioning. Connect your Fli
|
|||
- [Hardware combos and Un-bricking](/documentation/KeyCombo.md) - recovering your Flipper from the most nasty situations
|
||||
- [Flipper File Formats](/documentation/file_formats) - everything about how Flipper stores your data and how you can work with it
|
||||
- [Universal Remotes](/documentation/UniversalRemotes.md) - contributing your infrared remote to the universal remote database
|
||||
- And much more in the [documentation](/documentation) folder
|
||||
- [Firmware Roadmap](/documentation/RoadMap.md)
|
||||
- And much more in the [Developer Documentation](https://developer.flipper.net/flipperzero/doxygen)
|
||||
|
||||
# Project structure
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* @file furi_hal_subghz.h
|
||||
* SubGhz HAL API
|
||||
* @file cc1101_ext.h
|
||||
* @brief External CC1101 transceiver access API.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
# Apps Assets folder Example
|
||||
# Apps Assets folder Example {#example_app_assets}
|
||||
|
||||
This example shows how to use the Apps Assets folder to store data that is not part of the application itself, but is required for its operation, and that data is provided with the application.
|
||||
|
||||
## Source code
|
||||
|
||||
Source code for this example can be found [here](https://github.com/flipperdevices/flipperzero-firmware/tree/dev/applications/examples/example_apps_assets).
|
||||
|
||||
## What is the Apps Assets Folder?
|
||||
|
||||
The **Apps Assets** folder is a folder where external applications unpack their assets.
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
/**
|
||||
* @file example_apps_assets.c
|
||||
* @brief Application assets example.
|
||||
*/
|
||||
#include <furi.h>
|
||||
#include <storage/storage.h>
|
||||
#include <toolbox/stream/stream.h>
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
# Apps Data folder Example
|
||||
# Apps Data folder Example {#example_app_data}
|
||||
|
||||
This example demonstrates how to utilize the Apps Data folder to store data that is not part of the app itself, such as user data, configuration files, and so forth.
|
||||
|
||||
## Source code
|
||||
|
||||
Source code for this example can be found [here](https://github.com/flipperdevices/flipperzero-firmware/tree/dev/applications/examples/example_apps_data).
|
||||
|
||||
## What is the Apps Data Folder?
|
||||
|
||||
The **Apps Data** folder is a folder used to store data for external apps that are not part of the main firmware.
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
/**
|
||||
* @file example_apps_data.c
|
||||
* @brief Application data example.
|
||||
*/
|
||||
#include <furi.h>
|
||||
#include <storage/storage.h>
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
/**
|
||||
* @file ble_beacon_app.h
|
||||
* @brief BLE beacon example.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "extra_beacon.h"
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
/**
|
||||
* @file example_custom_font.c
|
||||
* @brief Custom font example.
|
||||
*/
|
||||
#include <furi.h>
|
||||
#include <furi_hal.h>
|
||||
|
||||
|
|
|
@ -1,11 +1,21 @@
|
|||
# Application icons
|
||||
# Application icons {#example_app_images}
|
||||
|
||||
## Source code
|
||||
|
||||
Source code for this example can be found [here](https://github.com/flipperdevices/flipperzero-firmware/tree/dev/applications/examples/example_images).
|
||||
|
||||
## General principle
|
||||
|
||||
To use icons, do the following:
|
||||
* add a line to the application manifest: `fap_icon_assets="folder"`, where `folder` points to the folder where your icons are located
|
||||
* add `#include "application_id_icons.h"` to the application code, where `application_id` is the appid from the manifest
|
||||
* every icon in the folder will be available as a `I_icon_name` variable, where `icon_name` is the name of the icon file without the extension
|
||||
|
||||
* Add a line to the application manifest: `fap_icon_assets="folder"`, where `folder` points to the folder where your icons are located
|
||||
* Add `#include "application_id_icons.h"` to the application code, where `application_id` is the appid from the manifest
|
||||
* Every icon in the folder will be available as a `I_icon_name` variable, where `icon_name` is the name of the icon file without the extension
|
||||
|
||||
## Example
|
||||
|
||||
We have an application with the following manifest:
|
||||
|
||||
```
|
||||
App(
|
||||
appid="example_images",
|
||||
|
@ -17,6 +27,7 @@ App(
|
|||
So the icons are in the `images` folder and will be available in the generated `example_images_icons.h` file.
|
||||
|
||||
The example code is located in `example_images_main.c` and contains the following line:
|
||||
|
||||
```
|
||||
#include "example_images_icons.h"
|
||||
```
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
/**
|
||||
* @file example_images.c
|
||||
* @brief Custom images example.
|
||||
*/
|
||||
#include <furi.h>
|
||||
#include <furi_hal.h>
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
/*
|
||||
* An example of a plugin host application.
|
||||
/**
|
||||
* @file example_plugins.c
|
||||
* @brief Plugin host application example.
|
||||
*
|
||||
* Loads a single plugin and calls its methods.
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
/*
|
||||
* An example of an advanced plugin host application.
|
||||
/**
|
||||
* @file example_plugins_multi.c
|
||||
* @brief Advanced plugin host application example.
|
||||
*
|
||||
* It uses PluginManager to load all plugins from a directory
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
/* A simple plugin implementing example_plugins application's plugin interface */
|
||||
/**
|
||||
* @file plugin1.c
|
||||
* @brief Plugin example 1.
|
||||
*
|
||||
* A simple plugin implementing example_plugins application's plugin interface
|
||||
*/
|
||||
|
||||
#include "plugin_interface.h"
|
||||
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
/* Second plugin implementing example_plugins application's plugin interface */
|
||||
/**
|
||||
* @file plugin2.c
|
||||
* @brief Plugin example 2.
|
||||
*
|
||||
* Second plugin implementing example_plugins application's plugin interface
|
||||
*/
|
||||
|
||||
#include "plugin_interface.h"
|
||||
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
/**
|
||||
* @file plugin_interface.h
|
||||
* @brief Example plugin interface.
|
||||
*
|
||||
* Common interface between a plugin and host application
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/* Common interface between a plugin and host application */
|
||||
|
||||
#define PLUGIN_APP_ID "example_plugins"
|
||||
#define PLUGIN_API_VERSION 1
|
||||
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
#pragma once
|
||||
|
||||
/*
|
||||
/**
|
||||
* @file app_api.h
|
||||
* @brief Application API example.
|
||||
*
|
||||
* This file contains an API that is internally implemented by the application
|
||||
* It is also exposed to plugins to allow them to use the application's API.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
/*
|
||||
/**
|
||||
* @file plugin1.c
|
||||
* @brief Plugin example 1.
|
||||
*
|
||||
* This plugin uses both firmware's API interface and private application headers.
|
||||
* It can be loaded by a plugin manager that uses CompoundApiInterface,
|
||||
* which combines both interfaces.
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
/*
|
||||
/**
|
||||
* @file plugin2.c
|
||||
* @brief Plugin example 2.
|
||||
*
|
||||
* This plugin uses both firmware's API interface and private application headers.
|
||||
* It can be loaded by a plugin manager that uses CompoundApiInterface,
|
||||
* which combines both interfaces.
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
/**
|
||||
* @file plugin_interface.h
|
||||
* @brief Example plugin interface.
|
||||
*
|
||||
* Common interface between a plugin and host application
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/* Common interface between a plugin and host application */
|
||||
|
||||
#define PLUGIN_APP_ID "example_plugins_advanced"
|
||||
#define PLUGIN_API_VERSION 1
|
||||
|
||||
|
|
|
@ -1,8 +1,14 @@
|
|||
# 1-Wire Thermometer
|
||||
# 1-Wire Thermometer {#example_thermo}
|
||||
|
||||
This example application demonstrates the use of the 1-Wire library with a DS18B20 thermometer.
|
||||
It also covers basic GUI, input handling, threads and localisation.
|
||||
|
||||
## Source code
|
||||
|
||||
Source code for this example can be found [here](https://github.com/flipperdevices/flipperzero-firmware/tree/dev/applications/examples/example_thermo).
|
||||
|
||||
## Electrical connections
|
||||
|
||||
Before launching the application, connect the sensor to Flipper's external GPIO according to the table below:
|
||||
| DS18B20 | Flipper |
|
||||
| :-----: | :-----: |
|
||||
|
@ -15,12 +21,14 @@ Before launching the application, connect the sensor to Flipper's external GPIO
|
|||
*NOTE 2*: For any other pin than 17, connect an external 4.7k pull-up resistor to pin 9.
|
||||
|
||||
## Launching the application
|
||||
|
||||
In order to launch this demo, follow the steps below:
|
||||
1. Make sure your Flipper has an SD card installed.
|
||||
2. Connect your Flipper to the computer via a USB cable.
|
||||
3. Run `./fbt launch APPSRC=example_thermo` in your terminal emulator of choice.
|
||||
|
||||
## Changing the data pin
|
||||
|
||||
It is possible to use other GPIO pin as a 1-Wire data pin. In order to change it, set the `THERMO_GPIO_PIN` macro to any of the options listed below:
|
||||
|
||||
```c
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
/*
|
||||
/**
|
||||
* @file example_thermo.c
|
||||
* @brief 1-Wire thermometer example.
|
||||
*
|
||||
* This file contains an example application that reads and displays
|
||||
* the temperature from a DS18B20 1-wire thermometer.
|
||||
*
|
||||
|
|
|
@ -239,7 +239,6 @@ void canvas_draw_bitmap(
|
|||
* @param x x coordinate
|
||||
* @param y y coordinate
|
||||
* @param icon Icon instance
|
||||
* @param flip IconFlip
|
||||
* @param rotation IconRotation
|
||||
*/
|
||||
void canvas_draw_icon_ex(
|
||||
|
|
|
@ -107,7 +107,7 @@ CanvasOrientation canvas_get_orientation(const Canvas* canvas);
|
|||
|
||||
/** Draw a u8g2 bitmap
|
||||
*
|
||||
* @param canvas Canvas instance
|
||||
* @param u8g2 u8g2 instance
|
||||
* @param x x coordinate
|
||||
* @param y y coordinate
|
||||
* @param width width
|
||||
|
|
|
@ -188,8 +188,7 @@ void elements_bubble(Canvas* canvas, uint8_t x, uint8_t y, uint8_t width, uint8_
|
|||
* @param canvas Canvas instance
|
||||
* @param x left x coordinates
|
||||
* @param y top y coordinate
|
||||
* @param width bubble width
|
||||
* @param height bubble height
|
||||
* @param text text to display
|
||||
* @param horizontal horizontal aligning
|
||||
* @param vertical aligning
|
||||
*/
|
||||
|
|
|
@ -114,7 +114,6 @@ void dialog_ex_set_text(
|
|||
* @param x x position
|
||||
* @param y y position
|
||||
* @param icon The icon
|
||||
* @param name icon to be shown
|
||||
*/
|
||||
void dialog_ex_set_icon(DialogEx* dialog_ex, uint8_t x, uint8_t y, const Icon* icon);
|
||||
|
||||
|
|
|
@ -108,7 +108,6 @@ bool scene_manager_handle_back_event(SceneManager* scene_manager);
|
|||
* Calls Scene event handler with Tick event parameter
|
||||
*
|
||||
* @param scene_manager SceneManager instance
|
||||
* @return true if event was consumed, false otherwise
|
||||
*/
|
||||
void scene_manager_handle_tick_event(SceneManager* scene_manager);
|
||||
|
||||
|
|
|
@ -34,44 +34,44 @@ typedef enum {
|
|||
typedef struct View View;
|
||||
|
||||
/** View Draw callback
|
||||
* @param canvas, pointer to canvas
|
||||
* @param view_model, pointer to context
|
||||
* @param canvas pointer to canvas
|
||||
* @param model pointer to model
|
||||
* @warning called from GUI thread
|
||||
*/
|
||||
typedef void (*ViewDrawCallback)(Canvas* canvas, void* model);
|
||||
|
||||
/** View Input callback
|
||||
* @param event, pointer to input event data
|
||||
* @param context, pointer to context
|
||||
* @param event pointer to input event data
|
||||
* @param context pointer to context
|
||||
* @return true if event handled, false if event ignored
|
||||
* @warning called from GUI thread
|
||||
*/
|
||||
typedef bool (*ViewInputCallback)(InputEvent* event, void* context);
|
||||
|
||||
/** View Custom callback
|
||||
* @param event, number of custom event
|
||||
* @param context, pointer to context
|
||||
* @param event number of custom event
|
||||
* @param context pointer to context
|
||||
* @return true if event handled, false if event ignored
|
||||
*/
|
||||
typedef bool (*ViewCustomCallback)(uint32_t event, void* context);
|
||||
|
||||
/** View navigation callback
|
||||
* @param context, pointer to context
|
||||
* @param context pointer to context
|
||||
* @return next view id
|
||||
* @warning called from GUI thread
|
||||
*/
|
||||
typedef uint32_t (*ViewNavigationCallback)(void* context);
|
||||
|
||||
/** View callback
|
||||
* @param context, pointer to context
|
||||
* @param context pointer to context
|
||||
* @warning called from GUI thread
|
||||
*/
|
||||
typedef void (*ViewCallback)(void* context);
|
||||
|
||||
/** View Update Callback Called upon model change, need to be propagated to GUI
|
||||
* throw ViewPort update
|
||||
* @param view, pointer to view
|
||||
* @param context, pointer to context
|
||||
* @param view pointer to view
|
||||
* @param context pointer to context
|
||||
* @warning called from GUI thread
|
||||
*/
|
||||
typedef void (*ViewUpdateCallback)(View* view, void* context);
|
||||
|
|
|
@ -44,7 +44,7 @@ View* view_stack_get_view(ViewStack* view_stack);
|
|||
* Adds View on top of ViewStack.
|
||||
*
|
||||
* @param view_stack instance
|
||||
* @view view view to add
|
||||
* @param view view to add
|
||||
*/
|
||||
void view_stack_add_view(ViewStack* view_stack, View* view);
|
||||
|
||||
|
@ -52,7 +52,7 @@ void view_stack_add_view(ViewStack* view_stack, View* view);
|
|||
* If no View to remove found - ignore.
|
||||
*
|
||||
* @param view_stack instance
|
||||
* @view view view to remove
|
||||
* @param view view to remove
|
||||
*/
|
||||
void view_stack_remove_view(ViewStack* view_stack, View* view);
|
||||
|
||||
|
|
|
@ -339,7 +339,7 @@ FS_Error storage_common_merge(Storage* storage, const char* old_path, const char
|
|||
* @brief Create a directory.
|
||||
*
|
||||
* @param storage pointer to a storage API instance.
|
||||
* @param fs_path pointer to a zero-terminated string containing the directory path.
|
||||
* @param path pointer to a zero-terminated string containing the directory path.
|
||||
* @return FSE_OK if the directory has been successfully created, any other error code on failure.
|
||||
*/
|
||||
FS_Error storage_common_mkdir(Storage* storage, const char* path);
|
||||
|
@ -366,7 +366,6 @@ FS_Error storage_common_fs_info(
|
|||
*
|
||||
* @param storage pointer to a storage API instance.
|
||||
* @param path pointer to a zero-terminated string containing the path in question.
|
||||
* @return true if the path was successfully resolved, false otherwise.
|
||||
*/
|
||||
void storage_common_resolve_path_and_ensure_app_directory(Storage* storage, FuriString* path);
|
||||
|
||||
|
@ -526,7 +525,8 @@ FS_Error storage_int_backup(Storage* storage, const char* dstname);
|
|||
* @param converter pointer to a filename conversion function (may be NULL).
|
||||
* @return FSE_OK if the storage was successfully restored, any other error code on failure.
|
||||
*/
|
||||
FS_Error storage_int_restore(Storage* api, const char* dstname, Storage_name_converter converter);
|
||||
FS_Error
|
||||
storage_int_restore(Storage* storage, const char* dstname, Storage_name_converter converter);
|
||||
|
||||
/***************** Simplified Functions ******************/
|
||||
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
#include "storage.h"
|
||||
#include <toolbox/tar/tar_archive.h>
|
||||
|
||||
FS_Error storage_int_backup(Storage* api, const char* dstname) {
|
||||
TarArchive* archive = tar_archive_alloc(api);
|
||||
FS_Error storage_int_backup(Storage* storage, const char* dstname) {
|
||||
TarArchive* archive = tar_archive_alloc(storage);
|
||||
bool success = tar_archive_open(archive, dstname, TAR_OPEN_MODE_WRITE) &&
|
||||
tar_archive_add_dir(archive, STORAGE_INT_PATH_PREFIX, "") &&
|
||||
tar_archive_finalize(archive);
|
||||
|
@ -11,8 +11,9 @@ FS_Error storage_int_backup(Storage* api, const char* dstname) {
|
|||
return success ? FSE_OK : FSE_INTERNAL;
|
||||
}
|
||||
|
||||
FS_Error storage_int_restore(Storage* api, const char* srcname, Storage_name_converter converter) {
|
||||
TarArchive* archive = tar_archive_alloc(api);
|
||||
FS_Error
|
||||
storage_int_restore(Storage* storage, const char* srcname, Storage_name_converter converter) {
|
||||
TarArchive* archive = tar_archive_alloc(storage);
|
||||
bool success = tar_archive_open(archive, srcname, TAR_OPEN_MODE_READ) &&
|
||||
tar_archive_unpack_to(archive, STORAGE_INT_PATH_PREFIX, converter);
|
||||
tar_archive_free(archive);
|
||||
|
|
|
@ -1,17 +1,19 @@
|
|||
# Requirements
|
||||
# Firmware Assets {#firmware_assets}
|
||||
|
||||
## Requirements
|
||||
|
||||
- Python3
|
||||
- Python3 packages: Pillow & heatshrink2
|
||||
|
||||
# Compiling
|
||||
## Compiling
|
||||
|
||||
```bash
|
||||
./fbt icons proto dolphin_internal dolphin_blocking dolphin_ext resources
|
||||
```
|
||||
|
||||
# Asset naming rules
|
||||
## Asset naming rules
|
||||
|
||||
## Images and Animations
|
||||
### Images and Animations
|
||||
|
||||
`NAME_VARIANT_SIZE`
|
||||
|
||||
|
@ -22,16 +24,16 @@
|
|||
Image names will be automatically prefixed with `I_`, animation names with `A_`.
|
||||
Icons and Animations will be gathered into `icon.h` and `icon.c`.
|
||||
|
||||
## Dolphin and Games assets
|
||||
### Dolphin and Games assets
|
||||
|
||||
Rules are same as for Images and Animations plus assets are grouped by level and level prepends `NAME`.
|
||||
Good starting point: https://docs.unrealengine.com/4.27/en-US/ProductionPipelines/AssetNaming/
|
||||
|
||||
# Important notes
|
||||
## Important notes
|
||||
|
||||
Don't include assets that you are not using, compiler is not going to strip unused assets.
|
||||
|
||||
# Structure
|
||||
## Structure
|
||||
- `dolphin` - Dolphin game assets sources. Goes to `compiled` and `resources` folders in `build` directory.
|
||||
- `icons` - Icons sources. Goes to `compiled` folder in `build` directory.
|
||||
- `protobuf` - Protobuf sources. Goes to `compiled` folder in `build` directory.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Dolphin assets
|
||||
# Dolphin assets {#dolphin_assets}
|
||||
|
||||
Dolphin assets are split into 3 parts:
|
||||
|
||||
|
|
3
documentation/.gitignore
vendored
3
documentation/.gitignore
vendored
|
@ -1,2 +1 @@
|
|||
/html
|
||||
/latex
|
||||
/doxygen/build
|
|
@ -1,14 +1,14 @@
|
|||
# Flipper Application Manifests (.fam)
|
||||
# Flipper Application Manifests (.fam) {#app_manifests}
|
||||
|
||||
All components of Flipper Zero firmware — services, user applications, and system settings — are developed independently. Each component has a build system manifest file named `application.fam`, which defines the basic properties of that component and its relations to other parts of the system.
|
||||
|
||||
When building firmware, **`fbt`** collects all application manifests and processes their dependencies. Then it builds only those components referenced in the current build configuration. See [FBT docs](./fbt.md#firmware-application-set) for details on build configurations.
|
||||
When building firmware, `fbt` collects all application manifests and processes their dependencies. Then it builds only those components referenced in the current build configuration. See [FBT docs](fbt.md) for details on build configurations.
|
||||
|
||||
## Application definition
|
||||
|
||||
A firmware component's properties are declared in a Python code snippet, forming a call to the `App()` function with various parameters.
|
||||
|
||||
Only two parameters are mandatory: **_appid_** and **_apptype_**. Others are optional and may only be meaningful for certain application types.
|
||||
Only two parameters are mandatory: **appid** and **apptype**. Others are optional and may only be meaningful for certain application types.
|
||||
|
||||
### Parameters
|
||||
|
||||
|
@ -34,7 +34,7 @@ Only two parameters are mandatory: **_appid_** and **_apptype_**. Others are opt
|
|||
- **flags**: internal flags for system apps. Do not use.
|
||||
- **cdefines**: C preprocessor definitions to declare globally for other apps when the current application is included in the active build configuration. **For external applications**: specified definitions are used when building the application itself.
|
||||
- **requires**: list of application IDs to include in the build configuration when the current application is referenced in the list of applications to build.
|
||||
- **conflicts**: list of application IDs with which the current application conflicts. If any of them is found in the constructed application list, **`fbt`** will abort the firmware build process.
|
||||
- **conflicts**: list of application IDs with which the current application conflicts. If any of them is found in the constructed application list, `fbt` will abort the firmware build process.
|
||||
- **provides**: functionally identical to **_requires_** field.
|
||||
- **stack_size**: stack size in bytes to allocate for an application on its startup. Note that allocating a stack too small for an app to run will cause a system crash due to stack overflow, and allocating too much stack space will reduce usable heap memory size for apps to process data. _Note: you can use `ps` and `free` CLI commands to profile your app's memory usage._
|
||||
- **icon**: animated icon name from built-in assets to be used when building the app as a part of the firmware.
|
||||
|
@ -55,11 +55,11 @@ The following parameters are used only for [FAPs](./AppsOnSDCard.md):
|
|||
- **fap_description**: string, may be empty. Short application description.
|
||||
- **fap_author**: string, may be empty. Application's author.
|
||||
- **fap_weburl**: string, may be empty. Application's homepage.
|
||||
- **fap_icon_assets**: string. If present, it defines a folder name to be used for gathering image assets for this application. These images will be preprocessed and built alongside the application. See [FAP assets](./AppsOnSDCard.md#fap-assets) for details.
|
||||
- **fap_extbuild**: provides support for parts of application sources to be built by external tools. Contains a list of `ExtFile(path="file name", command="shell command")` definitions. **`fbt`** will run the specified command for each file in the list.
|
||||
- **fap_icon_assets**: string. If present, it defines a folder name to be used for gathering image assets for this application. These images will be preprocessed and built alongside the application. See [FAP assets](AppsOnSDCard.md) for details.
|
||||
- **fap_extbuild**: provides support for parts of application sources to be built by external tools. Contains a list of `ExtFile(path="file name", command="shell command")` definitions. `fbt` will run the specified command for each file in the list.
|
||||
- **fal_embedded**: boolean, default `False`. Applies only to PLUGIN type. If `True`, the plugin will be embedded into host application's .fap file as a resource and extracted to `apps_assets/APPID` folder on its start. This allows plugins to be distributed as a part of the host application.
|
||||
|
||||
Note that commands are executed at the firmware root folder, and all intermediate files must be placed in an application's temporary build folder. For that, you can use pattern expansion by **`fbt`**: `${FAP_WORK_DIR}` will be replaced with the path to the application's temporary build folder, and `${FAP_SRC_DIR}` will be replaced with the path to the application's source folder. You can also use other variables defined internally by **`fbt`**.
|
||||
Note that commands are executed at the firmware root folder, and all intermediate files must be placed in an application's temporary build folder. For that, you can use pattern expansion by `fbt`: `${FAP_WORK_DIR}` will be replaced with the path to the application's temporary build folder, and `${FAP_SRC_DIR}` will be replaced with the path to the application's source folder. You can also use other variables defined internally by `fbt`.
|
||||
|
||||
Example for building an app from Rust sources:
|
||||
|
||||
|
@ -77,12 +77,12 @@ Example for building an app from Rust sources:
|
|||
Library sources must be placed in a subfolder of the `lib` folder within the application's source folder.
|
||||
Each library is defined as a call to the `Lib()` function, accepting the following parameters:
|
||||
|
||||
- **name**: name of the library's folder. Required.
|
||||
- **fap_include_paths**: list of the library's relative paths to add to the parent fap's include path list. The default value is `["."]`, meaning the library's source root.
|
||||
- **sources**: list of filename masks to be used for gathering include files for this library. Paths are relative to the library's source root. The default value is `["*.c*"]`.
|
||||
- **cflags**: list of additional compiler flags to be used for building this library. The default value is `[]`.
|
||||
- **cdefines**: list of additional preprocessor definitions to be used for building this library. The default value is `[]`.
|
||||
- **cincludes**: list of additional include paths to be used for building this library. Paths are relative to the application's root. This can be used for providing external search paths for this library's code — for configuration headers. The default value is `[]`.
|
||||
- **name**: name of the library's folder. Required.
|
||||
- **fap_include_paths**: list of the library's relative paths to add to the parent fap's include path list. The default value is `["."]`, meaning the library's source root.
|
||||
- **sources**: list of filename masks to be used for gathering include files for this library. Paths are relative to the library's source root. The default value is `["*.c*"]`.
|
||||
- **cflags**: list of additional compiler flags to be used for building this library. The default value is `[]`.
|
||||
- **cdefines**: list of additional preprocessor definitions to be used for building this library. The default value is `[]`.
|
||||
- **cincludes**: list of additional include paths to be used for building this library. Paths are relative to the application's root. This can be used for providing external search paths for this library's code — for configuration headers. The default value is `[]`.
|
||||
|
||||
Example for building an app with a private library:
|
||||
|
||||
|
@ -105,12 +105,12 @@ Example for building an app with a private library:
|
|||
],
|
||||
```
|
||||
|
||||
For that snippet, **`fbt`** will build 2 libraries: one from sources in `lib/mbedtls` folder and another from sources in the `lib/loclass` folder. For the `mbedtls` library, **`fbt`** will add `lib/mbedtls/include` to the list of include paths for the application and compile only the files specified in the `sources` list. Additionally, **`fbt`** will enable `MBEDTLS_ERROR_C` preprocessor definition for `mbedtls` sources.
|
||||
For the `loclass` library, **`fbt`** will add `lib/loclass` to the list of the include paths for the application and build all sources in that folder. Also, **`fbt`** will disable treating compiler warnings as errors for the `loclass` library, which can be useful when compiling large 3rd-party codebases.
|
||||
For that snippet, `fbt` will build 2 libraries: one from sources in `lib/mbedtls` folder and another from sources in the `lib/loclass` folder. For the `mbedtls` library, `fbt` will add `lib/mbedtls/include` to the list of include paths for the application and compile only the files specified in the `sources` list. Additionally, `fbt` will enable `MBEDTLS_ERROR_C` preprocessor definition for `mbedtls` sources.
|
||||
For the `loclass` library, `fbt` will add `lib/loclass` to the list of the include paths for the application and build all sources in that folder. Also, `fbt` will disable treating compiler warnings as errors for the `loclass` library, which can be useful when compiling large 3rd-party codebases.
|
||||
|
||||
Both libraries will be linked with the application.
|
||||
|
||||
## `.fam` file contents
|
||||
## .fam file contents
|
||||
|
||||
The `.fam` file contains one or more application definitions. For example, here's a part of `applications/service/bt/application.fam`:
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# FAP (Flipper Application Package)
|
||||
# FAP (Flipper Application Package) {#apps_on_sd_card}
|
||||
|
||||
[fbt](./fbt.md) supports building applications as FAP files. FAPs are essentially `.elf` executables with extra metadata and resources bundled in.
|
||||
|
||||
|
@ -6,7 +6,7 @@ FAPs are built with the `faps` target. They can also be deployed to the `dist` f
|
|||
|
||||
FAPs do not depend on being run on a specific firmware version. Compatibility is determined by the FAP's metadata, which includes the required [API version](#api-versioning).
|
||||
|
||||
## How to set up an application to be built as a FAP
|
||||
## How to set up an application to be built as a FAP {#fap-howto}
|
||||
|
||||
FAPs are created and developed the same way as internal applications that are part of the firmware.
|
||||
|
||||
|
@ -21,15 +21,15 @@ To build your application as a FAP, create a folder with your app's source code
|
|||
|
||||
FAPs can include static and animated images as private assets. They will be automatically compiled alongside application sources and can be referenced the same way as assets from the main firmware.
|
||||
|
||||
To use that feature, put your images in a subfolder inside your application's folder, then reference that folder in your application's manifest in the `fap_icon_assets` field. See [Application Manifests](./AppManifests.md#application-definition) for more details.
|
||||
To use that feature, put your images in a subfolder inside your application's folder, then reference that folder in your application's manifest in the `fap_icon_assets` field. See [Application Manifests](AppManifests.md) for more details.
|
||||
|
||||
To use these assets in your application, put `#include "{APPID}_icons.h"` in your application's source code, where `{APPID}` is the `appid` value field from your application's manifest. Then you can use all icons from your application's assets the same way as if they were a part of `assets_icons.h` of the main firmware.
|
||||
|
||||
Images and animated icons should follow the same [naming convention](../assets/ReadMe.md#asset-naming-rules) as those from the main firmware.
|
||||
Images and animated icons should follow the same [naming convention](../assets/ReadMe.md) as those from the main firmware.
|
||||
|
||||
## Debugging FAPs
|
||||
|
||||
**`fbt`** includes a script for gdb-py to provide debugging support for FAPs, `debug/flipperapps.py`. It is loaded in default debugging configurations by **`fbt`** and stock VS Code configurations.
|
||||
`fbt` includes a script for gdb-py to provide debugging support for FAPs, `debug/flipperapps.py`. It is loaded in default debugging configurations by `fbt` and stock VS Code configurations.
|
||||
|
||||
With it, you can debug FAPs as if they were a part of the main firmware — inspect variables, set breakpoints, step through the code, etc.
|
||||
|
||||
|
@ -43,7 +43,7 @@ To debug FAPs, do the following:
|
|||
|
||||
1. Build firmware with `./fbt`
|
||||
2. Flash it with `./fbt flash`
|
||||
3. [Build your FAP](#how-to-set-up-an-application-to-be-built-as-a-fap) and run it on Flipper
|
||||
3. [Build your FAP](#fap-howto) and run it on Flipper
|
||||
|
||||
After that, you can attach with `./fbt debug` or VS Code and use all debug features.
|
||||
|
||||
|
@ -59,25 +59,25 @@ Applications are built for a specific API version. It is a part of the hardware
|
|||
|
||||
The App Loader allocates memory for the application and copies it to RAM, processing relocations and providing concrete addresses for imported symbols using the [symbol table](#symbol-table). Then it starts the application.
|
||||
|
||||
## API versioning
|
||||
## API versioning {#api-versioning}
|
||||
|
||||
Not all parts of firmware are available for external applications. A subset of available functions and variables is defined in the "api_symbols.csv" file, which is a part of the firmware target definition in the `targets/` directory.
|
||||
|
||||
**`fbt`** uses semantic versioning for the API. The major version is incremented when there are breaking changes in the API. The minor version is incremented when new features are added.
|
||||
`fbt` uses semantic versioning for the API. The major version is incremented when there are breaking changes in the API. The minor version is incremented when new features are added.
|
||||
|
||||
Breaking changes include:
|
||||
|
||||
- Removing a function or a global variable
|
||||
- Changing the signature of a function
|
||||
|
||||
API versioning is mostly automated by **`fbt`**. When rebuilding the firmware, **`fbt`** checks if there are any changes in the API exposed by headers gathered from `SDK_HEADERS`. If so, it stops the build, adjusts the API version, and asks the user to go through the changes in the `.csv` file. New entries are marked with a "`?`" mark, and the user is supposed to change the mark to "`+`" for the entry to be exposed for FAPs, or to "`-`" for it to be unavailable.
|
||||
API versioning is mostly automated by `fbt`. When rebuilding the firmware, `fbt` checks if there are any changes in the API exposed by headers gathered from `SDK_HEADERS`. If so, it stops the build, adjusts the API version, and asks the user to go through the changes in the `.csv` file. New entries are marked with a "`?`" mark, and the user is supposed to change the mark to "`+`" for the entry to be exposed for FAPs, or to "`-`" for it to be unavailable.
|
||||
|
||||
**`fbt`** will not allow building a firmware until all "`?`" entries are changed to "`+`" or "`-`".
|
||||
`fbt` will not allow building a firmware until all "`?`" entries are changed to "`+`" or "`-`".
|
||||
|
||||
**NB:** **`fbt`** automatically manages the API version. The only case where manually incrementing the major API version is allowed (and required) is when existing "`+`" entries are to be changed to "`-`".
|
||||
**NB:** `fbt` automatically manages the API version. The only case where manually incrementing the major API version is allowed (and required) is when existing "`+`" entries are to be changed to "`-`".
|
||||
|
||||
### Symbol table
|
||||
### Symbol table {#symbol-table}
|
||||
|
||||
The symbol table is a list of symbols exported by firmware and available for external applications. It is generated by **`fbt`** from the API symbols file and is used by the App Loader to resolve addresses of imported symbols. It is build as a part of the `fap_loader` application.
|
||||
The symbol table is a list of symbols exported by firmware and available for external applications. It is generated by `fbt` from the API symbols file and is used by the App Loader to resolve addresses of imported symbols. It is build as a part of the `fap_loader` application.
|
||||
|
||||
**`fbt`** also checks if all imported symbols are present in the symbol table. If there are any missing symbols, it will issue a warning listing them. The application won't be able to run on the device until all required symbols are provided in the symbol table.
|
||||
`fbt` also checks if all imported symbols are present in the symbol table. If there are any missing symbols, it will issue a warning listing them. The application won't be able to run on the device until all required symbols are provided in the symbol table.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Expansion Module Protocol - Draft
|
||||
# Expansion Module Protocol {#expansion_protocol}
|
||||
|
||||
## Terms and definitions
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Run time checks and forced system crash
|
||||
# Run time checks and forced system crash {#furi_check}
|
||||
|
||||
The best way to protect system integrity is to reduce amount cases that we must handle and crash the system as early as possible.
|
||||
For that purpose we have bunch of helpers located in Furi Core check.h.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Using FuriHalBus API
|
||||
# Using FuriHalBus API {#furi_hal_bus}
|
||||
|
||||
## Basic info
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Furi HAL Debugging
|
||||
# Furi HAL Debugging {#furi_hal_debugging}
|
||||
|
||||
Some Furi subsystems got additional debugging features that can be enabled by adding additional defines to firmware compilation.
|
||||
Usually they are used for low level tracing and profiling or signal redirection/duplication.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
## What a Firmware Target is
|
||||
## What a Firmware Target is {#hardware_targets}
|
||||
|
||||
Flipper's firmware is modular and supports different hardware configurations in a common code base. It encapsulates hardware-specific differences in `furi_hal`, board initialization code, linker files, SDK data and other information in a _target definition_.
|
||||
|
||||
|
@ -29,7 +29,7 @@ A target definition file, `target.json`, is a JSON file that can contain the fol
|
|||
|
||||
Not all applications are available on different hardware targets.
|
||||
|
||||
* For applications built into the firmware, you have to specify a compatible application set using `FIRMWARE_APP_SET=...` fbt option. See [fbt docs](./fbt.md#firmware-application-set) for details on build configurations.
|
||||
* For applications built into the firmware, you have to specify a compatible application set using `FIRMWARE_APP_SET=...` fbt option. See [fbt docs](./fbt.md) for details on build configurations.
|
||||
|
||||
* For applications built as external .faps, you have to explicitly specify compatible targets in application's manifest, `application.fam`. For example, to limit application to a single target, add `targets=["f7"],` to the manifest. It won't be built for other targets.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Key Combos
|
||||
# Key Combos {#key_combos}
|
||||
|
||||
There are times when your Flipper feels blue and doesn't respond to any of your commands due to a software issue. This guide will help you solve this problem.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Reading RAW RFID data
|
||||
# Reading RAW RFID data {#lfrfid_raw}
|
||||
|
||||
Flipper Zero has the option to read RAW data from 125 kHz cards that allows you to record the card's data and save it, similar to how a dictaphone records sound.
|
||||
|
||||
|
|
|
@ -1,20 +1,22 @@
|
|||
# Executing code from RAM
|
||||
# Flipper Zero OTA update process {#ota_updates}
|
||||
|
||||
## Executing code from RAM
|
||||
|
||||
In Flipper firmware, we have a special boot mode that loads a specially crafted system image into RAM and transfers control to it. System image executing in RAM has full write access to Flipper's entire flash memory — something that's not possible when running main code from the same flash.
|
||||
|
||||
We leverage that boot mode to perform OTA firmware updates, including operations on a radio stack running on the second MCU core.
|
||||
|
||||
# How does Flipper OTA work?
|
||||
## How does Flipper OTA work?
|
||||
|
||||
Installation of OTA updates goes through 3 stages:
|
||||
|
||||
## 1. Backing up internal storage (`/int`)
|
||||
### 1. Backing up internal storage (/int)
|
||||
|
||||
It is a special partition of Flipper's flash memory, taking up all available space not used by the firmware code. Newer versions of firmware may be of different size, and simply installing them would cause flash repartitioning and data loss.
|
||||
|
||||
So, before taking any action on the firmware, we back up the current configuration from `/int` into a plain tar archive on the SD card.
|
||||
|
||||
## 2. Performing device update
|
||||
### 2. Performing device update
|
||||
|
||||
The main firmware loads an updater image — a customized build of the main Flipper firmware — into RAM and runs it. Updater performs operations on system flash as described by an Update manifest file.
|
||||
|
||||
|
@ -24,17 +26,17 @@ Then, updater validates and corrects Option Bytes — a special memory region co
|
|||
|
||||
After that, updater loads a `.dfu` file with firmware to be flashed, checks its integrity using CRC32, writes it to system flash and validates written data.
|
||||
|
||||
## 3. Restoring internal storage and updating resources
|
||||
### 3. Restoring internal storage and updating resources
|
||||
|
||||
After performing operations on flash memory, the system restarts into newly flashed firmware. Then it performs restoration of previously backed up `/int` contents.
|
||||
|
||||
If the update package contains an additional resources archive, it is extracted onto the SD card.
|
||||
|
||||
# Update manifest
|
||||
## Update manifest
|
||||
|
||||
An update package comes with a manifest that contains a description of its contents. The manifest is in Flipper File Format — a simple text file, comprised of key-value pairs.
|
||||
|
||||
## Mandatory fields
|
||||
### Mandatory fields
|
||||
|
||||
An update manifest must contain the following keys in the given order:
|
||||
|
||||
|
@ -50,7 +52,7 @@ An update manifest must contain the following keys in the given order:
|
|||
|
||||
- **Loader CRC**: CRC32 of loader file. Note that it is represented in little-endian hex.
|
||||
|
||||
## Optional fields
|
||||
### Optional fields
|
||||
|
||||
Other fields may have empty values. In this case, updater skips all operations related to these values.
|
||||
|
||||
|
@ -66,7 +68,7 @@ Other fields may have empty values. In this case, updater skips all operations r
|
|||
|
||||
- **OB reference**, **OB mask**, **OB write mask**: reference values for validating and correcting option bytes.
|
||||
|
||||
# OTA update error codes
|
||||
## OTA update error codes
|
||||
|
||||
We designed the OTA update process to be as fail-safe as possible. We don't start any risky operations before validating all related pieces of data to ensure we don't leave the device in a partially updated, or bricked, state.
|
||||
|
||||
|
@ -102,21 +104,21 @@ Even if something goes wrong, updater allows you to retry failed operations and
|
|||
| Restoring LFS | **12** | **0-100** | FS read/write error |
|
||||
| Updating resources | **13** | **0-100** | SD card read/write error |
|
||||
|
||||
# Building update packages
|
||||
## Building update packages
|
||||
|
||||
## Full package
|
||||
### Full package
|
||||
|
||||
To build a full update package, including firmware, radio stack and resources for the SD card, run:
|
||||
|
||||
`./fbt COMPACT=1 DEBUG=0 updater_package`
|
||||
|
||||
## Minimal package
|
||||
### Minimal package
|
||||
|
||||
To build a minimal update package, including only firmware, run:
|
||||
|
||||
`./fbt COMPACT=1 DEBUG=0 updater_minpackage`
|
||||
|
||||
## Customizing update bundles
|
||||
### Customizing update bundles
|
||||
|
||||
Default update packages are built with Bluetooth Light stack.
|
||||
You can pick a different stack if your firmware version supports it, and build a bundle with it by passing the stack type and binary name to `fbt`:
|
||||
|
@ -127,7 +129,7 @@ Note that `COPRO_OB_DATA` must point to a valid file in the `scripts` folder con
|
|||
|
||||
In certain cases, you might have to confirm your intentions by adding `COPRO_DISCLAIMER=...` to the build command line.
|
||||
|
||||
## Building partial update packages
|
||||
### Building partial update packages
|
||||
|
||||
You can customize package contents by calling `scripts/update.py` directly.
|
||||
For example, to build a package only for installing BLE FULL stack:
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
# Unit tests
|
||||
# Unit tests {#unit_tests}
|
||||
|
||||
## Intro
|
||||
|
||||
Unit tests are special pieces of code that apply known inputs to the feature code and check the results to see if they are correct.
|
||||
They are crucial for writing robust, bug-free code.
|
||||
|
||||
Flipper Zero firmware includes a separate application called [unit_tests](/applications/debug/unit_tests).
|
||||
Flipper Zero firmware includes a separate application called [unit_tests](https://github.com/flipperdevices/flipperzero-firmware/tree/dev/applications/debug/unit_tests).
|
||||
It is run directly on Flipper devices in order to employ their hardware features and rule out any platform-related differences.
|
||||
|
||||
When contributing code to the Flipper Zero firmware, it is highly desirable to supply unit tests along with the proposed features.
|
||||
|
@ -20,7 +20,7 @@ To run the unit tests, follow these steps:
|
|||
3. Launch the CLI session and run the `unit_tests` command.
|
||||
|
||||
**NOTE:** To run a particular test (and skip all others), specify its name as the command argument.
|
||||
See [test_index.c](/applications/debug/unit_tests/test_index.c) for the complete list of test names.
|
||||
See [test_index.c](https://github.com/flipperdevices/flipperzero-firmware/blob/dev/applications/debug/unit_tests/test_index.c) for the complete list of test names.
|
||||
|
||||
## Adding unit tests
|
||||
|
||||
|
@ -28,11 +28,11 @@ See [test_index.c](/applications/debug/unit_tests/test_index.c) for the complete
|
|||
|
||||
#### Entry point
|
||||
|
||||
The common entry point for all tests is the [unit_tests](/applications/debug/unit_tests) application. Test-specific code is placed into an arbitrarily named subdirectory and is then called from the [test_index.c](/applications/debug/unit_tests/test_index.c) source file.
|
||||
The common entry point for all tests is the [unit_tests](https://github.com/flipperdevices/flipperzero-firmware/tree/dev/applications/debug/unit_tests) application. Test-specific code is placed into an arbitrarily named subdirectory and is then called from the [test_index.c](https://github.com/flipperdevices/flipperzero-firmware/tree/dev/applications/debug/unit_tests/test_index.c) source file.
|
||||
|
||||
#### Test assets
|
||||
|
||||
Some unit tests require external data in order to function. These files (commonly called assets) reside in the [unit_tests](/applications/debug/unit_tests/resources/unit_tests) directory in their respective subdirectories. Asset files can be of any type (plain text, FlipperFormat (FFF), binary, etc.).
|
||||
Some unit tests require external data in order to function. These files (commonly called assets) reside in the [unit_tests](https://github.com/flipperdevices/flipperzero-firmware/tree/dev/applications/debug/unit_tests/resources/unit_tests) directory in their respective subdirectories. Asset files can be of any type (plain text, FlipperFormat (FFF), binary, etc.).
|
||||
|
||||
### Application-specific
|
||||
|
||||
|
@ -41,9 +41,9 @@ Some unit tests require external data in order to function. These files (commonl
|
|||
Each infrared protocol has a corresponding set of unit tests, so it makes sense to implement one when adding support for a new protocol.
|
||||
To add unit tests for your protocol, follow these steps:
|
||||
|
||||
1. Create a file named `test_<your_protocol_name>.irtest` in the [assets](/applications/debug/unit_tests/resources/unit_tests/infrared) directory.
|
||||
1. Create a file named `test_<your_protocol_name>.irtest` in the [assets](https://github.com/flipperdevices/flipperzero-firmware/tree/dev/applications/debug/unit_tests/resources/unit_tests/infrared) directory.
|
||||
2. Fill it with the test data (more on it below).
|
||||
3. Add the test code to [infrared_test.c](/applications/debug/unit_tests/infrared/infrared_test.c).
|
||||
3. Add the test code to [infrared_test.c](https://github.com/flipperdevices/flipperzero-firmware/blob/dev/applications/debug/unit_tests/infrared/infrared_test.c).
|
||||
4. Build and install firmware with resources, install it on your Flipper and run the tests to see if they pass.
|
||||
|
||||
##### Test data format
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Universal Remotes
|
||||
# Universal Remotes {#universal_remotes}
|
||||
|
||||
## Televisions
|
||||
|
||||
|
@ -13,7 +13,7 @@ Each signal is recorded using the following algorithm:
|
|||
|
||||
The signal names are self-explanatory. Remember to make sure that every recorded signal does what it's supposed to.
|
||||
|
||||
If everything checks out, append these signals **to the end** of the [TV universal remote file](/applications/main/infrared/resources/infrared/assets/tv.ir).
|
||||
If everything checks out, append these signals **to the end** of the [TV universal remote file](https://github.com/flipperdevices/flipperzero-firmware/blob/dev/applications/main/infrared/resources/infrared/assets/tv.ir).
|
||||
|
||||
## Audio players
|
||||
|
||||
|
@ -23,7 +23,7 @@ The signal names are self-explanatory.
|
|||
On many remotes, the `Play` button doubles as `Pause`. In this case, record it as `Play` omitting the `Pause`.
|
||||
Make sure that every signal does what it's supposed to.
|
||||
|
||||
If everything checks out, append these signals **to the end** of the [audio player universal remote file](/applications/main/infrared/resources/infrared/assets/audio.ir).
|
||||
If everything checks out, append these signals **to the end** of the [audio player universal remote file](https://github.com/flipperdevices/flipperzero-firmware/blob/dev/applications/main/infrared/resources/infrared/assets/audio.ir).
|
||||
|
||||
## Projectors
|
||||
|
||||
|
@ -67,7 +67,7 @@ Finally, record the `Off` signal:
|
|||
The resulting remote file should now contain 6 signals. You can omit any of them, but you then won't be able to use their functionality.
|
||||
Test the file against the actual device. Make sure that every signal does what it's supposed to.
|
||||
|
||||
If everything checks out, append these signals **to the end** of the [A/C universal remote file](/applications/main/infrared/resources/infrared/assets/ac.ir).
|
||||
If everything checks out, append these signals **to the end** of the [A/C universal remote file](https://github.com/flipperdevices/flipperzero-firmware/blob/dev/applications/main/infrared/resources/infrared/assets/ac.ir).
|
||||
|
||||
## Final steps
|
||||
|
||||
|
|
246
documentation/devboard/Firmware update on Developer Board.md
Normal file
246
documentation/devboard/Firmware update on Developer Board.md
Normal file
|
@ -0,0 +1,246 @@
|
|||
# Firmware update on Developer Board {#dev_board_fw_update}
|
||||
|
||||
It's important to regularly update your Developer Board to keep it up to date. This tutorial will guide you through the necessary steps to successfully update the firmware of your Developer Board.
|
||||
|
||||
This tutorial assumes that you're familiar with the basics of the command line. If you’re unfamiliar with the command line, please refer to the [Windows](https://www.digitalcitizen.life/command-prompt-how-use-basic-commands/) or [MacOS/Linux](https://ubuntu.com/tutorials/command-line-for-beginners#1-overview) command line tutorials.
|
||||
|
||||
***
|
||||
|
||||
## Downloading the latest firmware
|
||||
|
||||
The first thing you need to do is to download the latest Developer Board firmware.
|
||||
|
||||
To get the latest pre-built firmware, do the following:
|
||||
|
||||
1. Go to the [Update Server page](https://update.flipperzero.one/builds/blackmagic-firmware).
|
||||
![The Update Server page hosts different versions of the Developer Board firmware](https://archbee-image-uploads.s3.amazonaws.com/3StCFqarJkJQZV-7N79yY/gIXVO9VrE4LK05CmcMSSD_monosnap-miro-2023-07-19-17-36-23.jpg)
|
||||
|
||||
There, you can find the following version of the Developer Board firmware:
|
||||
|
||||
* **Release:** The most stable version of the firmware, which went through rigorous testing. The Release firmware version has the following format: **X.Y.Z/**, where X, Y, and Z are the build numbers. We recommend installing this version of the firmware.
|
||||
|
||||
* **Release-candidate:** The firmware version that hasn't been tested yet and may contain bugs. The Release-candidate firmware version has the following format: **X.Y.Z-rc/**, where X, Y, and Z are the build numbers.
|
||||
|
||||
* **Development:** The firmware version which builds every day and contains the latest features but might be unstable.
|
||||
|
||||
2. Open the folder with the latest Release firmware and download the `blackmagic-firmware-s2-full-X.Y.Z.tgz` file.
|
||||
|
||||
***
|
||||
|
||||
## Extracting the firmware
|
||||
|
||||
After downloading the firmware archive, extract it into a folder:
|
||||
|
||||
* On Windows, you can use any archive manager for this, for example, [7-Zip](https://www.7-zip.org/).
|
||||
|
||||
* On MacOS and Linux, you can use the `tar` command:
|
||||
|
||||
```text
|
||||
tar -xzf blackmagic-firmware-s2-full-X.Y.Z.tgz -C <destination_directory>
|
||||
```
|
||||
|
||||
Don't forget to replace `X.Y.Z` with the actual version number and set the destination directory!
|
||||
|
||||
***
|
||||
|
||||
## Installing the prerequisites for flashing
|
||||
|
||||
Install the tools below if you haven't already.
|
||||
|
||||
### Python
|
||||
|
||||
Download and install [Python3](https://www.python.org/downloads/). Make sure to check the “Add Python to PATH” option during installation.
|
||||
|
||||
### pip
|
||||
|
||||
To install the pip package manager, run the following command in the Terminal:
|
||||
|
||||
```text
|
||||
python3 -m ensurepip --upgrade
|
||||
```
|
||||
|
||||
If this command fails, please refer to the [official pip documentation](https://pip.pypa.io/en/stable/installation/) for alternative installation methods.
|
||||
|
||||
### esptool
|
||||
|
||||
esptool is a command-line utility for flashing ESP8266 and ESP32 microcontrollers, including the ESP32-S2 in your Developer Board.
|
||||
|
||||
To install esptool, run the following command in the Terminal:
|
||||
|
||||
```text
|
||||
pip3 install esptool
|
||||
```
|
||||
|
||||
If this command fails, try using **pip** instead of **pip3**. If this didn’t help, please refer to the [official esptool installation manual](https://docs.espressif.com/projects/esptool/en/latest/esp32/installation.html).
|
||||
|
||||
***
|
||||
|
||||
## Connecting the Developer Board to your computer
|
||||
|
||||
1. List all of the serial devices on your computer.
|
||||
|
||||
* ***Windows***
|
||||
|
||||
On Windows, go to Device Manager and expand the Ports (COM & LPT) section.
|
||||
|
||||
* ***macOS***
|
||||
|
||||
On macOS, you can run the following command in the Terminal:
|
||||
|
||||
```text
|
||||
ls /dev/cu.*
|
||||
```
|
||||
|
||||
* ***Linux***
|
||||
|
||||
On Linux, you can run the following command in the Terminal:
|
||||
|
||||
```text
|
||||
ls /dev/tty*
|
||||
```
|
||||
|
||||
View the devices in the list.
|
||||
|
||||
2. Connect the Developer Board to your computer using a USB-C cable.\
|
||||
![The Developer Board in Wired mode](https://archbee-image-uploads.s3.amazonaws.com/3StCFqarJkJQZV-7N79yY/Aq7gfMI-m_5H6sGGjwb4I_monosnap-miro-2023-07-19-19-47-39.jpg)
|
||||
|
||||
3. Switch your Developer Board to Bootloader mode:
|
||||
|
||||
3.1. Press and hold the **BOOT** button.
|
||||
|
||||
3.2. Press the **RESET** button while holding the **BOOT** button.
|
||||
|
||||
3.3. Release the **BOOT** button.
|
||||
![You can easily switch the Dev Board to Bootloader mode](https://archbee-image-uploads.s3.amazonaws.com/3StCFqarJkJQZV-7N79yY/KynP9iT6sJ3mXLaLyI82__image.png)
|
||||
|
||||
4. Repeat Step 1 and view the name of your Developer Board that appeared in the list.
|
||||
|
||||
For example, on macOS:
|
||||
|
||||
```text
|
||||
/dev/cu.usbmodem01
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
## Flashing the firmware
|
||||
|
||||
### Getting the flash command
|
||||
|
||||
1. Run the Terminal and navigate to the folder with the extracted firmware.
|
||||
|
||||
2. Run the following command to read the file with the flash command:
|
||||
|
||||
```text
|
||||
cat flash.command
|
||||
```
|
||||
|
||||
If you see a similar output, you can proceed to the Flashing step:
|
||||
|
||||
```text
|
||||
esptool.py -p (PORT) -b 460800 --before default_reset --after hard_reset --chip esp32s2 write_flash --flash_mode dio --flash_freq 80m --flash_size 4MB 0x1000 bootloader.bin 0x10000 blackmagic.bin 0x8000 partition-table.bin
|
||||
```
|
||||
|
||||
Don't use the exact command above for your Developer Board in the next step since it's just an example and may not match your firmware version!
|
||||
|
||||
If you get an error, ensure you’re in the correct directory and extracted the firmware archive correctly.
|
||||
|
||||
***
|
||||
|
||||
### Flashing
|
||||
|
||||
1. Copy the command you got from the previous step and replace the `(PORT)` part with the name of the serial device you learned earlier.
|
||||
|
||||
For Windows, replace `(PORT)` with the COM port number—for example, `COM3`.
|
||||
|
||||
2. Run the command in the Terminal.
|
||||
|
||||
Your command should look similar to this:
|
||||
|
||||
```text
|
||||
esptool.py -p /dev/cu.usbmodem01 -b 460800 --before default_reset --after hard_reset --chip esp32s2 write_flash --flash_mode dio --flash_freq 80m --flash_size 4MB 0x1000 bootloader.bin 0x10000 blackmagic.bin 0x8000 partition-table.bin
|
||||
```
|
||||
|
||||
If you get an error, ensure that you’ve entered the correct serial device name and that the Developer Board is in Bootloader mode.
|
||||
|
||||
3. Wait till the firmware flashing is over. The flashing process takes about 30 seconds.
|
||||
|
||||
The Terminal output should look similar to this:
|
||||
|
||||
```text
|
||||
esptool.py v4.6.1
|
||||
Serial port /dev/cu.usbmodem01
|
||||
Connecting...
|
||||
Chip is ESP32-S2 (revision v0.0)
|
||||
Features: WiFi, No Embedded Flash, No Embedded PSRAM, ADC and temperature sensor
|
||||
calibration in BLK2 of efuse V2
|
||||
Crystal is 40MHz
|
||||
MAC: 00:11:22:33:44:55
|
||||
Uploading stub...
|
||||
Running stub...
|
||||
Stub running...
|
||||
Changing baud rate to 460800
|
||||
Changed.
|
||||
Configuring flash size...
|
||||
Flash will be erased from 0x00001000 to 0x00004fff...
|
||||
Flash will be erased from 0x00010000 to 0x000ecfff...
|
||||
Flash will be erased from 0x00008000 to 0x00008fff...
|
||||
Compressed 13248 bytes to 9298...
|
||||
Wrote 13248 bytes (9298 compressed) at 0x00001000 in 0.3 seconds (effective 402.7 kbit/s)...
|
||||
Hash of data verified.
|
||||
Compressed 904288 bytes to 562550...
|
||||
Wrote 904288 bytes (562550 compressed) at 0x00010000 in 6.7 seconds (effective 1076.5 kbit/s)...
|
||||
Hash of data verified.
|
||||
Compressed 3072 bytes to 124...
|
||||
Wrote 3072 bytes (124 compressed) at 0x00008000 in 0.1 seconds (effective 360.8 kbit/s)...
|
||||
Hash of data verified.
|
||||
Leaving...
|
||||
Hard resetting via RTS pin...
|
||||
```
|
||||
|
||||
If the Terminal output has these two lines at the end, your Developer Board has been successfully updated:
|
||||
|
||||
```text
|
||||
Leaving...
|
||||
Hard resetting via RTS pin...
|
||||
```
|
||||
|
||||
If you get this warning, you can safely ignore it:
|
||||
|
||||
```text
|
||||
WARNING: ESP32-S2 (revision v0.0) chip was placed into download mode using GPIO0.
|
||||
esptool.py can not exit the download mode over USB. To run the app, reset the chip manually.
|
||||
To suppress this note, set --after option to 'no_reset
|
||||
```
|
||||
|
||||
#### If flashing failed
|
||||
|
||||
If you get an error message during the flashing process, such as:
|
||||
|
||||
```text
|
||||
A fatal error occurred: Serial data stream stopped: Possible serial noise or corruption.
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```text
|
||||
FileNotFoundError: [Errno 2] No such file or directory: '/dev/cu.usbmodem01'
|
||||
```
|
||||
|
||||
Try doing the following:
|
||||
|
||||
* Disconnect the Developer Board from your computer, then reconnect it.
|
||||
|
||||
* Use a different USB port on your computer.
|
||||
|
||||
* Use a different USB-C cable.
|
||||
|
||||
***
|
||||
|
||||
## Finishing the installation
|
||||
|
||||
After flashing the firmware, you can reboot the Developer Board by pressing the **RESET** button.
|
||||
|
||||
![Reset the Developer Board](https://archbee-image-uploads.s3.amazonaws.com/3StCFqarJkJQZV-7N79yY/rcQeKARgrVwa51tLoo-qY_monosnap-miro-2023-07-20-18-29-33.jpg)
|
||||
|
||||
The Developer Board should appear as a serial device on your computer. Now, you can use it with the Black Magic Debug client of your choice.
|
175
documentation/devboard/Get started with the Dev Board.md
Normal file
175
documentation/devboard/Get started with the Dev Board.md
Normal file
|
@ -0,0 +1,175 @@
|
|||
# Get started with the Dev Board {#dev_board_get_started}
|
||||
|
||||
The Wi-Fi Developer Board serves as a tool to debug the Flipper Zero firmware. To debug the firmware, the initial step involves compiling the firmware from its source code. This process enables the debugging functionality within the firmware and generates all the necessary files required for debugging purposes.
|
||||
|
||||
> **NOTE:** Building and debugging the Flipper Zero firmware is fully supported on MacOS and Linux. Support for Windows is in beta test.
|
||||
|
||||
***
|
||||
|
||||
## Updating the firmware of your Developer Board
|
||||
|
||||
Update the firmware of your Developer Board before using it. For more information, visit [Firmware update on Developer Board](https://docs.flipperzero.one/development/hardware/wifi-debugger-module/update).
|
||||
|
||||
***
|
||||
|
||||
## Installing Git
|
||||
|
||||
You’ll need Git installed on your computer to clone the firmware repository. If you don’t have Git, install it by doing the following:
|
||||
|
||||
* **MacOS**
|
||||
|
||||
On MacOS, install the **Xcode Command Line Tools** package, which includes Git as one of the pre-installed command-line utilities, by running in the Terminal the following command:
|
||||
|
||||
```text
|
||||
xcode-select --install
|
||||
```
|
||||
|
||||
* **Linux**
|
||||
|
||||
On Linux, you can install Git using your package manager. For example, on Ubuntu, run in the Terminal the following command:
|
||||
|
||||
```text
|
||||
sudo apt install git
|
||||
```
|
||||
|
||||
For other distributions, refer to your package manager documentation.
|
||||
|
||||
***
|
||||
|
||||
## Building the firmware
|
||||
|
||||
First, clone the firmware repository:
|
||||
|
||||
```text
|
||||
git clone --recursive https://github.com/flipperdevices/flipperzero-firmware.git
|
||||
cd flipperzero-firmware
|
||||
```
|
||||
|
||||
Then, run the **Flipper Build Tool** (FBT) to build the firmware:
|
||||
|
||||
```text
|
||||
./fbt
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
## Connecting the Developer Board
|
||||
|
||||
The Developer Board can work in the **Wired** mode and two **Wireless** modes: **Wi-Fi access point (AP)** mode and **Wi-Fi client (STA)** mode. The Wired mode is the simplest to set up, but requires a USB Type-C cable. The Wireless modes are more complex to set up, but they allow you to debug your Flipper Zero wirelessly.
|
||||
|
||||
> **NOTE:** Use the following credentials when connecting to the Developer Board in **Wi-Fi access point** mode: Name: **blackmagic**, Password: **iamwitcher**
|
||||
|
||||
## Wired
|
||||
|
||||
![The Developer Board in Wired mode](https://archbee-image-uploads.s3.amazonaws.com/3StCFqarJkJQZV-7N79yY/jZdVlRTPVdSQVegzCyXp7_monosnap-miro-2023-06-22-16-28-06.jpg)
|
||||
|
||||
To connect the Developer Board in **Wired** mode, do the following:
|
||||
|
||||
1. Cold-plug the Developer Board by turning off your Flipper Zero and connecting the Developer Board, and then turning it back on.
|
||||
|
||||
2. On your computer, open the **Terminal** and run the following:
|
||||
|
||||
* **MacOS**
|
||||
|
||||
```text
|
||||
ls /dev/cu.*
|
||||
```
|
||||
|
||||
* **Linux**
|
||||
|
||||
```text
|
||||
ls /dev/tty*
|
||||
```
|
||||
|
||||
Note the list of devices.
|
||||
|
||||
3. Connect the Developer Board to your computer via a USB-C cable.
|
||||
|
||||
4. Rerun the command. Two new devices have to appear: this is the Developer Board.
|
||||
|
||||
> **NOTE:** If the Developer Board doesn’t appear in the list of devices, try using a different cable, USB port, or computer.
|
||||
>
|
||||
> **NOTE:** Flipper Zero logs can only be viewed when the Developer Board is connected via USB. The option to view logs over Wi-Fi will be added in future updates. For more information, visit [Reading logs via the Dev Board](https://docs.flipperzero.one/development/hardware/wifi-debugger-module/reading-logs).
|
||||
|
||||
## Wireless
|
||||
|
||||
### Wi-Fi access point (AP) mode
|
||||
|
||||
![The Developer Board in Wi-Fi access point mode](https://archbee-image-uploads.s3.amazonaws.com/3StCFqarJkJQZV-7N79yY/tKRTMHAuruiLSEce2a8Ve_monosnap-miro-2023-06-22-16-39-17.jpg)
|
||||
|
||||
Out of the box, the Developer Board is configured to work as a **Wi-Fi access point**. This means it will create its own Wi-Fi network to which you can connect. If your Developer Board doesn’t create a Wi-Fi network, it is probably configured to work in **Wi-Fi client** mode. To reset your Developer Board back to **Wi-Fi access point** mode, press and hold the **BOOT** button for 10 seconds, then wait for the module to reboot.
|
||||
|
||||
![You can reconfigure the Developer Board mode by pressing and holding the BOOT button](https://archbee-image-uploads.s3.amazonaws.com/3StCFqarJkJQZV-7N79yY/57eELJsAwMxeZCEA1NMJw_monosnap-miro-2023-06-22-20-33-27.jpg)
|
||||
|
||||
To connect the Developer Board in **Wi-Fi access point** mode, do the following:
|
||||
|
||||
1. Cold-plug the Developer Board by turning off your Flipper Zero and connecting the Developer Board, and then turning it back on.
|
||||
|
||||
2. Open Wi-Fi settings on your client device (phone, laptop, or other).
|
||||
|
||||
3. Connect to the network:
|
||||
|
||||
* Name: **blackmagic**
|
||||
* Password: **iamwitcher**
|
||||
|
||||
4. To configure the Developer Board, open a browser and go to `http://192.168.4.1`.
|
||||
|
||||
#### Wi-Fi client (STA) mode
|
||||
|
||||
![The Developer Board in Wi-Fi client mode](https://archbee-image-uploads.s3.amazonaws.com/3StCFqarJkJQZV-7N79yY/xLQpFyYPfUS5Cx0uQhrNd_monosnap-miro-2023-06-23-12-34-36.jpg)
|
||||
|
||||
To connect the Developer Board in **Wi-Fi client** mode, you need to configure it to connect to your Wi-Fi network by doing the following:
|
||||
|
||||
1. Cold-plug the Developer Board by turning off your Flipper Zero and connecting the Developer Board, and then turning it back on.
|
||||
|
||||
2. Connect to the Developer Board in **Wi-Fi access point** mode.
|
||||
|
||||
3. In a browser, go to the configuration page on `http://192.168.4.1`.
|
||||
|
||||
4. Select the **STA** mode and enter your network’s **SSID** (name) and **password**. For convenience, you can click the **+** button to see the list of nearby networks.
|
||||
|
||||
5. Save the configuration and reboot the Developer Board.
|
||||
|
||||
![In the Wi-Fi tab, you can set the Developer Board mode](https://archbee-image-uploads.s3.amazonaws.com/3StCFqarJkJQZV-7N79yY/klbLVj8lz2bEvm7j4wRaj_monosnap-miro-2023-06-23-13-06-32.jpg)
|
||||
|
||||
After rebooting, the Developer Board connects to your Wi-Fi network. You can connect to the device using the mDNS name [blackmagic.local](http://blackmagic.local) or the IP address it got from your router (you’ll have to figure this out yourself, every router is different).
|
||||
|
||||
After connecting to your debugger via [blackmagic.local](http://blackmagic.local), you can find its IP address in the **SYS** tab. You can also change the debugger’s mode to **AP** or **STA** there.
|
||||
|
||||
![In the SYS tab, you can view the IP address of your Developer Board](https://archbee-image-uploads.s3.amazonaws.com/3StCFqarJkJQZV-7N79yY/5XbUptlfqzlV0p6hRUqiG_monosnap-miro-2023-06-22-18-11-30.jpg)
|
||||
|
||||
***
|
||||
|
||||
## Debugging the firmware
|
||||
|
||||
Open the **Terminal** in the **flipperzero-firmware** directory that you cloned earlier and run the following command:
|
||||
|
||||
```text
|
||||
./fbt flash_blackmagic
|
||||
```
|
||||
|
||||
This will upload the firmware you’ve just built to your Flipper Zero via the Developer Board. After that, you can start debugging the firmware using the [GDB](https://www.gnu.org/software/gdb/) debugger. We recommend using **VSCode** with the recommended extensions, and we have pre-made configurations for it.
|
||||
|
||||
To debug in **VSCode**, do the following:
|
||||
|
||||
1. In VSCode, open the **flipperzero-firmware** directory.
|
||||
|
||||
2. You should see a notification about recommended extensions. Install them.
|
||||
|
||||
If there were no notifications, open the **Extensions** tab, enter `@recommended` in the search bar, and install the workspace recommendations.
|
||||
|
||||
3. In the **Terminal**, run the `./fbt vscode_dist` command. This will generate the VSCode configuration files needed for debugging.
|
||||
|
||||
4. In VSCode, open the **Run and Debug** tab and select **Attach FW (blackmagic)** from the dropdown menu.
|
||||
|
||||
5. If needed, flash your Flipper Zero with the `./fbt flash_blackmagic` command, then click the **Play** button in the debug sidebar to start the debugging session.
|
||||
|
||||
6. Note that starting a debug session halts the execution of the firmware, so you’ll need to click the **Continue** button on the toolbar at the top of your VSCode window to continue execution.
|
||||
|
||||
![Click Continue in the toolbar to continue execution of the firmware](https://archbee-image-uploads.s3.amazonaws.com/3StCFqarJkJQZV-7N79yY/lp8ygGaZ3DvWD3OSI9yGO_monosnap-miro-2023-06-23-17-58-09.jpg)
|
||||
|
||||
To learn about debugging, visit the following pages:
|
||||
|
||||
* [Debugging with GDB](https://sourceware.org/gdb/current/onlinedocs/gdb.pdf)
|
||||
|
||||
* [Debugging in VS Code](https://code.visualstudio.com/docs/editor/debugging)
|
152
documentation/devboard/Reading logs via the Dev Board.md
Normal file
152
documentation/devboard/Reading logs via the Dev Board.md
Normal file
|
@ -0,0 +1,152 @@
|
|||
# Reading logs via the Dev Board {#dev_board_reading_logs}
|
||||
|
||||
The Developer Board allows you to read Flipper Zero logs via UART. Unlike reading logs via the command-line interface (CLI), the Developer Board enables you to collect logs from the device directly to a serial console independently from the operating system of Flipper Zero. It allows you to see the device's logs when it's loading, updating, or crashing. It's useful for debugging and troubleshooting during software development.
|
||||
|
||||
> **NOTE:** Flipper Zero logs can only be viewed when the developer board is connected via USB. The option to view logs over Wi-Fi will be added in future updates.
|
||||
|
||||
## Setting the log level
|
||||
|
||||
Depending on your needs, you can set the log level by going to Main Menu -> Settings -> Log Level. To learn more about logging levels, visit [Settings](https://docs.flipperzero.one/basics/settings#d5TAt).
|
||||
|
||||
![You can manually set the preferred log level](https://archbee-image-uploads.s3.amazonaws.com/3StCFqarJkJQZV-7N79yY/INzQMw8QUsG9PXi30WFS0_monosnap-miro-2023-07-11-13-29-47.jpg)
|
||||
|
||||
***
|
||||
|
||||
## Viewing Flipper Zero logs
|
||||
|
||||
Depending on your operating system, you need to install an additional application on your computer to read logs via the Developer Board:
|
||||
|
||||
### MacOS
|
||||
|
||||
On MacOS, you need to install the **minicom** communication program by doing the following:
|
||||
|
||||
1. [Install Homebrew](https://brew.sh/) by running in the Terminal the following command:
|
||||
|
||||
```text
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
```
|
||||
|
||||
2. After installation of Homebrew, run the following command to install minicom:
|
||||
|
||||
```text
|
||||
brew install minicom
|
||||
```
|
||||
|
||||
After installation of minicom on your macOS computer, you can connect to the Developer Board to read Flipper Zero logs by doing the following:
|
||||
|
||||
1. Cold-plug the Developer Board into your Flipper Zero by turning off the Flipper Zero, connecting the developer board, and then turning it back on.
|
||||
|
||||
2. On your computer, open the Terminal and run the following command:
|
||||
|
||||
```text
|
||||
ls /dev/cu.*
|
||||
```
|
||||
|
||||
Note the list of devices.
|
||||
|
||||
3. Connect the developer board to your computer using a USB Type-C cable.\
|
||||
![The Developer Board in Wired mode](https://archbee-image-uploads.s3.amazonaws.com/3StCFqarJkJQZV-7N79yY/iPpsMt2-is4aIjiVeFu5t_hjxs2i1oovrnps74v5jgsimage.png)
|
||||
|
||||
4. Rerun the command. Two new devices have to appear: this is the Developer Board.
|
||||
|
||||
```text
|
||||
/dev/cu.usbmodemblackmagic1
|
||||
/dev/cu.usbmodemblackmagic3
|
||||
```
|
||||
|
||||
Your Developer Board might have different names.
|
||||
|
||||
5. Run the following command:
|
||||
|
||||
```text
|
||||
minicom -D /dev/<port> -b 230400
|
||||
```
|
||||
|
||||
Where `<port>` is the name of your device with a bigger number.
|
||||
|
||||
Example:
|
||||
|
||||
```text
|
||||
minicom -D /dev/cu.usbmodemblackmagic3 -b 230400
|
||||
```
|
||||
|
||||
6. View logs of your Flipper Zero in the Terminal.
|
||||
|
||||
7. To quit, close the minicom window or quit via the minicom menu.
|
||||
|
||||
### Linux
|
||||
|
||||
On Linux, you need to install the **minicom** communication program. For example, on Ubuntu, run in the Terminal the following command:
|
||||
|
||||
```text
|
||||
sudo apt install minicom
|
||||
```
|
||||
|
||||
After installation of minicom on your Linux computer, you can connect to the Developer Board to read Flipper Zero logs by doing the following:
|
||||
|
||||
1. Cold-plug the Developer Board into your Flipper Zero by turning off the Flipper Zero, connecting the developer board, and then turning it back on.
|
||||
|
||||
2. On your computer, open the Terminal and run the following command:
|
||||
|
||||
```text
|
||||
ls /dev/tty*
|
||||
```
|
||||
|
||||
Note the list of devices.
|
||||
|
||||
3. Connect the developer board to your computer using a USB Type-C cable.
|
||||
![The Developer Board in Wired mode](https://archbee-image-uploads.s3.amazonaws.com/3StCFqarJkJQZV-7N79yY/iPpsMt2-is4aIjiVeFu5t_hjxs2i1oovrnps74v5jgsimage.png)
|
||||
|
||||
4. Rerun the command. Two new devices have to appear: this is the Developer Board.
|
||||
|
||||
```text
|
||||
/dev/ttyACM0
|
||||
/dev/ttyACM1
|
||||
```
|
||||
|
||||
Your Developer Board might have different names.
|
||||
|
||||
5. Run the following command:
|
||||
|
||||
```text
|
||||
minicom -D /dev/<port> \-b 230400
|
||||
```
|
||||
|
||||
Where `<port>` is the name of your device with a bigger number.
|
||||
|
||||
Example:
|
||||
|
||||
```text
|
||||
minicom -D /dev/ttyACM1 \-b 230400
|
||||
```
|
||||
|
||||
6. View logs of your Flipper Zero in the Terminal.
|
||||
|
||||
> **NOTE:** If no logs are shown in the Terminal, try running the command from Step 5 with another device name.
|
||||
|
||||
7. To quit, close the minicom window or quit via the minicom menu.
|
||||
|
||||
### Windows
|
||||
|
||||
On Windows, do the following:
|
||||
|
||||
1. On your computer, [install the PuTTY application](https://www.chiark.greenend.org.uk/\~sgtatham/putty/latest.html).
|
||||
|
||||
2. Cold-plug the Developer Board into your Flipper Zero by turning off the Flipper Zero, connecting the developer board, and then turning it back on.
|
||||
|
||||
3. Connect the developer board to your computer using a USB Type-C cable.
|
||||
![The Developer Board in Wired mode](https://archbee-image-uploads.s3.amazonaws.com/3StCFqarJkJQZV-7N79yY/iPpsMt2-is4aIjiVeFu5t_hjxs2i1oovrnps74v5jgsimage.png)
|
||||
|
||||
4. Find the serial port that the developer board is connected to by going to **Device Manager -> Ports (COM & LPT)** and looking for a new port that appears when you connect the Wi-Fi developer board.
|
||||
![Go to Device Manager -> Ports (COM & LPT)](https://archbee-image-uploads.s3.amazonaws.com/3StCFqarJkJQZV-7N79yY/KKLQJK1lvqmI5iab3d__C_image.png)
|
||||
|
||||
5. Run the PuTTY application and select **Serial** as the connection type.
|
||||
|
||||
6. Enter the port number you found in the previous step into the **Serial line** field.
|
||||
|
||||
7. Set the **Speed** parameter to **230400** and click **Open**.
|
||||
![Set the required parameters](https://archbee-image-uploads.s3.amazonaws.com/3StCFqarJkJQZV-7N79yY/ROBSJyfQ_CXiy4GUZcPbs_monosnap-miro-2023-07-12-13-56-47.jpg)
|
||||
|
||||
8. View logs of your Flipper Zero in the PuTTY terminal window.
|
||||
|
||||
9. To quit, close the PuTTY window.
|
11
documentation/doxygen/Doxyfile-awesome.cfg
Normal file
11
documentation/doxygen/Doxyfile-awesome.cfg
Normal file
|
@ -0,0 +1,11 @@
|
|||
@INCLUDE = doxygen/Doxyfile.cfg
|
||||
GENERATE_TREEVIEW = YES # required!
|
||||
DISABLE_INDEX = NO
|
||||
FULL_SIDEBAR = NO
|
||||
HTML_EXTRA_STYLESHEET = doxygen/doxygen-awesome-css/doxygen-awesome.css \
|
||||
doxygen/doxygen-awesome-css/doxygen-awesome-sidebar-only.css \
|
||||
doxygen/doxygen-awesome-css/doxygen-awesome-sidebar-only-darkmode-toggle.css
|
||||
HTML_COLORSTYLE = LIGHT # required with Doxygen >= 1.9.5
|
||||
HTML_HEADER = doxygen/header.html
|
||||
HTML_EXTRA_FILES = doxygen/doxygen-awesome-css/doxygen-awesome-darkmode-toggle.js
|
||||
|
|
@ -32,7 +32,7 @@ DOXYFILE_ENCODING = UTF-8
|
|||
# title of most generated pages and in a few other places.
|
||||
# The default value is: My Project.
|
||||
|
||||
PROJECT_NAME = "FlipperZero Firmware"
|
||||
PROJECT_NAME = "Flipper Zero Firmware"
|
||||
|
||||
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
|
||||
# could be handy for archiving the generated documentation or if some version
|
||||
|
@ -51,14 +51,19 @@ PROJECT_BRIEF =
|
|||
# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
|
||||
# the logo to the output directory.
|
||||
|
||||
PROJECT_LOGO =
|
||||
PROJECT_LOGO = doxygen/logo.png
|
||||
|
||||
# With the PROJECT_ICON tag one can specify an icon that is included in the tabs
|
||||
# when the HTML document is shown. Doxygen will copy the logo to the output directory.
|
||||
|
||||
PROJECT_ICON = doxygen/favicon.ico
|
||||
|
||||
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
|
||||
# into which the generated documentation will be written. If a relative path is
|
||||
# entered, it will be relative to the location where doxygen was started. If
|
||||
# left blank the current directory will be used.
|
||||
|
||||
OUTPUT_DIRECTORY = documentation
|
||||
OUTPUT_DIRECTORY = doxygen/build
|
||||
|
||||
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
|
||||
# directories (in 2 levels) under the output directory of each output format and
|
||||
|
@ -150,7 +155,7 @@ INLINE_INHERITED_MEMB = NO
|
|||
# shortest path that makes the file name unique will be used
|
||||
# The default value is: YES.
|
||||
|
||||
FULL_PATH_NAMES = YES
|
||||
FULL_PATH_NAMES = NO
|
||||
|
||||
# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
|
||||
# Stripping is only done if one of the specified strings matches the left-hand
|
||||
|
@ -162,7 +167,7 @@ FULL_PATH_NAMES = YES
|
|||
# will be relative from the directory where doxygen is started.
|
||||
# This tag requires that the tag FULL_PATH_NAMES is set to YES.
|
||||
|
||||
STRIP_FROM_PATH =
|
||||
STRIP_FROM_PATH =
|
||||
|
||||
# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
|
||||
# path mentioned in the documentation of a class, which tells the reader which
|
||||
|
@ -171,7 +176,7 @@ STRIP_FROM_PATH =
|
|||
# specify the list of include paths that are normally passed to the compiler
|
||||
# using the -I flag.
|
||||
|
||||
STRIP_FROM_INC_PATH =
|
||||
STRIP_FROM_INC_PATH =
|
||||
|
||||
# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
|
||||
# less readable) file names. This can be useful is your file systems doesn't
|
||||
|
@ -347,7 +352,7 @@ TOC_INCLUDE_HEADINGS = 5
|
|||
# globally by setting AUTOLINK_SUPPORT to NO.
|
||||
# The default value is: YES.
|
||||
|
||||
AUTOLINK_SUPPORT = YES
|
||||
AUTOLINK_SUPPORT = NO
|
||||
|
||||
# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
|
||||
# to include (a tag file for) the STL sources as input, then you should set this
|
||||
|
@ -463,7 +468,7 @@ LOOKUP_CACHE_SIZE = 0
|
|||
# DOT_NUM_THREADS setting.
|
||||
# Minimum value: 0, maximum value: 32, default value: 1.
|
||||
|
||||
NUM_PROC_THREADS = 1
|
||||
NUM_PROC_THREADS = 4
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Build related configuration options
|
||||
|
@ -748,7 +753,7 @@ SHOW_FILES = YES
|
|||
# Folder Tree View (if specified).
|
||||
# The default value is: YES.
|
||||
|
||||
SHOW_NAMESPACES = YES
|
||||
SHOW_NAMESPACES = NO
|
||||
|
||||
# The FILE_VERSION_FILTER tag can be used to specify a program or script that
|
||||
# doxygen should invoke to get the current version for each file (typically from
|
||||
|
@ -871,10 +876,13 @@ WARN_LOGFILE =
|
|||
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
|
||||
# Note: If this tag is empty the current directory is searched.
|
||||
|
||||
INPUT = applications \
|
||||
lib \
|
||||
firmware \
|
||||
furi
|
||||
INPUT = ../applications \
|
||||
../documentation \
|
||||
../targets \
|
||||
../assets \
|
||||
../lib \
|
||||
../furi \
|
||||
../.vscode \
|
||||
|
||||
# This tag can be used to specify the character encoding of the source files
|
||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
|
||||
|
@ -912,7 +920,9 @@ FILE_PATTERNS = *.c \
|
|||
*.hh \
|
||||
*.hxx \
|
||||
*.hpp \
|
||||
*.h++
|
||||
*.h++ \
|
||||
*.md \
|
||||
*.dox
|
||||
|
||||
# The RECURSIVE tag can be used to specify whether or not subdirectories should
|
||||
# be searched for input files as well.
|
||||
|
@ -928,18 +938,46 @@ RECURSIVE = YES
|
|||
# run.
|
||||
|
||||
EXCLUDE = \
|
||||
lib/mlib \
|
||||
lib/stm32wb_cmsis \
|
||||
lib/stm32wb_copro \
|
||||
lib/stm32wb_hal_driver \
|
||||
lib/littlefs \
|
||||
lib/nanopb \
|
||||
assets/protobuf \
|
||||
lib/libusb_stm32 \
|
||||
lib/FreeRTOS-Kernel \
|
||||
lib/microtar \
|
||||
lib/mbedtls \
|
||||
lib/cxxheaderparser
|
||||
../lib/mlib \
|
||||
../lib/STM32CubeWB \
|
||||
../lib/littlefs \
|
||||
../lib/nanopb \
|
||||
../assets/protobuf \
|
||||
../lib/libusb_stm32 \
|
||||
../lib/FreeRTOS-Kernel \
|
||||
../lib/microtar \
|
||||
../lib/mbedtls \
|
||||
../lib/cxxheaderparser \
|
||||
../lib/ST25RFAL002 \
|
||||
../lib/fatfs \
|
||||
../lib/mlib \
|
||||
../lib/stm32wb_cmsis \
|
||||
../lib/stm32wb_copro \
|
||||
../lib/stm32wb_hal_driver \
|
||||
../lib/stm32wb_hal \
|
||||
../lib/cmsis_core \
|
||||
../targets/f7/fatfs/ \
|
||||
../applications/plugins/dap_link/lib/free-dap \
|
||||
../applications/debug \
|
||||
../applications/main \
|
||||
../applications/settings \
|
||||
../lib/micro-ecc \
|
||||
../lib/ReadMe.md \
|
||||
../lib/callback-connector \
|
||||
../lib/app-scened-template \
|
||||
../applications/ReadMe.md \
|
||||
../targets/ReadMe.md \
|
||||
../web \
|
||||
../assets/protobuf \
|
||||
../lib/libusb_stm32 \
|
||||
../lib/FreeRTOS-Kernel \
|
||||
../lib/microtar \
|
||||
../lib/mbedtls \
|
||||
../lib/cxxheaderparser \
|
||||
../applications/external/dap_link/lib/free-dap \
|
||||
../lib/heatshrink \
|
||||
./doxygen/doxygen-awesome-css
|
||||
|
||||
|
||||
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
|
||||
# directories that are symbolic links (a Unix file system feature) are excluded
|
12
documentation/doxygen/applications.dox
Normal file
12
documentation/doxygen/applications.dox
Normal file
|
@ -0,0 +1,12 @@
|
|||
/**
|
||||
@page applications Application Programming
|
||||
|
||||
Flipper Zero features full support for custom applications which (usually) do not require any changes to the firmware.
|
||||
|
||||
For easy application development, a software tool called [uFBT](https://github.com/flipperdevices/flipperzero-ufbt) is available.
|
||||
|
||||
- @subpage vscode - Flipper Zero integration for VS Code
|
||||
- @subpage apps_on_sd_card - Creating apps that can be dynamically loaded from the SD card
|
||||
- @subpage app_manifests - How applications announce themselves to the system
|
||||
- @subpage app_examples - Various application examples, complete with the source code
|
||||
*/
|
10
documentation/doxygen/dev_board.dox
Normal file
10
documentation/doxygen/dev_board.dox
Normal file
|
@ -0,0 +1,10 @@
|
|||
/**
|
||||
@page dev_board Developer Board
|
||||
|
||||
[ESP32-based development board](https://shop.flipperzero.one/collections/flipper-zero-accessories/products/wifi-devboard).
|
||||
|
||||
- @subpage dev_board_get_started - Quick start for new users
|
||||
- @subpage dev_board_reading_logs - Find out what is currently happening on the system
|
||||
- @subpage dev_board_fw_update - Keep the developer board up to date
|
||||
|
||||
*/
|
9
documentation/doxygen/dev_tools.dox
Normal file
9
documentation/doxygen/dev_tools.dox
Normal file
|
@ -0,0 +1,9 @@
|
|||
/**
|
||||
@page dev_tools Developer Tools
|
||||
|
||||
Hardware and software tools for all kinds of programming.
|
||||
|
||||
- @subpage fbt - Official build and deployment tool for Flipper Zero
|
||||
- @subpage dev_board - ESP32-based development board
|
||||
- @subpage ota_updates - Standalone firmware self-update mechanism
|
||||
*/
|
1
documentation/doxygen/doxygen-awesome-css
Submodule
1
documentation/doxygen/doxygen-awesome-css
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit df88fe4fdd97714fadfd3ef17de0b4401f804052
|
10
documentation/doxygen/examples.dox
Normal file
10
documentation/doxygen/examples.dox
Normal file
|
@ -0,0 +1,10 @@
|
|||
/**
|
||||
@page app_examples Application Examples
|
||||
|
||||
A collection of examples covering various aspects of application programming for Flipper Zero.
|
||||
|
||||
- @subpage example_app_images - Using images and icons in an application
|
||||
- @subpage example_app_assets - Using application-specific asset folders
|
||||
- @subpage example_app_data - Using application-specific data folders
|
||||
- @subpage example_thermo - Reading data from a 1-Wire thermometer
|
||||
*/
|
8
documentation/doxygen/expansion_modules.dox
Normal file
8
documentation/doxygen/expansion_modules.dox
Normal file
|
@ -0,0 +1,8 @@
|
|||
/**
|
||||
@page expansion Expansion Modules
|
||||
|
||||
Expansion modules are special pieces of hardware designed to interface with Flipper's GPIO connector, such as the [Video Game Module](https://shop.flipperzero.one/collections/flipper-zero-accessories/products/video-game-module-for-flipper-zero).
|
||||
|
||||
- @subpage expansion_protocol - Transport protocol for smart expansion modules
|
||||
|
||||
*/
|
BIN
documentation/doxygen/favicon.ico
Normal file
BIN
documentation/doxygen/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.7 KiB |
13
documentation/doxygen/file_formats.dox
Normal file
13
documentation/doxygen/file_formats.dox
Normal file
|
@ -0,0 +1,13 @@
|
|||
/**
|
||||
@page file_formats File Formats
|
||||
|
||||
Descriptions of various file formats used in Flipper Zero, grouped by applications that use them.
|
||||
|
||||
- @subpage badusb_file_format
|
||||
- @subpage ibutton_file_format
|
||||
- @subpage infrared_file_format
|
||||
- @subpage lfrfid_file_format
|
||||
- @subpage nfc_file_format
|
||||
- @subpage subghz_file_format
|
||||
|
||||
*/
|
84
documentation/doxygen/header.html
Normal file
84
documentation/doxygen/header.html
Normal file
|
@ -0,0 +1,84 @@
|
|||
<!-- HTML header for doxygen 1.10.0-->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="$langISO">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen $doxygenversion"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->
|
||||
<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->
|
||||
<!--BEGIN PROJECT_ICON-->
|
||||
<link rel="icon" href="$relpath^$projecticon" type="image/x-icon" />
|
||||
<!--END PROJECT_ICON-->
|
||||
<link href="$relpath^tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<!--BEGIN DISABLE_INDEX-->
|
||||
<!--BEGIN FULL_SIDEBAR-->
|
||||
<script type="text/javascript">var page_layout=1;</script>
|
||||
<!--END FULL_SIDEBAR-->
|
||||
<!--END DISABLE_INDEX-->
|
||||
<script type="text/javascript" src="$relpath^jquery.js"></script>
|
||||
<script type="text/javascript" src="$relpath^dynsections.js"></script>
|
||||
<!--BEGIN COPY_CLIPBOARD-->
|
||||
<script type="text/javascript" src="$relpath^clipboard.js"></script>
|
||||
<!--END COPY_CLIPBOARD-->
|
||||
$treeview
|
||||
$search
|
||||
$mathjax
|
||||
$darkmode
|
||||
<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css" />
|
||||
$extrastylesheet
|
||||
<script type="text/javascript" src="$relpath^doxygen-awesome-darkmode-toggle.js"></script>
|
||||
<script type="text/javascript">
|
||||
DoxygenAwesomeDarkModeToggle.init()
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<!--BEGIN DISABLE_INDEX-->
|
||||
<!--BEGIN FULL_SIDEBAR-->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<!--END FULL_SIDEBAR-->
|
||||
<!--END DISABLE_INDEX-->
|
||||
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
|
||||
<!--BEGIN TITLEAREA-->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr id="projectrow">
|
||||
<!--BEGIN PROJECT_LOGO-->
|
||||
<td id="projectlogo"><img alt="Logo" src="$relpath^$projectlogo"$logosize/></td>
|
||||
<!--END PROJECT_LOGO-->
|
||||
<!--BEGIN PROJECT_NAME-->
|
||||
<td id="projectalign">
|
||||
<div id="projectname">$projectname<!--BEGIN PROJECT_NUMBER--><span id="projectnumber"> $projectnumber</span><!--END PROJECT_NUMBER-->
|
||||
</div>
|
||||
<!--BEGIN PROJECT_BRIEF--><div id="projectbrief">$projectbrief</div><!--END PROJECT_BRIEF-->
|
||||
</td>
|
||||
<!--END PROJECT_NAME-->
|
||||
<!--BEGIN !PROJECT_NAME-->
|
||||
<!--BEGIN PROJECT_BRIEF-->
|
||||
<td>
|
||||
<div id="projectbrief">$projectbrief</div>
|
||||
</td>
|
||||
<!--END PROJECT_BRIEF-->
|
||||
<!--END !PROJECT_NAME-->
|
||||
<!--BEGIN DISABLE_INDEX-->
|
||||
<!--BEGIN SEARCHENGINE-->
|
||||
<!--BEGIN !FULL_SIDEBAR-->
|
||||
<td>$searchbox</td>
|
||||
<!--END !FULL_SIDEBAR-->
|
||||
<!--END SEARCHENGINE-->
|
||||
<!--END DISABLE_INDEX-->
|
||||
</tr>
|
||||
<!--BEGIN SEARCHENGINE-->
|
||||
<!--BEGIN FULL_SIDEBAR-->
|
||||
<tr><td colspan="2">$searchbox</td></tr>
|
||||
<!--END FULL_SIDEBAR-->
|
||||
<!--END SEARCHENGINE-->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!--END TITLEAREA-->
|
||||
<!-- end header part -->
|
25
documentation/doxygen/index.dox
Normal file
25
documentation/doxygen/index.dox
Normal file
|
@ -0,0 +1,25 @@
|
|||
/**
|
||||
@mainpage Overview
|
||||
|
||||
Welcome to the Flipper Zero Firmware Developer Documentation!
|
||||
|
||||
This documentation is intended for developers who want to modify the firmware of the Flipper Zero.
|
||||
|
||||
If you are looking for the user manual, please visit the [User Documentation](https://docs.flipperzero.one/) instead.
|
||||
|
||||
The documentation is divided into several sections, with all of them accessible from the sidebar on the left:
|
||||
|
||||
- @ref applications - Writing applications for Flipper Zero
|
||||
- @ref system - Understanding the firmware's internals
|
||||
- @ref file_formats - Saving and loading data to and from files
|
||||
- @ref dev_tools - Hardware and software tools for all kinds of programming
|
||||
- @ref expansion - Additional modules to expand Flipper's consciousness
|
||||
- @ref misc - Various useful pieces of information
|
||||
|
||||
Aside from the manually-written documentation files, there's also a few automatically-generated ones at the bottom of the sidebar:
|
||||
|
||||
- [Data Structures](annotated.html) - Every data structure in a list
|
||||
- [Files](files.html) - Source file tree with easy navigation
|
||||
|
||||
These are generated from the source code and are useful for quickly finding the source code or API documentation for a particular function or data structure.
|
||||
*/
|
BIN
documentation/doxygen/logo.png
Normal file
BIN
documentation/doxygen/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 873 B |
9
documentation/doxygen/misc.dox
Normal file
9
documentation/doxygen/misc.dox
Normal file
|
@ -0,0 +1,9 @@
|
|||
/**
|
||||
@page misc Miscellaneous
|
||||
|
||||
Various pieces of information that do not fall into other categories.
|
||||
|
||||
- @subpage lfrfid_raw - Collecting raw data from LFRFID tags
|
||||
- @subpage key_combos - Different key combination shortcuts for Flipper Zero
|
||||
- @subpage universal_remotes - Creating and improving IR universal remote libraries
|
||||
*/
|
13
documentation/doxygen/system.dox
Normal file
13
documentation/doxygen/system.dox
Normal file
|
@ -0,0 +1,13 @@
|
|||
/**
|
||||
@page system System Programming
|
||||
|
||||
Lower level aspects of software development for Flipper Zero.
|
||||
|
||||
- @subpage unit_tests - Automated testing, a crucial part of the development process
|
||||
- @subpage furi_check - Hard checks for exceptional situations
|
||||
- @subpage furi_hal_bus - Access the on-chip peripherals in a safe way
|
||||
- @subpage furi_hal_debugging - Low level debugging features
|
||||
- @subpage hardware_targets - Support for different hardware platforms
|
||||
- @subpage firmware_assets - Various files required for building the firmware
|
||||
- @subpage dolphin_assets - Animations for the Dolphin game
|
||||
*/
|
|
@ -1,4 +1,4 @@
|
|||
# Flipper Build Tool
|
||||
# Flipper Build Tool {#fbt}
|
||||
|
||||
FBT is the entry point for firmware-related commands and utilities.
|
||||
It is invoked by `./fbt` in the firmware project root directory. Internally, it is a wrapper around [scons](https://scons.org/) build system.
|
||||
|
@ -58,7 +58,7 @@ To use language servers other than the default VS Code C/C++ language server, us
|
|||
|
||||
## FBT targets
|
||||
|
||||
**`fbt`** keeps track of internal dependencies, so you only need to build the highest-level target you need, and **`fbt`** will make sure everything they depend on is up-to-date.
|
||||
`fbt` keeps track of internal dependencies, so you only need to build the highest-level target you need, and `fbt` will make sure everything they depend on is up-to-date.
|
||||
|
||||
### High-level (what you most likely need)
|
||||
|
||||
|
@ -83,8 +83,8 @@ To use language servers other than the default VS Code C/C++ language server, us
|
|||
|
||||
### Firmware targets
|
||||
|
||||
- `faps` - build all external & plugin apps as [`.faps`](./AppsOnSDCard.md#fap-flipper-application-package).
|
||||
- **`fbt`** also defines per-app targets. For example, for an app with `appid=snake_game` target names are:
|
||||
- `faps` - build all external & plugin apps as [`.faps`](AppsOnSDCard.md).
|
||||
- `fbt` also defines per-app targets. For example, for an app with `appid=snake_game` target names are:
|
||||
- `fap_snake_game`, etc. - build single app as `.fap` by its application ID.
|
||||
- Check out [`--extra-ext-apps`](#command-line-parameters) for force adding extra apps to external build.
|
||||
- `fap_snake_game_list`, etc - generate source + assembler listing for app's `.fap`.
|
||||
|
@ -103,7 +103,7 @@ To use language servers other than the default VS Code C/C++ language server, us
|
|||
- `proto_ver` - generate `.h` with a protobuf version
|
||||
- `dolphin_internal`, `dolphin_blocking` - generate `.c+.h` for corresponding dolphin assets
|
||||
|
||||
## Command-line parameters
|
||||
## Command-line parameters {#command-line-parameters}
|
||||
|
||||
- `--options optionfile.py` (default value `fbt_options.py`) - load a file with multiple configuration values
|
||||
- `--extra-int-apps=app1,app2,appN` - force listed apps to be built as internal with the `firmware` target
|
||||
|
|
|
@ -1,21 +1,23 @@
|
|||
# Command syntax
|
||||
# BadUSB File Format {#badusb_file_format}
|
||||
|
||||
## Command syntax
|
||||
|
||||
BadUsb app uses extended Duckyscript syntax. It is compatible with classic USB Rubber Ducky 1.0 scripts but provides some additional commands and features, such as custom USB ID, ALT+Numpad input method, SYSRQ command, and more functional keys.
|
||||
|
||||
# Script file format
|
||||
## Script file format
|
||||
|
||||
BadUsb app can execute only text scripts from `.txt` files, no compilation is required. Both `\n` and `\r\n` line endings are supported. Empty lines are allowed. You can use spaces or tabs for line indentation.
|
||||
|
||||
# Command set
|
||||
## Command set
|
||||
|
||||
## Comment line
|
||||
### Comment line
|
||||
|
||||
Just a single comment line. The interpreter will ignore all text after the REM command.
|
||||
| Command | Parameters | Notes |
|
||||
| ------- | ------------ | ----- |
|
||||
| REM | Comment text | |
|
||||
|
||||
## Delay
|
||||
### Delay
|
||||
|
||||
Pause script execution by a defined time.
|
||||
| Command | Parameters | Notes |
|
||||
|
@ -24,7 +26,7 @@ Pause script execution by a defined time.
|
|||
| DEFAULT_DELAY | Delay value in ms | Add delay before every next command |
|
||||
| DEFAULTDELAY | Delay value in ms | Same as DEFAULT_DELAY |
|
||||
|
||||
## Special keys
|
||||
### Special keys
|
||||
|
||||
| Command | Notes |
|
||||
| ------------------ | ---------------- |
|
||||
|
@ -53,7 +55,7 @@ Pause script execution by a defined time.
|
|||
| APP | Same as MENU |
|
||||
| Fx | F1-F12 keys |
|
||||
|
||||
## Modifier keys
|
||||
### Modifier keys
|
||||
|
||||
Can be combined with a special key command or a single character.
|
||||
| Command | Notes |
|
||||
|
@ -85,7 +87,7 @@ Will wait indefinitely for a button to be pressed
|
|||
| WAIT_FOR_BUTTON_PRESS | None | Will wait for the user to press a button to continue script execution |
|
||||
|
||||
|
||||
## String
|
||||
### String
|
||||
|
||||
| Command | Parameters | Notes |
|
||||
| ------- | ----------- | ----------------- |
|
||||
|
@ -100,13 +102,13 @@ Delay between keypresses.
|
|||
| STRING_DELAY | Delay value in ms | Applied once to next appearing STRING command |
|
||||
| STRINGDELAY | Delay value in ms | Same as STRING_DELAY |
|
||||
|
||||
## Repeat
|
||||
### Repeat
|
||||
|
||||
| Command | Parameters | Notes |
|
||||
| ------- | ---------------------------- | ----------------------- |
|
||||
| REPEAT | Number of additional repeats | Repeat previous command |
|
||||
|
||||
## ALT+Numpad input
|
||||
### ALT+Numpad input
|
||||
|
||||
On Windows and some Linux systems, you can print characters by holding `ALT` key and entering its code on Numpad.
|
||||
| Command | Parameters | Notes |
|
||||
|
@ -115,14 +117,14 @@ On Windows and some Linux systems, you can print characters by holding `ALT` key
|
|||
| ALTSTRING | Text string | Print text string using ALT+Numpad method |
|
||||
| ALTCODE | Text string | Same as ALTSTRING, presents in some Duckyscript implementations |
|
||||
|
||||
## SysRq
|
||||
### SysRq
|
||||
|
||||
Send [SysRq command](https://en.wikipedia.org/wiki/Magic_SysRq_key)
|
||||
| Command | Parameters | Notes |
|
||||
| ------- | ---------------- | ----- |
|
||||
| SYSRQ | Single character | |
|
||||
|
||||
## USB device ID
|
||||
### USB device ID
|
||||
|
||||
You can set the custom ID of the Flipper USB HID device. ID command should be in the **first line** of script, it is executed before script run.
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Infrared Flipper File Formats
|
||||
# Infrared Flipper File Formats {#infrared_file_format}
|
||||
|
||||
## Supported protocols list for "type: parsed"
|
||||
|
||||
## Supported protocols list for `type: parsed`
|
||||
```
|
||||
NEC
|
||||
NECext
|
||||
|
@ -17,6 +17,7 @@
|
|||
Kaseikyo
|
||||
RCA
|
||||
```
|
||||
|
||||
## Infrared Remote File Format
|
||||
|
||||
### Example
|
||||
|
@ -51,7 +52,7 @@ Each button is separated from others by a comment character (`#`) for better rea
|
|||
|
||||
Known protocols are represented in the `parsed` form, whereas non-recognized signals may be saved and re-transmitted as `raw` data.
|
||||
|
||||
#### Version history:
|
||||
#### Version history
|
||||
|
||||
1. Initial version.
|
||||
|
||||
|
@ -72,19 +73,19 @@ Known protocols are represented in the `parsed` form, whereas non-recognized sig
|
|||
|
||||
### Examples
|
||||
|
||||
- [TV Universal Library](/applications/main/infrared/resources/infrared/assets/tv.ir)
|
||||
- [A/C Universal Library](/applications/main/infrared/resources/infrared/assets/ac.ir)
|
||||
- [Audio Universal Library](/applications/main/infrared/resources/infrared/assets/audio.ir)
|
||||
- [TV Universal Library](https://github.com/flipperdevices/flipperzero-firmware/blob/dev/applications/main/infrared/resources/infrared/assets/tv.ir)
|
||||
- [A/C Universal Library](https://github.com/flipperdevices/flipperzero-firmware/blob/dev/applications/main/infrared/resources/infrared/assets/ac.ir)
|
||||
- [Audio Universal Library](https://github.com/flipperdevices/flipperzero-firmware/blob/dev/applications/main/infrared/resources/infrared/assets/audio.ir)
|
||||
|
||||
### Description
|
||||
|
||||
Filename extension: `.ir`
|
||||
|
||||
This file format is used to store universal remote libraries. It is identical to the previous format, differing only in the `Filetype` field.\
|
||||
This file format is used to store universal remote libraries. It is identical to the previous format, differing only in the `Filetype` field.
|
||||
It also has predefined button names for each universal library type, so that the universal remote application can understand them.
|
||||
See [Universal Remotes](/documentation/UniversalRemotes.md) for more information.
|
||||
See [Universal Remotes](../UniversalRemotes.md) for more information.
|
||||
|
||||
### Version history:
|
||||
### Version history
|
||||
|
||||
1. Initial version.
|
||||
|
||||
|
@ -92,7 +93,7 @@ See [Universal Remotes](/documentation/UniversalRemotes.md) for more information
|
|||
|
||||
### Examples
|
||||
|
||||
See [Infrared Unit Tests](/applications/debug/unit_tests/resources/unit_tests/infrared/) for various examples.
|
||||
See [Infrared Unit Tests](https://github.com/flipperdevices/flipperzero-firmware/tree/dev/applications/debug/unit_tests/resources/unit_tests/infrared) for various examples.
|
||||
|
||||
### Description
|
||||
|
||||
|
@ -103,10 +104,10 @@ It is mostly similar to the two previous formats, with the main difference being
|
|||
|
||||
Each infrared protocol must have corresponding unit tests complete with an `.irtest` file.
|
||||
|
||||
Known protocols are represented in the `parsed_array` form, whereas raw data has the `raw` type.\
|
||||
Known protocols are represented in the `parsed_array` form, whereas raw data has the `raw` type.
|
||||
Note: a single parsed signal must be represented as an array of size 1.
|
||||
|
||||
### Version history:
|
||||
### Version history
|
||||
|
||||
1. Initial version.
|
||||
|
||||
|
@ -141,4 +142,4 @@ and the number is a sequential integer: 1, 2, 3, etc., which produces names like
|
|||
| decoder_expected | parsed_array | An array of parsed signals containing the expected decoder output. Also used as the encoder input. |
|
||||
| encoder_decoder_input | parsed_array | An array of parsed signals containing both the encoder-decoder input and expected output. |
|
||||
|
||||
See [Unit Tests](/documentation/UnitTests.md#infrared) for more info.
|
||||
See [Unit Tests](../UnitTests.md) for more info.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# LF RFID key file format
|
||||
# LF RFID key file format {#lfrfid_file_format}
|
||||
|
||||
## Example
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# NFC Flipper File Formats
|
||||
# NFC Flipper File Formats {#nfc_file_format}
|
||||
|
||||
## UID + Header (General format)
|
||||
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
# File Formats for Flipper's SubGhz Subsystem
|
||||
# SubGhz Subsystem File Formats {#subghz_file_format}
|
||||
|
||||
## `.sub` File Format
|
||||
## .sub File Format
|
||||
|
||||
Flipper uses `.sub` files to store SubGhz transmissions. These are text files in Flipper File Format. `.sub` files can contain either a SubGhz Key with a certain protocol or SubGhz RAW data.
|
||||
Flipper uses `.sub` files to store SubGhz signals. These files use the Flipper File Format. `.sub` files can contain either a SubGhz Key with a certain protocol or SubGhz RAW data.
|
||||
|
||||
A `.sub` files consist of 3 parts:
|
||||
A `.sub` file consist of 3 parts:
|
||||
|
||||
- **header**, contains file type, version, and frequency
|
||||
- **header**, contains the file type, version, and frequency
|
||||
- **preset information**, preset type and, in case of a custom preset, transceiver configuration data
|
||||
- **protocol and its data**, contains protocol name and its specific data, such as key, bit length, etc., or RAW data
|
||||
|
||||
Flipper's SubGhz subsystem uses presets to configure the radio transceiver. Presets are used to configure modulation, bandwidth, filters, etc. There are several presets available in stock firmware, and there is a way to create custom presets. See [SubGhz Presets](#adding-a-custom-preset) for more details.
|
||||
Flipper's SubGhz subsystem uses presets to configure the radio transceiver. Presets are used to configure modulation, bandwidth, filters, etc. There are several presets available in stock firmware, and there is a way to create custom presets. See [SubGhz Presets](#adding-a-custom-preset) section for more details.
|
||||
|
||||
## Header format
|
||||
|
||||
Header is a mandatory part of `.sub` file. It contains file type, version, and frequency.
|
||||
Header is a mandatory part of a `.sub` file. It contains the file type, version, and frequency.
|
||||
|
||||
| Field | Type | Description |
|
||||
| ----------- | ------ | ----------------------------------------------------------------- |
|
||||
|
@ -41,7 +41,7 @@ Built-in presets:
|
|||
- `FuriHalSubGhzPreset2FSKDev238Async` — 2 Frequency Shift Keying, deviation 2kHz, 270kHz bandwidth, async(IO throw GP0)
|
||||
- `FuriHalSubGhzPreset2FSKDev476Async` — 2 Frequency Shift Keying, deviation 47kHz, 270kHz bandwidth, async(IO throw GP0)
|
||||
|
||||
### Transceiver Configuration Data
|
||||
### Transceiver Configuration Data {#transceiver-configuration-data}
|
||||
|
||||
Transceiver configuration data is a string of bytes, encoded in hex format, separated by spaces. For CC1101 data structure is: `XX YY XX YY .. 00 00 ZZ ZZ ZZ ZZ ZZ ZZ ZZ ZZ`, where:
|
||||
|
||||
|
@ -54,7 +54,7 @@ You can find more details in the [CC1101 datasheet](https://www.ti.com/lit/ds/sy
|
|||
|
||||
## File Data
|
||||
|
||||
`.sub` file data section contains either key data — protocol name and its specific data, bit length, etc., or RAW data — an array of signal timings, recorded without any protocol-specific processing.
|
||||
`.sub` file data section can either contain key data, consisting of a protocol name and its specific data, bit length, etc., or RAW data, which consists of an array of signal timings, recorded without any protocol-specific processing.
|
||||
|
||||
### Key Files
|
||||
|
||||
|
@ -88,20 +88,20 @@ RAW `.sub` files contain raw signal data that is not processed through protocol-
|
|||
For RAW files, 2 fields are required:
|
||||
|
||||
- **Protocol**, must be `RAW`
|
||||
- **RAW_Data**, contains an array of timings, specified in microseconds Values must be non-zero, start with a positive number, and interleaved (change sign with each value). Up to 512 values per line. Can be specified multiple times to store multiple lines of data.
|
||||
- **RAW_Data**, contains an array of timings, specified in microseconds. Values must be non-zero, start with a positive number, and interleaved (change sign with each value). Up to 512 values per line. Can be specified multiple times to store multiple lines of data.
|
||||
|
||||
Example of RAW data:
|
||||
|
||||
Protocol: RAW
|
||||
RAW_Data: 29262 361 -68 2635 -66 24113 -66 11 ...
|
||||
|
||||
Long payload not fitting into internal memory buffer and consisting of short duration timings (< 10us) may not be read fast enough from the SD card. That might cause the signal transmission to stop before reaching the end of the payload. Ensure that your SD Card has good performance before transmitting long or complex RAW payloads.
|
||||
A long payload that doesn't fit into the internal memory buffer and consists of short duration timings (< 10us) may not be read fast enough from the SD card. That might cause the signal transmission to stop before reaching the end of the payload. Ensure that your SD Card has good performance before transmitting long or complex RAW payloads.
|
||||
|
||||
### BIN_RAW Files
|
||||
|
||||
BinRAW `.sub` files and `RAW` files both contain data that has not been decoded by any protocol. However, unlike `RAW`, `BinRAW` files only record a useful repeating sequence of durations with a restored byte transfer rate and without broadcast noise. These files can emulate nearly all static protocols, whether Flipper knows them or not.
|
||||
|
||||
- Usually, you have to receive the signal a little longer so that Flipper accumulates sufficient data for correct analysis.
|
||||
- Usually, you have to receive the signal a little longer so that Flipper accumulates sufficient data to analyze it correctly.
|
||||
|
||||
For `BinRAW` files, the following parameters are required and must be aligned to the left:
|
||||
|
||||
|
@ -188,7 +188,7 @@ Data_RAW: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 DE 02 D3 54 D5 4C D2 C
|
|||
|
||||
SubGhz application provides support for adding extra radio presets and additional keys for decoding transmissions in certain protocols.
|
||||
|
||||
## SubGhz `keeloq_mfcodes_user` file
|
||||
## SubGhz keeloq_mfcodes_user file
|
||||
|
||||
This file contains additional manufacturer keys for Keeloq protocol. It is used to decode Keeloq transmissions.
|
||||
This file is loaded at subghz application start and is located at path `/ext/subghz/assets/keeloq_mfcodes_user`.
|
||||
|
@ -228,7 +228,7 @@ For each key, a name and encryption method must be specified, according to comme
|
|||
AABBCCDDEEFFAABB:1:Test1
|
||||
AABBCCDDEEFFAABB:1:Test2
|
||||
|
||||
## SubGhz `setting_user` file
|
||||
## SubGhz setting_user file
|
||||
|
||||
This file contains additional radio presets and frequencies for SubGhz application. It is used to add new presets and frequencies for existing presets. This file is being loaded on subghz application start and is located at path `/ext/subghz/assets/setting_user`.
|
||||
|
||||
|
@ -256,7 +256,7 @@ Header must contain the following fields:
|
|||
|
||||
Repeating the same frequency will cause Flipper to listen to this frequency more often.
|
||||
|
||||
#### Adding a Custom Preset
|
||||
#### Adding a Custom Preset {#adding-a-custom-preset}
|
||||
|
||||
You can have as many presets as you want. Presets are embedded into `.sub` files, so another Flipper can load them directly from that file.
|
||||
Each preset is defined by the following fields:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# iButton key file format
|
||||
# iButton key file format {#ibutton_file_format}
|
||||
|
||||
## Example
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ FURI_NORETURN void __furi_halt_implementation();
|
|||
|
||||
/** Crash system
|
||||
*
|
||||
* @param optional message (const char*)
|
||||
* @param ... optional message (const char*)
|
||||
*/
|
||||
#define furi_crash(...) M_APPLY(__furi_crash, M_IF_EMPTY(__VA_ARGS__)((NULL), (__VA_ARGS__)))
|
||||
|
||||
|
@ -57,7 +57,7 @@ FURI_NORETURN void __furi_halt_implementation();
|
|||
|
||||
/** Halt system
|
||||
*
|
||||
* @param optional message (const char*)
|
||||
* @param ... optional message (const char*)
|
||||
*/
|
||||
#define furi_halt(...) M_APPLY(__furi_halt, M_IF_EMPTY(__VA_ARGS__)((NULL), (__VA_ARGS__)))
|
||||
|
||||
|
@ -71,8 +71,7 @@ FURI_NORETURN void __furi_halt_implementation();
|
|||
|
||||
/** Check condition and crash if failed
|
||||
*
|
||||
* @param condition to check
|
||||
* @param optional message (const char*)
|
||||
* @param ... condition to check and optional message (const char*)
|
||||
*/
|
||||
#define furi_check(...) \
|
||||
M_APPLY(__furi_check, M_DEFAULT_ARGS(2, (__FURI_CHECK_MESSAGE_FLAG), __VA_ARGS__))
|
||||
|
@ -97,8 +96,7 @@ FURI_NORETURN void __furi_halt_implementation();
|
|||
*
|
||||
* @warning only will do check if firmware compiled in debug mode
|
||||
*
|
||||
* @param condition to check
|
||||
* @param optional message (const char*)
|
||||
* @param ... condition to check and optional message (const char*)
|
||||
*/
|
||||
#define furi_assert(...) \
|
||||
M_APPLY(__furi_assert, M_DEFAULT_ARGS(2, (__FURI_ASSERT_MESSAGE_FLAG), __VA_ARGS__))
|
||||
|
|
|
@ -79,7 +79,7 @@ void furi_delay_tick(uint32_t ticks);
|
|||
*
|
||||
* @warning This should never be called in interrupt request context.
|
||||
*
|
||||
* @param[in] ticks The tick until which kerel should delay task execution
|
||||
* @param[in] tick The tick until which kerel should delay task execution
|
||||
*
|
||||
* @return The furi status.
|
||||
*/
|
||||
|
|
|
@ -51,7 +51,7 @@ void furi_log_init(void);
|
|||
|
||||
/** Add log TX callback
|
||||
*
|
||||
* @param[in] callback The callback
|
||||
* @param[in] handler The callback and its context
|
||||
*
|
||||
* @return true on success, false otherwise
|
||||
*/
|
||||
|
@ -59,7 +59,7 @@ bool furi_log_add_handler(FuriLogHandler handler);
|
|||
|
||||
/** Remove log TX callback
|
||||
*
|
||||
* @param[in] callback The callback
|
||||
* @param[in] handler The callback and its context
|
||||
*
|
||||
* @return true on success, false otherwise
|
||||
*/
|
||||
|
@ -112,15 +112,16 @@ FuriLogLevel furi_log_get_level(void);
|
|||
/** Log level to string
|
||||
*
|
||||
* @param[in] level The level
|
||||
* @param[out] str String representation of the level
|
||||
*
|
||||
* @return The string
|
||||
* @return True if success, False otherwise
|
||||
*/
|
||||
bool furi_log_level_to_string(FuriLogLevel level, const char** str);
|
||||
|
||||
/** Log level from string
|
||||
*
|
||||
* @param[in] str The string
|
||||
* @param level The level
|
||||
* @param[out] level The level
|
||||
*
|
||||
* @return True if success, False otherwise
|
||||
*/
|
||||
|
|
|
@ -18,13 +18,13 @@ extern "C" {
|
|||
*
|
||||
* @param thread_id - thread id to track
|
||||
*/
|
||||
void memmgr_heap_enable_thread_trace(FuriThreadId taks_handle);
|
||||
void memmgr_heap_enable_thread_trace(FuriThreadId thread_id);
|
||||
|
||||
/** Memmgr heap disable thread allocation tracking
|
||||
*
|
||||
* @param thread_id - thread id to track
|
||||
*/
|
||||
void memmgr_heap_disable_thread_trace(FuriThreadId taks_handle);
|
||||
void memmgr_heap_disable_thread_trace(FuriThreadId thread_id);
|
||||
|
||||
/** Memmgr heap get allocatred thread memory
|
||||
*
|
||||
|
@ -32,7 +32,7 @@ void memmgr_heap_disable_thread_trace(FuriThreadId taks_handle);
|
|||
*
|
||||
* @return bytes allocated right now
|
||||
*/
|
||||
size_t memmgr_heap_get_thread_memory(FuriThreadId taks_handle);
|
||||
size_t memmgr_heap_get_thread_memory(FuriThreadId thread_id);
|
||||
|
||||
/** Memmgr heap get the max contiguous block size on the heap
|
||||
*
|
||||
|
|
|
@ -32,7 +32,6 @@ void furi_message_queue_free(FuriMessageQueue* instance);
|
|||
* @param instance pointer to FuriMessageQueue instance
|
||||
* @param[in] msg_ptr The message pointer
|
||||
* @param[in] timeout The timeout
|
||||
* @param[in] msg_prio The message prio
|
||||
*
|
||||
* @return The furi status.
|
||||
*/
|
||||
|
@ -43,7 +42,6 @@ FuriStatus
|
|||
*
|
||||
* @param instance pointer to FuriMessageQueue instance
|
||||
* @param msg_ptr The message pointer
|
||||
* @param msg_prio The message prioority
|
||||
* @param[in] timeout The timeout
|
||||
*
|
||||
* @return The furi status.
|
||||
|
|
|
@ -102,7 +102,7 @@ void furi_string_reserve(FuriString* string, size_t size);
|
|||
/**
|
||||
* @brief Reset string.
|
||||
* Make the string empty.
|
||||
* @param s
|
||||
* @param string
|
||||
*/
|
||||
void furi_string_reset(FuriString* string);
|
||||
|
||||
|
|
|
@ -235,8 +235,6 @@ int32_t furi_thread_get_return_code(FuriThread* thread);
|
|||
/** Thread related methods that doesn't involve FuriThread directly */
|
||||
|
||||
/** Get FreeRTOS FuriThreadId for current thread
|
||||
*
|
||||
* @param thread FuriThread instance
|
||||
*
|
||||
* @return FuriThreadId or NULL
|
||||
*/
|
||||
|
@ -263,7 +261,7 @@ uint32_t furi_thread_flags_wait(uint32_t flags, uint32_t options, uint32_t timeo
|
|||
* @brief Enumerate threads
|
||||
*
|
||||
* @param thread_array array of FuriThreadId, where thread ids will be stored
|
||||
* @param array_items array size
|
||||
* @param array_item_count array size
|
||||
* @return uint32_t threads count
|
||||
*/
|
||||
uint32_t furi_thread_enumerate(FuriThreadId* thread_array, uint32_t array_item_count);
|
||||
|
|
|
@ -98,8 +98,7 @@ bool elf_file_is_init_complete(ELFFile* elf);
|
|||
/**
|
||||
* @brief Get actual entry point for ELF file
|
||||
* @param elf_file
|
||||
* @param args
|
||||
* @return int32_t
|
||||
* @return void*
|
||||
*/
|
||||
void* elf_file_get_entry_point(ELFFile* elf_file);
|
||||
|
||||
|
@ -148,4 +147,4 @@ ElfProcessSectionResult elf_process_section(
|
|||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -170,7 +170,7 @@ void nfc_set_fdt_listen_fc(Nfc* instance, uint32_t fdt_listen_fc);
|
|||
* @brief Set mask receive time.
|
||||
*
|
||||
* @param[in,out] instance pointer to the instance to be modified.
|
||||
* @param[in] mask_rx_time mask receive time, in carrier cycles.
|
||||
* @param[in] mask_rx_time_fc mask receive time, in carrier cycles.
|
||||
*/
|
||||
void nfc_set_mask_receive_time_fc(Nfc* instance, uint32_t mask_rx_time_fc);
|
||||
|
||||
|
|
|
@ -72,14 +72,14 @@ NfcScanner* nfc_scanner_alloc(Nfc* nfc);
|
|||
/**
|
||||
* @brief Delete an NfcScanner instance.
|
||||
*
|
||||
* @param[in,out] pointer to the instance to be deleted.
|
||||
* @param[in,out] instance pointer to the instance to be deleted.
|
||||
*/
|
||||
void nfc_scanner_free(NfcScanner* instance);
|
||||
|
||||
/**
|
||||
* @brief Start an NfcScanner.
|
||||
*
|
||||
* @param[in,out] pointer to the instance to be started.
|
||||
* @param[in,out] instance pointer to the instance to be started.
|
||||
* @param[in] callback pointer to the callback function (will be called upon a detection event).
|
||||
* @param[in] context pointer to the caller-specific context (will be passed to the callback).
|
||||
*/
|
||||
|
@ -88,7 +88,7 @@ void nfc_scanner_start(NfcScanner* instance, NfcScannerCallback callback, void*
|
|||
/**
|
||||
* @brief Stop an NfcScanner.
|
||||
*
|
||||
* @param[in,out] pointer to the instance to be stopped.
|
||||
* @param[in,out] instance pointer to the instance to be stopped.
|
||||
*/
|
||||
void nfc_scanner_stop(NfcScanner* instance);
|
||||
|
||||
|
|
|
@ -199,7 +199,7 @@ FuriHalRtcHeapTrackMode furi_hal_rtc_get_heap_track_mode(void);
|
|||
|
||||
/** Set locale units
|
||||
*
|
||||
* @param[in] mode The RTC Locale Units
|
||||
* @param[in] value The RTC Locale Units
|
||||
*/
|
||||
void furi_hal_rtc_set_locale_units(FuriHalRtcLocaleUnits value);
|
||||
|
||||
|
|
|
@ -97,11 +97,12 @@ void furi_hal_bt_reinit();
|
|||
/** Change BLE app
|
||||
* Restarts 2nd core
|
||||
*
|
||||
* @param profile FuriHalBleProfileTemplate instance
|
||||
* @param event_cb GapEventCallback instance
|
||||
* @param context pointer to context
|
||||
* @param profile_template FuriHalBleProfileTemplate instance
|
||||
* @param profile_params Parameters to pass to the profile. Can be NULL
|
||||
* @param event_cb GapEventCallback instance
|
||||
* @param context pointer to context
|
||||
*
|
||||
* @return instance of profile, NULL on failure
|
||||
* @return instance of profile, NULL on failure
|
||||
*/
|
||||
FURI_WARN_UNUSED FuriHalBleProfileBase* furi_hal_bt_change_app(
|
||||
const FuriHalBleProfileTemplate* profile_template,
|
||||
|
|
|
@ -91,7 +91,7 @@ bool furi_hal_i2c_tx(
|
|||
* @param size Size of data buffer
|
||||
* @param begin How to begin the transaction
|
||||
* @param end How to end the transaction
|
||||
* @param timer Timeout timer
|
||||
* @param timeout Timeout in milliseconds
|
||||
*
|
||||
* @return true on successful transfer, false otherwise
|
||||
*/
|
||||
|
@ -131,7 +131,7 @@ bool furi_hal_i2c_rx(
|
|||
* @param size Size of data buffer
|
||||
* @param begin How to begin the transaction
|
||||
* @param end How to end the transaction
|
||||
* @param timer Timeout timer
|
||||
* @param timeout Timeout in milliseconds
|
||||
*
|
||||
* @return true on successful transfer, false otherwise
|
||||
*/
|
||||
|
|
|
@ -36,15 +36,15 @@ typedef void (*FuriHalInfraredTxSignalSentISRCallback)(void* context);
|
|||
|
||||
/** Signature of callback function for receiving continuous INFRARED rx signal.
|
||||
*
|
||||
* @param ctx[in] context to pass to callback
|
||||
* @param level[in] level of input INFRARED rx signal
|
||||
* @param duration[in] duration of continuous rx signal level in us
|
||||
* @param[in] ctx context to pass to callback
|
||||
* @param[in] level level of input INFRARED rx signal
|
||||
* @param[in] duration duration of continuous rx signal level in us
|
||||
*/
|
||||
typedef void (*FuriHalInfraredRxCaptureCallback)(void* ctx, bool level, uint32_t duration);
|
||||
|
||||
/** Signature of callback function for reaching silence timeout on INFRARED port.
|
||||
*
|
||||
* @param ctx[in] context to pass to callback
|
||||
* @param[in] ctx context to pass to callback
|
||||
*/
|
||||
typedef void (*FuriHalInfraredRxTimeoutCallback)(void* ctx);
|
||||
|
||||
|
|
|
@ -228,9 +228,9 @@ FuriHalNfcError furi_hal_nfc_poller_tx(const uint8_t* tx_data, size_t tx_bits);
|
|||
*
|
||||
* The receive buffer must be big enough to accomodate all of the expected data.
|
||||
*
|
||||
* @param rx_data[out] pointer to a byte array to be filled with received data.
|
||||
* @param rx_data_size[in] maximum received data size, in bytes.
|
||||
* @param rx_bits[out] pointer to the variable to hold received data size, in bits.
|
||||
* @param[out] rx_data pointer to a byte array to be filled with received data.
|
||||
* @param[in] rx_data_size maximum received data size, in bytes.
|
||||
* @param[out] rx_bits pointer to the variable to hold received data size, in bits.
|
||||
* @returns FuriHalNfcErrorNone on success, any other error code on failure.
|
||||
*/
|
||||
FuriHalNfcError furi_hal_nfc_poller_rx(uint8_t* rx_data, size_t rx_data_size, size_t* rx_bits);
|
||||
|
@ -249,9 +249,9 @@ FuriHalNfcError furi_hal_nfc_listener_tx(const uint8_t* tx_data, size_t tx_bits)
|
|||
*
|
||||
* The receive buffer must be big enough to accomodate all of the expected data.
|
||||
*
|
||||
* @param rx_data[out] pointer to a byte array to be filled with received data.
|
||||
* @param rx_data_size[in] maximum received data size, in bytes.
|
||||
* @param rx_bits[out] pointer to the variable to hold received data size, in bits.
|
||||
* @param[out] rx_data pointer to a byte array to be filled with received data.
|
||||
* @param[in] rx_data_size maximum received data size, in bytes.
|
||||
* @param[out] rx_bits pointer to the variable to hold received data size, in bits.
|
||||
* @returns FuriHalNfcErrorNone on success, any other error code on failure.
|
||||
*/
|
||||
FuriHalNfcError furi_hal_nfc_listener_rx(uint8_t* rx_data, size_t rx_data_size, size_t* rx_bits);
|
||||
|
@ -395,9 +395,9 @@ FuriHalNfcError furi_hal_nfc_iso14443a_tx_sdd_frame(const uint8_t* tx_data, size
|
|||
*
|
||||
* The receive buffer must be big enough to accomodate all of the expected data.
|
||||
*
|
||||
* @param rx_data[out] pointer to a byte array to be filled with received data.
|
||||
* @param rx_data_size[in] maximum received data size, in bytes.
|
||||
* @param rx_bits[out] pointer to the variable to hold received data size, in bits.
|
||||
* @param[in] rx_data pointer to a byte array to be filled with received data.
|
||||
* @param[in] rx_data_size maximum received data size, in bytes.
|
||||
* @param[in] rx_bits pointer to the variable to hold received data size, in bits.
|
||||
* @returns FuriHalNfcErrorNone on success, any other error code on failure.
|
||||
*/
|
||||
FuriHalNfcError
|
||||
|
|
|
@ -135,9 +135,7 @@ float furi_hal_power_get_battery_charge_voltage_limit();
|
|||
*
|
||||
* Invalid values will be clamped downward to the nearest valid value.
|
||||
*
|
||||
* @param voltage[in] voltage in V
|
||||
*
|
||||
* @return voltage in V
|
||||
* @param[in] voltage voltage in V
|
||||
*/
|
||||
void furi_hal_power_set_battery_charge_voltage_limit(float voltage);
|
||||
|
||||
|
@ -161,7 +159,7 @@ uint32_t furi_hal_power_get_battery_design_capacity();
|
|||
|
||||
/** Get battery voltage in V
|
||||
*
|
||||
* @param ic FuriHalPowerIc to get measurment
|
||||
* @param[in] ic FuriHalPowerIc to get measurment
|
||||
*
|
||||
* @return voltage in V
|
||||
*/
|
||||
|
@ -169,7 +167,7 @@ float furi_hal_power_get_battery_voltage(FuriHalPowerIC ic);
|
|||
|
||||
/** Get battery current in A
|
||||
*
|
||||
* @param ic FuriHalPowerIc to get measurment
|
||||
* @param[in] ic FuriHalPowerIc to get measurment
|
||||
*
|
||||
* @return current in A
|
||||
*/
|
||||
|
@ -177,7 +175,7 @@ float furi_hal_power_get_battery_current(FuriHalPowerIC ic);
|
|||
|
||||
/** Get temperature in C
|
||||
*
|
||||
* @param ic FuriHalPowerIc to get measurment
|
||||
* @param[in] ic FuriHalPowerIc to get measurment
|
||||
*
|
||||
* @return temperature in C
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue