Керівництво з перенесення контролера польоту
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 on top of the host OS (NuttX, Linux or any other POSIX platform like Mac OS), and the applications (Flight Stack in src/modules). Please reference the PX4 Architectural Overview for more information.
Цей посібник спрямований лише на операційну систему хоста та проміжне програмне забезпечення, оскільки програми/стек польоту будуть працювати на будь-якій цільовій платі.
Налаштування режиму польоту файлової структури
Board startup and configuration files are located under /boards in each board's vendor-specific directory (i.e. boards/VENDOR/MODEL/).
Наприклад, для FMUv5:
- (All) Board-specific files: /boards/px4/fmu-v5.
- Build configuration: /boards/px4/fmu-v5/default.px4board.
- Board-specific initialisation file: /boards/px4/fmu-v5/init/rc.board_defaults
- 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.
Linux
Плати Linux не включають ОС та конфігурацію ядра. Ці дані вже надаються зображенням Linux, доступним для плати (яке повинно підтримувати інерційні сенсори з коробки).
- boards/px4/raspberrypi/default.px4board - RPi cross-compilation.
Компоненти та конфігурація проміжного програмного забезпечення
Цей розділ описує різноманітні компоненти проміжного програмного забезпечення та необхідні оновлення файлів конфігурації для перенесення їх на нове апаратне засіб керування польотом.
QuRT / Шестикутник
- The start script is located in posix-configs/.
- Конфігурація ОС є частиною стандартного образу Linux (TODO: Вказати місце розташування ОБРАЗУ LINUX та інструкції щодо прошивки).
- The PX4 middleware configuration is located in src/boards. TODO: ADD BUS CONFIG
Рекомендації з підключення RC UART
Зазвичай рекомендується підключати RC через окремі піни RX та TX до мікроконтролера. Якщо, проте, RX та TX з'єднані разом, UART повинен бути переведений в режим одножильного кабелю, щоб уникнути будь-яких конфліктів. Це робиться за допомогою конфігураційної дошки та файлів маніфесту. One example is px4fmu-v5.
Getting Your Board Supported
This page covers the technical work of porting PX4 to new hardware. The process for getting that port reviewed, merged, and listed on the PX4 website, including board IDs, USB VID/PID, flight-test evidence, and maintenance expectations, is documented separately:
In short: build your own firmware target based on PX4, demonstrate stable flight on the current release, and open a pull request with your board support code, documentation, and flight logs. The board support guide explains each step.
The PX4 project supports and maintains the FMU standard reference hardware and any boards compatible with the standard, including the Pixhawk series (see the full list of supported hardware). Boards merged into PX4 benefit from a port in the repository, firmware builds accessible from QGroundControl, compatibility with the rest of the ecosystem, and automated CI checks.
TIP
The cost of maintaining a port is proportional to how far it diverges from the standard. Consider that cost before deviating: staying close to the reference design lets you benefit from day-to-day PX4 development with minimal maintenance burden.
Manufacturers are responsible for keeping their port up to date and working across PX4 releases. The PX4 project reserves the right to refuse or remove ports that do not meet the project's requirements, and all contributors are expected to follow the Code of Conduct.
Пов'язана інформація
- Device Drivers - How to support new peripheral hardware (device drivers)
- Building the Code - How to build source and upload firmware
- Підтримувані автопілоти включають:
- Autopilot Hardware
- Supported boards list (Github) - Boards for which PX4-Autopilot has specific code
- Supported Peripherals