mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-26 09:26:25 +08:00
Move PX4 Guide source into /docs (#24490)
* Add vitepress tree * Update existing workflows so they dont trigger on changes in the docs path * Add nojekyll, package.json, LICENCE etc * Add crowdin docs upload/download scripts * Add docs flaw checker workflows * Used docs prefix for docs workflows * Crowdin obvious fixes * ci: docs move to self hosted runner runs on a beefy server for faster builds Signed-off-by: Ramon Roche <mrpollo@gmail.com> * ci: don't run build action for docs or ci changes Signed-off-by: Ramon Roche <mrpollo@gmail.com> * ci: update runners Signed-off-by: Ramon Roche <mrpollo@gmail.com> * Add docs/en * Add docs assets and scripts * Fix up editlinks to point to PX4 sources * Download just the translations that are supported * Add translation sources for zh, uk, ko * Update latest tranlsation and uorb graphs * update vitepress to latest --------- Signed-off-by: Ramon Roche <mrpollo@gmail.com> Co-authored-by: Ramon Roche <mrpollo@gmail.com>
This commit is contained in:
@@ -0,0 +1,137 @@
|
||||
# Керівництво з підтримки плати PX4 від виробника
|
||||
|
||||
The PX4 development and test teams fully support and maintain boards that are compliant with the [Pixhawk Standard](https://pixhawk.org/standards/).
|
||||
Виробники, які бажають відхилитися від стандарту або створити зовсім нові плати, можуть це зробити, але їм буде потрібно підтримувати будь-які виникаючі різниці в сумісності.
|
||||
|
||||
This guide outlines the [general requirements](#general_requirements) for board support, along with the additional requirements for the different [board support categories](#board-support-categories).
|
||||
|
||||
:::info
|
||||
Boards that are not compliant with the requirements are [unsupported](#unsupported); they will not be listed on the PX4 website hardware list and will be removed from the codebase.
|
||||
:::
|
||||
|
||||
<a id="general_requirements"></a>
|
||||
|
||||
## Загальні вимоги
|
||||
|
||||
Загальні вимоги до всіх підтримуваних плат є наступні:
|
||||
|
||||
1. Апаратне забезпечення повинно бути доступним на ринку.
|
||||
|
||||
2. Плати не повинні мати апаратні помилки або неприйнятну якість, що робить неможливим або небезпечним використання плати з PX4 на БЛА.
|
||||
Плата повинна пройти критерії прийняття для забезпечення якості деталей та збірки.
|
||||
|
||||
3. Чіткий та простий спосіб зв'язатися з службою підтримки клієнтів для клієнтів.
|
||||
Один або декілька з наступних приймається:
|
||||
|
||||
- Присутність сервера PX4 у Discord
|
||||
- Електронна пошта підтримки
|
||||
- Номер телефону
|
||||
|
||||
4. Точка контакту (PoC) для зберігачів PX4 (прямий електронний лист або доступний у Slack/Форумі/Github)
|
||||
|
||||
5. The board needs to use the [PX4 bootloader protocol](https://github.com/PX4/PX4-Autopilot/tree/main/platforms/nuttx/src/bootloader).
|
||||
For more information on bootloaders see: [PX4 Nuttx Porting Guide > Bootloader](../hardware/porting_guide_nuttx.md#bootloader).
|
||||
|
||||
6. Достатня документація, яка включає, але не обмежується:
|
||||
|
||||
- Повний підключення, яке стало доступним для громадськості, яке відображає PX4 визначення контактів на:
|
||||
1. Піни мікроконтролера
|
||||
2. Фізичні зовнішні роз'ємники
|
||||
- A block diagram or full schematic of the main components (sensors, power supply, etc.) that allows to infer software requirements and boot order
|
||||
- Посібник з використання готового продукту
|
||||
|
||||
7. Має бути окрема веб-сторінка для плати з PX4, на якій перераховані функції та обмеження використання з PX4, включаючи або посилання на вищезазначену документацію.
|
||||
|
||||
## Категорії підтримки борди
|
||||
|
||||
Категорії підтримки плат перераховані нижче. The autopilot boards in each category are listed at: [https://px4.io/autopilots/.](https://px4.io/autopilots/)
|
||||
|
||||
:::info
|
||||
Manufacturer supported boards may be as well/better supported than Pixhawk boards (for example through economies of scale).
|
||||
:::
|
||||
|
||||
## Pixhawk Connector Standard
|
||||
|
||||
Плата Pixhawk - це та, яка відповідає стандартам Pixhawk. These standards are laid out on [http://pixhawk.org](http://pixhawk.org/), but at high-level require that the board passes electrical tests mandated by the standard and the manufacturer has signed the Pixhawk adopter and trademark agreement.
|
||||
|
||||
PX4 загалом підтримує лише плати, які є комерційно доступними, що зазвичай означає, що стандарти плат, випущені за останні п'ять років, підтримуються.
|
||||
|
||||
<a id="ver_rev_id"></a>
|
||||
|
||||
### Ідентифікатори VER та REV (Апаратна ревізія та виявлення версії)
|
||||
|
||||
У FMUv5 та пізніше є електричний механізм виявлення.
|
||||
Цей сенсорний зв'язок разом з необов'язковими даними конфігурації буде використовуватися для визначення конфігурації апаратного забезпечення щодо обов'язкової конфігурації пристрою та живлення. Manufacturers must obtain the VER and REV ID from PX4 board maintainers by issuing a PR to ammend the [DS-018 Pixhawk standard](https://github.com/pixhawk/Pixhawk-Standards) for board versions and revisions.
|
||||
|
||||
Оскільки ці борди на 100% відповідають стандарту Pixhawk, значення, призначені для VER та REV ID, є значеннями за замовчуванням для цієї версії FMU.
|
||||
|
||||
## Manufacturer-Supported Autopilots
|
||||
|
||||
Ці плати підтримуються виробником.
|
||||
Щоб відповідати цій категорії, борді необхідно працювати з останнім стабільним випуском PX4 протягом 4 місяців з моменту випуску.
|
||||
|
||||
- Виробник володіє підтримкою
|
||||
- Виробник повинен постачати принаймні 2 плати команді ядра-розробників (для використання на тестовому стелажі та командою тестування)
|
||||
|
||||
:::tip
|
||||
While there is no commitment from the PX4 maintainers and the flight test team to support and test boards in this category, we strongly recommended PX4 and manufacturer teams build close working relationships.
|
||||
Це призведе до кращого результату для всіх сторін.
|
||||
:::
|
||||
|
||||
:::info
|
||||
These boards will be assigned [VER and REV ID](#ver_rev_id) based on compatibility.
|
||||
Спеціальне завдання буде створено PX4, якщо плата є варіантом специфікації FMU і здатна запускати той самий бінарний файл, з незначними відмінностями, підтримуваними виробником.
|
||||
Contact the PX4 maintainer at [boards@px4.io](mailto:boards@px4.io) to request more information.
|
||||
:::
|
||||
|
||||
## Експериментальні налаштування
|
||||
|
||||
These boards are all boards that don't fall in the above categories, or don't fall in those categories _anymore_.
|
||||
Застосовуються наступні вимоги:
|
||||
|
||||
- Плата повинна працювати щонайменше з одним випуском PX4 для визначеного типу транспортного засобу, але не обов'язково з останнім випуском.
|
||||
|
||||
:::info
|
||||
Experimental boards that were _previously_ Pixhawk or Manufacturer supported will have/retain their original IDs.
|
||||
_New_ experimental boards are allocated [VER and REV IDs](#ver_rev_id) based on compatibility, in the same way as Manufacturer Supported boards.
|
||||
:::
|
||||
|
||||
## Непідтримувано
|
||||
|
||||
Ця категорія включає всі плати, які не підтримуються проектом PX4 або виробником, і що виходять за межі "експериментальної" підтримки.
|
||||
|
||||
- Плата на папері в певній мірі сумісна з чимось, що ми вже підтримуємо, і для того, щоб підняти її до рівня "експериментального", потрібно буде мінімальних зусиль, проте або команда розробників, або виробник наразі цим не займаються
|
||||
- Manufacturer/Owner of hardware violates our [Code of Conduct](https://discuss.px4.io/t/code-of-conduct/13655)
|
||||
- Закритий вихідний код, де будь-які необхідні інструменти/бібліотеки/драйвери тощо, необхідні для підтримки плати, вважаються несумісними через ліцензійні обмеження
|
||||
- Плата не відповідає мінімальним вимогам, визначеним у Загальних вимогах
|
||||
|
||||
:::info
|
||||
Unsupported boards will NOT be assigned [VER and REV ID](#ver_rev_id) (and cannot run PX4 FMUvX firmware).
|
||||
:::
|
||||
|
||||
## Процес випуску
|
||||
|
||||
Припускається, що коли виробник заявляє, що плата відноситься до певної категорії, ця дошка відповідає вимогам для цієї категорії та загальним вимогам.
|
||||
|
||||
Коли на ринок виводиться нова плата, яка входить до категорії, підтримуваної виробником або експериментальної, виробник відповідає за оновлення документації PX4 та виконання процесу випуску плати в PX4. Ми рекомендуємо виконати наступні кроки:
|
||||
|
||||
Contact PX4 board maintainers at [boards@px4.io](mailto:boards@px4.io) and request the following:
|
||||
|
||||
1. The assignment of a _board id_ for bootloader and firmware selection in QGC.
|
||||
2. Призначення значень резисторів REV та VER ID.
|
||||
3. Якщо плата підтримує USB: або запросіть призначення USB VID та PID, або надайте USB VID та PID.
|
||||
|
||||
Integrate the board according to the board porting release process described in the [porting guide](../hardware/porting_guide.md)
|
||||
|
||||
:::warning
|
||||
The board support process may be changed and improved over time.
|
||||
Виробники апаратного забезпечення закликаються брати участь у цьому процесі через регулярний виклик апаратного забезпечення, форум обговорень або Discord.
|
||||
:::
|
||||
|
||||
## Підтримка
|
||||
|
||||
Якщо частини керівного посібника/процесу не є зрозумілими:
|
||||
|
||||
- Ask the community for help on Discord channels under `Hardware` category, or on the discuss forum
|
||||
- Беріть участь у щотижневому виклику з апаратного забезпечення
|
||||
- Consultancy options are listed here: [https://px4.io/community/consultants/](https://px4.io/community/consultants/)
|
||||
@@ -0,0 +1,19 @@
|
||||
# Hardware Hardware Selection & Setup
|
||||
|
||||
У цьому розділі міститься інформація про повністю готові транспортні засоби PX4 і компоненти, які ви можете використовувати для створення власних дронів:
|
||||
|
||||
- [Flight Controllers (Autopilots)](../flight_controller/index.md) - Pixhawk and other FCs, firmware updates, other bootloaders
|
||||
- [Sensors](../sensor/index.md) — accelerometer, gyroscope, compass, airspeed, barometer, rangefinders, GNSS, RTK GNSS, Optical Flow, Tachometers, Factory calibration, thermal calibration.
|
||||
- [Actuators](../actuators/index.md) — Allocation, ESC, motors, servos
|
||||
- [Radio Control (RC)](../getting_started/rc_transmitter_receiver.md) — Manual control using an RC system
|
||||
- [Joysticks](../config/joystick.md) — Manual control using a Joystick connected to QGroundControl
|
||||
- [Data Links](../data_links/index.md) — MAVLink, telemetry radios, satellite comms
|
||||
- [Power Systems](../power_systems/index.md) — Battery estimation tuning, power modules, smart batteries
|
||||
- [Peripherals](../peripherals/index.md) — camera, gimbal, grippers, parachute, RemoteID, traffic avoidance etc.
|
||||
- [I2C Peripherals](../sensor_bus/i2c_general.md)
|
||||
- [CAN Peripherals](../can/index.md)
|
||||
- [DroneCAN Peripherals](../dronecan/index.md)
|
||||
- [Cable Wiring](../assembly/cable_wiring.md)
|
||||
- [Companion Computers](../companion_computer/index.md) — Setup, peripherals, computer vision, etc.
|
||||
- [Serial Port Configuration](../peripherals/serial_configuration.md)
|
||||
- [PX4 Ethernet Setup](../advanced_config/ethernet_setup.md)
|
||||
@@ -0,0 +1,17 @@
|
||||
# Інтеграція апаратних засобів
|
||||
|
||||
This section contains topics about integrating PX4 with _new_ autopilot and peripheral hardware, including:
|
||||
|
||||
- [Flight Controller Reference Design](../hardware/reference_design.md)
|
||||
- [Manufacturer’s Board Support Guide](../hardware/board_support_guide.md)
|
||||
- [Flight Controller Porting Guide](../hardware/porting_guide.md)
|
||||
- [Serial Port Mapping](../hardware/serial_port_mapping.md)
|
||||
- [Airframes](../dev_airframes/index.md)
|
||||
- [Device Drivers](../middleware/drivers.md)
|
||||
- [Telemetry Radio/Modems](../data_links/telemetry.md) and other communications links
|
||||
- [Sensor and Actuator I/O](../sensor_bus/index.md)
|
||||
- [RTK GPS (Integration)](../advanced/rtk_gps.md)
|
||||
|
||||
:::tip
|
||||
Other sections show how to _use_ and _configure_ supported [autopilot](../flight_controller/index.md), [companion computer](../companion_computer/index.md) and [peripheral](../peripherals/index.md) hardware.
|
||||
:::
|
||||
@@ -0,0 +1,98 @@
|
||||
# Керівництво з перенесення контролера польоту
|
||||
|
||||
This topic is for developers who want to port PX4 to work with _new_ flight controller hardware.
|
||||
|
||||
## Архітектура системи PX4
|
||||
|
||||
PX4 consists of two main layers: The [board support and middleware layer](../middleware/index.md) on top of the host OS (NuttX, Linux or any other POSIX platform like Mac OS), and the applications (Flight Stack in [src/modules](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules)\). Please reference the [PX4 Architectural Overview](../concept/architecture.md) for more information.
|
||||
|
||||
Цей посібник спрямований лише на операційну систему хоста та проміжне програмне забезпечення, оскільки програми/стек польоту будуть працювати на будь-якій цільовій платі.
|
||||
|
||||
## Налаштування режиму польоту файлової структури
|
||||
|
||||
Board startup and configuration files are located under [/boards](https://github.com/PX4/PX4-Autopilot/tree/main/boards/) in each board's vendor-specific directory (i.e. **boards/_VENDOR_/_MODEL_/**).
|
||||
|
||||
Наприклад, для FMUv5:
|
||||
|
||||
- (All) Board-specific files: [/boards/px4/fmu-v5](https://github.com/PX4/PX4-Autopilot/tree/main/boards/px4/fmu-v5).<!-- NEED px4_version -->
|
||||
- Build configuration: [/boards/px4/fmu-v5/default.px4board](https://github.com/PX4/PX4-Autopilot/blob/main/boards/px4/fmu-v5/default.px4board).<!-- NEED px4_version -->
|
||||
- Board-specific initialisation file: [/boards/px4/fmu-v5/init/rc.board_defaults](https://github.com/PX4/PX4-Autopilot/blob/main/boards/px4/fmu-v5/init/rc.board_defaults) <!-- NEED px4_version -->
|
||||
- A board-specific initialisation file is automatically included in startup scripts if found under the boards directory at **init/rc.board**.
|
||||
- Файл використовується для запуску сенсорів (та інших речей), які існують лише на конкретній платі.
|
||||
Це також може бути використано для встановлення параметрів за замовчуванням дошки, відображень UART та будь-яких інших виняткових випадків.
|
||||
- Для FMUv5 ви можете побачити, як запускаються всі датчики Pixhawk 4, а також встановлюється більший LOGGER_BUF.
|
||||
|
||||
## Конфігурація операційної системи хоста
|
||||
|
||||
Цей розділ описує призначення та місцезнаходження файлів конфігурації, необхідних для кожної підтримуваної операційної системи хоста, щоб перенести їх на нове апаратне засіб керування польотом.
|
||||
|
||||
### NuttX
|
||||
|
||||
See [NuttX Board Porting Guide](porting_guide_nuttx.md).
|
||||
|
||||
### Linux
|
||||
|
||||
Плати Linux не включають ОС та конфігурацію ядра.
|
||||
Ці дані вже надаються зображенням Linux, доступним для плати (яке повинно підтримувати інерційні сенсори з коробки).
|
||||
|
||||
- [boards/px4/raspberrypi/default.px4board](https://github.com/PX4/PX4-Autopilot/blob/main/boards/px4/raspberrypi/default.px4board) - RPi cross-compilation. <!-- NEED px4_version -->
|
||||
|
||||
## Компоненти та конфігурація проміжного програмного забезпечення
|
||||
|
||||
Цей розділ описує різноманітні компоненти проміжного програмного забезпечення та необхідні оновлення файлів конфігурації для перенесення їх на нове апаратне засіб керування польотом.
|
||||
|
||||
### QuRT / Шестикутник
|
||||
|
||||
- The start script is located in [posix-configs/](https://github.com/PX4/PX4-Autopilot/tree/main/posix-configs). <!-- NEED px4_version -->
|
||||
- Конфігурація ОС є частиною стандартного образу Linux (TODO: Вказати місце розташування ОБРАЗУ LINUX та інструкції щодо прошивки).
|
||||
- The PX4 middleware configuration is located in [src/boards](https://github.com/PX4/PX4-Autopilot/tree/main/boards). <!-- NEED px4_version --> TODO: ADD BUS CONFIG
|
||||
|
||||
## Рекомендації з підключення RC UART
|
||||
|
||||
Зазвичай рекомендується підключати RC через окремі піни RX та TX до мікроконтролера.
|
||||
Якщо, проте, RX та TX з'єднані разом, UART повинен бути переведений в режим одножильного кабелю, щоб уникнути будь-яких конфліктів.
|
||||
Це робиться за допомогою конфігураційної дошки та файлів маніфесту.
|
||||
One example is [px4fmu-v5](https://github.com/PX4/PX4-Autopilot/blob/main/boards/px4/fmu-v5/src/manifest.c). <!-- NEED px4_version -->
|
||||
|
||||
## Офіційно Підтримуване Обладнання
|
||||
|
||||
The PX4 project supports and maintains the [FMU standard reference hardware](../hardware/reference_design.md) and any boards that are compatible with the standard.
|
||||
This includes the [Pixhawk-series](../flight_controller/pixhawk_series.md) (see the user guide for a [full list of officially supported hardware](../flight_controller/index.md)).
|
||||
|
||||
Кожна офіційно підтримувана дошка користується наступними перевагами:
|
||||
|
||||
- Порт PX4 доступний у сховищі PX4
|
||||
- Automatic firmware builds that are accessible from _QGroundControl_
|
||||
- Сумісність з рештою екосистеми
|
||||
- Автоматизовані перевірки через CI - безпека залишається найважливішою для цієї спільноти
|
||||
- [Flight testing](../test_and_ci/test_flights.md)
|
||||
|
||||
We encourage board manufacturers to aim for full compatibility with the [FMU spec](https://pixhawk.org/).
|
||||
З повною сумісністю ви користуєтеся постійним розвитком PX4 щодня, але не маєте жодних витрат на обслуговування, які виникають у зв'язку з відхиленнями від специфікації.
|
||||
|
||||
:::tip
|
||||
Manufacturers should carefully consider the cost of maintenance before deviating from the specification (the cost to the manufacturer is proportional to the level of divergence).
|
||||
:::
|
||||
|
||||
We welcome any individual or company to submit their port for inclusion in our supported hardware, provided they are willing to follow our [Code of Conduct](https://github.com/PX4/PX4-Autopilot/blob/main/CODE_OF_CONDUCT.md) and work with the Dev Team to provide a safe and fulfilling PX4 experience to their customers.
|
||||
|
||||
Також важливо зауважити, що команда розробників PX4 має відповідальність випускати безпечне програмне забезпечення, тому ми вимагаємо, щоб будь-який виробник плати зобов'язався витрачати всі необхідні ресурси для підтримки їхнього порту в актуальному стані та працездатному.
|
||||
|
||||
Якщо ви хочете, щоб ваша дошка була офіційно підтримана в PX4:
|
||||
|
||||
- Ваше обладнання повинно бути доступним на ринку (тобто його можна придбати будь-якому розробнику без обмежень).
|
||||
- Hardware must be made available to the PX4 Dev Team so that they can validate the port (contact [lorenz@px4.io](mailto:lorenz@px4.io) for guidance on where to ship hardware for testing).
|
||||
- The board must pass full [test suite](../test_and_ci/index.md) and [flight testing](../test_and_ci/test_flights.md).
|
||||
|
||||
**The PX4 project reserves the right to refuse acceptance of new ports (or remove current ports) for failure to meet the requirements set by the project.**
|
||||
|
||||
You can reach out to the core developer team and community on the [official support channels](../contribute/support.md).
|
||||
|
||||
## Пов'язана інформація
|
||||
|
||||
- [Device Drivers](../middleware/drivers.md) - How to support new peripheral hardware (device drivers)
|
||||
- [Building the Code](../dev_setup/building_px4.md) - How to build source and upload firmware
|
||||
- Підтримувані автопілоти включають:
|
||||
- [Autopilot Hardware](../flight_controller/index.md)
|
||||
- [Supported boards list](https://github.com/PX4/PX4-Autopilot/#supported-hardware) (Github) - Boards for which PX4-Autopilot has specific code
|
||||
- [Supported Peripherals](../peripherals/index.md)
|
||||
@@ -0,0 +1,72 @@
|
||||
# PX4 Конфігурація плати (kconfig)
|
||||
|
||||
The PX4 Autopilot firmware can be configured at build time to adapt it for specialized applications (fixed-wing, multicopter, rover or more), to enable new and experimental features (such as Cyphal) or to save flash & RAM usage by disabling some drivers and subsystems.
|
||||
This configuration is handled through _Kconfig_, which is the same [configuration system used by NuttX](../hardware/porting_guide_nuttx.md#nuttx-menuconfig-setup).
|
||||
|
||||
The configuration options (often referred as "symbols" by the _kconfig_ language) are defined in `Kconfig` files under the **/src** directory.
|
||||
|
||||
## Конвенція найменування символів PX4 Kconfig
|
||||
|
||||
За умовчанням символи для модулів/драйверів називаються на основі шляху папки модуля.
|
||||
For example, the symbol for the ADC driver at `src/drivers/adc/board_adc` must be named `DRIVERS_ADC_BOARD_ADC`.
|
||||
|
||||
Для додавання символів для параметрів, специфічних для драйвера/модуля, конвенція найменування полягає в тому, що за ім'ям модуля слідує назва параметра.
|
||||
For example `UAVCAN_V1_GNSS_PUBLISHER` which is an option `GNSS_PUBLISHER` for the `UAVCAN_V1` module.
|
||||
The options have to be guarded behind an `if` statement to ensure that the options are only visible when the module itself is enabled.
|
||||
|
||||
Наприклад:
|
||||
|
||||
```
|
||||
menuconfig DRIVERS_UAVCAN_V1
|
||||
bool "UAVCANv1"
|
||||
default n
|
||||
---help---
|
||||
Enable support for UAVCANv1
|
||||
|
||||
if DRIVERS_UAVCAN_V1
|
||||
config UAVCAN_V1_GNSS_PUBLISHER
|
||||
bool "GNSS Publisher"
|
||||
default n
|
||||
endif #DRIVERS_UAVCAN_V1
|
||||
```
|
||||
|
||||
:::info
|
||||
Builds will silently ignore any missing or miss-spelled modules in the `*.px4board` configuration file.
|
||||
:::
|
||||
|
||||
## Успадкування мітки PX4 Kconfig
|
||||
|
||||
Each PX4 board must have a `default.px4board` configuration and can have an optional `bootloader.px4board configuration`.
|
||||
However you can add also separate configurations under a different label e.g. `cyphal.px4board`.
|
||||
Note that by default the configuration of `cyphal.px4board` inherits all settings set in `default.px4board`.
|
||||
When changing the `cyphal.px4board` it only stores the delta of the Kconfig keys that are different compared to `default.px4board`, this is useful to simplify configurations management
|
||||
|
||||
:::info
|
||||
When modifying a Kconfig key in `default.px4board` it will be modified in all derivative configurations of the same board that had the same config as well.
|
||||
:::
|
||||
|
||||
## Налаштування меню PX4 Menuconfig
|
||||
|
||||
The [menuconfig](https://pypi.org/project/kconfiglib/#menuconfig-interfaces) tool is used to modify the PX4 board configuration, adding/removing modules, drivers, and other features.
|
||||
|
||||
Існують варіанти командного рядка та графічного інтерфейсу, які можна запустити за допомогою скорочень збірки PX4:
|
||||
|
||||
```
|
||||
make px4_fmu-v5_default boardconfig
|
||||
make px4_fmu-v5_default boardguiconfig
|
||||
```
|
||||
|
||||
:::info
|
||||
_Kconfiglib_ and _menuconfig_ come with the _kconfiglib_ python package, which is installed by the normal [ubuntu.sh](https://github.com/PX4/PX4-Autopilot/blob/main/Tools/setup/ubuntu.sh) installation script.
|
||||
If _kconfiglib_ is not installed, you can do so using the command: `pip3 install kconfiglib`
|
||||
:::
|
||||
|
||||
Інтерфейс командного рядка та графічного інтерфейсу показані нижче.
|
||||
|
||||
### Інтерфейс користувача menuconfig GUI
|
||||
|
||||

|
||||
|
||||
### Інтерфейс командного рядка menuconfig
|
||||
|
||||

|
||||
@@ -0,0 +1,91 @@
|
||||
# Посібник з портування NuttX
|
||||
|
||||
Для портування PX4 на NuttX на новий апаратний пристрій, цей апаратний пристрій повинен бути підтриманий NuttX.
|
||||
The NuttX project maintains an excellent [porting guide](https://cwiki.apache.org/confluence/display/NUTTX/Porting+Guide) for porting NuttX to a new computing platform.
|
||||
|
||||
The following guide assumes you are using an already supported hardware target or have ported NuttX (including the [PX4 base layer](https://github.com/PX4/PX4-Autopilot/tree/main/platforms/nuttx/src/px4)) already.
|
||||
|
||||
The configuration files for all boards, including linker scripts and other required settings, are located under [/boards](https://github.com/PX4/PX4-Autopilot/tree/main/boards/) in a vendor- and board-specific directory (i.e. **boards/_VENDOR_/_MODEL_/**).
|
||||
|
||||
The following example uses FMUv5 as it is a recent [reference configuration](../hardware/reference_design.md) for NuttX based flight controllers:
|
||||
|
||||
- Running `make px4_fmu-v5_default` from the **PX4-Autopilot** directory will build the FMUv5 config
|
||||
- The base FMUv5 configuration files are located in: [/boards/px4/fmu-v5](https://github.com/PX4/PX4-Autopilot/tree/main/boards/px4/fmu-v5).
|
||||
- Board specific header (NuttX pins and clock configuration): [/boards/px4/fmu-v5/nuttx-config/include/board.h](https://github.com/PX4/PX4-Autopilot/blob/main/boards/px4/fmu-v5/nuttx-config/include/board.h).
|
||||
- Board specific header (PX4 configuration): [/boards/px4/fmu-v5/src/board_config.h](https://github.com/PX4/PX4-Autopilot/blob/main/boards/px4/fmu-v5/src/board_config.h).
|
||||
- NuttX OS config (created with NuttX menuconfig): [/boards/px4/fmu-v5/nuttx-config/nsh/defconfig](https://github.com/PX4/PX4-Autopilot/blob/main/boards/px4/fmu-v5/nuttx-config/nsh/defconfig).
|
||||
- Build configuration: [boards/px4/fmu-v5/default.px4board](https://github.com/PX4/PX4-Autopilot/blob/main/boards/px4/fmu-v5/default.px4board).
|
||||
|
||||
## Налаштування меню NuttX Menuconfig
|
||||
|
||||
To modify the NuttX OS configuration, you can use [menuconfig](https://bitbucket.org/patacongo/nuttx/src/master/) using the PX4 shortcuts:
|
||||
|
||||
```sh
|
||||
make px4_fmu-v5_default menuconfig
|
||||
make px4_fmu-v5_default qconfig
|
||||
```
|
||||
|
||||
For fresh installs of PX4 onto Ubuntu using [ubuntu.sh](https://github.com/PX4/PX4-Autopilot/blob/main/Tools/setup/ubuntu.sh) <!-- NEED px4_version --> you will also need to install _kconfig_ tools from [NuttX tools](https://bitbucket.org/nuttx/tools/src/master/).
|
||||
|
||||
:::info
|
||||
The following steps are not required if using the [px4-dev-nuttx](https://hub.docker.com/r/px4io/px4-dev-nuttx/) docker container or have installed to macOS using our normal instructions (as these include`kconfig-mconf`).
|
||||
:::
|
||||
|
||||
Виконайте наступні команди з будь-якого каталогу:
|
||||
|
||||
```sh
|
||||
git clone https://bitbucket.org/nuttx/tools.git
|
||||
cd tools/kconfig-frontends
|
||||
sudo apt install gperf
|
||||
./configure --enable-mconf --disable-nconf --disable-gconf --enable-qconf --prefix=/usr
|
||||
make
|
||||
sudo make install
|
||||
```
|
||||
|
||||
The `--prefix=/usr` determines the specific installation location (which must be in the `PATH` environment variable).
|
||||
The `--enable-mconf` and `--enable-qconf` options will enable the `menuconfig` and `qconfig` options respectively.
|
||||
|
||||
To run `qconfig` you may need to install additional Qt dependencies.
|
||||
|
||||
### Завантажувач
|
||||
|
||||
Спочатку вам знадобиться завантажувач, який залежить від цільового обладнання:
|
||||
|
||||
- STM32H7: завантажувач базується на NuttX та включений в прошивку PX4.
|
||||
See [here](https://github.com/PX4/PX4-Autopilot/tree/main/boards/holybro/durandal-v1/nuttx-config/bootloader) for an example.
|
||||
- Для всіх інших цілей використовується https://github.com/PX4/Bootloader. See [here](https://github.com/PX4/Bootloader/pull/155/files) for an example how to add a new target.
|
||||
Then checkout the [building and flashing instructions](../software_update/stm32_bootloader.md).
|
||||
|
||||
### Кроки портування прошивки
|
||||
|
||||
1. Make sure you have a working [development setup](../dev_setup/dev_env.md) and installed the NuttX \`menuconfig\`\` tool (see above).
|
||||
|
||||
2. Завантажте вихідний код і переконайтеся, що ви можете зібрати існуючу ціль:
|
||||
|
||||
```sh
|
||||
git clone --recursive https://github.com/PX4/PX4-Autopilot.git
|
||||
cd PX4-Autopilot
|
||||
make px4_fmu-v5
|
||||
```
|
||||
|
||||
3. Знаходьте існуючу ціль, яка використовує той самий (або тісно пов'язаний) тип ЦП, і скопіюйте її.
|
||||
Наприклад для STM32F7:
|
||||
|
||||
```sh
|
||||
mkdir boards/manufacturer
|
||||
cp -r boards/px4/fmu-v5 boards/manufacturer/my-target-v1
|
||||
```
|
||||
|
||||
Change **manufacturer** to the manufacturer name and **my-target-v1** to your board name.
|
||||
|
||||
Next you need to go through all files under **boards/manufacturer/my-target-v1** and update them according to your board.
|
||||
|
||||
1. **firmware.prototype**: update the board ID and name
|
||||
2. **default.px4board**: update the **VENDOR** and **MODEL** to match the directory names (**my-target-v1**).
|
||||
Налаштування послідовних портів.
|
||||
3. Configure NuttX (**defconfig**) via `make manufacturer_my-target-v1 menuconfig`: Adjust the CPU and chip, configure the peripherals (UART's, SPI, I2C, ADC).
|
||||
4. **nuttx-config/include/board.h**: Configure the NuttX pins.
|
||||
Для всіх зовнішніх пристроїв з кількома варіантами контактів, NuttX повинен знати контакт.
|
||||
They are defined in the chip-specific pinmap header file, for example [stm32f74xx75xx_pinmap.h](https://github.com/PX4/NuttX/blob/px4_firmware_nuttx-8.2/arch/arm/src/stm32f7/hardware/stm32f74xx75xx_pinmap.h).
|
||||
5. **src**: go through all files under **src** and update them as needed, in particular **board_config.h**.
|
||||
6. **init/rc.board_sensors**: start the sensors that are attached to the board.
|
||||
@@ -0,0 +1,52 @@
|
||||
# Проектування контролера польоту PX4
|
||||
|
||||
The PX4 reference design is the [Pixhawk series](../flight_controller/pixhawk_series.md) of flight controllers. First released in 2011, this design is now in its 5th [generation](#reference_design_generations) (with the 6th generation board design in progress).
|
||||
|
||||
## Сумісність з бінарним кодом
|
||||
|
||||
Всі плати, виготовлені за певним дизайном, мають бути сумісними з двійковим кодом (тобто можуть запускати ту ж саму прошивку). З 2018 року ми будемо надавати набір тестів для перевірки бінарної сумісності, який дозволить нам перевірити та сертифікувати цю сумісність.
|
||||
|
||||
Покоління FMU 1-3 були розроблені як відкрите обладнання, тоді як покоління FMU 4 та 5 надали лише специфікації роз'ємів та живлення (схеми були створені окремими виробниками). Для кращої сумісності, починаючи з FMUv6 і пізніше, буде використано повний модельний референтний дизайн.
|
||||
|
||||
<a id="reference_design_generations"></a>
|
||||
|
||||
## Reference Design Generations
|
||||
|
||||
- FMUv1: Development board \(STM32F407, 128 KB RAM, 1MB flash, [schematics](https://github.com/PX4/Hardware/tree/master/FMUv1)\) (no longer supported by PX4)
|
||||
- FMUv2: Pixhawk \(STM32F427, 168 MHz, 192 KB RAM, 1MB flash, [schematics](https://github.com/PX4/Hardware/tree/master/FMUv2)\)
|
||||
- FMUv3: Pixhawk variants with 2MB flash \(3DR Pixhawk 2 \(Solo\), Hex Pixhawk 2.1, Holybro Pixfalcon, 3DR Pixhawk Mini, STM32F427, 168 MHz, 256 KB RAM, 2 MB flash, [schematics](https://github.com/PX4/Hardware/tree/master/FMUv3_REV_D)\)
|
||||
- FMUv4: Pixracer \(STM32F427, 168 MHz, 256 KB RAM, 2 MB flash, [pinout](https://docs.google.com/spreadsheets/d/1raRRouNsveQz8cj-EneWG6iW0dqGfRAifI91I2Sr5E0/edit#gid=1585075739)\)
|
||||
- FMUv4 PRO: Drotek Pixhawk 3 PRO \(STM32F469, 180 MHz, 384 KB RAM, 2 MB flash, [pinout](https://docs.google.com/spreadsheets/d/1raRRouNsveQz8cj-EneWG6iW0dqGfRAifI91I2Sr5E0/edit#gid=1585075739)\)
|
||||
- FMUv5: Holybro Pixhawk 4 \(STM32F765, 216 MHz, 512 KB RAM, 2 MB flash, [pinout](https://docs.google.com/spreadsheets/d/1-n0__BYDedQrc_2NHqBenG1DNepAgnHpSGglke-QQwY/edit#gid=912976165)\)
|
||||
- FMUv5X: (Multiple Products) \(STM32F765, 400 MHz, 512KB RAM, 2 MB flash\) ([standard](https://github.com/pixhawk/Pixhawk-Standards/blob/master/DS-011%20Pixhawk%20Autopilot%20v5X%20Standard.pdf))
|
||||
- FMUv6X: (Multiple Products) \(STM32H753, 480 MHz, 1 MB RAM, 2 MB flash\) and variant 6i \(i.MX RT1050, 600 MHz, 512 KB RAM, external flash\) ([standard](https://github.com/pixhawk/Pixhawk-Standards/blob/master/DS-012%20Pixhawk%20Autopilot%20v6X%20Standard.pdf))
|
||||
- FMUv6C: (Multiple Products) \(STM32H743V, 480 MHz, 1 MB RAM, 2 MB flash\) ([standard](https://github.com/pixhawk/Pixhawk-Standards/blob/master/DS-018%20Pixhawk%20Autopilot%20v6C%20Standard.pdf))
|
||||
- FMUv6U: (Multiple Products) \(STM32H753, 400 MHz, 1 MB RAM, 2 MB flash\) ([standard](https://github.com/pixhawk/Pixhawk-Standards/blob/master/DS-016%20Pixhawk%20Autopilot%20v6U%20Standard.pdf))
|
||||
- FMUv6X-RT: (Multiple Products) \(NXP i.MX RT1176, 32 Bit Arm® Cortex®-M7, 1GHz 32 Bit Arm® Cortex®-M4, 400MHz secondary core, 2 MB RAM, 64 MB flash\) and variant 6i \(i.MX RT1050, 600 MHz, 512 KB RAM, external flash\) ([standard](https://github.com/pixhawk/Pixhawk-Standards/blob/master/DS-020%20Pixhawk%20Autopilot%20v6X-RT%20Standard.pdf))
|
||||
|
||||
Starting with FMUv5X all new standards are published on GitHub under [Pixhawk/Pixhawk-Standards](https://github.com/pixhawk/Pixhawk-Standards). See [Pixhawk.org](https://pixhawk.org) for more info.
|
||||
|
||||
## Розподіл функцій основної / ввід-вивідної функції
|
||||
|
||||
Діаграма нижче показує розподіл обов'язків автобуса та функціональних відповідальностей між платами FMU та I/O в контролері польоту серії Pixhawk (плати вбудовані в один фізичний модуль).
|
||||
|
||||

|
||||
|
||||
<!-- Draw.io version of file can be found here: https://drive.google.com/file/d/1H0nK7Ufo979BE9EBjJ_ccVx3fcsilPS3/view?usp=sharing -->
|
||||
|
||||
Деякі контролери серії Pixhawk будуються без плати введення-виведення для зменшення розміру або складності, або для кращого вирішення певних сценаріїв використання плати.
|
||||
У цьому випадку І/O драйвер не запущений.
|
||||
|
||||
:::info
|
||||
Manufacturer flight controller variants without an I/O board are often named as a "diminutive" of a version that includes the I/O board: e.g. _Pixhawk 4_ **Mini**_, \_CUAV v5 **nano**_.
|
||||
:::
|
||||
|
||||
Build targets that must run on flight controllers with an I/O board map the FMU outputs to `AUX` and the I/0 outputs to `MAIN` (see diagram above).
|
||||
Якщо ціль запускається на обладнанні, де відсутня або вимкнена плата вводу-виводу, вихідні сигнали головних ШШ не будуть присутні.
|
||||
You might see this, for example, by running `px4_fmu-v5_default` on [Pixhawk 4](../flight_controller/pixhawk4.md) (with IO) and [Pixhawk 4 Mini](../flight_controller/pixhawk4_mini.md) (without I/O).
|
||||
|
||||
:::warning
|
||||
On [Pixhawk 4 Mini](../flight_controller/pixhawk4_mini.md) this results in a mismatch between the `MAIN` label screenprinted on the flight controller and the `AUX` bus shown during [Actuator Configuration](../config/actuators.md).
|
||||
::: info that if a build target is only ever intended to run on a flight controller that does not have an I/0 board, then the FMU outputs are mapped to `MAIN` (for example, the `px4_fmu-v4_default` target for [Pixracer](../flight_controller/pixracer.md)).
|
||||
|
||||
PX4 PWM outputs are mapped to either `MAIN` or `AUX` ports in [Actuator Configuration](../config/actuators.md).
|
||||
@@ -0,0 +1,141 @@
|
||||
# Налаштування послідовного порту
|
||||
|
||||
This topic shows how to determine the mapping between USART/UART serial port device names (e.g. "ttyS0") and the associated ports on a flight controller, such as `TELEM1`, `TELEM2`, `GPS1`, `RC SBUS`, `Debug console`.
|
||||
|
||||
Інструкції використовуються для генерації таблиць відповідності портів серійного зв'язку у документації контролера польоту.
|
||||
For example: [Pixhawk 4 > Serial Port Mapping](../flight_controller/pixhawk4.md#serial-port-mapping).
|
||||
|
||||
:::info
|
||||
The function assigned to each port does not _have to_ match the name (in most cases), and is set using a [Serial Port Configuration](../peripherals/serial_configuration.md).
|
||||
Usually the port function is configured to match the name, which is why the port labelled `GPS1` will work with a GPS out of the box.
|
||||
:::
|
||||
|
||||
## NuttX на STMxxyyy
|
||||
|
||||
<!-- instructions from DavidS here: https://github.com/PX4/PX4-user_guide/pull/672#issuecomment-598198434 -->
|
||||
|
||||
У цьому розділі показано, як отримати зіставлення для збірок NuttX на архітектурах STMxxyyy, перевіряючи файли конфігурації плати.
|
||||
Інструкції використовують FMUv5, але можуть бути аналогічно розширені для інших версій FMU або плат NuttX.
|
||||
|
||||
### default.px4board
|
||||
|
||||
The **default.px4board** lists a number of serial port mappings (search for the text "SERIAL_PORTS").
|
||||
|
||||
From [/boards/px4/fmu-v5/default.px4board](https://github.com/PX4/PX4-Autopilot/blob/main/boards/px4/fmu-v5/default.px4board):
|
||||
|
||||
```
|
||||
CONFIG_BOARD_SERIAL_GPS1="/dev/ttyS0"
|
||||
CONFIG_BOARD_SERIAL_TEL1="/dev/ttyS1"
|
||||
CONFIG_BOARD_SERIAL_TEL2="/dev/ttyS2"
|
||||
CONFIG_BOARD_SERIAL_TEL4="/dev/ttyS3"
|
||||
```
|
||||
|
||||
Alternatively you can launch boardconfig using `make px4_fmu-v5 boardconfig` and access the serial port menu
|
||||
|
||||
```
|
||||
Serial ports --->
|
||||
(/dev/ttyS0) GPS1 tty port
|
||||
() GPS2 tty port
|
||||
() GPS3 tty port
|
||||
() GPS4 tty port
|
||||
() GPS5 tty port
|
||||
(/dev/ttyS1) TEL1 tty port
|
||||
(/dev/ttyS2) TEL2 tty port
|
||||
() TEL3 tty port
|
||||
(/dev/ttyS3) TEL4 tty port
|
||||
() TEL5 tty port
|
||||
```
|
||||
|
||||
### nsh/defconfig
|
||||
|
||||
The _nsh/defconfig_ allows you to determine which ports are defined, whether they are UART or USARTs, and the mapping between USART/UART and device.
|
||||
You can also determine which port is used for the [serial/debug console](../debug/system_console.md).
|
||||
|
||||
Open the board's defconfig file, for example: [/boards/px4/fmu-v5/nuttx-config/nsh/defconfig](https://github.com/PX4/PX4-Autopilot/blob/main/boards/px4/fmu-v5/nuttx-config/nsh/defconfig#L215-L221)
|
||||
|
||||
Search for the text "ART" until you find a section like with entries formatted like `CONFIG_STM32xx_USARTn=y` (where `xx` is a processor type and `n` is a port number).
|
||||
Наприклад:
|
||||
|
||||
```
|
||||
CONFIG_STM32F7_UART4=y
|
||||
CONFIG_STM32F7_UART7=y
|
||||
CONFIG_STM32F7_UART8=y
|
||||
CONFIG_STM32F7_USART1=y
|
||||
CONFIG_STM32F7_USART2=y
|
||||
CONFIG_STM32F7_USART3=y
|
||||
CONFIG_STM32F7_USART6=y
|
||||
```
|
||||
|
||||
Записи показують, які порти визначено, і чи вони є UART або USART.
|
||||
|
||||
Скопіюйте вищенаведений розділ і перегрупуйте його числово за "n".
|
||||
Increment the device number _ttyS**n**_ alongside (zero based) to get the device-to-serial-port mapping.
|
||||
|
||||
```
|
||||
ttyS0 CONFIG_STM32F7_USART1=y
|
||||
ttyS1 CONFIG_STM32F7_USART2=y
|
||||
ttyS2 CONFIG_STM32F7_USART3=y
|
||||
ttyS3 CONFIG_STM32F7_UART4=y
|
||||
ttyS4 CONFIG_STM32F7_USART6=y
|
||||
ttyS5 CONFIG_STM32F7_UART7=y
|
||||
ttyS6 CONFIG_STM32F7_UART8=y
|
||||
```
|
||||
|
||||
To get the DEBUG console mapping we search the [defconfig file](https://github.com/PX4/PX4-Autopilot/blob/main/boards/px4/fmu-v5/nuttx-config/nsh/defconfig#L212) for `SERIAL_CONSOLE`.
|
||||
Нижче ми бачимо, що консоль знаходиться на UART7:
|
||||
|
||||
```
|
||||
CONFIG_UART7_SERIAL_CONSOLE=y
|
||||
```
|
||||
|
||||
### board_config.h
|
||||
|
||||
For flight controllers that have an IO board, determine the PX4IO connection from **board_config.h** by searching for `PX4IO_SERIAL_DEVICE`.
|
||||
|
||||
For example, [/boards/px4/fmu-v5/src/board_config.h](https://github.com/PX4/PX4-Autopilot/blob/main/boards/px4/fmu-v5/src/board_config.h#L59):
|
||||
|
||||
```
|
||||
#define PX4IO_SERIAL_DEVICE "/dev/ttyS6"
|
||||
#define PX4IO_SERIAL_TX_GPIO GPIO_UART8_TX
|
||||
#define PX4IO_SERIAL_RX_GPIO GPIO_UART8_RX
|
||||
#define PX4IO_SERIAL_BASE STM32_UART8_BASE
|
||||
```
|
||||
|
||||
So the PX4IO is on `ttyS6` (we can also see that this maps to UART8, which we already knew from the preceding section).
|
||||
|
||||
### Підсумовуючи все це разом,
|
||||
|
||||
Остаточне відображення таке:
|
||||
|
||||
```
|
||||
ttyS0 CONFIG_STM32F7_USART1=y GPS1
|
||||
ttyS1 CONFIG_STM32F7_USART2=y TEL1
|
||||
ttyS2 CONFIG_STM32F7_USART3=y TEL2
|
||||
ttyS3 CONFIG_STM32F7_UART4=y TEL4
|
||||
ttyS4 CONFIG_STM32F7_USART6=y
|
||||
ttyS5 CONFIG_STM32F7_UART7=y DEBUG
|
||||
ttyS6 CONFIG_STM32F7_UART8=y PX4IO
|
||||
```
|
||||
|
||||
In the [flight controller docs](../flight_controller/pixhawk4.md#serial-port-mapping) the resulting table is:
|
||||
|
||||
| UART | Пристрій | Порт |
|
||||
| ------ | ---------- | --------------------------------------------- |
|
||||
| UART1 | /dev/ttyS0 | GPS |
|
||||
| USART2 | /dev/ttyS1 | TELEM1 (керування потоком) |
|
||||
| USART3 | /dev/ttyS2 | TELEM2 (керування потоком) |
|
||||
| UART4 | /dev/ttyS3 | TELEM4 |
|
||||
| USART6 | /dev/ttyS4 | RC SBUS |
|
||||
| UART7 | /dev/ttyS5 | Debug Console |
|
||||
| UART8 | /dev/ttyS6 | PX4IO |
|
||||
|
||||
## Інші архітектури
|
||||
|
||||
:::info
|
||||
Contributions welcome!
|
||||
:::
|
||||
|
||||
## Дивіться також
|
||||
|
||||
- [Serial Port Configuration](../peripherals/serial_configuration.md)
|
||||
- [MAVLink Telemetry (OSD/GCS)](../peripherals/mavlink_peripherals.md)
|
||||
Reference in New Issue
Block a user