PX4-Autopilot/Kconfig
Ramon Roche 63f059fd47
manifest: add label_pretty and firmware_category fields
Add human-readable labels and firmware classification to the build
manifest so ground stations like QGC can display friendly names and
filter builds by category.

New fields:
- label_pretty: human-readable variant name (e.g. "Multicopter")
- firmware_category: auto-detected classification
  - "vehicle" for multicopter, fixedwing, vtol, rover, uuv, spacecraft
  - "peripheral" for CAN sensor nodes (GPS, flow, mag, etc.)
  - "bootloader" for bootloader/canbootloader
  - "dev" for everything else (default, zenoh, mavlink-dev, etc.)

Peripheral detection uses ROMFSROOT="cannode" which is shared by all
~18 CAN sensor boards across ARK, Holybro, CUAV, Freefly, Matek, NXP.

A build-time warning fires when an unrecognized label falls through to
"dev", so new vehicle types are not silently hidden from end users.

Boards can override via CONFIG_BOARD_FIRMWARE_CATEGORY in .px4board.
CONFIG_BOARD_LABEL_PRETTY set on all px4/fmu-v6x variants as Phase 1.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-04-08 17:37:54 -07:00

257 lines
6.8 KiB
Plaintext

# PX4 Firmware Configuration
mainmenu "PX4 Firmware Configuration"
comment "Vendor: $(VENDOR)"
comment "Model: $(MODEL)"
comment "Label: $(LABEL)"
menu "Toolchain"
choice
prompt "Platform"
default PLATFORM_NUTTX
config PLATFORM_NUTTX
bool "nuttx"
config PLATFORM_POSIX
bool "posix"
config PLATFORM_QURT
bool "qurt"
config PLATFORM_ROS2
bool "ros2"
endchoice
config BOARD_PLATFORM
string
default "nuttx" if PLATFORM_NUTTX
default "posix" if PLATFORM_POSIX
default "qurt" if PLATFORM_QURT
default "ros2" if PLATFORM_ROS2
config BOARD_LOCKSTEP
bool "Force enable lockstep"
depends on PLATFORM_POSIX
help
forces lockstep behaviour, despite REPLAY env variable
config BOARD_NOLOCKSTEP
bool "Force disable lockstep"
depends on PLATFORM_POSIX
help
forces nolockstep behaviour, despite REPLAY env variable
config BOARD_LINUX_TARGET
bool "Linux OS Target"
depends on PLATFORM_POSIX
help
Board Platform is running the Linux operating system
config BOARD_TOOLCHAIN
string "Toolchain"
default ""
config BOARD_ARCHITECTURE
string "Architecture"
default ""
config BOARD_LABEL_PRETTY
string "Human-readable label for this build variant"
default ""
help
A short display name for this build variant (e.g. "Multicopter",
"Rover"). Used by ground stations like QGC to show a user-friendly
name instead of raw target strings. Must be set in every .px4board
variant file because non-base variants inherit from default.
config BOARD_FIRMWARE_CATEGORY
string "Firmware category override (vehicle, peripheral, dev, bootloader)"
default ""
help
Override the auto-detected firmware category. Normally inferred
from the build label and board config: vehicle types (multicopter,
fixedwing, etc.) map to "vehicle", bootloader/canbootloader map to
"bootloader", CAN peripheral boards (ROMFSROOT=cannode) map to
"peripheral", and everything else maps to "dev". Set this only
when the auto-detection is wrong for a particular board variant.
IMPORTANT: If you add a new vehicle type with a label not yet in
_VEHICLE_LABELS (in gen_board_manifest_from_defconfig.py), either
add it there or set this to "vehicle" — otherwise the build will
be hidden from end-users in QGC.
config BOARD_LTO
bool "(EXPERIMENTAL) Link Time Optimization (LTO)"
default n
help
Enables LTO flag in linker
Note: Highly EXPERIMENTAL, furthermore make sure you're using a modern compiler GCC 9 or later
config BOARD_FULL_OPTIMIZATION
bool "Full optmization (O3)"
default n
help
Enables Cmake Release for -O3 optimization
config BOARD_SUPPORT_FORTIFIED_TOOLCHAIN
bool "Fortified toolchain support"
default n
help
Enable compatibility with toolchains that define
_FORTIFY_SOURCE.
This switches PX4_DEBUG_OPT_LEVEL from -O0 to -Og. Keep this
disabled unless the fortified toolchain requires optimization.
config BOARD_ROMFSROOT
string "ROMFSROOT"
default "px4fmu_common"
help
relative path to the ROMFS root directory
config BOARD_ADDITIONAL_INIT
string "Additional init file"
help
additional configurable init file to include in the ROMFS
config BOARD_IO
string "IO board name"
default "px4_io-v2_default"
depends on DRIVERS_PX4IO
help
name of IO board to be built and included in the ROMFS (requires a valid ROMFSROOT)
config BOARD_CONSTRAINED_FLASH
bool "Contrained flash"
help
flag to enable constrained flash options (eg limit init script status text)
config BOARD_NO_HELP
bool "No help"
help
optional condition flag to disable help text on constrained flash systems
config BOARD_CONSTRAINED_MEMORY
bool "Contrained memory"
help
flag to enable constrained memory options (eg limit maximum number of uORB publications)
config BOARD_EXTERNAL_METADATA
bool "External metadata"
help
flag to exclude metadata to reduce flash
config BOARD_LINKER_PREFIX
string "linker prefix"
help
optional to prefix on the Linker script.
config BOARD_COMPILE_DEFINITIONS
string "add custom compile definitions"
help
add custom compile defitions to this specific target
endmenu #Toolchain
config BOARD_TESTING
bool "Testing"
select SYSTEMCMDS_TESTS
help
flag to enable automatic inclusion of PX4 testing modules
config BOARD_ETHERNET
bool "Ethernet"
help
flag to indicate that ethernet is enabled
config BOARD_CRYPTO
bool "Crypto support"
help
Enable PX4 Crypto Support. Select the implementation under drivers
config BOARD_PROTECTED
bool "Memory protection"
help
Enable memory protection via MPU/MMU
menu "Serial ports"
config BOARD_SERIAL_URT6
string "URT6 tty port"
config BOARD_SERIAL_GPS1
string "GPS1 tty port"
config BOARD_SERIAL_GPS2
string "GPS2 tty port"
config BOARD_SERIAL_GPS3
string "GPS3 tty port"
config BOARD_SERIAL_GPS4
string "GPS4 tty port"
config BOARD_SERIAL_GPS5
string "GPS5 tty port"
config BOARD_SERIAL_TEL1
string "TEL1 tty port"
config BOARD_SERIAL_TEL2
string "TEL2 tty port"
config BOARD_SERIAL_TEL3
string "TEL3 tty port"
config BOARD_SERIAL_TEL4
string "TEL4 tty port"
config BOARD_SERIAL_TEL5
string "TEL5 tty port"
config BOARD_SERIAL_RC
string "RC tty port"
config BOARD_SERIAL_WIFI
string "WIFI tty port"
config BOARD_SERIAL_EXT2
string "EXT2 tty port"
endmenu
menu "File paths"
config BOARD_ROOT_PATH
string "PX4 Root file path"
default "/fs/microsd"
config BOARD_PARAM_FILE
string "Parameter file"
default "/fs/mtd_params"
endmenu
menu "drivers"
source "src/drivers/Kconfig"
endmenu
menu "modules"
source "src/modules/Kconfig"
endmenu
menu "systemcmds"
source "src/systemcmds/Kconfig"
endmenu
menu "examples"
source "src/examples/Kconfig"
endmenu
menu "templates"
source "src/templates/Kconfig"
endmenu
menu "platforms"
depends on PLATFORM_QURT || PLATFORM_POSIX || PLATFORM_NUTTX
source "platforms/Kconfig"
endmenu
source "src/lib/*/Kconfig"