Commit Graph

1114 Commits

Author SHA1 Message Date
Matthias Grob
7b68c5dbfc parameters: remove parameters_injected.xml and support for it in the build system (#25549)
This was apparently added 10 years ago to store metadata of UAVCAN components within the PX4 binary. The parameters in the xml are mostly early UAVCAN ESC parameters that are presumably out of date and not used. Also it does not scale to maintain metadata for all the possible UAVCAN components and it causes confusion when users read the metadata documentation because these parameters are not available in PX4. That's why I suggest to remove it.
2025-09-11 10:47:45 -08:00
Alexander Lerach
138427b3a8 config: add dynamic init file
Some checks failed
Build all targets / Scan for Board Targets (push) Has been cancelled
Build all targets / Build Group [${{ matrix.group }}][${{ matrix.arch == 'nuttx' && 'x86' || 'arm64' }}] (push) Has been cancelled
Build all targets / Upload Artifacts to S3 (push) Has been cancelled
Build all targets / Create Release and Upload Artifacts (push) Has been cancelled
Checks / build (NO_NINJA_BUILD=1 px4_fmu-v5_default) (push) Has been cancelled
Checks / build (NO_NINJA_BUILD=1 px4_sitl_default) (push) Has been cancelled
Checks / build (check_format) (push) Has been cancelled
Checks / build (check_newlines) (push) Has been cancelled
Checks / build (module_documentation) (push) Has been cancelled
Checks / build (px4_fmu-v2_default stack_check) (push) Has been cancelled
Checks / build (px4_sitl_allyes) (push) Has been cancelled
Checks / build (shellcheck_all) (push) Has been cancelled
Checks / build (tests) (push) Has been cancelled
Checks / build (tests_coverage) (push) Has been cancelled
Checks / build (validate_module_configs) (push) Has been cancelled
Clang Tidy / build (push) Has been cancelled
MacOS build / build (px4_fmu-v5_default) (push) Has been cancelled
MacOS build / build (px4_sitl) (push) Has been cancelled
Ubuntu environment build / Build and Test (ubuntu:22.04) (push) Has been cancelled
Ubuntu environment build / Build and Test (ubuntu:24.04) (push) Has been cancelled
Container build / Set Tags and Variables (push) Has been cancelled
Container build / Build Container (amd64) (push) Has been cancelled
Container build / Build Container (arm64) (push) Has been cancelled
Container build / Deploy To Registry (push) Has been cancelled
EKF Update Change Indicator / unit_tests (push) Has been cancelled
Failsafe Simulator Build / build (failsafe_web) (push) Has been cancelled
FLASH usage analysis / Analyzing px4_fmu-v5x (push) Has been cancelled
FLASH usage analysis / Analyzing px4_fmu-v6x (push) Has been cancelled
FLASH usage analysis / Publish Results (push) Has been cancelled
ITCM check / Checking nxp_tropic-community (push) Has been cancelled
ITCM check / Checking px4_fmu-v5x (push) Has been cancelled
ITCM check / Checking px4_fmu-v6xrt (push) Has been cancelled
MAVROS Mission Tests / build (map[mission:MC_mission_box vehicle:iris]) (push) Has been cancelled
MAVROS Offboard Tests / build (map[test_file:mavros_posix_tests_offboard_posctl.test vehicle:iris]) (push) Has been cancelled
Nuttx Target with extra env config / build (px4_fmu-v5_default) (push) Has been cancelled
Python CI Checks / build (push) Has been cancelled
ROS Integration Tests / build (push) Has been cancelled
ROS Translation Node Tests / Build and test (map[ros_version:humble ubuntu:jammy]) (push) Has been cancelled
ROS Translation Node Tests / Build and test (map[ros_version:jazzy ubuntu:noble]) (push) Has been cancelled
SITL Tests / Testing PX4 tailsitter (push) Has been cancelled
SITL Tests / Testing PX4 iris (push) Has been cancelled
SITL Tests / Testing PX4 standard_vtol (push) Has been cancelled
Docs - Crowdin - Upload Guide sources (en) / upload-to-crowdin (push) Has been cancelled
Docs - Deploy PX4 User Guide / build (push) Has been cancelled
Docs - Deploy PX4 User Guide to AWS / build (push) Has been cancelled
Docs - Deploy PX4 User Guide / deploy (push) Has been cancelled
Docs - Deploy PX4 User Guide to AWS / deploy (push) Has been cancelled
Handle stale issues and PRs / stale (push) Has been cancelled
Fuzzing / Fuzzing (push) Has been cancelled
* config: add dynamic init file

* added review feedback

* added docs
2025-08-21 16:46:06 +02:00
Beat Küng
7594a270f7 tests: remove previous fuzz testing
We now use https://github.com/google/fuzztest (see previous commits).
And the test was also failing to build
(https://github.com/PX4/PX4-Autopilot/actions/workflows/cflite_batch.yml)

This reverts these commits:
- 9eda5b373c
- 2cbc993976
- be0a5b4b32
2025-07-11 10:39:28 +02:00
Beat Küng
9472b4b1f7 refactor: remove '#define MODULE_NAME' from tests
And use target_compile_definitions() instead
2025-07-11 10:39:28 +02:00
Beat Küng
3d1cace7b7 test: add google fuzztest to unit test build
From https://github.com/google/fuzztest.
This will now also add gtest (via cmake FetchContent)

And requires newer cmake (container updates):
CMake 3.19 or higher is required.  You are running version 3.16.3
2025-07-11 10:39:28 +02:00
Ramon Roche
a54bbe0b24 coverage: move coverage flags within its own cmake
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2025-07-07 10:25:40 +02:00
Ramon Roche
6deac08b42 docs: remove old doxygen builds (#24743)
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2025-07-02 14:51:18 -07:00
Daniel Agar
00d6bef6a9 cmake/gtest: bump cmake minimum to 3.5 2025-04-30 18:12:33 -04:00
Alexander Lerach
2356cb973f Performance & testing targets
* Added minimal configs for performance testing

* Rename recovery to performance

* added mfg_cfg

* fix params & don't inherit from default

* rename performance -> performance-test

---------

Co-authored-by: Igor-Misic <igy1000mb@gmail.com>
2025-02-24 16:02:46 +01:00
Pedro Roque
e7e76e2e21 Spacecraft build and bare control allocator (#24221) 2025-02-06 23:54:24 -05:00
Beat Küng
bfcd4564a6 fix metadata.cmake: add missing paths to json & xml parameter outputs (#23464) 2024-08-07 16:17:03 +10:00
Matthias Grob
f2bca92221 Fix duplicate newlines at the end of files 2024-07-19 14:33:36 +02:00
Peter van der Perk
a9ba0acb2a cmake: all allyes target for better CI coverage
Currently only v6x-rt and SITL are supported
But targets with label allyes will try to enable all kconfig symbols
2024-04-01 22:05:20 -04:00
Peter van der Perk
5137ca1ccc cmake: fix kconfig cache when setting to 0 or n 2023-10-18 15:30:36 -04:00
Ville Juven
6cb2c176d5 events: Move implementation of events::send() to lib/events
Events have a global, system-wide sequence number, which must be handled
atomically, (fetching and incrementing the sequence AND sending the event
to uORB must be atomic). Currently in FLAT mode, only one instance of this
sequence number exists, so it is OK to have it in px4_platform.

However, in PROTECTED mode px4_platform is instantiated both in kernel-
and user spaces, which makes two instances of this sequence number, which
causes problems in the mavlink event handling logic.

When mavlink receives and handles events, it expects that:
- The sequence numbers arrive in order (seq n is followed by n+1 etc)
- It increments by 1
- There is only one instance of the sequence number

In PROTECTED mode this is violated, as the kernel and user sequence
numbers run freely on their own. This patch fixes the issue by moving
the event backend to the kernel and by providing user access to it via
ioctl.
2023-09-25 09:54:11 +02:00
Jukka Laitinen
9bcfd1a7f7 cmake/kconfig.cmake: Don't populate config_kernel_list in nuttx flat builds
This passes __KERNEL__ compilation flag to all modules, which may break some NuttX headers

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-09-13 21:00:07 +12:00
Matthias Grob
da0e40c72b googletest: switch to latest version 1.12.1 -> 1.13 2023-03-21 15:01:26 +01:00
Daniel Agar
2b5722786b cmake: fix and update packaging 2023-01-18 22:51:12 -05:00
Daniel Agar
cc1b043e18 cmake/kconfig.cmake: fix whitespace 2022-12-30 13:01:30 -05:00
Daniel Agar
0204a55354 Makefile: add all_olddefconfig and all_px4_savedefconfig helpers for updating all boards 2022-12-29 12:50:37 -05:00
Beat Küng
685d5cb473 fix kconfig: rename LINUX to LINUX_TARGET
LINUX is defined by cmake >= 3.25:
https://cmake.org/cmake/help/latest/variable/LINUX.html
2022-12-13 09:05:18 -05:00
tanja
aba11ce920 rename all instances of serial PPB to EXT2 2022-12-13 08:09:15 +01:00
Zachary Lowell
643eed51cb Qurt lightweight parameter implementation (#20735) 2022-12-09 09:55:49 -08:00
Daniel Agar
8114aad983 initial minimal PX4_ROS2 platform and px4_ros2_default build (#20689)
- new ROS2 platform in PX4 intended for creating configs that build and run entirely in ROS2
 - PX4_CONFIG defaults to px4_ros2_default if no config specified and in a colcon workspace with ROS_VERSION=2
 - currently doesn't do much other than allow you to build px4 msgs interface package
2022-12-08 23:03:44 -05:00
Eric Katzfey
796fa8bd72 boards/modalai: separate voxl2 builds into two board builds instead of single board build with different variants
* Made voxl2 apps processor and slpi dsp processor builds into separate board builds so that they can
more easily be configured independently.

* Removed board specific link library command from px4_config.cmake and moved it to a more generic
board specific solution that can be used by any board that needs custom link libraries.

* Removed redundant cmake command for Qurt

* Removed unused definition from Qurt cmake file

* Removed unnecessary QURT_LIB cmake function

* Reorganized the voxl2 build structure to avoid 4 level board directories.

* Reverted cmake files to remove 4 level board naming code

* Updated documentation
2022-11-15 13:09:04 -05:00
Zachary Lowell
a9989df36c Qurt uORB SLPI Implementation (#20538)
- allow uORB to be compiled and run on the qurt architecture.
2022-11-08 12:30:36 -05:00
Eric Katzfey
4afd19f037 Moved the bad-function-cast compiler warning option out of the common flags and into
the nuttx and posix specific options files since this option cannot be used with
the qurt platform. There are header files in the hexagon sdk that fail this check.
2022-10-20 18:18:40 -04:00
Daniel Agar
57bdac2b26 cmake: px4_parse_function_args re-enable failure on unparsed (invalid) arguments 2022-09-24 13:48:51 -04:00
Eric Katzfey
d30ccb2b1d initial board and platform support for the ModalAI VOXL 2 (POSIX + QuRT) 2022-09-23 12:03:05 -04:00
Daniel Agar
4040e4cdf2 simulation organization and cleanup
- new modules/simulation directory to collect all simulators and related modules
 - new Tools/simulation directory to collect and organize scattered simulation submodules, scripts, etc
 - simulation module renamed to simulator_mavlink
 - sih renamed to simulator_sih (not a great name, but I wanted to be clear it was a simulator)
 - ignition_simulator renamed to simulator_ignition_bridge
 - large sitl_target.cmake split by simulation option and in some cases pushed to appropriate modules
 - sitl targets broken down to what's actually available (eg jmavsim only has 1 model and 1 world)
 - new Gazebo consistently referred to as Ignition for now (probably the least confusing thing until we fully drop Gazebo classic support someday)
2022-08-25 09:10:03 -04:00
Daniel Agar
cfc579542e new Ignition Gazebo simulation interface architecture (#20057)
- much simpler direct interface using Ignition Transport 
 - in tree models and worlds
 - control allocation output configuration, no more magic actuator mapping to mavlink and back
 - currently requires no custom Gazebo plugins (keeping things as lightweight and simple as possible)

Co-authored-by: Jaeyoung-Lim <jalim@ethz.ch>
2022-08-22 10:58:19 -04:00
Jukka Laitinen
c7aaf52fd4 Double the allocated stack size of 64-bit NuttX built-in modules
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-08-09 08:08:54 +02:00
Beat Küng
3e68870547 gtest: update to version 1.12.1
Fixes the error
googletest-src/googletest/src/gtest-death-test.cc:1283:24: error: ‘dummy’ may be used uninitialized [-Werror=maybe-uninitialized]
with GCC 11
2022-08-08 07:43:42 +02:00
Hamish Willee
30e2490d5b Docs are now in user guide and main (#19977)
* Fix links to docs in source to point to docs on main not master

* More docs and scripts that need to point to main
2022-08-01 11:39:39 +10:00
Beat Küng
6652718354 metadata.cmake: enable ethernet parameters 2022-04-04 09:54:47 +02:00
Jukka Laitinen
0d31aadcc3 src/lib/paramters: Add a new interface library for protected build user side
Implement an interface for protected build to access parameters.

The implementation only does IOCTL calls to the kernel, where the parameters
live.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-03-15 07:52:26 +01:00
Peter van der Perk
9f97793491 Generate C/C++ header to expose px4board kconfig symbols to the preprocessor 2022-02-02 13:23:21 -05:00
Jukka Laitinen
51ceb9a85e Add support for compiling modules into kernel side
Define __KERNEL__ macro during compilation and place the module in separate library

Remove default library linking to m or libc on NuttX. Add these in platform layer instead, since
they are different on kernel and user side

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-27 12:42:40 -05:00
Julian Oes
2cbc993976 Add clusterfuzzlite to fuzz in CI 2022-01-07 10:17:12 -05:00
Julian Oes
9eda5b373c posix: add fuzz testing using MAVLink messages
This adds the env option PX4_FUZZ which runs the LLVM libFuzzer which
throws random bytes at mavlink_receiver using MAVLink messages over UDP.

The MAVLink messages that are being sent are valid, so the CRC is
calculated but the payload and msgid, etc. are generally garbage, unless
the fuzzing gets a msgid right by chance.

As I understand it, libFuzzer watches the test coverage and will try to
execute as much of the code as possible.
2022-01-07 10:17:12 -05:00
Daniel Agar
38af93085b linux_pwm_out: use PWM_MAIN parameter prefix
- this keeps things simpler for now across the old and new output
configuration
2021-12-23 15:57:11 -05:00
Beat Küng
10f49c99ef px4_add_gtest.cmake: add optional COMPILE_FLAGS, INCLUDES, EXTRA_SRCS and LINKLIBS 2021-12-10 09:03:08 -05:00
Beat Küng
aa96e39306 kconfig: do not inherit for recovery.px4board from default.px4board 2021-12-10 09:03:08 -05:00
Jukka Laitinen
a537925c3c Fix a build error with crypto variants
There was an error that PX4_CRYPTO was cached accross variants, if it was
defined just for one variant.

This synchronizes the caching of BOARD_CRYPTO with other similar BOARD_ flags;
it is set as INTERNAL and "1" when enabled.

Also remove handling of BOARD_KEYSTORE; it is not used anywhere after
changing the crypto under src/drivers. If a separate keystore driver
is required, it is just selected as any other driver in px4board

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-12-01 09:28:02 -05:00
Beat Küng
93a54ee63d metadata: fix generic param metadata generation
Adds the module.yaml params that was previously split into a separate file.
2021-11-23 12:40:22 -05:00
Beat Küng
b94c5db55d component_information: add actuators json generation & CI deployment 2021-11-23 12:40:22 -05:00
Daniel Agar
24090b724c cmake: px4_add_module improve unity build dependencies to avoid unnecessary work 2021-11-19 09:13:07 -05:00
Daniel Agar
f5d9b01f5c NuttX build in place
- cmake NuttX build wrapper compile in place instead of copying source tree to build directory
    - slightly faster skipping necessary copying (depending on system)
    - allows debugging in place
    - easier to work directly in NuttX following official documentation
    - simplifies overall build which should make it easier to resolve any remaining NuttX dependency issues in the build system
 - the downside is switching back and forth between different builds always require rebuilding NuttX, but I think this is worth the improved developer experience
 - also no longer builds px4io and bootloader in every single build, for most users these rarely change and we're wasting a lot of build time
2021-11-15 18:47:38 -05:00
Jacob Crabill
5969508fa7 mavlink: cmake generate mavlink headers at build time
- mavlink/mavlink is now directly included as a submodule instead of the generated mavlink/c_library_v2
 - this also switches to mavlink development.xml by default
2021-11-05 23:01:38 -04:00
Daniel Agar
be5c5856e7 cmake: px4_add_module always add module to PX4_MODULE_PATHS so that parameters aren't pruned 2021-10-27 23:00:40 -04:00