Skip to content

Commit 41c35cd

Browse files
rnadyrshinknrn64skotopes
authored
Documentation: update and cleanup (#3934)
* Developers Docs editing * Logo underline removed The underline has been removed when hovering over the logo. * proofread docs * application -> app in several files --------- Co-authored-by: knrn64 <25254561+knrn64@users.noreply.github.com> Co-authored-by: あく <alleteam@gmail.com>
1 parent 0eaad8b commit 41c35cd

33 files changed

+247
-228
lines changed

ReadMe.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
# Flipper Zero Firmware
1010

1111
- [Flipper Zero Official Website](https://flipperzero.one). A simple way to explain to your friends what Flipper Zero can do.
12-
- [Flipper Zero Firmware Update](https://update.flipperzero.one). Improvements for your dolphin: latest firmware releases, upgrade tools for PC and mobile devices.
13-
- [User Documentation](https://docs.flipperzero.one). Learn more about your dolphin: specs, usage guides, and anything you want to ask.
12+
- [Flipper Zero Firmware Update](https://flipperzero.one/update). Improvements for your dolphin: latest firmware releases, upgrade tools for PC and mobile devices.
13+
- [User Documentation](https://docs.flipper.net). Learn more about your dolphin: specs, usage guides, and anything you want to ask.
1414
- [Developer Documentation](https://developer.flipper.net/flipperzero/doxygen). Dive into the Flipper Zero Firmware source code: build system, firmware structure, and more.
1515

1616
# Contributing
@@ -19,7 +19,7 @@ Our main goal is to build a healthy and sustainable community around Flipper, so
1919

2020
## I need help
2121

22-
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).
22+
The best place to search for answers is our [User Documentation](https://docs.flipper.net). 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).
2323

2424
## I want to report an issue
2525

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1-
# Number Input
1+
# Number Input {#example_number_input}
22

3-
Simple keyboard that limits user inputs to a full number (integer). Useful to enforce correct entries without the need of intense validations after a user input.
3+
Simple keyboard that limits user inputs to a full number (integer). Useful to enforce correct entries without the need for intense validations after a user input.
44

5-
Definition of min/max values is required. Numbers are of type int32_t. If negative numbers are allowed withing min - max, an additional button is displayed to switch the sign between + and -.
5+
## Source code
66

7-
It is also possible to define a header text, shown in this example app with the 3 different input options.
7+
Source code for this example can be found [here](https://github.com/flipperdevices/flipperzero-firmware/tree/dev/applications/examples/example_number_input).
8+
9+
## General principle
10+
11+
Definition of min/max values is required. Numbers are of type int32_t. If negative numbers are allowed within min - max, an additional button is displayed to switch the sign between + and -.
12+
13+
It is also possible to define a header text, as shown in this example app with the 3 different input options.

documentation/AppManifests.md

Lines changed: 39 additions & 39 deletions
Large diffs are not rendered by default.

documentation/AppsOnSDCard.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
1-
# FAP (Flipper Application Package) {#apps_on_sd_card}
1+
# FAP (Flipper App Package) {#apps_on_sd_card}
22

3-
[fbt](./fbt.md) supports building applications as FAP files. FAPs are essentially `.elf` executables with extra metadata and resources bundled in.
3+
[fbt](./fbt.md) supports building apps as FAP files. FAPs are essentially `.elf` executables with extra metadata and resources bundled in.
44

55
FAPs are built with the `faps` target. They can also be deployed to the `dist` folder with the `fap_dist` target.
66

77
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).
88

9-
## How to set up an application to be built as a FAP {#fap-howto}
9+
## How to set up an app to be built as a FAP {#fap-howto}
1010

11-
FAPs are created and developed the same way as internal applications that are part of the firmware.
11+
FAPs are created and developed the same way as internal apps that are part of the firmware.
1212

13-
To build your application as a FAP, create a folder with your app's source code in `applications_user`, then write its code the way you'd do when creating a regular built-in application. Then configure its `application.fam` manifest, and set its _apptype_ to FlipperAppType.EXTERNAL. See [Application Manifests](./AppManifests.md#application-definition) for more details.
13+
To build your app as a FAP, create a folder with your app's source code in `applications_user`, then write its code the way you'd do when creating a regular built-in app. Then configure its `application.fam` manifest, and set its `apptype` to `FlipperAppType.EXTERNAL`. See [Flipper App Manifests](AppManifests.md) for more details.
1414

15-
- To build your application, run `./fbt fap_{APPID}`, where APPID is your application's ID in its manifest.
15+
- To build your app, run `./fbt fap_{APPID}`, where APPID is your app's ID in its manifest.
1616
- To build your app and upload it over USB to run on Flipper, use `./fbt launch APPSRC=applications_user/path/to/app`. This command is configured in the default [VS Code profile](../.vscode/ReadMe.md) as a "Launch App on Flipper" build action (Ctrl+Shift+B menu).
1717
- To build an app without uploading it to Flipper, use `./fbt build APPSRC=applications_user/path/to/app`. This command is also available in VSCode configuration as "Build App".
1818
- To build all FAPs, run `./fbt faps` or `./fbt fap_dist`.
1919

2020
## FAP assets
2121

22-
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.
22+
FAPs can include static and animated images as private assets. They will be automatically compiled alongside app sources and can be referenced the same way as assets from the main firmware.
2323

24-
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.
24+
To use that feature, put your images in a subfolder inside your app's folder, then reference that folder in your app's manifest in the `fap_icon_assets` field. See [Flipper App Manifests](AppManifests.md) for more details.
2525

26-
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.
26+
To use these assets in your app, put `#include "{APPID}_icons.h"` in your app's source code, where `{APPID}` is the `appid` value field from your app's manifest. Then you can use all icons from your app's assets the same way as if they were a part of `assets_icons.h` of the main firmware.
2727

2828
Images and animated icons should follow the same [naming convention](../assets/ReadMe.md) as those from the main firmware.
2929

@@ -33,35 +33,35 @@ Images and animated icons should follow the same [naming convention](../assets/R
3333

3434
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.
3535

36-
If debugging session is active, firmware will trigger a breakpoint after loading a FAP it into memory, but before running any code from it. This allows you to set breakpoints in the FAP's code. Note that any breakpoints set before the FAP is loaded may need re-setting after the FAP is actually loaded, since before loading it debugger cannot know the exact address of the FAP's code.
36+
If debugging session is active, firmware will trigger a breakpoint after loading a FAP into memory, but before running any code from it. This allows you to set breakpoints in the FAP's code. Note that any breakpoints set before the FAP is loaded may need re-setting after the FAP is actually loaded, since the debugger cannot know the exact address of the FAP's code before loading the FAP.
3737

3838
### Setting up debugging environment
3939

40-
The debugging support script looks up debugging information in the latest firmware build directory (`build/latest`). That directory is symlinked by `fbt` to the latest firmware configuration (Debug or Release) build directory when you run `./fbt` for the chosen configuration. See [fbt docs](./fbt.md#nb) for details.
40+
The debugging support script looks up debugging information in the latest firmware build directory (`build/latest`). That directory is symlinked by `fbt` to the latest firmware configuration (Debug or Release) build directory when you run `./fbt` for the chosen configuration. See [fbt docs](fbt.md) for details.
4141

4242
To debug FAPs, do the following:
4343

4444
1. Build firmware with `./fbt`
4545
2. Flash it with `./fbt flash`
4646
3. [Build your FAP](#fap-howto) and run it on Flipper
4747

48-
After that, you can attach with `./fbt debug` or VS Code and use all debug features.
48+
After that, you can attach the debugger to the target MCU with `./fbt debug` or VS Code and use all debug features.
4949

50-
It is **important** that firmware and application build type (debug/release) match and that the matching firmware folder is linked as `build/latest`. Otherwise, debugging will not work.
50+
It is **important** that firmware and app build type (debug/release) match and that the matching firmware folder is linked as `build/latest`. Otherwise, debugging will not work.
5151

52-
## How Flipper runs an application from an SD card
52+
## How Flipper runs an app from an SD card
5353

54-
Flipper's MCU cannot run code directly from external storage, so it needs to be copied to RAM first. That is done by the App Loader application responsible for loading the FAP from the SD card, verifying its integrity and compatibility, copying it to RAM, and adjusting it for its new location.
54+
Flipper's MCU cannot run code directly from external storage, so it needs to be copied to RAM first. That is done by the App Loader responsible for loading the FAP from the SD card, verifying its integrity and compatibility, copying it to RAM, and adjusting it for its new location.
5555

56-
Since FAP has to be loaded to RAM to be executed, the amount of RAM available for allocations from heap is reduced compared to running the same app from flash, as a part of the firmware. Note that the amount of occupied RAM is less than the total FAP file size since only code and data sections are allocated, while the FAP file includes extra information only used at app load time.
56+
Since the FAP has to be loaded to RAM to be executed, the amount of RAM available for allocations from heap is reduced compared to running the same app from flash, as a part of the firmware. Note that the amount of occupied RAM is less than the total FAP file size since only code and data sections are allocated, while the FAP file includes extra information only used at app load time.
5757

58-
Applications are built for a specific API version. It is a part of the hardware target's definition and contains a major and minor version number. The App Loader checks if the application's major API version matches the firmware's major API version.
58+
Apps are built for a specific API version. It is a part of the hardware target's definition and contains a major and minor version number. The App Loader checks if the app's major API version matches the firmware's major API version.
5959

60-
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.
60+
The App Loader allocates memory for the app and copies it to RAM, processing relocations and providing concrete addresses for imported symbols using the [symbol table](#symbol-table). Then it starts the app.
6161

6262
## API versioning {#api-versioning}
6363

64-
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.
64+
Not all parts of firmware are available for external apps. 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.
6565

6666
`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.
6767

@@ -78,6 +78,6 @@ API versioning is mostly automated by `fbt`. When rebuilding the firmware, `fbt`
7878

7979
### Symbol table {#symbol-table}
8080

81-
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.
81+
The symbol table is a list of symbols exported by firmware and available for external apps. 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` app.
8282

83-
`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.
83+
`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 app won't be able to run on the device until all required symbols are provided in the symbol table.

documentation/ExpansionModules.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Depending on the UART selected for communication, the following pins area availa
2929

3030
## Frame structure
3131

32-
Each frame consists of a header (1 byte), contents (size depends of frame type) and checksum (1 byte) fields:
32+
Each frame consists of a header (1 byte), contents (size depends on frame type) and checksum (1 byte) fields:
3333

3434
| Header (1 byte) | Contents (0 or more bytes) | Checksum (1 byte) |
3535
|-----------------|----------------------------|-------------------|
@@ -79,7 +79,7 @@ CONTROL frames are used to control various aspects of the communication and enab
7979
|-----------------|-------------------|-------------------|
8080
| 0x04 | Command | XOR checksum |
8181

82-
The `Command` field SHALL have one of the followind values:
82+
The `Command` field SHALL have one of the following values:
8383

8484
| Command | Meaning | Note |
8585
|---------|--------------------------|:----:|
@@ -96,7 +96,7 @@ Notes:
9696

9797
### Data frame
9898

99-
DATA frames are used to transmit arbitrary data in either direction. Each DATA frame can hold up to 64 bytes. If an RPC session is curretly open, all received bytes are forwarded to it.
99+
DATA frames are used to transmit arbitrary data in either direction. Each DATA frame can hold up to 64 bytes. If an RPC session is currently open, all received bytes are forwarded to it.
100100

101101
| Header (1 byte) | Contents (1 to 65 byte(s)) | Checksum (1 byte) |
102102
|-----------------|----------------------------|-------------------|
@@ -110,7 +110,7 @@ The `Data` field SHALL have the following structure:
110110

111111
## Communication flow
112112

113-
In order for the host to be able to detect the module, the respective feature must be enabled first. This can be done via the GUI by going to `Settings -> Expansion Modules` and selecting the required `Listen UART` or programmatically by calling `expansion_enable()`. Likewise, disabling this feature via the same GUI or by calling `expansion_disable()` will result in ceasing all communications and not being able to detect any connected modules.
113+
In order for the host to be able to detect the module, the respective feature must be enabled first. This can be done via the GUI by going to `Settings Expansion Modules` and selecting the required `Listen UART` or programmatically by calling `expansion_enable()`. Likewise, disabling this feature via the same GUI or by calling `expansion_disable()` will result in ceasing all communications and not being able to detect any connected modules.
114114

115115
The communication is always initiated by the module by the means of shortly pulling the RX pin down. The host SHALL respond with a HEARTBEAT frame indicating that it is ready to receive requests. The module then MUST issue a BAUDRATE request within Tto. Failure to do so will result in the host dropping the connection and returning to its initial state.
116116

documentation/FuriCheck.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Run time checks and forced system crash {#furi_check}
22

33
The best way to protect system integrity is to reduce amount cases that we must handle and crash the system as early as possible.
4-
For that purpose we have bunch of helpers located in Furi Core check.h.
4+
For that purpose, we have a bunch of helpers located in Furi Core `check.h`.
55

66
## Couple notes before start
77

8-
- Definition of Crash - log event, save crash information in RTC and reboot the system.
9-
- Definition of Halt - log event, stall the system.
10-
- Debug and production builds behaves differently: debug build will never reset system in order to preserve state for debugging.
8+
- Definition of Crash log event, save crash information in RTC and reboot the system.
9+
- Definition of Halt log event, stall the system.
10+
- Debug and production builds behave differently: debug build will never reset system in order to preserve state for debugging.
1111
- If you have debugger connected we will stop before reboot automatically.
1212
- All helpers accept optional MESSAGE_CSTR: it can be in RAM or Flash memory, but only messages from Flash will be shown after system reboot.
1313
- MESSAGE_CSTR can be NULL, but macros magic already doing it for you, so just don't.
@@ -16,10 +16,10 @@ For that purpose we have bunch of helpers located in Furi Core check.h.
1616

1717
Assert condition in development environment and crash the system if CONDITION is false.
1818

19-
- Should be used at development stage in apps and services
20-
- Keep in mind that release never contains this check
21-
- Keep in mind that libraries never contains this check by default, use `LIB_DEBUG=1` if you need it
22-
- Avoid putting function calls into CONDITION, since it may be omitted in some builds
19+
- Should be used at development stage in apps and services.
20+
- Keep in mind that release never contains this check.
21+
- Keep in mind that libraries never contain this check by default, use `LIB_DEBUG=1` if you need it.
22+
- Avoid putting function calls into CONDITION, since it may be omitted in some builds.
2323

2424
## `furi_check(CONDITION)` or `furi_check(CONDITION, MESSAGE_CSTR)`
2525

@@ -31,10 +31,10 @@ Always assert condition and crash the system if CONDITION is false.
3131

3232
Crash the system.
3333

34-
- Use it to crash the system. For example: if abnormal condition detected.
34+
- Use it to crash the system. For example, if an abnormal condition is detected.
3535

3636
## `furi_halt()` or `furi_halt(MESSAGE_CSTR)`
3737

3838
Halt the system.
3939

40-
- We use it internally to shutdown flipper if poweroff is not possible.
40+
- We use it internally to shutdown Flipper if poweroff is not possible.

0 commit comments

Comments
 (0)