diff --git a/.gitignore b/.gitignore index 27ec494cc0c..c307d216a97 100644 --- a/.gitignore +++ b/.gitignore @@ -23,5 +23,4 @@ _wasi_sdk_fetch *.pyc # MkDocs -site/ -.cache/ +/site/ diff --git a/README.md b/README.md index e34d7f562e9..e6c8a5c880f 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ EdgeTX is the cutting edge of OpenTX. It is the place where innovative ideas and - Sound Packs: [Info](https://github.com/EdgeTX/edgetx-sdcard-sounds) - [Downloads](https://github.com/EdgeTX/edgetx-sdcard-sounds/releases) -- [Development Wiki](https://github.com/EdgeTX/edgetx/wiki) - [Docker Build Environment](https://github.com/EdgeTX/build-edgetx) +- [Developer Documentation](https://edgetx.org/edgetx/latest/) - [Docker Build Environment](https://github.com/EdgeTX/build-edgetx) ## Acknowledgements diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 00000000000..dc06e4e003e --- /dev/null +++ b/docs/README.md @@ -0,0 +1,71 @@ +# EdgeTX Developer Documentation + +This folder contains the source for the EdgeTX developer documentation site, built with [MkDocs](https://www.mkdocs.org/) using the [Material theme](https://squidfunk.github.io/mkdocs-material/). + +## Prerequisites + +Install the required packages from the repo root. Using [`uv`](https://docs.astral.sh/uv/getting-started/installation/) is recommended: + +```bash +uv pip install -r docs-requirements.txt +``` + +Or with plain pip: + +```bash +pip install -r docs-requirements.txt +``` + +[`mike`](https://github.com/jimporter/mike) is included as a dependency — it manages versioned deployments of the site (e.g. publishing a new release). You won't need it for local editing or preview. + +## Local preview + +Serve the docs locally with live reload: + +```bash +mkdocs serve +``` + +Then open [http://127.0.0.1:8000](http://127.0.0.1:8000) in your browser. The site will automatically refresh as you edit files. + +## Building + +To build a static copy of the site into the `site/` directory: + +```bash +mkdocs build +``` + +CI runs `mkdocs build --strict` on pull requests, which treats warnings (e.g. broken internal links) as errors. It's worth running this locally before submitting a PR to catch any issues early: + +```bash +mkdocs build --strict +``` + +## Deployment + +The docs are deployed automatically via GitHub Actions (`.github/workflows/docs.yml`): + +- Pushes to `main` are deployed as the `latest` version. +- Release tags (e.g. `v2.11.0`) are deployed as a numbered version (e.g. `v2.11`) and aliased as `stable`. + +## Project structure + +``` +docs/ +├── assets/ # Images, stylesheets +├── building/ # Build guides (Windows, Linux, macOS, CodeSpaces) +├── contributing/ # Git workflow and contribution guides +├── development/ # Developer reference (CLI, protocols, etc.) +├── hardware/ # Radio specs and hardware reference +├── mods/ # Hardware modification guides +└── troubleshooting/ # Troubleshooting guides +``` + +Site navigation is defined in [`mkdocs.yml`](../mkdocs.yml) at the repo root. + +## Adding or editing pages + +1. Create or edit a `.md` file in the appropriate subfolder. +2. If adding a new page, add it to the `nav:` section in `mkdocs.yml`. +3. Preview with `mkdocs serve` and verify with `mkdocs build --strict` before submitting a PR. diff --git a/docs/assets/simu_x9dplus_ubuntu b/docs/assets/simu_x9dplus_ubuntu new file mode 100644 index 00000000000..eb65e1d90d7 Binary files /dev/null and b/docs/assets/simu_x9dplus_ubuntu differ diff --git a/docs/building/codespaces.md b/docs/building/codespaces.md index 47813eccf3d..b59ebb08bfd 100644 --- a/docs/building/codespaces.md +++ b/docs/building/codespaces.md @@ -43,8 +43,8 @@ Next, issue: cmake --build . --target arm-none-eabi-configure --parallel 2 ``` -> [!NOTE] -> The `--parallel 2` in the command above instructs the cmake build system as to how many tasks to execute in parallel. Typically, you would set this to the number of CPU cores your machine has. So if you are using a higher CPU core count GitHub machine type, you can increase this to suit, and get a faster build. +!!! note + The `--parallel 2` in the command above instructs the cmake build system as to how many tasks to execute in parallel. Typically, you would set this to the number of CPU cores your machine has. So if you are using a higher CPU core count GitHub machine type, you can increase this to suit, and get a faster build. Only a few seconds later, you should be greeted with "-- Generating done" message. @@ -55,8 +55,8 @@ cmake --build arm-none-eabi --target firmware This time it can take few minutes so until the firmware binary is successfully built. If you see "[100%] Built target firmware" then all went smoothly, and you have just made yourself a custom EdgeTX firmware. If you are making incremental modifications to the firmware, subsequent firmware builds will be a lot faster. -> [!TIP] -> If you want more information about the firmware binary - such as how big the firmware is in relation to the FLASH memory the target handset has, you can compile the `firmware-size` target instead of firmware, and you'll get a summary at the end of the firmware build. +!!! tip + If you want more information about the firmware binary - such as how big the firmware is in relation to the FLASH memory the target handset has, you can compile the `firmware-size` target instead of firmware, and you'll get a summary at the end of the firmware build. It's a good idea to rename the binary, so that it is easier later to see the target radio and which options were baked into it. For this, issue in the terminal: ``` @@ -66,6 +66,6 @@ mv firmware.bin edgetx_main_tx16s_bt_release.bin In the left file browser tree open the **build** folder and then open **arm-none-eabi** folder. Right click at _edgetx_main_tx16s_bt_release.bin_ and select Download. -Put the downloaded firmware binary into your radio SD card \FIRMWARE subfolder, and flash it to your radio either using EdgeTX bootloader, [EdgeTX Buddy](https://buddy.edgetx.org/), EdgeTX Companion or [STM32CubeProgrammer](../mods/unbrick.md). +Put the downloaded firmware binary into your radio SD card \FIRMWARE subfolder, and flash it to your radio either using EdgeTX bootloader, [EdgeTX Buddy](https://buddy.edgetx.org/), EdgeTX Companion or [STM32CubeProgrammer](../troubleshooting/unbrick.md). Use [EdgeTX Buddy](https://buddy.edgetx.org/) or EdgeTX Companion to fill your SD card appropriately for your radio. diff --git a/docs/building/compilation-options.md b/docs/building/compilation-options.md index 80dc60329cc..381367fe638 100644 --- a/docs/building/compilation-options.md +++ b/docs/building/compilation-options.md @@ -1,302 +1,257 @@ # Compilation Options -!!! note "Work in Progress" - This page is a work in progress. The raw option list below is an initial dump of all compile-time defines. It still needs to be sorted into categories, have details added for options like `PCBREV` (with all possible values), and be converted into tables. +This page documents the CMake options available when building EdgeTX firmware. Most options have sensible defaults set by the target's CMakeLists.txt — you only need to override them when you have a specific reason to. + +## Target Selection + +These are the most important options to set, as they determine which radio you are building for. + +### `PCB` + +Selects the radio target. + +| Value | Radio | +|-------|-------| +| `X7` | FrSky Taranis Q X7 / X7S and Jumper / RadioMaster variants (see `PCBREV`) | +| `X9LITE` | FrSky Taranis X9 Lite | +| `X9LITES` | FrSky Taranis X9 Lite S | +| `XLITE` | FrSky X-Lite | +| `XLITES` | FrSky X-Lite S | +| `X9D` | FrSky Taranis X9D | +| `X9D+` | FrSky Taranis X9D+ (see `PCBREV`) | +| `X9E` | FrSky Taranis X9E | +| `X10` | FrSky Horus X10 / X10S and RadioMaster / Jumper variants (see `PCBREV`) | +| `X12S` | FrSky Horus X12S | +| `PL18` | Flysky PL18 and variants (see `PCBREV`) | +| `TX15` | RadioMaster TX15 | +| `TX16SMK3` | RadioMaster TX16S Mark III | +| `T15PRO` | Jumper T15 Pro | +| `ST16` | Siyi ST16 | +| `PA01` | FrSky PA01 | + +### `PCBREV` + +Selects a specific variant within a `PCB` target. Valid values depend on the selected `PCB`: + +=== "X7" + | Value | Radio | + |-------|-------| + | `TX12` | RadioMaster TX12 | + | `TX12MK2` | RadioMaster TX12 Mark II | + | `ZORRO` | RadioMaster Zorro | + | `BOXER` | RadioMaster Boxer | + | `MT12` | RadioMaster MT12 | + | `GX12` | RadioMaster GX12 | + | `POCKET` | RadioMaster Pocket | + | `T8` | RadioMaster T8 | + | `COMMANDO8` | RadioMaster Commando 8 | + | `T12` | Jumper T12 | + | `T12MAX` | Jumper T12 Max | + | `TPRO` | Jumper T-Pro | + | `TPROV2` | Jumper T-Pro V2 | + | `TPROS` | Jumper T-Pro S | + | `T14` | Jumper T14 | + | `T20` | Jumper T20 | + | `T20V2` | Jumper T20 V2 | + | `TLITE` | Jumper T-Lite | + | `LR3PRO` | Jumper LR3 Pro | + | `BUMBLEBEE` | Jumper Bumblebee | + | `ACCESS` | FrSky Q X7 Access | + | `V12` | FrSky Q X7 V1.2 | + | `V14` | FrSky Q X7 V1.4 | + +=== "X9D+" + | Value | Radio | + |-------|-------| + | `2014` | X9D+ (original, default) | + | `2019` | X9D+ 2019 | + +=== "X10" + | Value | Radio | + |-------|-------| + | `STD` | FrSky Horus X10 (default) | + | `EXPRESS` | FrSky Horus X10 Express | + | `T16` | RadioMaster TX16S | + | `TX16S` | RadioMaster TX16S Mark II | + | `F16` | Flyzone F16 | + | `V16` | VolantexRC V16 | + | `T18` | Jumper T18 | + | `T15` | Jumper T15 | + +=== "PL18" + | Value | Radio | + |-------|-------| + | `PL18` | Flysky PL18 (default) | + | `PL18EV` | Flysky PL18EV / Paladin EV | + | `PL18U` | Flysky PL18U | + | `EL18` | Flysky EL18 | + | `NV14` | Flysky NV14 | + | `NB4P` | Flysky NB4+ | + +### `TRANSLATIONS` + +Firmware language. Default: `EN` + +Valid values: `CN` `CZ` `DA` `DE` `EN` `ES` `FI` `FR` `HE` `HU` `IT` `JP` `KO` `NL` `PL` `PT` `RU` `SE` `SK` `TW` `UA` + +--- + +## Feature Options + +These options enable or disable firmware features. Defaults are typically set by the target, so you only need to override them if you want to add or remove a feature for a specific build. + +| Option | Default | Description | +|--------|---------|-------------| +| `AUTOSOURCE` | ON | Automatic source detection in menus | +| `AUTOSWITCH` | ON | Automatic switch detection in menus | +| `BLUETOOTH` | varies | Bluetooth module support | +| `BOOTLOADER` | ON | Include bootloader | +| `CURVES` | ON | Curves support | +| `DANGEROUS_MODULE_FUNCTIONS` | OFF | Enable RangeCheck / Bind / Module OFF functions | +| `DBLKEYS` | ON | Double key shortcuts | +| `DISK_CACHE` | ON | SD card disk cache (color screen targets) | +| `FAI` | OFF | Competition mode — disables telemetry | +| `FLIGHT_MODES` | ON | Flight modes | +| `FLYSKY_GIMBAL` | varies | Flysky serial gimbal support | +| `GVARS` | ON | Global variables | +| `GUI` | ON | GUI | +| `HELI` | ON | Helicopter mixer menu | +| `INTERNAL_GPS` | varies | Internal GPS support | +| `KCX_BTAUDIO` | OFF | KCX BT audio emitter support | +| `LUA` | ON | Lua scripting | +| `LUA_COMPILER` | ON | Pre-compile and cache Lua scripts on the radio | +| `LUA_MIXER` | ON | Lua mixer / model scripts | +| `MODULE_PROTOCOL_D8` | ON | FrSky D8 module protocol | +| `MODULE_PROTOCOL_FCC` | ON | FCC module protocol | +| `MODULE_PROTOCOL_FLEX` | OFF | Non-certified FLEX module protocol | +| `MODULE_PROTOCOL_LBT` | ON | EU / LBT module protocol | +| `MODULE_SIZE_STD` | ON | Standard size external module bay | +| `MULTIMODULE` | ON | DIY Multiprotocol TX Module | +| `OVERRIDE_CHANNEL_FUNCTION` | ON | OverrideChannel function | +| `PPM_CENTER_ADJUSTABLE` | ON | PPM centre adjustable | +| `PPM_LIMITS_SYMETRICAL` | OFF | PPM limits symmetrical | +| `RAS` | ON | RAS (SWR) measurement | +| `SPACEMOUSE` | OFF | SpaceMouse support (Horus only) | +| `TEMPLATES` | OFF | Model templates menu | +| `UNEXPECTED_SHUTDOWN` | ON | Unexpected shutdown warning screen | +| `USB_SERIAL` | ON | USB serial (CDC) | +| `WATCHDOG` | ON | Hardware watchdog | + +--- + +## Hardware Configuration + +These string options configure hardware behaviour and are normally set by the target. + +### `PWR_BUTTON` + +How the power button works. Default is target-specific. + +| Value | Description | +|-------|-------------| +| `PRESS` | Momentary press to power on/off (most radios) | +| `SWITCH` | Toggle switch | + +### `PPM_UNIT` + +PPM display unit. Default is target-specific. + +| Value | Description | +|-------|-------------| +| `PERCENT_PREC1` | Percentage with one decimal place (e.g. 100.0%) | +| `PERCENT_PREC0` | Percentage with no decimal places (e.g. 100%) | +| `US` | Microseconds | + +### `DEFAULT_MODE` + +Default sticks mode. Leave blank to use the firmware default. + +| Value | Description | +|-------|-------------| +| `` | Use firmware default | +| `1` | Mode 1 | +| `2` | Mode 2 | +| `3` | Mode 3 | +| `4` | Mode 4 | + +### `INTERNAL_GPS_BAUDRATE` + +Baud rate for the internal GPS, where supported. Default: `9600` + +### `LUA_SCRIPT_LOAD_MODE` + +Controls how Lua scripts are loaded and compiled. Leave blank to use the firmware default (`bt` on radio, `T` on simulator/debug builds). Accepts a combination of the following flags: + +| Flag | Description | +|------|-------------| +| `b` | Load binary (pre-compiled) scripts | +| `t` | Load text scripts | +| `T` | Pre-compile scripts | +| `x` | Execute on load | +| `c` | Compile only | +| `d` | Decompress | + +### `POPUP_LEVEL` + +Controls the verbosity of popup notifications. Default: `2` (set to `3` for `FRSKY_RELEASE` builds). + +--- + +## Debug & Tracing + +These options are for development and debugging. All default to `OFF`. + +| Option | Description | +|--------|-------------| +| `ASTERISK` | Show asterisk icon to identify test-only firmware | +| `DEBUG_SEGGER_RTT` | Route debug output to Segger RTT | +| `DEBUG_WINDOWS` | Trace UI window activity | +| `DEBUG_YAML` | Trace YAML parser activity | +| `DEBUG_LABELS` | Trace label activity | +| `JITTER_MEASURE` | Enable ADC jitter measurement | +| `SEMIHOSTING` | Enable debugger semihosting | +| `TEST_BUILD_WARNING` | Show a warning banner on test builds | +| `TRACE_AUDIO` | Trace audio subsystem | +| `TRACE_LUA_INTERNALS` | Trace Lua VM internals | +| `UI_PERF_MONITOR` | Overlay frame rate and CPU usage on screen | +| `WARNINGS_AS_ERRORS` | Treat compiler warnings as errors (`-Werror`) | + +--- + +## Simulator Options + +| Option | Default | Description | +|--------|---------|-------------| +| `SIMU_DISKIO` | OFF | Enable disk I/O simulation using a `sdcard.image` file | +| `SIMU_LUA_COMPILER` | ON | Pre-compile and cache Lua scripts in the simulator | +| `SIMU_TARGET` | ON | Build the simulator target | +| `DISABLE_COMPANION` | OFF | Skip building Companion and simulators | - **TODO:** - - [ ] Sort into categories — PCB/TX model, hardware-specific, handy default setting flags, etc. - - [ ] Add details for options like `PCBREV` with all possible values - - [ ] Convert to a set of tables - - [x] Clear out system-specific / autogenerated flags +--- -Initial dump of all the compile time defines / options (`cmake -LAH` output) +## Release Build Options -``` -// Support for AFHDS2 -AFHDS2:BOOL=OFF +These options are used to produce official manufacturer-specific firmware releases and are not needed for general development builds. -// Support for AFHDS3 -AFHDS3:BOOL=ON +| Option | Manufacturer | +|--------|-------------| +| `FRSKY_RELEASE` | FrSky (also sets `POPUP_LEVEL=3`) | +| `IMRC_RELEASE` | IMRC | +| `TBS_RELEASE` | Team BlackSheep | +| `JUMPER_RELEASE` | Jumper | +| `RADIOMASTER_RELEASE` | RadioMaster | +| `RADIOMASTER_RTF_RELEASE` | RadioMaster RTF | +| `IFLIGHT_RELEASE` | iFlight | +| `BETAFPV_RELEASE` | BetaFPV | -// Allow nightly builds download / update -ALLOW_NIGHTLY_BUILDS:BOOL=OFF +--- -// Enable asterisk icon (test only firmware) -ASTERISK:BOOL=OFF +## Compiler & Build Flags -// Automatic source detection in menus -AUTOSOURCE:BOOL=ON - -// Automatic switch detection in menus -AUTOSWITCH:BOOL=ON - -// Support for bluetooth module -BLUETOOTH:BOOL=OFF - -// Include Bootloader -BOOTLOADER:BOOL=ON - -// Command Line Interface -CLI:BOOL=OFF - -// Crossfire TX Module -CROSSFIRE:BOOL=ON - -// Curves -CURVES:BOOL=ON - -// Dangerous module functions (RangeCheck / Bind / Module OFF, etc.) available -DANGEROUS_MODULE_FUNCTIONS:BOOL=OFF - -// Double Keys -DBLKEYS:BOOL=ON - -// Debug mode -DEBUG:BOOL=Y - -// Count interrupts -DEBUG_INTERRUPTS:BOOL=OFF - -// Debug latency -DEBUG_LATENCY:BOOL=OFF - -// Turn on debug output for storage import -DEBUG_STORAGE_IMPORT:BOOL=OFF - -// Task switching statistics -DEBUG_TASKS:BOOL=OFF - -// Time critical parts of the code -DEBUG_TIMERS:BOOL=OFF - -// Debug Trace Screen -DEBUG_TRACE_BUFFER:BOOL=OFF - -// Count individual USB interrupts -DEBUG_USB_INTERRUPTS:BOOL=OFF - -// Turn on windows traces -DEBUG_WINDOWS:BOOL=OFF - -// Default sticks mode -DEFAULT_MODE:STRING= - -// -DEFAULT_TEMPLATE_SETUP:STRING=21 - -// Disable building companion and simulators -DISABLE_COMPANION:BOOL=OFF - -// Enable SD card disk cache -DISK_CACHE:BOOL=ON - -// DSM2 TX Module -DSM2:BOOL=ON - -// Competition mode (no telemetry) -FAI:BOOL=OFF - -// Support of old FAS prototypes (different resistors) -FAS_PROTOTYPE:BOOL=OFF - -// Configure Firmware target (can be turned off for compiling Companion only) -FIRMWARE_TARGET:BOOL=ON - -// Flight Modes -FLIGHT_MODES:BOOL=ON - -// Enable FlySky Hall Sticks -FLYSKY_HALL_STICKS:BOOL=OFF - -// Used to build FrSky released firmware -FRSKY_RELEASE:BOOL=OFF - -// Reverse sticks for FrSky sticks -FRSKY_STICKS:BOOL=OFF - -// Ghost TX Module -GHOST:BOOL=ON - -// GUI enabled -GUI:BOOL=ON - -// Global variables -GVARS:BOOL=ON - -// Support for R9M 2019 hardware mod -HARDWARE_EXTERNAL_ACCESS_MOD:BOOL=OFF - -// Allow multi trainer -HARDWARE_TRAINER_MULTI:BOOL=OFF - -// Heli menu -HELI:BOOL=ON - -// Used to build IMRC released firmware -IMRC_RELEASE:BOOL=OFF - -// Support for internal ublox GPS -INTERNAL_GPS:BOOL=YES - -// Baud rate for internal GPS -INTERNAL_GPS_BAUDRATE:STRING=9600 - -// Support for MULTI internal module -INTERNAL_MODULE_MULTI:BOOL=ON - -// Enable ADC jitter measurement -JITTER_MEASURE:BOOL=OFF - -// Bluetooth Logs on SD card -LOG_BLUETOOTH:BOOL=OFF - -// Telemetry Logs on SD card -LOG_TELEMETRY:BOOL=OFF - -// Enable LUA support -LUA:BOOL=ON - -// Trace Lua memory (de)allocations to debug port (also needs DEBUG=YES NANO=NO) -LUA_ALLOCATOR_TRACER:BOOL=OFF - -// Pre-compile and save Lua scripts -LUA_COMPILER:BOOL=ON - -// Script loading mode and compilation flags [btTxcd] (see loadScript() API docs). Blank for default ('bt' on radio, 'T' on SIMU/DEBUG builds) -LUA_SCRIPT_LOAD_MODE:STRING= - -// Add support for D8 modules -MODULE_PROTOCOL_D8:BOOL=ON - -// Add support for FCC modules -MODULE_PROTOCOL_FCC:BOOL=ON - -// Add support for non certified FLEX modules -MODULE_PROTOCOL_FLEX:BOOL=OFF - -// Add support for EU/LBT modules -MODULE_PROTOCOL_LBT:BOOL=ON - -// Standard size TX Module -MODULE_SIZE_STD:BOOL=ON - -// DIY Multiprotocol TX Module (https://github.com/pascallanger/DIY-Multiprotocol-TX-Module) -MULTIMODULE:BOOL=ON - -// Use nano newlib and binalloc -NANO:BOOL=OFF - -// OverrideChannel function available -OVERRIDE_CHANNEL_FUNCTION:BOOL=ON - -// Radio type, one of: X9LITE;X9LITES;X7;XLITE;XLITES;X9D;X9D+;X9E;X10;X12S;SKY9X;9XRPRO;AR9X;NV14 -PCB:STRING=X10 - -// PCB Revision -PCBREV:STRING=TX16S - -// Popup level -POPUP_LEVEL:STRING=2 - -// PPM TX Module -PPM:BOOL=ON - -// PPM center adjustable -PPM_CENTER_ADJUSTABLE:BOOL=ON - -// PPM limits symetrical -PPM_LIMITS_SYMETRICAL:BOOL=OFF - -// PPM display unit (US/PERCENT_PREC1/PERCENT_PREC0) -PPM_UNIT:STRING=PERCENT_PREC1 - -// Pwr button type (PRESS/SWITCH) -PWR_BUTTON:STRING=PRESS - -// PXX1 protocol support -PXX1:BOOL=ON - -// PXX2 protocol support -PXX2:BOOL=OFF - -// RAS (SWR) enabled -RAS:BOOL=ON - -// SBUS TX Module -SBUS:BOOL=ON - -// Enable debugger semihosting -SEMIHOSTING:BOOL=OFF - -// Alternative simulator library search path -SIMULATOR_INSTALL_PREFIX:STRING= - -// Enable disk IO simulation in simulator. Simulator will use FatFs module and simulated IO layer that uses "./sdcard.image" file as image of SD card. This file must contain whole SD card from first to last sector -SIMU_DISKIO:BOOL=OFF - -// Pre-compile and save Lua scripts in simulator. -SIMU_LUA_COMPILER:BOOL=ON - -// Configure libsimulator/simu targets (can be turned off for compiling Companion only) -SIMU_TARGET:BOOL=ON - -// Splash (DEFAULT/OFF/FRSKY) -SPLASH:STRING=DEFAULT - -// Use QTableWidget for grid layouts -TABLE_LAYOUT:BOOL=OFF - -// Used to build TBS released firmware -TBS_RELEASE:BOOL=OFF - -// Model templates menu -TEMPLATES:BOOL=OFF - -// Warn this is a test build -TEST_BUILD_WARNING:BOOL=OFF - -// Timers count (2 or 3) -TIMERS:STRING=3 - -// Traces audio enabled -TRACE_AUDIO:BOOL=OFF - -// Traces FatFS enabled -TRACE_FATFS:BOOL=OFF - -// Turn on traces for Lua internals -TRACE_LUA_INTERNALS:BOOL=OFF - -// Traces SD enabled -TRACE_SD_CARD:BOOL=OFF - -// Turn on traces in simpgmspace.cpp -TRACE_SIMPGMSPACE:BOOL=ON - -// Radio language, one of: CZ;DE;EN;ES;FR;IT;PT;SK;SE;PL;HU;NL;CN;TW -TRANSLATIONS:STRING=EN - -// Enable the Unexpected Shutdown screen -UNEXPECTED_SHUTDOWN:BOOL=ON - -// Enable USB serial (CDC) -USB_SERIAL:BOOL=ON - -// Show extra information while processing CMakeLists.txt files. -VERBOSE_CMAKELISTS:BOOL=OFF - -// Treat any compiler warning as an error (adds -Werror flag). -WARNINGS_AS_ERRORS:BOOL=OFF - -// Enable hardware Watchdog -WATCHDOG:BOOL=ON - -// Draw bounding boxes around windows -WINDOWS_INSPECT_BORDERS:BOOL=OFF - -// XJT TX Module -XJT:BOOL=ON - -// Enable YAML storage -YAML_STORAGE:BOOL=OFF -``` +| Option | Default | Description | +|--------|---------|-------------| +| `OPT` | `s` | Optimisation level (`0`, `1`, `2`, `s`) | +| `FIRMWARE_C_FLAGS` | `` | Additional C compiler flags | +| `FIRMWARE_CXX_FLAGS` | `` | Additional C++ compiler flags | +| `WARNINGS_AS_ERRORS` | OFF | Treat all compiler warnings as errors | +| `VERBOSE_CMAKELISTS` | OFF | Show extra information when processing CMake files | diff --git a/docs/building/index.md b/docs/building/index.md index 589c4d761ba..b7c64ab9216 100644 --- a/docs/building/index.md +++ b/docs/building/index.md @@ -2,22 +2,6 @@ This section contains step-by-step build instructions for every supported platform. Whether you want to build a custom firmware binary, run the EdgeTX simulator, or contribute to development, pick the guide that matches your environment. -## Available build guides - -| Guide | Platform | -|---|---| -| [In a Web Browser (CodeSpaces)](codespaces.md) | Any OS — no local setup required | -| [Windows](windows.md) | Windows — Visual Studio 2022 + Ninja | -| [Windows (Docker)](windows-docker.md) | Windows 10 — Docker Desktop | -| [Linux (Ubuntu 22.04)](linux-ubuntu-22.04.md) | Ubuntu 22.04 (bare-metal, VM, or WSL2) | -| [Linux (Ubuntu 24.04)](linux-ubuntu-24.04.md) | Ubuntu 24.04 (bare-metal, VM, or WSL2) | -| [Linux (WSL / Ubuntu 20.04)](linux-wsl.md) | Windows 10/11 — WSL2 with Ubuntu 20.04 | -| [macOS (Sequoia / Tahoe)](macos-sequoia.md) | macOS 15 (Sequoia) and macOS 26 (Tahoe) | -| [macOS (Sonoma)](macos-sonoma.md) | macOS 14.1 (Sonoma) | -| [macOS (Catalina)](macos-catalina.md) | macOS 10.15 (Catalina) | -| [Compilation Options](compilation-options.md) | Reference list of all CMake build flags | -| [Qt Creator (Obsolete)](qt-creator.md) | Historical — no longer maintained | - ## Notes - The document here is meant to help you develop or test changes to EdgeTX on your PC, not to build flight/radio safe version of binaries. diff --git a/docs/building/linux-ubuntu-22.04.md b/docs/building/linux-ubuntu-22.04.md index 1f6d0b927e5..667557bddeb 100644 --- a/docs/building/linux-ubuntu-22.04.md +++ b/docs/building/linux-ubuntu-22.04.md @@ -86,8 +86,8 @@ You will need to prepare a clean microSD card and fill it with the content accor The following page lists which zip file you need: [https://github.com/EdgeTX/edgetx-sdcard](https://github.com/EdgeTX/edgetx-sdcard) -You can use [OpenTX Companion](https://www.open-tx.org/downloads.html) or [STM32CubeProgrammer](https://www.st.com/en/development-tools/stm32cubeprog.html) to flash the binary to your radio. For further instructions, see: -[https://github.com/EdgeTX/edgetx.github.io/wiki/How-to-install-EdgeTX--(pre-release)-for-the-first-time](https://github.com/EdgeTX/edgetx.github.io/wiki/How-to-install-EdgeTX--(pre-release)-for-the-first-time) +You can use [EdgeTX Buddy](https://buddy.edgetx.org/), [EdgeTX Companion](https://edgetx.org/getedgetx/), or [STM32CubeProgrammer](https://www.st.com/en/development-tools/stm32cubeprog.html) to flash the binary to your radio. For further instructions, see: +[https://manual.edgetx.org/installing-and-updating-edgetx/update-from-opentx-to-edgetx-1](https://manual.edgetx.org/installing-and-updating-edgetx/update-from-opentx-to-edgetx-1) ## Building Companion, Simulator and radio simulator libraries diff --git a/docs/building/linux-ubuntu-24.04.md b/docs/building/linux-ubuntu-24.04.md index 0f047a7c7ec..1455fc675eb 100644 --- a/docs/building/linux-ubuntu-24.04.md +++ b/docs/building/linux-ubuntu-24.04.md @@ -86,8 +86,8 @@ You will need to prepare a clean microSD card and fill it with the content accor The following page lists which zip file you need: [https://github.com/EdgeTX/edgetx-sdcard](https://github.com/EdgeTX/edgetx-sdcard) -You can use [OpenTX Companion](https://www.open-tx.org/downloads.html) or [STM32CubeProgrammer](https://www.st.com/en/development-tools/stm32cubeprog.html) to flash the binary to your radio. For further instructions, see: -[https://github.com/EdgeTX/edgetx.github.io/wiki/How-to-install-EdgeTX--(pre-release)-for-the-first-time](https://github.com/EdgeTX/edgetx.github.io/wiki/How-to-install-EdgeTX--(pre-release)-for-the-first-time) +You can use [EdgeTX Buddy](https://buddy.edgetx.org/), [EdgeTX Companion](https://edgetx.org/getedgetx/), or [STM32CubeProgrammer](https://www.st.com/en/development-tools/stm32cubeprog.html) to flash the binary to your radio. For further instructions, see: +[https://manual.edgetx.org/installing-and-updating-edgetx/update-from-opentx-to-edgetx-1](https://manual.edgetx.org/installing-and-updating-edgetx/update-from-opentx-to-edgetx-1) ## Building Companion, Simulator and radio simulator libraries diff --git a/docs/building/linux-wsl.md b/docs/building/linux-wsl.md index c7ec420f163..46dcac3e9e7 100644 --- a/docs/building/linux-wsl.md +++ b/docs/building/linux-wsl.md @@ -101,13 +101,14 @@ This finishes the install. ## Running the SIMU -We have created a SIMU application for the Taranis X9D+ by compiling it for you. If you want to test it, just type the following command to fetch it `wget -q https://raw.githubusercontent.com/wiki/EdgeTX/edgetx/files/simu/simu_x9dplus_ubuntu`. +We have created a SIMU application for the Taranis X9D+ by compiling it for you. If you want to test it, just type the following command to fetch it `wget -q https://raw.githubusercontent.com/EdgeTX/edgetx/refs/heads/main/docs/assets/simu_x9dplus_ubuntu`. + then `chmod a+x simu_x9dplus_ubuntu` and run it with `./simu_x9dplus_ubuntu`. And your X9D+ simple simulator is running in an Ubuntu window on your windows computer. (the key shortcuts can be found in the windows companion help screen: PG-UP->MENU; PG-DN->PAGE; DEL/ESC/BKSP->EXIT; +->+; -->-; ENTER->ENT). ## Compiling -In order to make the instructions that are on another WIKI page for setting up UBUNTU to compile, there is only one thing you need to do first. +Before following the Ubuntu build guide, there is one extra step required for WSL: * You have to enable the support for the i386 libraries by executing the following commands in UBUNTU: * `sudo dpkg --add-architecture i386` diff --git a/docs/building/macos-sequoia.md b/docs/building/macos-sequoia.md index 0839fb2b9da..a62c752dbd2 100644 --- a/docs/building/macos-sequoia.md +++ b/docs/building/macos-sequoia.md @@ -6,12 +6,12 @@ ``` /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ``` -> [!TIP] -> Installing Brew via the command above will automatically install the [Xcode Command Line Tools](https://mac.install.guide/commandlinetools/). If for some reason you need to do this manually, run `xcode-select —install` via the Terminal app. +!!! tip + Installing Brew via the command above will automatically install the [Xcode Command Line Tools](https://mac.install.guide/commandlinetools/). If for some reason you need to do this manually, run `xcode-select —install` via the Terminal app. # Install Qt 6 -> [!NOTE] -> If you only intend on building the firmware, and not `simu`, `companion` or `simulator`, this is not necessary, and you can skip to the next step. +!!! note + If you only intend on building the firmware, and not `simu`, `companion` or `simulator`, this is not necessary, and you can skip to the next step. ``` brew install qt@6 @@ -97,10 +97,11 @@ cmake -DPCB=X10 -DPCBREV=TX16S \ -DARM_TOOLCHAIN_DIR=/Applications/ArmGNUToolchain/14.2.Rel1/arm-none-eabi/bin/ .. ``` -> [!NOTE] -> Please note that the variables `CMAKE_PREFIX_PATH`, `ARM_TOOLCHAIN_DIR` must be specified additionally to what is described in the other compilation HowTos: -> - `CMAKE_PREFIX_PATH`: this must point to your Qt installation path. -> - `ARM_TOOLCHAIN_DIR`: this must point to where ARM GCC has been installed (and MUST contain `/` at the end). +!!! note + Please note that the variables `CMAKE_PREFIX_PATH`, `ARM_TOOLCHAIN_DIR` must be specified additionally to what is described in the other compilation HowTos: + + - `CMAKE_PREFIX_PATH`: this must point to your Qt installation path. + - `ARM_TOOLCHAIN_DIR`: this must point to where ARM GCC has been installed (and MUST contain `/` at the end). Configure the compiler for firmware building (parallel limits the number of CPU cores used - you can increase this if your machine can handle more): ``` diff --git a/docs/building/windows-docker.md b/docs/building/windows-docker.md index 0fc3ad84243..bcf07f8edab 100644 --- a/docs/building/windows-docker.md +++ b/docs/building/windows-docker.md @@ -100,4 +100,4 @@ cd src # References -see [EdgeTX Build Wiki](https://github.com/EdgeTX/build-edgetx) +see [EdgeTX Build repository](https://github.com/EdgeTX/build-edgetx) diff --git a/docs/development/cli-commands.md b/docs/development/cli-commands.md index aed1e21bbd0..a7de72d975f 100644 --- a/docs/development/cli-commands.md +++ b/docs/development/cli-commands.md @@ -14,13 +14,14 @@ Summary of the commands available in CLI mode. | `play` | `` | Play a file. | | `reboot` | `[wdt]` | Reboot the device. | | `set` | ` ` | Set a configuration parameter. | +| `trigger_watchdog_reset` | | Trigger a watchdog reset. | | `help` | `[]` | Show help for a command. | ## If `ENABLE_SERIAL_PASSTHROUGH` set | Function | Parameters (if any) | Description | |--|--|--| -| `serialpassthrough` | ` ` | Enable serial passthrough. | +| `serialpassthrough` | ` [] []` | Enable serial passthrough. | ## If `DEBUG` set @@ -35,6 +36,7 @@ Summary of the commands available in CLI mode. | `trace` | `on \| off` | Enable/disable tracing. | | `debugvars` | | Show debug variables. | | `repeat` | ` ` | Repeat a command. | +| `testfatfs` | | Test FatFS SD card. | ## If `JITTER_MEASURE` set @@ -51,6 +53,13 @@ Summary of the commands available in CLI mode. | `gps` | `\|$\|trace` | Send a command to the GPS. | +## If `SPACEMOUSE` set + +| Function | Parameters (if any) | Description | +|--|--|--| +| `spacemouse` | `poll \| tare \| startstreaming \| stopstreaming \| trace` | Control the SpaceMouse device. | + + ## If `BLUETOOTH` set | Function | Parameters (if any) | Description | @@ -58,6 +67,13 @@ Summary of the commands available in CLI mode. | `bt` | `\|` | Send a command to the Bluetooth module. | +## If `TP_GT911` set + +| Function | Parameters (if any) | Description | +|--|--|--| +| `reset_gt911` | | Reset the GT911 touchscreen controller. | + + ## If `ACCESS_DENIED` && `DEBUG_CRYPT` set | Function | Parameters (if any) | Description | diff --git a/docs/development/customisable-switches.md b/docs/development/customisable-switches.md deleted file mode 100644 index 01500faaeae..00000000000 --- a/docs/development/customisable-switches.md +++ /dev/null @@ -1,47 +0,0 @@ -# Customisable Switches - -The functions switches are a type of multipos switches that are managed directly by EdgeTX. Physically, they look a bit like a regular 6pos switch, but they are much more flexible. - -Unlike other switches that are manage at radio level, functions switches are defined per model, and are therefore set in model setup page. - -## Switch type - -Function switch can be set to: - -`none` : they are basically disabled - -`toggle` : they are active only during push duration - -`2POS` : pushing the switch will alternate state : OFF push ON push OFF .... - -## Switch group - -A traditional 6POS is basically a group of 6 switches that work together, where only one can be active at one time. Functions switches expand that concept and let you choose how FS should be grouped. - -`-` defines a function switch with no group. Pushing it will only affect this switch - -`1`, `2` or `3` define groups. All the switches in a group act together, **where only one (the last pushed) can be active** - -**Always on groups** : in hardware 6POS implementations, one switch of the group MUST stay on, in other words, the switches in the group cannot be all off. If you want this type of behavior, you should tick the check box at the right side of the screen. - -In a traditional 6POS , all the switches belong to the same group. If you want 2 groups of 3 switches, assign 3 switches to group 1, and 3 to group 2 - -![Customisable switches figure 1](../assets/images/fs_fig1.png) - -## Startup Position - -For switch not in group, you can defined in what state each switches will be when the model is loaded - -`↑` switch is inactive - -`↓` switch is active - -`=` switch is set to the same state is was when the model was last used (it keeps old state) - -For groups - -`=` all switches in group are set to the same state is was when the model was last used (it keeps old state) - -`SWx` SWx is set to on, the others in groups are set to off - -`OFF` all switches are set to off at start (NOT available when group is set to 'always on') diff --git a/docs/hardware/dma-mapping-nv14.md b/docs/hardware/dma-mapping-nv14.md index 6882984ee60..22bc5bb6dd7 100644 --- a/docs/hardware/dma-mapping-nv14.md +++ b/docs/hardware/dma-mapping-nv14.md @@ -1,3 +1,8 @@ +--- +hide: + - toc +--- + # DMA Mapping of NV14 ## DMA1 diff --git a/docs/hardware/dma-mapping-tx16s.md b/docs/hardware/dma-mapping-tx16s.md index 59449070c5a..631bc63d1dd 100644 --- a/docs/hardware/dma-mapping-tx16s.md +++ b/docs/hardware/dma-mapping-tx16s.md @@ -1,3 +1,8 @@ +--- +hide: + - toc +--- + # DMA Mapping of TX16S ## DMA1 diff --git a/docs/hardware/irq-usage-tx16s.md b/docs/hardware/irq-usage-tx16s.md index 678d42743f3..a5165331a07 100644 --- a/docs/hardware/irq-usage-tx16s.md +++ b/docs/hardware/irq-usage-tx16s.md @@ -1,3 +1,8 @@ +--- +hide: + - toc +--- + # IRQ Usage of TX16S | IRQn | IRQ handler acronym | Used for | Priority | Prio Addr | Description | Address | diff --git a/docs/hardware/radio-specs.md b/docs/hardware/radio-specs.md index e1d17db7b56..edc70637320 100644 --- a/docs/hardware/radio-specs.md +++ b/docs/hardware/radio-specs.md @@ -1,3 +1,19 @@ # Radio Hardware Specifications for EdgeTX -See: https://edgetx.org/Radio-hardware-specifications-for-EdgeTX/ +The radio hardware specifications — covering supported targets, MCU types, flash and RAM sizes, and peripheral availability — are maintained on the EdgeTX website: + +**[Radio Hardware Specifications for EdgeTX](https://edgetx.org/Radio-hardware-specifications-for-EdgeTX/)** + +The table on that page includes, for each supported radio, details such as: + +- **MCU** — processor model and clock speed +- **Flash** — total flash memory available and amount used by EdgeTX +- **RAM** — total SRAM and CCM RAM +- **Internal module** — RF protocol of the built-in module (if any) +- **External module bay** — whether a JR-style external module bay is present +- **SD card** — whether an SD card slot is present +- **Audio** — speaker and/or audio jack availability +- **USB** — USB connectivity type +- **Bluetooth** — whether Bluetooth is present +- **GPS** — whether an internal GPS module is present +- **Color display** — whether the radio has a color screen diff --git a/docs/index.md b/docs/index.md index cfae0f5267f..356957f1844 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,12 +1,12 @@ # EdgeTX Developer Documentation -Welcome to the EdgeTX developer wiki! +Welcome to the EdgeTX developer documentation! ![EdgeTX Logo](assets/images/EdgeTX_logo.png) EdgeTX is an open-source firmware for RC radio transmitters. This documentation covers technical topics for developers and contributors: how to build EdgeTX from source, hardware reference material, hardware modification guides, and internal software architecture. -## What's in this wiki +## What's in this documentation - **Contributing** — Getting started with Git, the GitHub workflow, and a command reference for common Git operations. - **Building EdgeTX** — Step-by-step build instructions for every supported platform (Linux, macOS, Windows, Docker, and GitHub CodeSpaces), plus a reference for all CMake compilation options. @@ -22,5 +22,5 @@ EdgeTX is an open-source firmware for RC radio transmitters. This documentation | [Building — CodeSpaces](building/codespaces.md) | Build in a web browser with no local setup | | [Building — Linux (Ubuntu 24.04)](building/linux-ubuntu-24.04.md) | Recommended local build environment | | [Building — Windows](building/windows.md) | Native Windows build using Visual Studio + Ninja | -| [Unbrick your radio](mods/unbrick.md) | Recover from a failed flash using STM32CubeProgrammer | +| [Unbrick your radio](troubleshooting/unbrick.md) | Recover from a failed flash using STM32CubeProgrammer | | [Radio Specifications](hardware/radio-specs.md) | Hardware specs for supported radios | diff --git a/docs/mods/flashing-flysky-pl18.md b/docs/mods/flashing-flysky-pl18.md index 5a9be3d90a6..f11795db9dd 100644 --- a/docs/mods/flashing-flysky-pl18.md +++ b/docs/mods/flashing-flysky-pl18.md @@ -22,7 +22,7 @@ Due to PL18 and Paladin EV radio hardware differences, when compared to other Ed * Remove the FRM301 RF-module for now. This module likely will never get official EdgeTX support due to proprietary API that Flysky desires to keep confidential. You can use [Flysky FJR2 JR-micro bay adapter](https://www.flysky-cn.com/b1700-specifications) to attach arbitrary JR micro bay RF-modules to the PL18 or Paladin EV instead. Alternatively, consider ExpressLRS firmware for the FRM301 (see [ExpressLRS pull-request #1811](https://github.com/ExpressLRS/ExpressLRS/pull/1811)) or see the section about supported [external RF modules](#external-rf-module-support) below. * Fully charge the battery of your PL18 or Paladin EV before starting with the backup or the flashing steps below. -* Download and install the latest STM32CubeProgrammer, see for instructions: [Unbrick your radio](unbrick.md) (you need to make an account at ST to be able to download it). +* Download and install the latest STM32CubeProgrammer, see for instructions: [Unbrick your radio](../troubleshooting/unbrick.md) (you need to make an account at ST to be able to download it). * Peel off the left rubber handle on your PL18 or Paladin EV. That should reveal two hidden buttons. The top button is the Device-Firmware-Upgrade (DFU) button, the bottom button is the ultimate master power-off button and will be required to be pressed to exit the DFU mode. [![PL18 hidden buttons](../assets/images/hw/flysky-pl18/pl18_hidden_buttons.jpg)](../assets/images/hw/flysky-pl18/pl18_hidden_buttons.jpg) diff --git a/docs/mods/unbrick.md b/docs/troubleshooting/unbrick.md similarity index 100% rename from docs/mods/unbrick.md rename to docs/troubleshooting/unbrick.md diff --git a/mkdocs.yml b/mkdocs.yml index 59188b26ca9..f6617c4c875 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -56,17 +56,23 @@ nav: - Git Command Reference: contributing/some-git-commands.md - Building EdgeTX: - Overview: building/index.md - - In a Web Browser (CodeSpaces): building/codespaces.md - - Windows: building/windows.md - - Windows (Docker): building/windows-docker.md - - Linux (Ubuntu 22.04): building/linux-ubuntu-22.04.md - - Linux (Ubuntu 24.04): building/linux-ubuntu-24.04.md - - Linux (WSL / Ubuntu 20.04): building/linux-wsl.md - - macOS (Sequoia / Tahoe): building/macos-sequoia.md - - macOS (Sonoma): building/macos-sonoma.md - - macOS (Catalina): building/macos-catalina.md - - Compilation Options: building/compilation-options.md - - Qt Creator (Obsolete): building/qt-creator.md + - Online: + - In a Web Browser (CodeSpaces): building/codespaces.md + - Windows: + - Windows (Native): building/windows.md + - Windows (Docker): building/windows-docker.md + - WSL: building/linux-wsl.md + - Linux: + - Ubuntu 22.04: building/linux-ubuntu-22.04.md + - Ubuntu 24.04: building/linux-ubuntu-24.04.md + - macOS: + - Sequoia / Tahoe: building/macos-sequoia.md + - Sonoma: building/macos-sonoma.md + - Catalina: building/macos-catalina.md + - Reference: + - Compilation Options: building/compilation-options.md + - Obsolete: + - Qt Creator: building/qt-creator.md - Hardware Reference: - Radio Specifications: hardware/radio-specs.md - DMA Mappings: @@ -80,15 +86,18 @@ nav: - Flysky PL18 & PL18EV: mods/flysky-pl18.md - Flysky NB4+: mods/flysky-nb4plus.md - Flashing EdgeTX to Flysky PL18/Paladin-EV: mods/flashing-flysky-pl18.md - - Unbrick Your Radio: mods/unbrick.md + - Troubleshooting: + - Unbrick Your Radio: troubleshooting/unbrick.md - Development: - CLI Commands: development/cli-commands.md - - Customisable Switches: development/customisable-switches.md - Control Inputs: development/control-inputs.md - External Module Protocols: development/external-module-protocols.md - YAML Parser/Generator: development/yaml-parser-generator.md - Mixer Synchronisation: development/mixer-synchronisation.md +exclude_docs: | + README.md + extra_css: - assets/stylesheets/extra.css