Commit Graph

1664 Commits

Author SHA1 Message Date
Peter Barker
7ceb7c31c7 global: fix whitespace issues in markdown files
global: fix MD007 unordered list indentation in markdown files

Normalize unordered list indentation to use 2-space multiples:
- Top-level list items start at column 0
- Nested list items use 2 additional spaces per level

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

global: fix MD009 trailing whitespace in markdown files

Remove trailing whitespace from all affected markdown files.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

global: fix MD010 hard tabs in markdown files

Replace hard tab characters with 4 spaces.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

global: fix MD012 multiple consecutive blank lines in markdown

Collapse multiple consecutive blank lines to single blank lines
across all markdown files (excluding vendored code).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

global: fix MD007 list indentation base level in markdown

Shift list indentation left by 2 spaces so top-level list items
start at column 0 instead of column 2.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Tools/scripts: fix MD022 blank lines around headings in markdown

Ensure headings are surrounded by blank lines as required by
markdownlint MD022 rule.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Tools/scripts: fix MD032 blank lines around lists in markdown

Ensure lists are surrounded by blank lines as required by
markdownlint MD032 rule.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Tools/scripts: fix MD031 blank lines around code blocks in markdown

Ensure fenced code blocks are surrounded by blank lines as required
by markdownlint MD031 rule.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Tools/scripts: fix MD047 files should end with single newline

Ensure all markdown files end with exactly one newline character
as required by markdownlint MD047 rule.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Tools/scripts: fix MD023 headings must start at beginning of line

Remove leading whitespace from heading lines as required by
markdownlint MD023 rule.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Tools/scripts: fix MD007 remaining list indentation in markdown

Fix unordered list indentation to use correct spacing as required
by markdownlint MD007 rule.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Tools/scripts: fix MD030 spaces after list markers in markdown

Reduce multiple spaces after list markers to single space as
required by markdownlint MD030 rule.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Tools/scripts: fix MD022 blank lines around setext headings

Ensure setext-style headings (underlined with === or ---) are
surrounded by blank lines as required by markdownlint MD022 rule.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Tools/scripts: fix MD018 missing space after hash in headings

Add space after hash marks in atx-style headings as required by
markdownlint MD018 rule.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Tools/scripts: fix MD019 multiple spaces after hash in headings

Reduce multiple spaces after hash marks to single space in
atx-style headings as required by markdownlint MD019 rule.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Tools/scripts: fix MD012 multiple consecutive blank lines in markdown

Remove multiple consecutive blank lines and ensure files end with
exactly one newline as required by markdownlint MD012 rule.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Tools/scripts: fix MD023 headings with leading whitespace

Remove leading whitespace from setext-style heading text lines
as required by markdownlint MD023 rule.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Tools/scripts: fix MD022 blank line after heading in markdown

Add missing blank line after heading as required by markdownlint
MD022 rule.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Tools/scripts: fix MD009 trailing non-breaking space in markdown

Remove trailing non-breaking space (U+00A0) as required by
markdownlint MD009 rule.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Tools/scripts: fix MD012 remaining multiple blank lines in markdown

Remove leading blank lines and whitespace-only lines that create
multiple consecutive blank lines.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 11:37:38 +11:00
Peter Barker
4f4457d259 Tools: extract_features.py: correct extraction for GRF rangefinder
define and classname don't match
2026-01-30 13:01:31 +00:00
Peter Barker
39cce1eeef Tools: build_options.py: add Lightware GRF
apparently missed this when the driver was added
2026-01-30 13:01:31 +00:00
Peter Barker
378c29d657 Tools: build_options.py: add TFS20L 2026-01-30 13:01:10 +00:00
Peter Barker
25bdd6dffc Tools: add --symbols to size_compare_branches.py
just lists the symbols added or removed
2026-01-30 13:00:41 +00:00
ES-Alexander
1221ab3247 Tools: scripts: mavlink_parse: mention Blimp as an option 2026-01-27 13:39:21 +11:00
ES-Alexander
44e1581d1b Tools: scripts: mavlink_parse: add ID numbers 2026-01-27 13:39:21 +11:00
ES-Alexander
b35fcd6c5f Tools: scripts: mavlink_parse: improve robustness 2026-01-27 13:39:21 +11:00
ES-Alexander
1e728e0c52 Tools: scripts: mavlink_parse: add missing message sets
Includes "all" as a fallback for known messages that aren't used in specified ArduPilot message sets.
Also moved to importing message sets dynamically, so there's a single source of truth.
2026-01-27 13:39:21 +11:00
ES-Alexander
665481116b Tools: scripts: mavlink_parse: add rst support
ArduPilot Wiki uses reStructuredText (rst) source files, so supporting rst output is essential for this script to generate wiki files.
2026-01-27 13:39:21 +11:00
Peter Barker
767390c17c Tools: add GPS debug logging to build server 2026-01-23 09:00:33 +11:00
Henry Wurzburg
20d43a5efe Tools: add mount POI lock Aux Func/Switch 2026-01-19 18:29:05 -05:00
Peter Barker
c060e7b68d Tools: skip building arm boards when testing new boards
compiler not available on CI machine
2026-01-14 09:43:22 +11:00
Peter Barker
b1a9562d09 Tools: add boards dynamically for SITL (i.e. hwdefs) 2026-01-14 09:43:22 +11:00
Peter Barker
3801c7118a Tools: remove no-longer-required running_python3 variables
this is always true now-adays
2026-01-11 17:41:07 -06:00
Peter Barker
188049d73a Tools: use normal layout for our enable defines for piccolocan, rename to AP_ namespace 2026-01-11 17:32:48 -06:00
Randy Mackay
820efa1327 Tools: add battery bms to build server 2026-01-08 10:23:59 +09:00
Peter Barker
a627d377fd Tools: stop showing strings command in extract_features.py 2026-01-06 11:40:32 +11:00
Willian Galvani
8b779a8f3b Tools: uploader: open serial port in exclusive mode 2026-01-05 18:53:15 +11:00
bhavyasree-A8
123aa83b53 Tools: clarify Feature() column in build_options.py 2025-12-31 10:29:32 +11:00
Peter Barker
c6b5bb2ece extract_features.py: do not show commands by default
no command-line option at the moment and we don't want this stuff emitted by default anyway.
2025-12-28 19:16:16 -06:00
Peter Barker
cfac833c21 Tools: emit progress to stderr not stdout
mixing the progress with stdout is causing problems for tools trying to consume stdout:

[update.py]: feature EF: Running (arm-none-eabi-nm --demangle --print-size /home/autotest/build/tmp/binaries.build/ZeroOneX6_Air/bin/blimp) in (.) (ZeroOneX6_Air,Blimp) not in build_options.py
[update.py]: feature EF: Running (strings /home/autotest/build/tmp/binaries.build/ZeroOneX6_Air/bin/blimp) in (.) (ZeroOneX6_Air,Blimp) not in build_options.py
2025-12-28 19:16:16 -06:00
James O'Shannessy
b16db812b0 Tools: Improvements to building of signed bootloaders
Adds ability to pass --omit-ardupilot-keys to build_bootloaders.py

Adds ability to pass multiple public keys to the signing of the bootloader. This extends the functionality of the single key that was previously possible. All keys are prefixed with --signing-key and are appended to the args.signing_key array. All keys are checked for presense, and type before being used to sign the bootloader.

General tidy up of the argument parser, prints a proper description of the role of the file.
2025-12-27 12:12:56 -06:00
James O'Shannessy
92d6da4fa9 signing: Improvements to make_secure_bl and make_secure_fw
This fixes make_secure_bl writing to the incorrect file (sys.argv[1]). The resultant file was whatever argv[1] was passed in as, which could have been --omit-ardupilot-keys.

This fixes make_secure_fw not running at all because of a possible return outside of a function. Also improves argument passing so we can get ourselves a better help file.
2025-12-27 12:12:56 -06:00
Peter Barker
ac5232a71a Tools: extract_features.py: use run_program from build_script_base.py 2025-12-21 14:10:01 +11:00
Peter Barker
7a454f2a08 Tools: size_compare_branches.py: make --all-vehicles include tracker
better fix would be to call it tracker throughout ArduPilot, but a rather larger and more disruptive fix
2025-12-17 19:28:02 +11:00
Peter Barker
953479d733 Tools: require README.md for new board hwdef directories
Ensures that all new boards added via PR include documentation by checking
for the presence of a README.md file in the hwdef directory. This helps
maintain code quality and provides essential information for users.

AP_Periph boards are excluded from this requirement as they typically don't
need the same level of user-facing documentation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-16 08:54:23 +11:00
Randy Mackay
b36fb7f133 Tools: param_check_all loses skywalker files from skip list 2025-12-10 10:27:32 -06:00
Randy Mackay
40b40492da Tools: param-check-all skip list shortened 2025-12-10 18:06:09 +11:00
Peter Barker
9aaa60bdb5 Tools: create and use a progress_prefix method 2025-12-09 11:55:49 +11:00
Peter Barker
c6efa3dd1f Tools: add test_new_boards.py to test newly-added boards in PRs
Add a script that:
- Finds all newly-added hwdef files in the current branch (git status 'A')
- Extracts board names from hwdef directory paths
- Builds each new board and its bootloader if a bootloader hwdef was added
- Skips ESP32 boards (CI limitation)
- Uses BuildScriptBase for common build operations

The script is designed to run in CI to ensure new board definitions compile correctly.
2025-12-09 11:55:49 +11:00
Peter Barker
66d7ecfb73 Tools: extract BuildScriptBase from size_compare_branches.py
Create a base class for build scripts that provides common utilities extracted from size_compare_branches.py:
- run_program(): Execute commands with output handling
- run_waf(): Run waf with consistent build environment
- run_git(): Run git commands
- find_current_git_branch_or_sha1(): Get current branch/SHA
- find_git_branch_merge_base(): Find merge base

Refactor size_compare_branches.py to use the base class, reducing duplicated code.

Other scripts with similar patterns can be refactored in the future:
- build_binaries.py
- build_bootloaders.py
- build_iofirmware.py
- build_peripherals.py
- configure_all.py
2025-12-09 11:55:49 +11:00
Bob Long
f98584f09f Tools: param_check: complain about legacy params
When generating metadata for the test, don't emit legacy parameters.
2025-12-05 10:20:59 +11:00
Bob Long
0186c0e9cc Tools: relax test_generate_metadata unit test
This section was simultaneously too strict and not strict enough. This
section mainly confirms that the vehicle argument is passed on.
2025-12-05 10:20:59 +11:00
Randy Mackay
5f9a8f7efe Tools: update build options for MAVLink Mount 2025-12-02 21:43:07 +11:00
Andy Piper
d4fd350963 scripts: add LIS2MDL compass 2025-11-26 18:25:43 +11:00
Bob Long
e1fb6c8f64 Tools: fix type hints in param_check
We changed the default to None, but forgot to update the type hints.
Also some drive-by whitespace cleanups.
2025-11-12 20:49:39 +11:00
Peter Barker
ac254388c9 Tools: build_options.py: add AP_RANGEFINDER_AINSTEIN_LR_D1_ENABLED 2025-11-11 09:12:26 +00:00
Peter Barker
cb633aeb19 Tools: various fixes to build_options.py and test_build_options.py
autotest: test_build_options.py: do not test AP_PERIPH_* defines on non-Periph builds

test_build_options.py:  AP_ROVER_AUTO_ARM_ONCE_ENABLED is only on Rover

test_build_options.py: create and use a blacklist

options on this blacklist really can't be tested when we're doing the
disable-everything step as they require one of two other options to
work, and we can't represent that in our dependencies

Tools: build_options.py: correct dependencies for CRSF Scripting

Tools: extract_features.py: correct extraction of AP_MAVLINK_FTP_ENABLED

Tools: test_build_options.py: exempt EK3_FEATURE_OPTFLOW_SRTM on some vehicles

AP_Terrain isn't instantiated so the symbol (and feature!) are missing

build_options.py: add missing dependency for Cortex generator

autotest: test_build_options.py: most vehicles do not have AP_ADSB_AVOIDANCE_ENABLED

autotest: test_build_options.py: fix for AP_SCRIPTING_BINDING_MOTORS_ENABLED

test_build_options.py: exempt AP_MOTORS_TRI_ENABLED except on Copter

Plane only has this if quadplane is enabled...
2025-11-11 11:27:31 +11:00
Minderring
00e4078e68 Tools: add hwdef MicoAir743-Lite
Update libraries/AP_HAL_ChibiOS/hwdef/MicoAir743-Lite/README.md

Co-authored-by: Henry Wurzburg <hwurzburg@yahoo.com>
2025-11-09 13:33:26 +11:00
bnsgeyer
dcaf309465 Tools: change label in builder options 2025-11-04 10:35:38 +11:00
Oliver Walters
ba86948bd0 Tools: Add GENERATOR_CORTEX support 2025-11-04 09:47:24 +11:00
Thomas Watson
b876809242 Tools: remove absolute path reference to rm command
On some systems (e.g. NixOS) it's not there.
2025-11-03 09:53:37 -06:00
Peter Barker
6b4eb8e7d7 Tools: get Linux and ESP32 board names dynamically for bootloader blacklist 2025-11-02 17:17:29 +11:00
Peter Barker
f7f6a13dbd Tools: size_compare_branches.py: don't build bootloader for pocket2
... it's a linux board...
2025-11-02 17:17:29 +11:00
Peter Barker
d2a361afa7 Tools: fix instances of flake8 B006 error
e.g.:

./Tools/autotest/vehicle_test_suite.py:8607:89: B006 Do not use mutable data structures for argument defaults.  They are created during function definition time. All calls to the function reuse this one instance of that data structure, persisting changes between them.
2025-10-28 20:19:01 -05:00
Erkan Vatan
871abcf15a Tools: add t3-gem-o1 board 2025-10-27 18:43:16 -05:00
Peter Barker
76a39dc4df Tools: fix flake8 B008 errors, methods-in-function-definitions
e.g.

./Tools/scripts/param_check_all.py:180:40: B008 Do not perform function calls in argument defaults.  The call is performed only once at function definition time. All calls to your function will reuse the result of that definition-time function call.  If this is intended, assign the function call to a module-level variable and use that variable as a default value.
2025-10-27 11:18:20 +11:00
Andy Piper
d801b2cd6a scripts: add support for AP_CPU_IDLE_STATS_ENABLED as a feature 2025-10-16 06:20:54 +11:00
Andrew Tridgell
986c418dda Tools: tidy up old unused build
unused
2025-10-14 09:14:13 -05:00