mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-24 02:17:35 +08:00
Compare commits
27 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 60c2aa165f | |||
| 07aa993c05 | |||
| 24f09a6578 | |||
| 263f68d241 | |||
| ce1b63a423 | |||
| 6c84e41502 | |||
| d537a1b628 | |||
| cb1528008f | |||
| 403d76c7a7 | |||
| a031f6eec8 | |||
| 0749b04c9f | |||
| 0902401115 | |||
| 87a6d36341 | |||
| bdf01061d0 | |||
| 62c76d62cd | |||
| 65c4a9190c | |||
| 5070238504 | |||
| 2f52c90885 | |||
| 9b4b67644d | |||
| 556c33cf8c | |||
| ac256eb64d | |||
| fd3efe168a | |||
| d091af4fc0 | |||
| 3ebea78d91 | |||
| 8361b8b3c6 | |||
| 2807e53838 | |||
| 2cc613cf64 |
-117
@@ -1,117 +0,0 @@
|
||||
---
|
||||
Checks: '*,
|
||||
-*-avoid-c-arrays,
|
||||
-*-uppercase-literal-suffix,
|
||||
-*-magic-numbers,
|
||||
-altera-id-dependent-backward-branch,
|
||||
-altera-unroll-loops,
|
||||
-android*,
|
||||
-bugprone-integer-division,
|
||||
-cert-dcl50-cpp,
|
||||
-cert-env33-c,
|
||||
-cert-err34-c,
|
||||
-cert-err58-cpp,
|
||||
-cert-flp30-c,
|
||||
-cert-msc30-c,
|
||||
-cert-msc50-cpp,
|
||||
-clang-analyzer-core.CallAndMessage,
|
||||
-clang-analyzer-core.NullDereference,
|
||||
-clang-analyzer-core.UndefinedBinaryOperatorResult,
|
||||
-clang-analyzer-core.uninitialized.Assign,
|
||||
-clang-analyzer-core.VLASize,
|
||||
-clang-analyzer-cplusplus.NewDelete,
|
||||
-clang-analyzer-cplusplus.NewDeleteLeaks,
|
||||
-clang-analyzer-deadcode.DeadStores,
|
||||
-clang-analyzer-optin.cplusplus.VirtualCall,
|
||||
-clang-analyzer-optin.performance.Padding,
|
||||
-clang-analyzer-security.FloatLoopCounter,
|
||||
-clang-analyzer-security.insecureAPI.strcpy,
|
||||
-clang-analyzer-unix.API,
|
||||
-clang-analyzer-unix.cstring.BadSizeArg,
|
||||
-clang-analyzer-unix.Malloc,
|
||||
-clang-analyzer-unix.MallocSizeof,
|
||||
-cppcoreguidelines-c-copy-assignment-signature,
|
||||
-cppcoreguidelines-interfaces-global-init,
|
||||
-cppcoreguidelines-no-malloc,
|
||||
-cppcoreguidelines-owning-memory,
|
||||
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
|
||||
-cppcoreguidelines-pro-bounds-constant-array-index,
|
||||
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
|
||||
-cppcoreguidelines-pro-type-const-cast,
|
||||
-cppcoreguidelines-pro-type-cstyle-cast,
|
||||
-cppcoreguidelines-pro-type-member-init,
|
||||
-cppcoreguidelines-pro-type-reinterpret-cast,
|
||||
-cppcoreguidelines-pro-type-union-access,
|
||||
-cppcoreguidelines-pro-type-vararg,
|
||||
-cppcoreguidelines-special-member-functions,
|
||||
-fuchsia-*,
|
||||
-google-build-using-namespace,
|
||||
-google-explicit-constructor,
|
||||
-google-global-names-in-headers,
|
||||
-google-readability-casting,
|
||||
-google-readability-function-size,
|
||||
-google-readability-namespace-comments,
|
||||
-google-readability-todo,
|
||||
-google-runtime-int,
|
||||
-google-runtime-references,
|
||||
-hicpp-deprecated-headers,
|
||||
-hicpp-explicit-conversions,
|
||||
-hicpp-function-size,
|
||||
-hicpp-member-init,
|
||||
-hicpp-no-array-decay,
|
||||
-hicpp-no-assembler,
|
||||
-hicpp-no-malloc,
|
||||
-hicpp-signed-bitwise,
|
||||
-hicpp-special-member-functions,
|
||||
-hicpp-use-auto,
|
||||
-hicpp-use-equals-default,
|
||||
-hicpp-use-equals-delete,
|
||||
-hicpp-use-override,
|
||||
-hicpp-vararg,
|
||||
-llvmlibc-*,
|
||||
-llvm-header-guard,
|
||||
-llvm-include-order,
|
||||
-llvm-namespace-comment,
|
||||
-misc-incorrect-roundings,
|
||||
-misc-macro-parentheses,
|
||||
-misc-misplaced-widening-cast,
|
||||
-misc-redundant-expression,
|
||||
-misc-unconventional-assign-operator,
|
||||
-misc-unused-parameters,
|
||||
-modernize-deprecated-headers,
|
||||
-modernize-loop-convert,
|
||||
-modernize-pass-by-value,
|
||||
-modernize-raw-string-literal,
|
||||
-modernize-return-braced-init-list,
|
||||
-modernize-use-auto,
|
||||
-modernize-use-bool-literals,
|
||||
-modernize-use-default-member-init,
|
||||
-modernize-use-equals-default,
|
||||
-modernize-use-equals-delete,
|
||||
-modernize-use-override,
|
||||
-modernize-use-trailing-return-type,
|
||||
-modernize-use-using,
|
||||
-modernize-use-trailing-return-type,
|
||||
-performance-inefficient-string-concatenation,
|
||||
-readability-avoid-const-params-in-decls,
|
||||
-readability-container-size-empty,
|
||||
-readability-else-after-return,
|
||||
-readability-function-size,
|
||||
-readability-implicit-bool-cast,
|
||||
-readability-implicit-bool-conversion,
|
||||
-readability-inconsistent-declaration-parameter-name,
|
||||
-readability-named-parameter,
|
||||
-readability-non-const-parameter,
|
||||
-readability-redundant-declaration,
|
||||
-readability-static-accessed-through-instance,
|
||||
-readability-static-definition-in-anonymous-namespace,
|
||||
'
|
||||
WarningsAsErrors: '*'
|
||||
CheckOptions:
|
||||
- key: google-readability-function-size.BranchThreshold
|
||||
value: '600'
|
||||
- key: google-readability-function-size.LineThreshold
|
||||
value: '4000'
|
||||
- key: google-readability-function-size.StatementThreshold
|
||||
value: '4000'
|
||||
...
|
||||
@@ -1,7 +0,0 @@
|
||||
FROM gcr.io/oss-fuzz-base/base-builder:v1
|
||||
COPY . $SRC/PX4-Autopilot
|
||||
RUN apt-get install -y libjpeg8-dev zlib1g-dev
|
||||
RUN pip3 install --upgrade pip
|
||||
RUN python3 -m pip install -r $SRC/PX4-Autopilot/Tools/setup/requirements.txt
|
||||
WORKDIR $SRC/PX4-Autopilot
|
||||
COPY ./.clusterfuzzlite/build.sh $SRC/
|
||||
@@ -1,4 +0,0 @@
|
||||
#!/usr/bin/env bash -eu
|
||||
|
||||
PX4_FUZZ=1 make px4_sitl
|
||||
cp build/px4_sitl_default/bin/px4 $OUT/px4
|
||||
@@ -1 +0,0 @@
|
||||
language: c++
|
||||
@@ -1,44 +0,0 @@
|
||||
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at:
|
||||
// https://github.com/microsoft/vscode-dev-containers/tree/v0.134.0/containers/cpp
|
||||
{
|
||||
"name": "px4-dev-nuttx",
|
||||
"image": "px4io/px4-dev-nuttx-focal:2022-08-12",
|
||||
|
||||
"runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],
|
||||
|
||||
// Set *default* container specific settings.json values on container create.
|
||||
"settings": {
|
||||
"terminal.integrated.shell.linux": "/bin/bash"
|
||||
},
|
||||
|
||||
// Add the IDs of extensions you want installed when the container is created.
|
||||
"extensions": [
|
||||
"chiehyu.vscode-astyle",
|
||||
"dan-c-underwood.arm",
|
||||
"editorconfig.editorconfig",
|
||||
"fredericbonnet.cmake-test-adapter",
|
||||
"github.vscode-pull-request-github",
|
||||
"marus25.cortex-debug",
|
||||
"ms-azuretools.vscode-docker",
|
||||
"ms-iot.vscode-ros",
|
||||
"ms-python.python",
|
||||
"ms-vscode.cmake-tools",
|
||||
"ms-vscode.cpptools",
|
||||
"ms-vscode.cpptools-extension-pack",
|
||||
"redhat.vscode-yaml",
|
||||
"streetsidesoftware.code-spell-checker",
|
||||
"twxs.cmake",
|
||||
"uavcan.dsdl",
|
||||
"wholroyd.jinja",
|
||||
"zixuanwang.linkerscript",
|
||||
"ms-vscode.makefile-tools"
|
||||
],
|
||||
|
||||
"containerUser": "user",
|
||||
"containerEnv": {
|
||||
"LOCAL_USER_ID": "${localEnv:UID}"
|
||||
},
|
||||
|
||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||
"forwardPorts": [14556],
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
insert_final_newline = true
|
||||
|
||||
[{*.{c,cpp,cc,h,hpp},CMakeLists.txt,Kconfig}]
|
||||
indent_style = tab
|
||||
tab_width = 8
|
||||
# Not in the official standard, but supported by many editors
|
||||
max_line_length = 120
|
||||
|
||||
[*.yaml, *.yml]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
@@ -1,79 +0,0 @@
|
||||
* text=auto eol=lf
|
||||
|
||||
*.cmake text eol=lf
|
||||
*.c text eol=lf
|
||||
*.cc text eol=lf
|
||||
*.cpp text eol=lf
|
||||
*.h text eol=lf
|
||||
*.hh text eol=lf
|
||||
*.hpp text eol=lf
|
||||
*.hxx text eol=lf
|
||||
*.S text eol=lf
|
||||
|
||||
*.ipynb text eol=lf
|
||||
*.m text eol=lf
|
||||
*.mat binary
|
||||
*.py text eol=lf
|
||||
|
||||
*.java text eol=lf
|
||||
*.jar binary
|
||||
*.xml text eol=lf
|
||||
|
||||
# PX4 msgs, etc
|
||||
*.bin binary
|
||||
*.msg text eol=lf
|
||||
*.config text eol=lf
|
||||
*.sdf text eol=lf
|
||||
*.uavcan text eol=lf
|
||||
|
||||
# NuttX
|
||||
Makefile.* text eol=lf
|
||||
*.defs text eol=lf
|
||||
*.ld text eol=lf
|
||||
|
||||
*.csv text eol=lf
|
||||
*.md text eol=lf
|
||||
*.txt text eol=lf
|
||||
|
||||
# Scripts
|
||||
*.bash text eol=lf
|
||||
*.sh text eol=lf
|
||||
*.zsh text eol=lf
|
||||
# These are explicitly windows files and should use crlf
|
||||
*.ps1 text eol=crlf
|
||||
*.{cmd,[cC][mM][dD]} text eol=crlf
|
||||
*.{bat,[bB][aA][tT]} text eol=crlf
|
||||
|
||||
# Serialisation
|
||||
*.json text eol=lf
|
||||
*.toml text eol=lf
|
||||
*.xml text eol=lf
|
||||
*.yaml text eol=lf
|
||||
*.yml text eol=lf
|
||||
|
||||
# Graphics
|
||||
*.png binary
|
||||
*.jpg binary
|
||||
*.jpeg binary
|
||||
*.gif binary
|
||||
*.tif binary
|
||||
*.tiff binary
|
||||
*.ico binary
|
||||
*.pdf binary
|
||||
# SVG treated as an asset (binary) by default.
|
||||
*.svg text eol=lf
|
||||
|
||||
# Text files where line endings should be preserved
|
||||
*.patch -text
|
||||
|
||||
# Archives
|
||||
*.7z binary
|
||||
*.gz binary
|
||||
*.tar binary
|
||||
*.tgz binary
|
||||
*.zip binary
|
||||
|
||||
# everything else
|
||||
.gitattributes text eol=lf
|
||||
.gitignore text eol=lf
|
||||
Makefile text eol=lf
|
||||
@@ -1,94 +0,0 @@
|
||||
name: 🐛 Bug report
|
||||
description: Create a report to help us improve
|
||||
title: "[Bug] "
|
||||
labels: ["bug-report"]
|
||||
body:
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Describe the bug
|
||||
description: A clear and concise description of the bug.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: To Reproduce
|
||||
description: |
|
||||
Steps to reproduce the behavior.
|
||||
1. Drone switched on '...'
|
||||
2. Uploaded mission '....' (attach QGC mission file)
|
||||
3. Took off '....'
|
||||
4. See error
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Expected behavior
|
||||
description: A clear and concise description of what you expected to happen.
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Screenshot / Media
|
||||
description: Add screenshot / media if you have them
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Flight Log
|
||||
description: |
|
||||
*Always* provide a link to the flight log file:
|
||||
- Download the flight log file from the vehicle ([tutorial](https://docs.px4.io/main/en/getting_started/flight_reporting.html)).
|
||||
- Upload the log to the [PX4 Flight Review](http://logs.px4.io/)
|
||||
- Share the link to the log (Copy and paste the URL of the log)
|
||||
placeholder: |
|
||||
# PASTE HERE THE LINK TO THE LOG
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
## Setup
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Software Version
|
||||
description: |
|
||||
Which version of PX4 are you using?
|
||||
placeholder: |
|
||||
# If you don't know the version, paste the output of `ver all` in the MAVLink Shell of QGC
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: input
|
||||
attributes:
|
||||
label: Flight controller
|
||||
description: Specify your flight controller model (what type is it, where was it bought from, ...).
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: Vehicle type
|
||||
options:
|
||||
- Multicopter
|
||||
- Helicopter
|
||||
- Fixed Wing
|
||||
- Hybrid VTOL
|
||||
- Airship/Balloon
|
||||
- Rover
|
||||
- Boat
|
||||
- Submarine
|
||||
- Other
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: How are the different components wired up (including port information)
|
||||
description: Details about how all is wired.
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Additional context
|
||||
description: Add any other context about the problem here.
|
||||
@@ -1,8 +0,0 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Support Question
|
||||
url: https://docs.px4.io/main/en/contribute/support.html#forums-and-chat
|
||||
about: For questions about using PX4 or related components, please use the discuss forum and discord server
|
||||
- name: Documentation Issue
|
||||
url: https://github.com/PX4/PX4-user_guide/issues
|
||||
about: If you found an issue in documentation, please submit it directly to the docs repository issues
|
||||
@@ -1,35 +0,0 @@
|
||||
name: 🚀 Feature Request
|
||||
description: Suggest an idea for this project
|
||||
labels: ["feature-request"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
## Please note that feature requests are not 'fire and forget'
|
||||
It is a lot more likely that the feature you would like to have will be implemented if you keep watching your feature request, and provide more details to developers looking into implementing your feature, and help them with testing.
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Describe problem solved by the proposed feature
|
||||
description: A clear and concise description of the problem, if any, this feature will solve. E.g. I'm always frustrated when ...
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Describe your preferred solution
|
||||
description: A clear and concise description of what you want to happen.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Describe possible alternatives
|
||||
description: A clear and concise description of any alternative solutions or features you've considered.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Additional context
|
||||
description: Add any other context or screenshots for the feature request here.
|
||||
@@ -1,37 +0,0 @@
|
||||
<!--
|
||||
|
||||
Thank you for your contribution!
|
||||
|
||||
Get early feedback through
|
||||
- Dronecode Discord: https://discord.gg/dronecode
|
||||
- PX4 Discuss: http://discuss.px4.io/
|
||||
- opening a draft pr and sharing the link
|
||||
|
||||
-->
|
||||
|
||||
### Solved Problem
|
||||
When ... I found that ...
|
||||
|
||||
Fixes #{Github issue ID}
|
||||
|
||||
### Solution
|
||||
- Add ... for ...
|
||||
- Refactor ...
|
||||
|
||||
### Changelog Entry
|
||||
For release notes:
|
||||
```
|
||||
Feature/Bugfix XYZ
|
||||
New parameter: XYZ_Z
|
||||
Documentation: Need to clarify page ... / done, read docs.px4.io/...
|
||||
```
|
||||
|
||||
### Alternatives
|
||||
We could also ...
|
||||
|
||||
### Test coverage
|
||||
- Unit/integration test: ...
|
||||
- Simulation/hardware testing logs: https://review.px4.io/
|
||||
|
||||
### Context
|
||||
Related links, screenshot before/after, video
|
||||
@@ -1,158 +0,0 @@
|
||||
# NOTE: this workflow is now running on Dronecode / PX4 AWS account.
|
||||
# - If you want to keep the tests running in GitHub Actions you need to uncomment the "runs-on: ubuntu-latest" lines
|
||||
# and comment the "runs-on: [runs-on,runner=..." lines.
|
||||
# - If you would like to duplicate this setup try setting up "RunsOn" on your own AWS account try https://runs-on.com
|
||||
|
||||
name: Build all targets
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
branches:
|
||||
- 'main'
|
||||
- 'stable'
|
||||
- 'beta'
|
||||
- 'release/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
group_targets:
|
||||
name: Scan for Board Targets
|
||||
# runs-on: ubuntu-latest
|
||||
runs-on: [runs-on,runner=1cpu-linux-x64,image=ubuntu22-full-x64,"run-id=${{ github.run_id }}",spot=false]
|
||||
outputs:
|
||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||
timestamp: ${{ steps.set-timestamp.outputs.timestamp }}
|
||||
tagname: ${{ steps.set-tag.outputs.tagname }}
|
||||
branchname: ${{ steps.set-branch.outputs.branchname }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Update python packaging to avoid canonicalize_version() error
|
||||
run: |
|
||||
pip3 install -U packaging
|
||||
|
||||
- name: Install Python Dependencies
|
||||
uses: py-actions/py-dependency-install@v4
|
||||
with:
|
||||
path: "./Tools/setup/requirements.txt"
|
||||
|
||||
- id: set-matrix
|
||||
run: echo "::set-output name=matrix::$(./Tools/ci/generate_board_targets_json.py --group)"
|
||||
|
||||
- id: set-timestamp
|
||||
run: echo "::set-output name=timestamp::$(date +"%Y%m%d%H%M%S")"
|
||||
|
||||
- id: set-branch
|
||||
run: echo "::set-output name=branchname::${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}"
|
||||
|
||||
- name: Debug Matrix Output
|
||||
if: runner.debug == '1'
|
||||
run: |
|
||||
echo "${{ steps.set-timestamp.outputs.timestamp }}"
|
||||
echo "${{ steps.set-branch.outputs.branchname }}"
|
||||
echo "$(./Tools/ci/generate_board_targets_json.py --group --verbose)"
|
||||
|
||||
setup:
|
||||
name: Build Group [${{ matrix.group }}]
|
||||
# runs-on: ubuntu-latest
|
||||
runs-on: [runs-on,runner=8cpu-linux-x64,image=ubuntu22-full-x64,"run-id=${{ github.run_id }}",spot=false]
|
||||
needs: group_targets
|
||||
strategy:
|
||||
matrix: ${{ fromJson(needs.group_targets.outputs.matrix) }}
|
||||
fail-fast: false
|
||||
container:
|
||||
image: ${{ matrix.container }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Git ownership workaround
|
||||
run: git config --system --add safe.directory '*'
|
||||
|
||||
- name: Setup ccache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.ccache
|
||||
key: ${{ matrix.group }}-ccache-${{ needs.group_targets.outputs.timestamp }}
|
||||
restore-keys: ${{ matrix.group }}-ccache-${{ needs.group_targets.outputs.timestamp }}
|
||||
|
||||
- name: Configure ccache
|
||||
run: |
|
||||
mkdir -p ~/.ccache
|
||||
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
|
||||
echo "compression = true" >> ~/.ccache/ccache.conf
|
||||
echo "compression_level = 6" >> ~/.ccache/ccache.conf
|
||||
echo "max_size = 120M" >> ~/.ccache/ccache.conf
|
||||
echo "hash_dir = false" >> ~/.ccache/ccache.conf
|
||||
ccache -s
|
||||
ccache -z
|
||||
|
||||
- name: Building [${{ matrix.group }}]
|
||||
run: |
|
||||
./Tools/ci/build_all_runner.sh ${{matrix.targets}}
|
||||
|
||||
- name: Arrange Build Artifacts
|
||||
run: |
|
||||
./Tools/ci/package_build_artifacts.sh
|
||||
|
||||
- name: Upload Build Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: px4_${{matrix.group}}_build_artifacts
|
||||
path: artifacts/
|
||||
|
||||
- name: Cache Save
|
||||
run: ccache -s
|
||||
|
||||
artifacts:
|
||||
name: Upload Artifacts to S3
|
||||
# runs-on: ubuntu-latest
|
||||
runs-on: [runs-on,runner=1cpu-linux-x64,image=ubuntu22-full-x64,"run-id=${{ github.run_id }}",spot=false]
|
||||
needs: [setup, group_targets]
|
||||
if: contains(fromJSON('["main", "stable", "beta"]'), needs.group_targets.outputs.branchname)
|
||||
steps:
|
||||
- name: Download Artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: artifacts/
|
||||
merge-multiple: true
|
||||
|
||||
- name: Branch Name
|
||||
run: |
|
||||
echo "${{ needs.group_targets.outputs.branchname }}"
|
||||
|
||||
- name: Uploading Artifacts to S3 [${{ needs.group_targets.outputs.branchname == 'main' && 'master' || needs.group_targets.outputs.branchname }}]
|
||||
uses: jakejarvis/s3-sync-action@master
|
||||
with:
|
||||
args: --acl public-read
|
||||
env:
|
||||
AWS_S3_BUCKET: 'px4-travis'
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
AWS_REGION: 'us-west-1'
|
||||
SOURCE_DIR: artifacts/
|
||||
DEST_DIR: Firmware/${{ needs.group_targets.outputs.branchname == 'main' && 'master' || needs.group_targets.outputs.branchname }}/
|
||||
|
||||
release:
|
||||
name: Create Release and Upload Artifacts
|
||||
# runs-on: ubuntu-latest
|
||||
runs-on: [runs-on,runner=1cpu-linux-x64,image=ubuntu22-full-x64,"run-id=${{ github.run_id }}",spot=false]
|
||||
needs: [setup, group_targets]
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
steps:
|
||||
- name: Download Artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: artifacts/
|
||||
merge-multiple: true
|
||||
|
||||
- name: Upload Binaries to Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
draft: true
|
||||
files: artifacts/*.px4
|
||||
@@ -1,34 +0,0 @@
|
||||
name: ClusterFuzzLite batch fuzzing
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 6 * * *' # UTC 6am every day.
|
||||
permissions: read-all
|
||||
jobs:
|
||||
BatchFuzzing:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sanitizer:
|
||||
- address
|
||||
- undefined
|
||||
- memory
|
||||
steps:
|
||||
- name: Build Fuzzers (${{ matrix.sanitizer }})
|
||||
id: build
|
||||
uses: google/clusterfuzzlite/actions/build_fuzzers@v1
|
||||
with:
|
||||
sanitizer: ${{ matrix.sanitizer }}
|
||||
- name: Run Fuzzers (${{ matrix.sanitizer }})
|
||||
id: run
|
||||
uses: google/clusterfuzzlite/actions/run_fuzzers@v1
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
fuzz-seconds: 1800 # 30 mins
|
||||
mode: 'batch'
|
||||
sanitizer: ${{ matrix.sanitizer }}
|
||||
# Optional but recommended: For storing certain artifacts from fuzzing.
|
||||
# See later section on "Git repo for storage".
|
||||
# storage-repo: https://${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com/OWNER/STORAGE-REPO-NAME.git
|
||||
# storage-repo-branch: main # Optional. Defaults to "main"
|
||||
# storage-repo-branch-coverage: gh-pages # Optional. Defaults to "gh-pages".
|
||||
@@ -1,52 +0,0 @@
|
||||
name: Checks
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
check: [
|
||||
"check_format",
|
||||
"check_newlines",
|
||||
"tests",
|
||||
"tests_coverage",
|
||||
"px4_fmu-v2_default stack_check",
|
||||
"validate_module_configs",
|
||||
"shellcheck_all",
|
||||
"NO_NINJA_BUILD=1 px4_fmu-v5_default",
|
||||
"NO_NINJA_BUILD=1 px4_sitl_default",
|
||||
"px4_sitl_allyes",
|
||||
"airframe_metadata",
|
||||
"module_documentation",
|
||||
"parameters_metadata",
|
||||
]
|
||||
container:
|
||||
image: px4io/px4-dev-nuttx-focal:2022-08-12
|
||||
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
token: ${{ secrets.ACCESS_TOKEN }}
|
||||
|
||||
- name: check environment
|
||||
run: |
|
||||
export
|
||||
ulimit -a
|
||||
- name: ${{matrix.check}}
|
||||
run: make ${{matrix.check}}
|
||||
- name: upload coverage
|
||||
if: contains(matrix.check, 'coverage')
|
||||
uses: codecov/codecov-action@v1
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
flags: unittests
|
||||
file: coverage/lcov.info
|
||||
@@ -1,23 +0,0 @@
|
||||
name: Clang Tidy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-clang:2021-09-08
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
token: ${{secrets.ACCESS_TOKEN}}
|
||||
|
||||
- uses: corrupt952/actions-retry-command@v1.0.7
|
||||
with:
|
||||
command: make clang-tidy-quiet
|
||||
max_attempts: 3
|
||||
@@ -1,60 +0,0 @@
|
||||
name: MacOS build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: macos-latest
|
||||
strategy:
|
||||
matrix:
|
||||
config: [
|
||||
px4_fmu-v5_default,
|
||||
px4_sitl
|
||||
]
|
||||
steps:
|
||||
- name: install Python 3.10
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.10"
|
||||
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
token: ${{secrets.ACCESS_TOKEN}}
|
||||
|
||||
- name: setup
|
||||
run: ./Tools/setup/macos.sh; ./Tools/setup/macos.sh
|
||||
|
||||
- name: Prepare ccache timestamp
|
||||
id: ccache_cache_timestamp
|
||||
shell: cmake -P {0}
|
||||
run: |
|
||||
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
|
||||
message("::set-output name=timestamp::${current_date}")
|
||||
- name: ccache cache files
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.ccache
|
||||
key: macos_${{matrix.config}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
|
||||
restore-keys: macos_${{matrix.config}}-ccache-
|
||||
- name: setup ccache
|
||||
run: |
|
||||
mkdir -p ~/.ccache
|
||||
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
|
||||
echo "compression = true" >> ~/.ccache/ccache.conf
|
||||
echo "compression_level = 6" >> ~/.ccache/ccache.conf
|
||||
echo "max_size = 40M" >> ~/.ccache/ccache.conf
|
||||
echo "hash_dir = false" >> ~/.ccache/ccache.conf
|
||||
ccache -s
|
||||
ccache -z
|
||||
|
||||
- name: make ${{matrix.config}}
|
||||
run: |
|
||||
ccache -z
|
||||
make ${{matrix.config}}
|
||||
ccache -s
|
||||
@@ -1,46 +0,0 @@
|
||||
name: Ubuntu environment build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
- 'stable'
|
||||
- 'beta'
|
||||
- 'release/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build_and_test:
|
||||
name: Build and Test
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
version: ['ubuntu:22.04', 'ubuntu:24.04']
|
||||
runs-on: [runs-on,runner=8cpu-linux-x64,"image=ubuntu24-full-x64","run-id=${{ github.run_id }}",spot=false]
|
||||
container:
|
||||
image: ${{ matrix.version }}
|
||||
volumes:
|
||||
- /github/workspace:/github/workspace
|
||||
steps:
|
||||
|
||||
- name: Fix git in container
|
||||
run: |
|
||||
# we only need this because we are running the job in a container
|
||||
# when checkout pulls git it does it in a shared volume
|
||||
# and file ownership changes between steps
|
||||
# first we install git since its missing from the base image
|
||||
# then we mark the directory as safe for other instances
|
||||
# of git to use.
|
||||
apt update && apt install git -y
|
||||
git config --global --add safe.directory $(realpath .)
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Deps, Build, and Make Quick Check
|
||||
run: |
|
||||
# we need to install dependencies and build on the same step
|
||||
# given the stateless nature of docker images
|
||||
./Tools/setup/ubuntu.sh
|
||||
make quick_check
|
||||
@@ -1,102 +0,0 @@
|
||||
|
||||
name: Container build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
- 'stable'
|
||||
- 'beta'
|
||||
- 'release/**'
|
||||
tags:
|
||||
- 'v*'
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build and Push Container
|
||||
runs-on: [runs-on,runner=8cpu-linux-x64,image=ubuntu22-full-x64,"run-id=${{ github.run_id }}",spot=false]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-tags: true
|
||||
submodules: false
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: |
|
||||
ghcr.io/PX4/px4-dev
|
||||
px4io/px4-dev
|
||||
tags: |
|
||||
type=schedule
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
type=semver,pattern={{major}}
|
||||
type=ref,event=branch,suffix=-{{date 'YYYYMMDD'}},priority=600
|
||||
type=ref,event=branch,suffix=,priority=500
|
||||
type=ref,event=pr
|
||||
type=sha
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Build and load container image
|
||||
uses: docker/build-push-action@v6
|
||||
id: docker
|
||||
with:
|
||||
context: Tools/setup
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
platforms: |
|
||||
linux/amd64
|
||||
load: true
|
||||
push: false
|
||||
cache-from: type=s3,blobs_prefix=cache/${{ github.repository }}/,manifests_prefix=cache/${{ github.repository }}/,region=${{ env.RUNS_ON_AWS_REGION }},bucket=${{ env.RUNS_ON_S3_BUCKET_CACHE }}
|
||||
cache-to: type=s3,blobs_prefix=cache/${{ github.repository }}/,manifests_prefix=cache/${{ github.repository }}/,region=${{ env.RUNS_ON_AWS_REGION }},bucket=${{ env.RUNS_ON_S3_BUCKET_CACHE }},mode=max
|
||||
|
||||
- name: Get Tag Name
|
||||
id: tag_name
|
||||
run: |
|
||||
echo "::set-output name=tag_name::$(echo '${{ fromJSON(steps.docker.outputs.metadata)['image.name'] }}' | sed 's/,.*$//')"
|
||||
|
||||
- name: make quick_check
|
||||
uses: addnab/docker-run-action@v3
|
||||
with:
|
||||
image: ${{ steps.tag_name.outputs.tag_name }}
|
||||
options: -v ${{ github.workspace }}:/workspace
|
||||
run: |
|
||||
cd /workspace
|
||||
git config --global --add safe.directory /workspace
|
||||
make px4_sitl_default
|
||||
make px4_fmu-v6x_default
|
||||
|
||||
- name: Push container image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: Tools/setup
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
platforms: |
|
||||
linux/amd64
|
||||
provenance: mode=max
|
||||
push: true
|
||||
cache-from: type=s3,blobs_prefix=cache/${{ github.repository }}/,manifests_prefix=cache/${{ github.repository }}/,region=${{ env.RUNS_ON_AWS_REGION }},bucket=${{ env.RUNS_ON_S3_BUCKET_CACHE }}
|
||||
cache-to: type=s3,blobs_prefix=cache/${{ github.repository }}/,manifests_prefix=cache/${{ github.repository }}/,region=${{ env.RUNS_ON_AWS_REGION }},bucket=${{ env.RUNS_ON_S3_BUCKET_CACHE }},mode=max
|
||||
@@ -1,21 +0,0 @@
|
||||
name: EKF Change Indicator
|
||||
|
||||
on: pull_request
|
||||
|
||||
jobs:
|
||||
unit_tests:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-base-focal:2021-09-08
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.1
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: checkout newest version of branch
|
||||
run: |
|
||||
git fetch origin pull/${{github.event.pull_request.number}}/head:${{github.head_ref}}
|
||||
git checkout ${GITHUB_HEAD_REF}
|
||||
- name: main test
|
||||
run: make tests TESTFILTER=EKF
|
||||
- name: Check if there is a functional change
|
||||
run: git diff --exit-code
|
||||
working-directory: src/modules/ekf2/test/change_indication
|
||||
@@ -1,29 +0,0 @@
|
||||
name: EKF Update Change Indicator
|
||||
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
unit_tests:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-base-focal:2021-09-08
|
||||
env:
|
||||
GIT_COMMITTER_EMAIL: bot@px4.io
|
||||
GIT_COMMITTER_NAME: PX4BuildBot
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.1
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: main test updates change indication files
|
||||
run: make tests TESTFILTER=EKF
|
||||
- name: Check if there exists diff and save result in variable
|
||||
run: echo "CHANGE_INDICATED=$(git diff --exit-code --output=/dev/null || echo $?)" >> $GITHUB_ENV
|
||||
working-directory: src/modules/ekf2/test/change_indication
|
||||
- name: auto-commit any changes to change indication
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
with:
|
||||
commit_message: '[AUTO COMMIT] update change indication'
|
||||
commit_user_name: ${GIT_COMMITTER_NAME}
|
||||
commit_user_email: ${GIT_COMMITTER_EMAIL}
|
||||
- if: ${{env.CHANGE_INDICATED}}
|
||||
name: if there is a functional change, fail check
|
||||
run: exit 1
|
||||
@@ -1,44 +0,0 @@
|
||||
name: Failsafe Simulator Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
check: [
|
||||
"failsafe_web",
|
||||
]
|
||||
container:
|
||||
image: px4io/px4-dev-nuttx-focal:2022-08-12
|
||||
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
token: ${{ secrets.ACCESS_TOKEN }}
|
||||
|
||||
- name: check environment
|
||||
run: |
|
||||
export
|
||||
ulimit -a
|
||||
- name: install emscripten
|
||||
run: |
|
||||
git clone https://github.com/emscripten-core/emsdk.git _emscripten_sdk
|
||||
cd _emscripten_sdk
|
||||
./emsdk install latest
|
||||
./emsdk activate latest
|
||||
- name: ${{matrix.check}}
|
||||
run: |
|
||||
. ./_emscripten_sdk/emsdk_env.sh
|
||||
make ${{matrix.check}}
|
||||
@@ -1,118 +0,0 @@
|
||||
name: FLASH usage analysis
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
analyze_flash:
|
||||
name: Analyzing ${{ matrix.target }}
|
||||
runs-on: [runs-on,runner=8cpu-linux-x64,image=ubuntu24-full-x64,"run-id=${{ github.run_id }}",spot=false]
|
||||
container:
|
||||
image: px4io/px4-dev-nuttx-focal
|
||||
strategy:
|
||||
matrix:
|
||||
target: [px4_fmu-v5x, px4_fmu-v6x]
|
||||
outputs:
|
||||
px4_fmu-v5x: ${{ steps.gen-output.outputs.output_px4_fmu-v5x }}
|
||||
px4_fmu-v6x: ${{ steps.gen-output.outputs.output_px4_fmu-v6x }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: Git ownership workaround
|
||||
run: git config --system --add safe.directory '*'
|
||||
|
||||
- name: Build Target
|
||||
run: make ${{ matrix.target }}
|
||||
|
||||
- name: Store the ELF with the change
|
||||
run: cp ./build/${{ matrix.target }}_default/${{ matrix.target }}_default.elf ./with-change.elf
|
||||
|
||||
- name: Clean previous build
|
||||
run: |
|
||||
make clean
|
||||
make distclean
|
||||
|
||||
- name: If it's a PR checkout the base commit
|
||||
if: ${{ github.event.pull_request }}
|
||||
run: git checkout ${{ github.event.pull_request.base.sha }}
|
||||
|
||||
- name: If it's a push checkout the previous commit
|
||||
if: github.event_name == 'push'
|
||||
run: git checkout ${{ github.event.before }}
|
||||
|
||||
- name: Update submodules
|
||||
run: make submodulesupdate
|
||||
|
||||
- name: Build
|
||||
run: make ${{ matrix.target }}
|
||||
|
||||
- name: Store the ELF before the change
|
||||
run: cp ./build/${{ matrix.target }}_default/${{ matrix.target }}_default.elf ./before-change.elf
|
||||
|
||||
- name: bloaty-action
|
||||
uses: carlosperate/bloaty-action@v1.1.0
|
||||
id: bloaty-step
|
||||
with:
|
||||
bloaty-args: -d sections,compileunits -n 0 ./with-change.elf -- ./before-change.elf
|
||||
output-to-summary: true
|
||||
|
||||
- name: Generate output
|
||||
id: gen-output
|
||||
run: |
|
||||
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
|
||||
echo "output_${{ matrix.target }}<<$EOF" >> $GITHUB_OUTPUT
|
||||
echo "${{ steps.bloaty-step.outputs.bloaty-output-encoded }}" >> $GITHUB_OUTPUT
|
||||
echo "$EOF" >> $GITHUB_OUTPUT
|
||||
|
||||
post_pr_comment:
|
||||
name: Publish Results
|
||||
runs-on: [runs-on,runner=1cpu-linux-x64,image=ubuntu24-full-x64,"run-id=${{ github.run_id }}",spot=false]
|
||||
needs: [analyze_flash]
|
||||
if: ${{ github.event.pull_request }}
|
||||
steps:
|
||||
- name: Find Comment
|
||||
uses: peter-evans/find-comment@v3
|
||||
id: fc
|
||||
with:
|
||||
issue-number: ${{ github.event.pull_request.number }}
|
||||
comment-author: 'github-actions[bot]'
|
||||
body-includes: FLASH Analysis
|
||||
|
||||
- name: Set Build Time
|
||||
id: bt
|
||||
run: |
|
||||
echo "timestamp=$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Create or update comment
|
||||
uses: peter-evans/create-or-update-comment@v4
|
||||
with:
|
||||
comment-id: ${{ steps.fc.outputs.comment-id }}
|
||||
issue-number: ${{ github.event.pull_request.number }}
|
||||
body: |
|
||||
## FLASH Analysis
|
||||
<details>
|
||||
<summary>px4_fmu-v5x</summary>
|
||||
|
||||
```
|
||||
${{ needs.analyze_flash.outputs.px4_fmu-v5x }}
|
||||
```
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>px4_fmu-v6x</summary>
|
||||
|
||||
```
|
||||
${{ needs.analyze_flash.outputs.px4_fmu-v6x }}
|
||||
```
|
||||
</details>
|
||||
|
||||
**Updated: _${{ steps.bt.outputs.timestamp }}_**
|
||||
edit-mode: replace
|
||||
@@ -1,141 +0,0 @@
|
||||
name: MAVROS Mission Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
config:
|
||||
- {vehicle: "iris", mission: "MC_mission_box", build_type: "RelWithDebInfo"}
|
||||
- {vehicle: "rover", mission: "rover_mission_1", build_type: "RelWithDebInfo"}
|
||||
#- {vehicle: "plane", mission: "FW_mission_1", build_type: "RelWithDebInfo"}
|
||||
#- {vehicle: "plane_catapult",mission: "FW_mission_1", build_type: "RelWithDebInfo"}
|
||||
#- {vehicle: "standard_vtol", mission: "VTOL_mission_1", build_type: "Coverage"}
|
||||
#- {vehicle: "standard_vtol", mission: "VTOL_mission_1", build_type: "AddressSanitizer"}
|
||||
#- {vehicle: "tailsitter", mission: "VTOL_mission_1", build_type: "RelWithDebInfo"}
|
||||
#- {vehicle: "tiltrotor", mission: "VTOL_mission_1", build_type: "RelWithDebInfo"}
|
||||
|
||||
container:
|
||||
image: px4io/px4-dev-ros-melodic:2021-09-08
|
||||
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
token: ${{ secrets.ACCESS_TOKEN }}
|
||||
|
||||
- name: Prepare ccache timestamp
|
||||
id: ccache_cache_timestamp
|
||||
shell: cmake -P {0}
|
||||
run: |
|
||||
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
|
||||
message("::set-output name=timestamp::${current_date}")
|
||||
- name: ccache cache files
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.ccache
|
||||
key: sitl_tests-${{matrix.config.build_type}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
|
||||
restore-keys: sitl_tests-${{matrix.config.build_type}}-ccache-
|
||||
- name: setup ccache
|
||||
run: |
|
||||
mkdir -p ~/.ccache
|
||||
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
|
||||
echo "compression = true" >> ~/.ccache/ccache.conf
|
||||
echo "compression_level = 6" >> ~/.ccache/ccache.conf
|
||||
echo "max_size = 100M" >> ~/.ccache/ccache.conf
|
||||
echo "hash_dir = false" >> ~/.ccache/ccache.conf
|
||||
ccache -s
|
||||
ccache -z
|
||||
|
||||
- name: check environment
|
||||
run: |
|
||||
export
|
||||
ulimit -a
|
||||
- name: Build PX4 and sitl_gazebo-classic
|
||||
env:
|
||||
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
|
||||
run: |
|
||||
ccache -z
|
||||
make px4_sitl_default
|
||||
make px4_sitl_default sitl_gazebo-classic
|
||||
ccache -s
|
||||
|
||||
- name: Core dump settings
|
||||
run: |
|
||||
ulimit -c unlimited
|
||||
echo "`pwd`/%e.core" > /proc/sys/kernel/core_pattern
|
||||
|
||||
- name: Run SITL tests
|
||||
env:
|
||||
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
|
||||
run: |
|
||||
export
|
||||
./test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=${{matrix.config.mission}} vehicle:=${{matrix.config.vehicle}}
|
||||
timeout-minutes: 45
|
||||
|
||||
- name: Look at core files
|
||||
if: failure()
|
||||
run: gdb build/px4_sitl_default/bin/px4 px4.core -ex "thread apply all bt" -ex "quit"
|
||||
- name: Upload px4 coredump
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: coredump
|
||||
path: px4.core
|
||||
|
||||
- name: ecl EKF analysis
|
||||
if: always()
|
||||
run: ./Tools/ecl_ekf/process_logdata_ekf.py ~/.ros/log/*/*.ulg || true
|
||||
|
||||
- name: Upload logs to flight review
|
||||
if: always()
|
||||
run: ./Tools/upload_log.py -q --description "${GITHUB_WORKFLOW} ${GITHUB_RUN_ID}" --feedback "${GITHUB_WORKFLOW} ${GITHUB_RUN_ID} ${GITHUB_REPOSITORY} ${GITHUB_REF}" --source CI ~/.ros/log/*/*.ulg
|
||||
|
||||
- name: Upload px4 binary
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: binary
|
||||
path: build/px4_sitl_default/bin/px4
|
||||
|
||||
- name: Store PX4 log
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: px4_log
|
||||
path: ~/.ros/log/*/*.ulg
|
||||
|
||||
- name: Store ROS log
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ros_log
|
||||
path: ~/.ros/**/rostest-*.log
|
||||
|
||||
# Report test coverage
|
||||
- name: Upload coverage
|
||||
if: contains(matrix.config.build_type, 'Coverage')
|
||||
run: |
|
||||
git config --global credential.helper "" # disable the keychain credential helper
|
||||
git config --global --add credential.helper store # enable the local store credential helper
|
||||
echo "https://x-access-token:${{ secrets.ACCESS_TOKEN }}@github.com" >> ~/.git-credentials # add credential
|
||||
git config --global url."https://github.com/".insteadof git@github.com: # credentials add credential
|
||||
mkdir -p coverage
|
||||
lcov --directory build/px4_sitl_default --base-directory build/px4_sitl_default --gcov-tool gcov --capture -o coverage/lcov.info
|
||||
- name: Upload coverage information to Codecov
|
||||
if: contains(matrix.config.build_type, 'Coverage')
|
||||
uses: codecov/codecov-action@v1
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
flags: mavros_mission
|
||||
file: coverage/lcov.info
|
||||
@@ -1,136 +0,0 @@
|
||||
name: MAVROS Offboard Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
config:
|
||||
- {test_file: "mavros_posix_tests_offboard_posctl.test", vehicle: "iris", build_type: "RelWithDebInfo"}
|
||||
#- {test_file: "mavros_posix_tests_offboard_attctl.test", vehicle: "iris", build_type: "RelWithDebInfo"}
|
||||
#- {test_file: "mavros_posix_tests_offboard_rpyrt_ctl.test", vehicle: "iris", build_type: "RelWithDebInfo"}
|
||||
|
||||
container:
|
||||
image: px4io/px4-dev-ros-melodic:2021-09-08
|
||||
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
token: ${{ secrets.ACCESS_TOKEN }}
|
||||
|
||||
- name: Prepare ccache timestamp
|
||||
id: ccache_cache_timestamp
|
||||
shell: cmake -P {0}
|
||||
run: |
|
||||
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
|
||||
message("::set-output name=timestamp::${current_date}")
|
||||
- name: ccache cache files
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.ccache
|
||||
key: sitl_tests-${{matrix.config.build_type}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
|
||||
restore-keys: sitl_tests-${{matrix.config.build_type}}-ccache-
|
||||
- name: setup ccache
|
||||
run: |
|
||||
mkdir -p ~/.ccache
|
||||
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
|
||||
echo "compression = true" >> ~/.ccache/ccache.conf
|
||||
echo "compression_level = 6" >> ~/.ccache/ccache.conf
|
||||
echo "max_size = 100M" >> ~/.ccache/ccache.conf
|
||||
echo "hash_dir = false" >> ~/.ccache/ccache.conf
|
||||
ccache -s
|
||||
ccache -z
|
||||
|
||||
- name: check environment
|
||||
run: |
|
||||
export
|
||||
ulimit -a
|
||||
- name: Build PX4 and sitl_gazebo-classic
|
||||
env:
|
||||
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
|
||||
run: |
|
||||
ccache -z
|
||||
make px4_sitl_default
|
||||
make px4_sitl_default sitl_gazebo-classic
|
||||
ccache -s
|
||||
|
||||
- name: Core dump settings
|
||||
run: |
|
||||
ulimit -c unlimited
|
||||
echo "`pwd`/%e.core" > /proc/sys/kernel/core_pattern
|
||||
|
||||
- name: Run SITL tests
|
||||
env:
|
||||
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
|
||||
run: |
|
||||
export
|
||||
./test/rostest_px4_run.sh ${{matrix.config.test_file}} vehicle:=${{matrix.config.vehicle}}
|
||||
timeout-minutes: 45
|
||||
|
||||
- name: Look at core files
|
||||
if: failure()
|
||||
run: gdb build/px4_sitl_default/bin/px4 px4.core -ex "thread apply all bt" -ex "quit"
|
||||
- name: Upload px4 coredump
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: coredump
|
||||
path: px4.core
|
||||
|
||||
- name: ecl EKF analysis
|
||||
if: always()
|
||||
run: ./Tools/ecl_ekf/process_logdata_ekf.py ~/.ros/log/*/*.ulg || true
|
||||
|
||||
- name: Upload logs to flight review
|
||||
if: always()
|
||||
run: ./Tools/upload_log.py -q --description "${GITHUB_WORKFLOW} ${GITHUB_RUN_ID}" --feedback "${GITHUB_WORKFLOW} ${GITHUB_RUN_ID} ${GITHUB_REPOSITORY} ${GITHUB_REF}" --source CI ~/.ros/log/*/*.ulg
|
||||
|
||||
- name: Upload px4 binary
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: binary
|
||||
path: build/px4_sitl_default/bin/px4
|
||||
|
||||
- name: Store PX4 log
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: px4_log
|
||||
path: ~/.ros/log/*/*.ulg
|
||||
|
||||
- name: Store ROS log
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ros_log
|
||||
path: ~/.ros/**/rostest-*.log
|
||||
|
||||
# Report test coverage
|
||||
- name: Upload coverage
|
||||
if: contains(matrix.config.build_type, 'Coverage')
|
||||
run: |
|
||||
git config --global credential.helper "" # disable the keychain credential helper
|
||||
git config --global --add credential.helper store # enable the local store credential helper
|
||||
echo "https://x-access-token:${{ secrets.ACCESS_TOKEN }}@github.com" >> ~/.git-credentials # add credential
|
||||
git config --global url."https://github.com/".insteadof git@github.com: # credentials add credential
|
||||
mkdir -p coverage
|
||||
lcov --directory build/px4_sitl_default --base-directory build/px4_sitl_default --gcov-tool gcov --capture -o coverage/lcov.info
|
||||
- name: Upload coverage information to Codecov
|
||||
if: contains(matrix.config.build_type, 'Coverage')
|
||||
uses: codecov/codecov-action@v1
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
flags: mavros_offboard
|
||||
file: coverage/lcov.info
|
||||
@@ -1,32 +0,0 @@
|
||||
name: Nuttx Target with extra env config
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container: px4io/px4-dev-nuttx-focal:2022-08-12
|
||||
strategy:
|
||||
matrix:
|
||||
config: [
|
||||
px4_fmu-v5,
|
||||
]
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
token: ${{secrets.ACCESS_TOKEN}}
|
||||
|
||||
- name: make ${{matrix.config}}
|
||||
env:
|
||||
PX4_EXTRA_NUTTX_CONFIG: "CONFIG_NSH_LOGIN_PASSWORD=\"test\";CONFIG_NSH_CONSOLE_LOGIN=y"
|
||||
run: |
|
||||
echo "PX4_EXTRA_NUTTX_CONFIG: $PX4_EXTRA_NUTTX_CONFIG"
|
||||
make ${{matrix.config}} nuttx_context
|
||||
# Check that the config option is set
|
||||
grep CONFIG_NSH_LOGIN_PASSWORD build/${{matrix.config}}_default/NuttX/nuttx/.config
|
||||
@@ -1,25 +0,0 @@
|
||||
name: Python CI Checks
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
token: ${{ secrets.ACCESS_TOKEN }}
|
||||
- name: Install Python3
|
||||
run: sudo apt-get install python3 python3-setuptools python3-pip -y
|
||||
- name: Install tools
|
||||
run: python3 -m pip install mypy types-requests flake8 --break-system-packages
|
||||
- name: Check MAVSDK test scripts with mypy
|
||||
run: $HOME/.local/bin/mypy --strict test/mavsdk_tests/*.py
|
||||
- name: Check MAVSDK test scripts with flake8
|
||||
run: $HOME/.local/bin/flake8 test/mavsdk_tests/*.py
|
||||
@@ -1,153 +0,0 @@
|
||||
# NOTE: this workflow is now running on Dronecode / PX4 AWS account.
|
||||
# - If you want to keep the tests running in GitHub Actions you need to uncomment the "runs-on: ubuntu-latest" lines
|
||||
# and comment the "runs-on: [runs-on,runner=..." lines.
|
||||
# - If you would like to duplicate this setup try setting up "RunsOn" on your own AWS account try https://runs-on.com
|
||||
|
||||
name: SITL Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Testing PX4 ${{ matrix.config.model }}
|
||||
runs-on: [runs-on,runner=16cpu-linux-x64,image=ubuntu22-full-x64,"run-id=${{ github.run_id }}",spot=false]
|
||||
container:
|
||||
image: px4io/px4-dev-simulation-focal:2021-09-08
|
||||
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
config:
|
||||
- {model: "iris", latitude: "59.617693", longitude: "-151.145316", altitude: "48", build_type: "RelWithDebInfo" } # Alaska
|
||||
- {model: "tailsitter" , latitude: "29.660316", longitude: "-82.316658", altitude: "30", build_type: "RelWithDebInfo" } # Florida
|
||||
- {model: "standard_vtol", latitude: "47.397742", longitude: "8.545594", altitude: "488", build_type: "Coverage" } # Zurich
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Git Ownership Workaround
|
||||
run: git config --system --add safe.directory '*'
|
||||
|
||||
- id: set-timestamp
|
||||
name: Set timestamp for cache
|
||||
run: echo "::set-output name=timestamp::$(date +"%Y%m%d%H%M%S")"
|
||||
|
||||
- name: Cache Key Config
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.ccache
|
||||
key: sitl-ccache-${{ steps.set-timestamp.outputs.timestamp }}
|
||||
restore-keys: sitl-ccache-${{ steps.set-timestamp.outputs.timestamp }}
|
||||
|
||||
- name: Cache Conf Config
|
||||
run: |
|
||||
mkdir -p ~/.ccache
|
||||
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
|
||||
echo "compression = true" >> ~/.ccache/ccache.conf
|
||||
echo "compression_level = 6" >> ~/.ccache/ccache.conf
|
||||
echo "max_size = 120M" >> ~/.ccache/ccache.conf
|
||||
echo "hash_dir = false" >> ~/.ccache/ccache.conf
|
||||
ccache -s
|
||||
ccache -z
|
||||
|
||||
- name: Build PX4
|
||||
env:
|
||||
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
|
||||
run: make px4_sitl_default
|
||||
|
||||
- name: Cache Post-Run [px4_sitl_default]
|
||||
run: ccache -s
|
||||
|
||||
- name: Build SITL Gazebo
|
||||
env:
|
||||
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
|
||||
run: make px4_sitl_default sitl_gazebo-classic
|
||||
|
||||
- name: Cache Post-Run [sitl_gazebo-classic]
|
||||
run: ccache -s
|
||||
|
||||
- name: Download MAVSDK
|
||||
run: wget "https://github.com/mavlink/MAVSDK/releases/download/v$(cat test/mavsdk_tests/MAVSDK_VERSION)/libmavsdk-dev_$(cat test/mavsdk_tests/MAVSDK_VERSION)_ubuntu20.04_amd64.deb"
|
||||
|
||||
- name: Install MAVSDK
|
||||
run: dpkg -i "libmavsdk-dev_$(cat test/mavsdk_tests/MAVSDK_VERSION)_ubuntu20.04_amd64.deb"
|
||||
|
||||
- name: Check PX4 Environment Variables
|
||||
env:
|
||||
PX4_HOME_LAT: ${{matrix.config.latitude}}
|
||||
PX4_HOME_LON: ${{matrix.config.longitude}}
|
||||
PX4_HOME_ALT: ${{matrix.config.altitude}}
|
||||
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
|
||||
run: |
|
||||
export
|
||||
ulimit -a
|
||||
|
||||
- name: Build PX4 / MAVSDK tests
|
||||
env:
|
||||
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
|
||||
DONT_RUN: 1
|
||||
run: make px4_sitl_default sitl_gazebo-classic mavsdk_tests
|
||||
|
||||
- name: Cache Post-Run [px4_sitl_default sitl_gazebo-classic mavsdk_tests]
|
||||
run: ccache -s
|
||||
|
||||
- name: Core Dump Settings
|
||||
run: |
|
||||
ulimit -c unlimited
|
||||
echo "`pwd`/%e.core" > /proc/sys/kernel/core_pattern
|
||||
|
||||
- name: Run SITL / MAVSDK Tests
|
||||
env:
|
||||
PX4_HOME_LAT: ${{matrix.config.latitude}}
|
||||
PX4_HOME_LON: ${{matrix.config.longitude}}
|
||||
PX4_HOME_ALT: ${{matrix.config.altitude}}
|
||||
PX4_CMAKE_BUILD_TYPE: ${{matrix.config.build_type}}
|
||||
run: test/mavsdk_tests/mavsdk_test_runner.py --speed-factor 10 --abort-early --model ${{matrix.config.model}} --upload test/mavsdk_tests/configs/sitl.json --verbose
|
||||
timeout-minutes: 45
|
||||
|
||||
- name: Upload failed logs
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: failed-${{matrix.config.model}}-logs.zip
|
||||
path: |
|
||||
logs/**/**/**/*.log
|
||||
logs/**/**/**/*.ulg
|
||||
build/px4_sitl_default/tmp_mavsdk_tests/rootfs/*.ulg
|
||||
|
||||
- name: Look at Core files
|
||||
if: failure() && ${{ hashFiles('px4.core') != '' }}
|
||||
run: gdb build/px4_sitl_default/bin/px4 px4.core -ex "thread apply all bt" -ex "quit"
|
||||
|
||||
- name: Upload PX4 coredump
|
||||
if: failure() && ${{ hashFiles('px4.core') != '' }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: coredump
|
||||
path: px4.core
|
||||
|
||||
- name: Setup & Generate Coverage Report
|
||||
if: contains(matrix.config.build_type, 'Coverage')
|
||||
run: |
|
||||
git config --global credential.helper "" # disable the keychain credential helper
|
||||
git config --global --add credential.helper store # enable the local store credential helper
|
||||
echo "https://x-access-token:${{ secrets.ACCESS_TOKEN }}@github.com" >> ~/.git-credentials # add credential
|
||||
git config --global url."https://github.com/".insteadof git@github.com: # credentials add credential
|
||||
mkdir -p coverage
|
||||
lcov --directory build/px4_sitl_default --base-directory build/px4_sitl_default --gcov-tool gcov --capture -o coverage/lcov.info
|
||||
|
||||
- name: Upload Coverage Information to Codecov
|
||||
if: contains(matrix.config.build_type, 'Coverage')
|
||||
uses: codecov/codecov-action@v4
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
flags: mavsdk
|
||||
file: coverage/lcov.info
|
||||
@@ -1,16 +0,0 @@
|
||||
name: 'Handle stale issues and PRs'
|
||||
on:
|
||||
schedule:
|
||||
- cron: '30 1 * * *'
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v8
|
||||
with:
|
||||
days-before-stale: 30
|
||||
days-before-close: -1
|
||||
stale-issue-label: 'stale'
|
||||
stale-pr-label: 'stale'
|
||||
remove-stale-when-updated: true
|
||||
+28
-64
@@ -1,6 +1,10 @@
|
||||
*.d
|
||||
!ROMFS/*/*.d
|
||||
!ROMFS/*/*/*.d
|
||||
!ROMFS/*/*/*/*.d
|
||||
*.px4log
|
||||
*.dSYM
|
||||
*.o
|
||||
*.gch
|
||||
*.pyc
|
||||
*~
|
||||
.*.swp
|
||||
@@ -8,20 +12,30 @@
|
||||
.cproject
|
||||
.DS_Store
|
||||
.gdbinit
|
||||
.gdb_history
|
||||
.project
|
||||
.settings
|
||||
.swp
|
||||
.~lock.*
|
||||
Archives/*
|
||||
Build/*
|
||||
Testing/
|
||||
Packages/*
|
||||
build/*
|
||||
build_*/
|
||||
core
|
||||
cscope.out
|
||||
cscope.in.out
|
||||
cscope.po.out
|
||||
Firmware.sublime-workspace
|
||||
user.sublime*
|
||||
Images/*.bin
|
||||
Images/*.px4
|
||||
mavlink/include/mavlink/v0.9/
|
||||
/nuttx-configs/px4io-v2/src/.depend
|
||||
/nuttx-configs/px4io-v2/src/Make.dep
|
||||
/nuttx-configs/px4io-v2/src/libboard.a
|
||||
/nuttx-configs/px4io-v1/src/.depend
|
||||
/nuttx-configs/px4io-v1/src/Make.dep
|
||||
/nuttx-configs/px4io-v1/src/libboard.a
|
||||
/Documentation/doxy.log
|
||||
/Documentation/html/
|
||||
/Documentation/doxygen*objdb*tmp
|
||||
@@ -31,11 +45,19 @@ tags
|
||||
.pydevproject
|
||||
.ropeproject
|
||||
*.orig
|
||||
src/modules/uORB/topics/*
|
||||
src/platforms/nuttx/px4_messages/*
|
||||
src/platforms/ros/px4_messages/*
|
||||
Firmware.zip
|
||||
unittests/build
|
||||
*.generated.h
|
||||
.vagrant
|
||||
*.pretty
|
||||
xcode
|
||||
src/platforms/posix/px4_messages/
|
||||
src/platforms/posix-arm/px4_messages/
|
||||
src/platforms/qurt/px4_messages/
|
||||
ROMFS/*/*/rc.autostart
|
||||
rootfs/
|
||||
*.autosave
|
||||
CMakeLists.txt.user
|
||||
@@ -47,64 +69,6 @@ GTAGS
|
||||
*.files
|
||||
*.includes
|
||||
|
||||
# CLion ignores
|
||||
.idea
|
||||
cmake-build-*/
|
||||
|
||||
posix-configs/SITL/init/test/*_generated
|
||||
|
||||
/airframes.md
|
||||
/airframes.xml
|
||||
/parameters.md
|
||||
/parameters.xml
|
||||
/modules
|
||||
/msg/ros/*.msg
|
||||
|
||||
*.gcov
|
||||
.coverage
|
||||
.coverage.*
|
||||
|
||||
# KDevelop ignores
|
||||
.kdev4/*
|
||||
*.kdev4
|
||||
|
||||
# cmake in tree (ninja)
|
||||
.ninja_deps
|
||||
.ninja_log
|
||||
bin/
|
||||
build.ninja
|
||||
cmake_install.cmake
|
||||
CMakeCache.txt
|
||||
CMakeFiles
|
||||
compile_commands.json
|
||||
CPackConfig.cmake
|
||||
CPackSourceConfig.cmake
|
||||
CTestTestfile.cmake
|
||||
external/
|
||||
rules.ninja
|
||||
|
||||
# in tree build
|
||||
**/*.a
|
||||
**/*.px4mod
|
||||
**/*.stamp
|
||||
/coverage*
|
||||
/functional-*
|
||||
/generated_params/
|
||||
/googletest-*/
|
||||
/logs
|
||||
/mavsdk_tests
|
||||
/unit-*
|
||||
/uORB/
|
||||
DartConfiguration.tcl
|
||||
msg/tmp/
|
||||
msg/topics_sources/
|
||||
platforms/posix/apps.cpp
|
||||
platforms/posix/apps.h
|
||||
src/lib/version/build_git_version.h
|
||||
src/modules/simulator/simulator_config.h
|
||||
src/systemcmds/topic_listener/listener_generated.cpp
|
||||
|
||||
!src/drivers/distance_sensor/broadcom/afbrs50/Lib/*
|
||||
|
||||
# colcon
|
||||
log/
|
||||
# uavcan firmware
|
||||
ROMFS/px4fmu_common/uavcan/
|
||||
vectorcontrol/
|
||||
|
||||
+40
-88
@@ -1,91 +1,43 @@
|
||||
[submodule "src/modules/mavlink/mavlink"]
|
||||
path = src/modules/mavlink/mavlink
|
||||
url = https://github.com/mavlink/mavlink.git
|
||||
branch = master
|
||||
[submodule "Tools/simulation/jmavsim/jMAVSim"]
|
||||
path = Tools/simulation/jmavsim/jMAVSim
|
||||
[submodule "mavlink/include/mavlink/v1.0"]
|
||||
path = mavlink/include/mavlink/v1.0
|
||||
url = https://github.com/mavlink/c_library_v1.git
|
||||
[submodule "mavlink/include/mavlink/v2.0"]
|
||||
path = mavlink/include/mavlink/v2.0
|
||||
url = https://github.com/mavlink/c_library_v2.git
|
||||
[submodule "NuttX"]
|
||||
path = NuttX
|
||||
url = https://github.com/PX4/NuttX.git
|
||||
[submodule "src/modules/uavcan/libuavcan"]
|
||||
path = src/modules/uavcan/libuavcan
|
||||
url = https://github.com/UAVCAN/libuavcan.git
|
||||
[submodule "Tools/genmsg"]
|
||||
path = Tools/genmsg
|
||||
url = https://github.com/ros/genmsg.git
|
||||
[submodule "Tools/gencpp"]
|
||||
path = Tools/gencpp
|
||||
url = https://github.com/ros/gencpp.git
|
||||
[submodule "Tools/jMAVSim"]
|
||||
path = Tools/jMAVSim
|
||||
url = https://github.com/PX4/jMAVSim.git
|
||||
branch = main
|
||||
[submodule "Tools/simulation/gazebo-classic/sitl_gazebo-classic"]
|
||||
path = Tools/simulation/gazebo-classic/sitl_gazebo-classic
|
||||
url = https://github.com/PX4/PX4-SITL_gazebo-classic.git
|
||||
branch = main
|
||||
[submodule "Tools/sitl_gazebo"]
|
||||
path = Tools/sitl_gazebo
|
||||
url = https://github.com/PX4/sitl_gazebo.git
|
||||
[submodule "unittests/googletest"]
|
||||
path = unittests/googletest
|
||||
url = https://github.com/google/googletest.git
|
||||
ignore = untracked
|
||||
[submodule "src/lib/matrix"]
|
||||
path = src/lib/matrix
|
||||
url = https://github.com/PX4/Matrix.git
|
||||
[submodule "src/lib/DriverFramework"]
|
||||
path = src/lib/DriverFramework
|
||||
url = https://github.com/PX4/DriverFramework.git
|
||||
[submodule "src/lib/ecl"]
|
||||
path = src/lib/ecl
|
||||
url = https://github.com/PX4/ecl.git
|
||||
[submodule "cmake/cmake_hexagon"]
|
||||
path = cmake/cmake_hexagon
|
||||
url = https://github.com/ATLFlight/cmake_hexagon
|
||||
[submodule "src/drivers/gps/devices"]
|
||||
path = src/drivers/gps/devices
|
||||
url = https://github.com/PX4/PX4-GPSDrivers.git
|
||||
branch = main
|
||||
[submodule "platforms/nuttx/NuttX/nuttx"]
|
||||
path = platforms/nuttx/NuttX/nuttx
|
||||
url = https://github.com/PX4/NuttX.git
|
||||
branch = px4_firmware_nuttx-10.3.0+
|
||||
[submodule "platforms/nuttx/NuttX/apps"]
|
||||
path = platforms/nuttx/NuttX/apps
|
||||
url = https://github.com/PX4/NuttX-apps.git
|
||||
branch = px4_firmware_nuttx-10.3.0+
|
||||
[submodule "Tools/flightgear_bridge"]
|
||||
path = Tools/simulation/flightgear/flightgear_bridge
|
||||
url = https://github.com/PX4/PX4-FlightGear-Bridge.git
|
||||
[submodule "Tools/simulation/jsbsim/jsbsim_bridge"]
|
||||
path = Tools/simulation/jsbsim/jsbsim_bridge
|
||||
url = https://github.com/PX4/px4-jsbsim-bridge.git
|
||||
[submodule "src/drivers/cyphal/libcanard"]
|
||||
path = src/drivers/cyphal/libcanard
|
||||
url = https://github.com/opencyphal/libcanard.git
|
||||
[submodule "src/drivers/cyphal/public_regulated_data_types"]
|
||||
path = src/drivers/cyphal/public_regulated_data_types
|
||||
url = https://github.com/opencyphal/public_regulated_data_types.git
|
||||
[submodule "src/drivers/cyphal/legacy_data_types"]
|
||||
path = src/drivers/cyphal/legacy_data_types
|
||||
url = https://github.com/PX4/public_regulated_data_types.git
|
||||
branch = legacy
|
||||
[submodule "src/lib/crypto/monocypher"]
|
||||
path = src/lib/crypto/monocypher
|
||||
url = https://github.com/PX4/Monocypher.git
|
||||
branch = px4
|
||||
[submodule "src/lib/events/libevents"]
|
||||
path = src/lib/events/libevents
|
||||
url = https://github.com/mavlink/libevents.git
|
||||
branch = main
|
||||
[submodule "src/lib/crypto/libtomcrypt"]
|
||||
path = src/lib/crypto/libtomcrypt
|
||||
url = https://github.com/PX4/libtomcrypt.git
|
||||
branch = px4
|
||||
[submodule "src/lib/crypto/libtommath"]
|
||||
path = src/lib/crypto/libtommath
|
||||
url = https://github.com/PX4/libtommath.git
|
||||
branch = px4
|
||||
[submodule "src/modules/uxrce_dds_client/Micro-XRCE-DDS-Client"]
|
||||
path = src/modules/uxrce_dds_client/Micro-XRCE-DDS-Client
|
||||
url = https://github.com/PX4/Micro-XRCE-DDS-Client.git
|
||||
branch = px4
|
||||
[submodule "src/lib/cdrstream/cyclonedds"]
|
||||
path = src/lib/cdrstream/cyclonedds
|
||||
url = https://github.com/px4/cyclonedds
|
||||
[submodule "src/lib/cdrstream/rosidl"]
|
||||
path = src/lib/cdrstream/rosidl
|
||||
url = https://github.com/px4/rosidl
|
||||
[submodule "src/modules/zenoh/zenoh-pico"]
|
||||
path = src/modules/zenoh/zenoh-pico
|
||||
url = https://github.com/px4/zenoh-pico
|
||||
branch = dev/1.0.0-px4
|
||||
[submodule "src/lib/heatshrink/heatshrink"]
|
||||
path = src/lib/heatshrink/heatshrink
|
||||
url = https://github.com/PX4/heatshrink.git
|
||||
branch = px4
|
||||
[submodule "Tools/simulation/gz"]
|
||||
path = Tools/simulation/gz
|
||||
url = https://github.com/PX4/PX4-gazebo-models.git
|
||||
branch = main
|
||||
[submodule "boards/modalai/voxl2/libfc-sensor-api"]
|
||||
path = boards/modalai/voxl2/libfc-sensor-api
|
||||
url = https://gitlab.com/voxl-public/voxl-sdk/core-libs/libfc-sensor-api.git
|
||||
[submodule "src/drivers/actuators/vertiq_io/iq-module-communication-cpp"]
|
||||
path = src/drivers/actuators/vertiq_io/iq-module-communication-cpp
|
||||
url = https://github.com/PX4/iq-module-communication-cpp.git
|
||||
branch = master
|
||||
[submodule "src/drivers/uavcan/libdronecan/dsdl"]
|
||||
path = src/drivers/uavcan/libdronecan/dsdl
|
||||
url = https://github.com/PX4/DSDL.git
|
||||
[submodule "src/drivers/uavcan/libdronecan/libuavcan/dsdl_compiler/pydronecan"]
|
||||
path = src/drivers/uavcan/libdronecan/libuavcan/dsdl_compiler/pydronecan
|
||||
url = https://github.com/dronecan/pydronecan
|
||||
url = https://github.com/PX4/GpsDrivers.git
|
||||
|
||||
+131
@@ -0,0 +1,131 @@
|
||||
# Build and autotest script for PX4 Firmware
|
||||
# http://travis-ci.org
|
||||
|
||||
language: cpp
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
include:
|
||||
- os: linux
|
||||
sudo: required
|
||||
env: GCC_VER=4.8 DOCKER_REPO="px4io/px4-dev-base:2016-07-14"
|
||||
services:
|
||||
- docker
|
||||
- os: osx
|
||||
sudo: true
|
||||
osx_image: xcode7.3
|
||||
env: CCACHE_CPP2=1
|
||||
|
||||
cache:
|
||||
ccache: true
|
||||
pip: true
|
||||
directories:
|
||||
- $HOME/.pip/cache/
|
||||
- $HOME/Library/Caches/pip
|
||||
|
||||
before_install:
|
||||
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
|
||||
cd ${TRAVIS_BUILD_DIR}
|
||||
&& git fetch --unshallow && git fetch --all --tags
|
||||
&& docker pull ${DOCKER_REPO}
|
||||
;
|
||||
elif [ "${TRAVIS_OS_NAME}" = "osx" ]; then
|
||||
sudo -H easy_install pip
|
||||
&& sudo -H pip install empy
|
||||
&& wget https://s3.amazonaws.com/px4-travis/toolchain/macos/ccache
|
||||
&& sudo mv ccache /usr/local/bin
|
||||
&& chmod +x /usr/local/bin/ccache
|
||||
&& mkdir -p ~/bin
|
||||
&& sudo ln -s /usr/local/bin/ccache ~/bin/c++
|
||||
&& sudo ln -s /usr/local/bin/ccache ~/bin/cc
|
||||
&& sudo ln -s /usr/local/bin/ccache ~/bin/clang
|
||||
&& sudo ln -s /usr/local/bin/ccache ~/bin/clang++
|
||||
&& sudo ln -s /usr/local/bin/ccache ~/bin/g++
|
||||
&& sudo ln -s /usr/local/bin/ccache ~/bin/gcc
|
||||
&& export PATH=~/bin:$PATH
|
||||
&& wget https://s3.amazonaws.com/px4-travis/toolchain/macos/ninja
|
||||
&& sudo mv ninja /usr/local/bin
|
||||
&& chmod +x /usr/local/bin/ninja
|
||||
;
|
||||
fi
|
||||
|
||||
env:
|
||||
global:
|
||||
# AWS KEY: $PX4_AWS_KEY
|
||||
- secure: "XknnZHWBbpHbN4f3fuAVwUztdLIu8ej4keC3aQSDofo3uw8AFEzojfsQsN9u77ShWSIV4iYJWh9C9ALkCx7TocJ+xYjiboo10YhM9lH/8u+EXjYWG6GHS8ua0wkir+cViSxoLNaMtmcb/rPTicJecAGANxLsIHyBAgTL3fkbLSA="
|
||||
# AWS SECRET: $PX4_AWS_SECRET
|
||||
- secure: "h6oajlW68dWIr+wZhO58Dv6e68dZHrBLVA6lPXZmheFQBW6Xam1HuLGA0LOW6cL9TnrAsOZ8g4goB58eMQnMEijFZKi3mhRwZhd/Xjq/ZGJOWBUrLoQHZUw2dQk5ja5vmUlKEoQnFZjDuMjx8KfX5ZMNy8A3yssWZtJYHD8c+bk="
|
||||
- PX4_AWS_BUCKET=px4-travis
|
||||
- GIT_SUBMODULES_ARE_EVIL=1
|
||||
|
||||
script:
|
||||
- ccache -M 1GB; ccache -z
|
||||
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
|
||||
docker run --rm -v `pwd`:`pwd`:rw -v $HOME/.ccache:$HOME/.ccache:rw -e CCACHE_DIR=$HOME/.ccache -e GIT_SUBMODULES_ARE_EVIL=1 -w=`pwd` --user=$UID -it ${DOCKER_REPO} /bin/bash -c "make check_qgc_firmware VECTORCONTROL=1";
|
||||
elif [ "${TRAVIS_OS_NAME}" = "osx" ]; then
|
||||
make check_posix_sitl_default;
|
||||
fi
|
||||
- ccache -s
|
||||
|
||||
after_success:
|
||||
- make package_firmware && mkdir s3deploy-archive && cp Firmware.zip s3deploy-archive/
|
||||
# find all px4 firmware (*.px4) and rename
|
||||
- find . -type f -name 'nuttx-*-default.px4' -exec cp "{}" . \;
|
||||
- find . -maxdepth 1 -mindepth 1 -type f -name 'nuttx-*-default.px4' | sed 's/.\/nuttx-//' | sed 's/-default.px4//' | xargs -I{} mv nuttx-{}-default.px4 {}_default.px4
|
||||
- mkdir s3deploy-branch && mv *_default.px4 build_px4fmu-v2_default/parameters.xml build_px4fmu-v2_default/airframes.xml s3deploy-branch/
|
||||
# only deploy GCC 4.8 builds on master/beta/stable
|
||||
- if [[ "$GCC_VER" == "4.8" && ( "$TRAVIS_BRANCH" == "master" || "$TRAVIS_BRANCH" == "beta" || "$TRAVIS_BRANCH" == "stable" ) ]]; then
|
||||
export PX4_S3_DEPLOY=1;
|
||||
fi
|
||||
|
||||
deploy:
|
||||
# deploy *.px4 to S3 px4-travis/Firmware/$TRAVIS_BRANCH
|
||||
- provider: s3
|
||||
access_key_id: $PX4_AWS_KEY
|
||||
secret_access_key:
|
||||
secure: $PX4_AWS_SECRET
|
||||
bucket: px4-travis
|
||||
local_dir: s3deploy-branch
|
||||
upload-dir: Firmware/$TRAVIS_BRANCH
|
||||
acl: public_read
|
||||
skip_cleanup: true
|
||||
on:
|
||||
all_branches: true
|
||||
condition: $PX4_S3_DEPLOY = 1
|
||||
|
||||
# deploy Firmware.zip to S3 px4-travis/archives/Firmware/$TRAVIS_BRANCH/$TRAVIS_BUILD_ID
|
||||
- provider: s3
|
||||
access_key_id: $PX4_AWS_KEY
|
||||
secret_access_key:
|
||||
secure: $PX4_AWS_SECRET
|
||||
bucket: px4-travis
|
||||
local_dir: s3deploy-archive
|
||||
upload-dir: archives/Firmware/$TRAVIS_BRANCH/$TRAVIS_BUILD_ID
|
||||
acl: public_read
|
||||
skip_cleanup: true
|
||||
on:
|
||||
all_branches: true
|
||||
condition: $PX4_S3_DEPLOY = 1
|
||||
|
||||
# on tags deploy Firmware.zip to Github releases
|
||||
- provider: releases
|
||||
api_key:
|
||||
secure: cdHWLRBxA5UlYpOS0Sp891QK7PFmMgQ5ZWs1aPt+sw0rIrowyWMHCwXNBEdUqaExHYNYgXCUDI0EzNgfB7ZcR63Qv1MQeoyamV4jsxlyAqDqmxNtWO82S6RhHGeMLk26VgFKzynVcEk1IYlQP2nqzMQLdu+jTrngERuAIrCdRuc=
|
||||
file: "Firmware.zip"
|
||||
skip_cleanup: true
|
||||
on:
|
||||
tags: true
|
||||
all_branches: true
|
||||
repo: PX4/Firmware
|
||||
condition: $GCC_VER = 4.8
|
||||
|
||||
notifications:
|
||||
webhooks:
|
||||
urls:
|
||||
- https://webhooks.gitter.im/e/2b9c4a4cb2211f8befba
|
||||
on_success: always # options: [always|never|change] default: always
|
||||
on_failure: always # options: [always|never|change] default: always
|
||||
slack:
|
||||
secure: "QKw73Zel/s3JAbe/7XyO9tPnJwiiGFpYzSjdR8lG3tYFjRdXZnhxG4c+G7bkgkaPTS4Hult33VXE3kcEqOI7+C+eRwRlZhDfL0knQbXVCxjcLjzmUFdoPOwurlgZDw66PFWCi5tZcLKSRo3u4U8ibT4WKi3jm9sDSyOcfBAucMU="
|
||||
on_success: change # options: [always|never|change] default: always
|
||||
on_failure: always # options: [always|never|change] default: always
|
||||
@@ -1,14 +0,0 @@
|
||||
.cortex-debug.peripherals.state.json
|
||||
.cortex-debug.registers.state.json
|
||||
compile_commands.json
|
||||
|
||||
# generated by cmake
|
||||
launch.json
|
||||
c_cpp_properties.json
|
||||
|
||||
# C/C++ extension does some local caching in this folder
|
||||
ipch/
|
||||
|
||||
browse.vc.db*
|
||||
|
||||
*.log
|
||||
Vendored
-5
@@ -1,5 +0,0 @@
|
||||
[
|
||||
{
|
||||
"name": "PX4 detect"
|
||||
}
|
||||
]
|
||||
Vendored
-398
@@ -1,398 +0,0 @@
|
||||
CONFIG:
|
||||
default: px4_sitl_default
|
||||
choices:
|
||||
px4_sitl_default:
|
||||
short: px4_sitl_default
|
||||
buildType: RelWithDebInfo
|
||||
settings:
|
||||
CONFIG: px4_sitl_default
|
||||
px4_sitl_nolockstep:
|
||||
short: px4_sitl_nolockstep
|
||||
buildType: RelWithDebInfo
|
||||
settings:
|
||||
CONFIG: px4_sitl_nolockstep
|
||||
px4_sitl_asan:
|
||||
short: px4_sitl (AddressSanitizer)
|
||||
buildType: AddressSanitizer
|
||||
settings:
|
||||
CONFIG: px4_sitl_default
|
||||
px4_sitl_ubsan:
|
||||
short: px4_sitl (UndefinedBehaviorSanitizer)
|
||||
buildType: UndefinedBehaviorSanitizer
|
||||
settings:
|
||||
CONFIG: px4_sitl_default
|
||||
px4_sitl_replay:
|
||||
short: px4_sitl_replay
|
||||
buildType: RelWithDebInfo
|
||||
settings:
|
||||
CONFIG: px4_sitl_replay
|
||||
px4_sitl_test:
|
||||
short: px4_sitl_test
|
||||
buildType: RelWithDebInfo
|
||||
settings:
|
||||
CONFIG: px4_sitl_test
|
||||
px4_io-v2_default:
|
||||
short: px4_io-v2
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: px4_io-v2_default
|
||||
px4_fmu-v2_default:
|
||||
short: px4_fmu-v2
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: px4_fmu-v2_default
|
||||
px4_fmu-v3_default:
|
||||
short: px4_fmu-v3
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: px4_fmu-v3_default
|
||||
px4_fmu-v4_default:
|
||||
short: px4_fmu-v4
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: px4_fmu-v4_default
|
||||
px4_fmu-v4pro_default:
|
||||
short: px4_fmu-v4pro
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: px4_fmu-v4pro_default
|
||||
px4_fmu-v5_default:
|
||||
short: px4_fmu-v5
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: px4_fmu-v5_default
|
||||
px4_fmu-v5_debug:
|
||||
short: px4_fmu-v5_debug
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: px4_fmu-v5_debug
|
||||
px4_fmu-v5x_default:
|
||||
short: px4_fmu-v5x
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: px4_fmu-v5x_default
|
||||
px4_fmu-v6c_default:
|
||||
short: px4_fmu-v6c
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: px4_fmu-v6c_default
|
||||
px4_fmu-v6c_bootloader:
|
||||
short: px4_fmu-v6c_bootloader
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: px4_fmu-v6c_bootloader
|
||||
px4_fmu-v6u_default:
|
||||
short: px4_fmu-v6u
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: px4_fmu-v6u_default
|
||||
px4_fmu-v6u_bootloader:
|
||||
short: px4_fmu-v6u_bootloader
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: px4_fmu-v6u_bootloader
|
||||
px4_fmu-v6x_default:
|
||||
short: px4_fmu-v6x
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: px4_fmu-v6x_default
|
||||
px4_fmu-v6x_bootloader:
|
||||
short: px4_fmu-v6x_bootloader
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: px4_fmu-v6x_bootloader
|
||||
px4_fmu-v6xrt_default:
|
||||
short: px4_fmu-v6xrt
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: px4_fmu-v6xrt_default
|
||||
px4_fmu-v6xrt_bootloader:
|
||||
short: px4_fmu-v6xrt_bootloader
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: px4_fmu-v6xrt_bootloader
|
||||
3dr_ctrl-zero-h7-oem-revg_default:
|
||||
short: 3dr_ctrl-zero-h7-oem-revg
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: 3dr_ctrl-zero-h7-oem-revg_default
|
||||
airmind_mindpx-v2_default:
|
||||
short: airmind_mindpx-v2
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: airmind_mindpx-v2_default
|
||||
ark_can-flow_default:
|
||||
short: ark_can-flow_default
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: ark_can-flow_default
|
||||
ark_can-flow_canbootloader:
|
||||
short: ark_can-flow_canbootloader
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: ark_can-flow_canbootloader
|
||||
ark_can-gps_default:
|
||||
short: ark_can-gps_default
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: ark_can-gps_default
|
||||
ark_can-gps_canbootloader:
|
||||
short: ark_can-gps_canbootloader
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: ark_can-gps_canbootloader
|
||||
ark_can-rtk-gps_default:
|
||||
short: ark_can-rtk-gps_default
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: ark_can-rtk-gps_default
|
||||
ark_can-rtk-gps_debug:
|
||||
short: ark_can-rtk-gps_debug
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: ark_can-rtk-gps_debug
|
||||
ark_can-rtk-gps_canbootloader:
|
||||
short: ark_can-rtk-gps_canbootloader
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: ark_can-rtk-gps_canbootloader
|
||||
ark_septentrio-gps_default:
|
||||
short: ark_septentrio-gps_default
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: ark_septentrio-gps_default
|
||||
ark_septentrio-gps_canbootloader:
|
||||
short: ark_septentrio-gps_canbootloader
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: ark_septentrio-gps_canbootloader
|
||||
ark_cannode_default:
|
||||
short: ark_cannode_default
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: ark_cannode_default
|
||||
ark_cannode_canbootloader:
|
||||
short: ark_cannode_canbootloader
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: ark_cannode_canbootloader
|
||||
ark_fmu-v6x_bootloader:
|
||||
short: ark_fmu-v6x_bootloader
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: ark_fmu-v6x_bootloader
|
||||
ark_fmu-v6x_default:
|
||||
short: ark_fmu-v6x_default
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: ark_fmu-v6x_default
|
||||
ark_fpv_bootloader:
|
||||
short: ark_fpv_bootloader
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: ark_fpv_bootloader
|
||||
ark_fpv_default:
|
||||
short: ark_fpv_default
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: ark_fpv_default
|
||||
ark_pi6x_bootloader:
|
||||
short: ark_pi6x_bootloader
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: ark_pi6x_bootloader
|
||||
ark_pi6x_default:
|
||||
short: ark_pi6x_default
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: ark_pi6x_default
|
||||
atl_mantis-edu_default:
|
||||
short: atl_mantis-edu
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: atl_mantis-edu_default
|
||||
av_x-v1_default:
|
||||
short: av_x-v1
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: av_x-v1_default
|
||||
bitcraze_crazyflie_default:
|
||||
short: bitcraze_crazyflie
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: bitcraze_crazyflie_default
|
||||
cuav_can-gps-v1_default:
|
||||
short: cuav_can-gps-v1_default
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: cuav_can-gps-v1_default
|
||||
cuav_can-gps-v1_canbootloader:
|
||||
short: cuav_can-gps-v1_canbootloader
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: cuav_can-gps-v1_canbootloader
|
||||
cuav_nora_default:
|
||||
short: cuav_nora
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: cuav_nora_default
|
||||
cuav_x7pro_default:
|
||||
short: cuav_x7pro
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: cuav_x7pro_default
|
||||
cuav_7-nano_default:
|
||||
short: cuav_7-nano
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: cuav_7-nano_default
|
||||
cubepilot_cubeorange_test:
|
||||
short: cubepilot_cubeorange
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: cubepilot_cubeorange_test
|
||||
cubepilot_cubeorangeplus_test:
|
||||
short: cubepilot_cubeorangeplus
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: cubepilot_cubeorangeplus_test
|
||||
emlid_navio2_default:
|
||||
short: emlid_navio2
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: emlid_navio2_default
|
||||
freefly_can-rtk-gps_default:
|
||||
short: freefly_can-rtk-gps_default
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: freefly_can-rtk-gps_default
|
||||
freefly_can-rtk-gps_canbootloader:
|
||||
short: freefly_can-rtk-gps_canbootloader
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: freefly_can-rtk-gps_canbootloader
|
||||
holybro_can-gps-v1_canbootloader:
|
||||
short: holybro_can-gps-v1_canbootloader
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: holybro_can-gps-v1_canbootloader
|
||||
holybro_can-gps-v1_default:
|
||||
short: holybro_can-gps-v1_default
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: holybro_can-gps-v1_default
|
||||
holybro_durandal-v1_default:
|
||||
short: holybro_durandal-v1
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: holybro_durandal-v1_default
|
||||
matek_h743-slim_default:
|
||||
short: matek_h743-slim
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: matek_h743-slim_default
|
||||
matek_gnss-m9n-f4_canbootloader:
|
||||
short: matek_gnss-m9n-f4_canbootloader
|
||||
buildType: MiniSizeRel
|
||||
settings:
|
||||
CONFIG: matek_m9nf4can_canbootloader
|
||||
matek_gnss-m9n-f4_default:
|
||||
short: matek_gnss-m9n-f4_default
|
||||
buildType: MiniSizeRel
|
||||
settings:
|
||||
CONFIG: matek_gnss-m9n-f4_default
|
||||
micoair_h743_default:
|
||||
short: micoair_h743
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: micoair_h743_default
|
||||
micoair_h743-aio_bootloader:
|
||||
short: micoair_h743-aio_bootloader
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: micoair_h743-aio_bootloader
|
||||
micoair_h743-aio_default:
|
||||
short: micoair_h743-aio
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: micoair_h743-aio_default
|
||||
modalai_fc-v1_default:
|
||||
short: modalai_fc-v1
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: modalai_fc-v1_default
|
||||
modalai_fc-v2_default:
|
||||
short: modalai_fc-v2
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: modalai_fc-v2_default
|
||||
modalai_voxl2-io_default:
|
||||
short: modalai_voxl2-io
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: modalai_voxl2-io_default
|
||||
mro_ctrl-zero-f7_default:
|
||||
short: mro_ctrl-zero-f7
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: mro_ctrl-zero-f7_default
|
||||
mro_pixracerpro_bootloader:
|
||||
short: mro_pixracerpro_bootloader
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: mro_pixracerpro_bootloader
|
||||
mro_pixracerpro_default:
|
||||
short: mro_pixracerpro_default
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: mro_pixracerpro_default
|
||||
mro_x21-777_default:
|
||||
short: mro_x2.1-777
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: mro_x21-777_default
|
||||
nxp_fmuk66-v3_default:
|
||||
short: nxp_fmuk66-v3
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: nxp_fmuk66-v3_default
|
||||
nxp_mr-canhubk3_default:
|
||||
short: nxp_mr-canhubk3_default
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: nxp_mr-canhubk3_default
|
||||
nxp_mr-canhubk3_fmu:
|
||||
short: nxp_mr-canhubk3_fmu
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: nxp_mr-canhubk3_fmu
|
||||
nxp_tropic-community_default:
|
||||
short: nxp_tropic-community_default
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: nxp_tropic-community_default
|
||||
raspberrypi_pico_default:
|
||||
short: raspberrypi_pico
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: raspberrypi_pico_default
|
||||
zeroone_x6_default:
|
||||
short: zeroone_x6
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: zeroone_x6_default
|
||||
zeroone_x6_bootloader:
|
||||
short: zeroone_x6_bootloader
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: zeroone_x6_bootloader
|
||||
x-mav_ap-h743v2_bootloader:
|
||||
short: x-mav_ap-h743v2-boot
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: x-mav_ap-h743v2_bootloader
|
||||
x-mav_ap-h743v2_default:
|
||||
short: x-mav_ap-h743v2
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: x-mav_ap-h743v2_default
|
||||
Vendored
-25
@@ -1,25 +0,0 @@
|
||||
{
|
||||
// See http://go.microsoft.com/fwlink/?LinkId=827846
|
||||
// for the documentation about the extensions.json format
|
||||
"recommendations": [
|
||||
"chiehyu.vscode-astyle",
|
||||
"dan-c-underwood.arm",
|
||||
"editorconfig.editorconfig",
|
||||
"fredericbonnet.cmake-test-adapter",
|
||||
"github.vscode-pull-request-github",
|
||||
"marus25.cortex-debug",
|
||||
"ms-azuretools.vscode-docker",
|
||||
"ms-iot.vscode-ros",
|
||||
"ms-python.python",
|
||||
"ms-vscode.cmake-tools",
|
||||
"ms-vscode.cpptools",
|
||||
"ms-vscode.cpptools-extension-pack",
|
||||
"redhat.vscode-yaml",
|
||||
"streetsidesoftware.code-spell-checker",
|
||||
"twxs.cmake",
|
||||
"uavcan.dsdl",
|
||||
"wholroyd.jinja",
|
||||
"zixuanwang.linkerscript",
|
||||
"ms-vscode.makefile-tools"
|
||||
]
|
||||
}
|
||||
Vendored
-133
@@ -1,133 +0,0 @@
|
||||
{
|
||||
"astyle.astylerc": "${workspaceFolder}/Tools/astyle/astylerc",
|
||||
"astyle.c.enable": true,
|
||||
"astyle.cpp.enable": true,
|
||||
"C_Cpp.autoAddFileAssociations": false,
|
||||
"C_Cpp.clang_format_fallbackStyle": "none",
|
||||
"C_Cpp.default.browse.limitSymbolsToIncludedHeaders": true,
|
||||
"C_Cpp.default.cppStandard": "c++14",
|
||||
"C_Cpp.default.cStandard": "c11",
|
||||
"C_Cpp.formatting": "Disabled",
|
||||
"C_Cpp.intelliSenseEngine": "Default",
|
||||
"C_Cpp.vcpkg.enabled": false,
|
||||
"C_Cpp.workspaceParsingPriority": "low",
|
||||
"cmake.buildBeforeRun": true,
|
||||
"cmake.buildDirectory": "${workspaceFolder}/build/${variant:CONFIG}",
|
||||
"cmake.configureOnOpen": true,
|
||||
"cmake.ctest.parallelJobs": 1,
|
||||
"cmake.options.statusBarVisibility": "compact",
|
||||
"cmake.skipConfigureIfCachePresent": true,
|
||||
"cmakeExplorer.buildDir": "${workspaceFolder}/build/px4_sitl_test",
|
||||
"cmakeExplorer.parallelJobs": 1,
|
||||
"cmakeExplorer.suiteDelimiter": "-",
|
||||
"cSpell.allowCompoundWords": true,
|
||||
"cSpell.diagnosticLevel": "Hint",
|
||||
"cSpell.showStatus": false,
|
||||
"cSpell.words": [
|
||||
"acro",
|
||||
"nuttx",
|
||||
"esc"
|
||||
],
|
||||
"debug.toolBarLocation": "docked",
|
||||
"editor.defaultFormatter": "chiehyu.vscode-astyle",
|
||||
"editor.insertSpaces": false,
|
||||
"editor.minimap.maxColumn": 120,
|
||||
"editor.minimap.renderCharacters": false,
|
||||
"editor.minimap.showSlider": "always",
|
||||
"editor.suggest.localityBonus": true,
|
||||
"editor.tabSize": 8,
|
||||
"editor.wordWrapColumn": 120,
|
||||
"explorer.openEditors.visible": 0,
|
||||
"files.insertFinalNewline": true,
|
||||
"files.trimTrailingWhitespace": true,
|
||||
"files.watcherExclude": {
|
||||
"**/build/**": true
|
||||
},
|
||||
"git.detectSubmodulesLimit": 20,
|
||||
"git.ignoreLimitWarning": true,
|
||||
"githubPullRequests.defaultMergeMethod": "squash",
|
||||
"githubPullRequests.telemetry.enabled": false,
|
||||
"files.associations": {
|
||||
"*.jinja": "jinja",
|
||||
"algorithm": "cpp",
|
||||
"array": "cpp",
|
||||
"atomic": "cpp",
|
||||
"bitset": "cpp",
|
||||
"cctype": "cpp",
|
||||
"cfenv": "cpp",
|
||||
"chrono": "cpp",
|
||||
"cinttypes": "cpp",
|
||||
"clocale": "cpp",
|
||||
"cmath": "cpp",
|
||||
"codecvt": "cpp",
|
||||
"complex": "cpp",
|
||||
"condition_variable": "cpp",
|
||||
"csignal": "cpp",
|
||||
"cstdarg": "cpp",
|
||||
"cstddef": "cpp",
|
||||
"cstdint": "cpp",
|
||||
"cstdio": "cpp",
|
||||
"cstdlib": "cpp",
|
||||
"cstring": "cpp",
|
||||
"ctime": "cpp",
|
||||
"cwchar": "cpp",
|
||||
"cwctype": "cpp",
|
||||
"deque": "cpp",
|
||||
"exception": "cpp",
|
||||
"forward_list": "cpp",
|
||||
"fstream": "cpp",
|
||||
"functional": "cpp",
|
||||
"future": "cpp",
|
||||
"hash_map": "cpp",
|
||||
"hash_set": "cpp",
|
||||
"initializer_list": "cpp",
|
||||
"iomanip": "cpp",
|
||||
"iosfwd": "cpp",
|
||||
"iostream": "cpp",
|
||||
"istream": "cpp",
|
||||
"iterator": "cpp",
|
||||
"limits": "cpp",
|
||||
"list": "cpp",
|
||||
"map": "cpp",
|
||||
"memory": "cpp",
|
||||
"memory_resource": "cpp",
|
||||
"mutex": "cpp",
|
||||
"new": "cpp",
|
||||
"numeric": "cpp",
|
||||
"optional": "cpp",
|
||||
"ostream": "cpp",
|
||||
"random": "cpp",
|
||||
"ratio": "cpp",
|
||||
"regex": "cpp",
|
||||
"set": "cpp",
|
||||
"sstream": "cpp",
|
||||
"stdexcept": "cpp",
|
||||
"streambuf": "cpp",
|
||||
"string": "cpp",
|
||||
"string_view": "cpp",
|
||||
"strstream": "cpp",
|
||||
"system_error": "cpp",
|
||||
"thread": "cpp",
|
||||
"tuple": "cpp",
|
||||
"type_traits": "cpp",
|
||||
"typeindex": "cpp",
|
||||
"typeinfo": "cpp",
|
||||
"unordered_map": "cpp",
|
||||
"unordered_set": "cpp",
|
||||
"utility": "cpp",
|
||||
"valarray": "cpp",
|
||||
"variant": "cpp",
|
||||
"vector": "cpp",
|
||||
"Jenkinsfile*": "groovy",
|
||||
"*.sdf": "xml"
|
||||
},
|
||||
"search.exclude": {
|
||||
"${workspaceFolder}/build": true
|
||||
},
|
||||
"search.showLineNumbers": true,
|
||||
"terminal.integrated.scrollback": 15000,
|
||||
"yaml.schemas": {
|
||||
"${workspaceFolder}/validation/module_schema.yaml": "${workspaceFolder}/src/modules/*/module.yaml"
|
||||
},
|
||||
"ros.distro": "humble"
|
||||
}
|
||||
Vendored
-310
@@ -1,310 +0,0 @@
|
||||
{
|
||||
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
||||
// for the documentation about the tasks.json format
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "build",
|
||||
"type": "shell",
|
||||
"command": "/bin/bash",
|
||||
"args": [
|
||||
"-c",
|
||||
"${command:cmake.tasksBuildCommand}"
|
||||
],
|
||||
"options": {
|
||||
"cwd": "${command:cmake.buildDirectory}"
|
||||
},
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true,
|
||||
},
|
||||
"problemMatcher": {
|
||||
"base": "$gcc",
|
||||
"fileLocation": ["relative", "${command:cmake.buildDirectory}"]
|
||||
},
|
||||
"presentation":{
|
||||
"echo": false,
|
||||
"showReuseMessage": false,
|
||||
"clear": true,
|
||||
"panel": "shared",
|
||||
"group": "build"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "test",
|
||||
"type": "shell",
|
||||
"command": "make tests",
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
"group": {
|
||||
"kind": "test",
|
||||
"isDefault": true,
|
||||
},
|
||||
"presentation":{
|
||||
"echo": true,
|
||||
"showReuseMessage": false,
|
||||
"clear": false,
|
||||
"panel": "shared",
|
||||
"group": "test"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "jmavsim kill",
|
||||
"type": "shell",
|
||||
"command": "kill $(ps aux | grep jmavsim | grep -v 'grep' | awk '{print $2}') || true",
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "never",
|
||||
"revealProblems": "onProblem",
|
||||
"focus": false,
|
||||
"panel": "dedicated",
|
||||
"showReuseMessage": false,
|
||||
"clear": false,
|
||||
"close": true
|
||||
},
|
||||
"problemMatcher": [],
|
||||
"dependsOn":["px4_sitl_cleanup"]
|
||||
},
|
||||
{
|
||||
"label": "gazebo-classic build",
|
||||
"type": "shell",
|
||||
"command": "make px4_sitl_default sitl_gazebo-classic",
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "never",
|
||||
"revealProblems": "onProblem",
|
||||
"focus": false,
|
||||
"panel": "dedicated",
|
||||
"showReuseMessage": false,
|
||||
"clear": false,
|
||||
"close": true
|
||||
},
|
||||
"problemMatcher": [],
|
||||
},
|
||||
{
|
||||
"label": "gazebo-classic start",
|
||||
"type": "shell",
|
||||
"dependsOn": "gazebo-classic build",
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}",
|
||||
"env": {
|
||||
"GAZEBO_PLUGIN_PATH": "${workspaceFolder}/build/px4_sitl_default/build_gazebo-classic",
|
||||
"GAZEBO_MODEL_PATH": "${workspaceFolder}/Tools/simulation/gazebo-classic/sitl_gazebo-classic/models",
|
||||
"PX4_SIM_SPEED_FACTOR": "1"
|
||||
}
|
||||
},
|
||||
"command": "gzserver --verbose ${workspaceFolder}/Tools/simulation/gazebo-classic/sitl_gazebo-classic/worlds/empty.world",
|
||||
"isBackground": true,
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "never",
|
||||
"revealProblems": "onProblem",
|
||||
"focus": false,
|
||||
"panel": "dedicated",
|
||||
"showReuseMessage": false,
|
||||
"clear": false,
|
||||
"close": true
|
||||
},
|
||||
"problemMatcher": [
|
||||
{
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": ".",
|
||||
"file": 1,
|
||||
"location": 2,
|
||||
"message": 3
|
||||
}
|
||||
],
|
||||
"background": {
|
||||
"activeOnStart": true,
|
||||
"beginsPattern": ".",
|
||||
"endsPattern": ".",
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "gazebo-classic",
|
||||
"type": "shell",
|
||||
"dependsOn": "gazebo-classic start",
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}",
|
||||
"env": {
|
||||
"GAZEBO_PLUGIN_PATH": "${workspaceFolder}/build/px4_sitl_default/build_gazebo-classic",
|
||||
"GAZEBO_MODEL_PATH": "${workspaceFolder}/Tools/simulation/gazebo-classic/sitl_gazebo-classic/models",
|
||||
"PX4_SIM_SPEED_FACTOR": "1"
|
||||
}
|
||||
},
|
||||
"command": "gz model --verbose --spawn-file=${workspaceFolder}/Tools/simulation/gazebo-classic/sitl_gazebo-classic/models/iris/iris.sdf --model-name=iris -x 1.01 -y 0.98 -z 0.83",
|
||||
"isBackground": false,
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "never",
|
||||
"revealProblems": "onProblem",
|
||||
"focus": false,
|
||||
"panel": "dedicated",
|
||||
"showReuseMessage": false,
|
||||
"clear": false,
|
||||
"close": true
|
||||
},
|
||||
"problemMatcher": [
|
||||
{
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": ".",
|
||||
"file": 1,
|
||||
"location": 2,
|
||||
"message": 3
|
||||
}
|
||||
],
|
||||
"background": {
|
||||
"activeOnStart": true,
|
||||
"beginsPattern": ".",
|
||||
"endsPattern": ".",
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "gazebo",
|
||||
"type": "shell",
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}",
|
||||
"env": {
|
||||
"IGN_GAZEBO_RESOURCE_PATH": "${workspaceFolder}/Tools/simulation/gz/models",
|
||||
}
|
||||
},
|
||||
"command": "gz sim -v 4 -r ${workspaceFolder}/Tools/simulation/gz/worlds/${input:gzWorld}.sdf",
|
||||
"isBackground": true,
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "always",
|
||||
"revealProblems": "onProblem",
|
||||
"focus": true,
|
||||
"panel": "dedicated",
|
||||
"showReuseMessage": false,
|
||||
"clear": false,
|
||||
"close": false
|
||||
},
|
||||
"problemMatcher": [],
|
||||
"dependsOn":["gazebo kill"]
|
||||
},
|
||||
{
|
||||
"label": "gazebo-classic kill",
|
||||
"type": "shell",
|
||||
"command": "pkill -9 -f gzserver || true",
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "never",
|
||||
"revealProblems": "onProblem",
|
||||
"focus": false,
|
||||
"panel": "dedicated",
|
||||
"showReuseMessage": false,
|
||||
"clear": false,
|
||||
"close": true
|
||||
},
|
||||
"problemMatcher": [],
|
||||
"dependsOn":["px4_sitl_cleanup"]
|
||||
},
|
||||
{
|
||||
"label": "gazebo kill",
|
||||
"type": "shell",
|
||||
"command": "pkill -9 -f 'gz sim' || true",
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "never",
|
||||
"revealProblems": "onProblem",
|
||||
"focus": false,
|
||||
"panel": "dedicated",
|
||||
"showReuseMessage": false,
|
||||
"clear": false,
|
||||
"close": true
|
||||
},
|
||||
"problemMatcher": [],
|
||||
"dependsOn":["px4_sitl_cleanup"]
|
||||
},
|
||||
|
||||
{
|
||||
"label": "px4_sitl_cleanup",
|
||||
"type": "shell",
|
||||
"command": "rm -rfv /tmp/px4* || true",
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "never",
|
||||
"revealProblems": "onProblem",
|
||||
"focus": false,
|
||||
"panel": "dedicated",
|
||||
"showReuseMessage": false,
|
||||
"clear": false,
|
||||
"close": true
|
||||
},
|
||||
"problemMatcher": [],
|
||||
"dependsOn":["px4_kill"]
|
||||
},
|
||||
{
|
||||
"label": "px4_kill",
|
||||
"type": "shell",
|
||||
"command": "pkill -9 px4 || true",
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "never",
|
||||
"revealProblems": "onProblem",
|
||||
"focus": false,
|
||||
"panel": "dedicated",
|
||||
"showReuseMessage": false,
|
||||
"clear": false,
|
||||
"close": true
|
||||
},
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "mavlink shell",
|
||||
"type": "shell",
|
||||
"command": "./Tools/mavlink_shell.py",
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "always",
|
||||
"focus": true,
|
||||
"panel": "new",
|
||||
"showReuseMessage": false,
|
||||
"clear": false
|
||||
},
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "miniterm.py",
|
||||
"type": "shell",
|
||||
"command": "miniterm.py --raw - 57600",
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "always",
|
||||
"focus": true,
|
||||
"panel": "new",
|
||||
"showReuseMessage": false,
|
||||
"clear": false
|
||||
},
|
||||
"problemMatcher": []
|
||||
}
|
||||
],
|
||||
"inputs": [
|
||||
{
|
||||
"type": "pickString",
|
||||
"id": "gzWorld",
|
||||
"description": "gz world",
|
||||
"options": [
|
||||
"default"
|
||||
],
|
||||
"default": "default"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,173 @@
|
||||
# This file is NOT licensed under the GPLv3, which is the license for the rest
|
||||
# of YouCompleteMe.
|
||||
#
|
||||
# Here's the license text for this file:
|
||||
#
|
||||
# This is free and unencumbered software released into the public domain.
|
||||
#
|
||||
# Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||
# distribute this software, either in source code form or as a compiled
|
||||
# binary, for any purpose, commercial or non-commercial, and by any
|
||||
# means.
|
||||
#
|
||||
# In jurisdictions that recognize copyright laws, the author or authors
|
||||
# of this software dedicate any and all copyright interest in the
|
||||
# software to the public domain. We make this dedication for the benefit
|
||||
# of the public at large and to the detriment of our heirs and
|
||||
# successors. We intend this dedication to be an overt act of
|
||||
# relinquishment in perpetuity of all present and future rights to this
|
||||
# software under copyright law.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
# OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# For more information, please refer to <http://unlicense.org/>
|
||||
|
||||
import os
|
||||
import ycm_core
|
||||
|
||||
# These are the compilation flags that will be used in case there's no
|
||||
# compilation database set (by default, one is not set).
|
||||
# CHANGE THIS LIST OF FLAGS. YES, THIS IS THE DROID YOU HAVE BEEN LOOKING FOR.
|
||||
flags = [
|
||||
'-Wall',
|
||||
'-Wextra',
|
||||
'-Werror',
|
||||
#'-Wc++98-compat',
|
||||
'-Wno-long-long',
|
||||
'-Wno-variadic-macros',
|
||||
'-fexceptions',
|
||||
'-DNDEBUG',
|
||||
# You 100% do NOT need -DUSE_CLANG_COMPLETER in your flags; only the YCM
|
||||
# source code needs it.
|
||||
#'-DUSE_CLANG_COMPLETER',
|
||||
# THIS IS IMPORTANT! Without a "-std=<something>" flag, clang won't know which
|
||||
# language to use when compiling headers. So it will guess. Badly. So C++
|
||||
# headers will be compiled as C headers. You don't want that so ALWAYS specify
|
||||
# a "-std=<something>".
|
||||
# For a C project, you would set this to something like 'c99' instead of
|
||||
# 'c++11'.
|
||||
'-std=c++11',
|
||||
# ...and the same thing goes for the magic -x option which specifies the
|
||||
# language that the files to be compiled are written in. This is mostly
|
||||
# relevant for c++ headers.
|
||||
# For a C project, you would set this to 'c' instead of 'c++'.
|
||||
'-x',
|
||||
'c++',
|
||||
'-undef', # get rid of standard definitions to allow us to include arm math header
|
||||
'-I', os.path.join(os.path.expanduser("~"),'gcc-arm-none-eabi-4_7-2013q3/arm-none-eabi/include'),
|
||||
'-I', 'Build/px4io-v1_default.build/nuttx-export/include/',
|
||||
'-I', 'Build/px4io-v2_default.build/nuttx-export/include/',
|
||||
'-I', './NuttX/nuttx/arch/arm/include',
|
||||
'-include', './src/include/visibility.h',
|
||||
'-I', './src',
|
||||
'-I', './src/modules',
|
||||
'-I', './src/include',
|
||||
'-I', './src/lib',
|
||||
'-I', './NuttX',
|
||||
]
|
||||
|
||||
|
||||
# Set this to the absolute path to the folder (NOT the file!) containing the
|
||||
# compile_commands.json file to use that instead of 'flags'. See here for
|
||||
# more details: http://clang.llvm.org/docs/JSONCompilationDatabase.html
|
||||
#
|
||||
# Most projects will NOT need to set this to anything; you can just change the
|
||||
# 'flags' list of compilation flags. Notice that YCM itself uses that approach.
|
||||
compilation_database_folder = ''
|
||||
|
||||
if os.path.exists( compilation_database_folder ):
|
||||
database = ycm_core.CompilationDatabase( compilation_database_folder )
|
||||
else:
|
||||
database = None
|
||||
|
||||
SOURCE_EXTENSIONS = [ '.cpp', '.cxx', '.cc', '.c', '.m', '.mm' ]
|
||||
|
||||
def DirectoryOfThisScript():
|
||||
return os.path.dirname( os.path.abspath( __file__ ) )
|
||||
|
||||
|
||||
def MakeRelativePathsInFlagsAbsolute( flags, working_directory ):
|
||||
if not working_directory:
|
||||
return list( flags )
|
||||
new_flags = []
|
||||
make_next_absolute = False
|
||||
path_flags = [ '-isystem', '-I', '-iquote', '--sysroot=' ]
|
||||
for flag in flags:
|
||||
new_flag = flag
|
||||
|
||||
if make_next_absolute:
|
||||
make_next_absolute = False
|
||||
if not flag.startswith( '/' ):
|
||||
new_flag = os.path.join( working_directory, flag )
|
||||
|
||||
for path_flag in path_flags:
|
||||
if flag == path_flag:
|
||||
make_next_absolute = True
|
||||
break
|
||||
|
||||
if flag.startswith( path_flag ):
|
||||
path = flag[ len( path_flag ): ]
|
||||
new_flag = path_flag + os.path.join( working_directory, path )
|
||||
break
|
||||
|
||||
if new_flag:
|
||||
new_flags.append( new_flag )
|
||||
return new_flags
|
||||
|
||||
|
||||
def IsHeaderFile( filename ):
|
||||
extension = os.path.splitext( filename )[ 1 ]
|
||||
return extension in [ '.h', '.hxx', '.hpp', '.hh' ]
|
||||
|
||||
|
||||
def GetCompilationInfoForFile( filename ):
|
||||
# The compilation_commands.json file generated by CMake does not have entries
|
||||
# for header files. So we do our best by asking the db for flags for a
|
||||
# corresponding source file, if any. If one exists, the flags for that file
|
||||
# should be good enough.
|
||||
if IsHeaderFile( filename ):
|
||||
basename = os.path.splitext( filename )[ 0 ]
|
||||
for extension in SOURCE_EXTENSIONS:
|
||||
replacement_file = basename + extension
|
||||
if os.path.exists( replacement_file ):
|
||||
compilation_info = database.GetCompilationInfoForFile(
|
||||
replacement_file )
|
||||
if compilation_info.compiler_flags_:
|
||||
return compilation_info
|
||||
return None
|
||||
return database.GetCompilationInfoForFile( filename )
|
||||
|
||||
|
||||
def FlagsForFile( filename, **kwargs ):
|
||||
if database:
|
||||
# Bear in mind that compilation_info.compiler_flags_ does NOT return a
|
||||
# python list, but a "list-like" StringVec object
|
||||
compilation_info = GetCompilationInfoForFile( filename )
|
||||
if not compilation_info:
|
||||
return None
|
||||
|
||||
final_flags = MakeRelativePathsInFlagsAbsolute(
|
||||
compilation_info.compiler_flags_,
|
||||
compilation_info.compiler_working_dir_ )
|
||||
|
||||
# NOTE: This is just for YouCompleteMe; it's highly likely that your project
|
||||
# does NOT need to remove the stdlib flag. DO NOT USE THIS IN YOUR
|
||||
# ycm_extra_conf IF YOU'RE NOT 100% SURE YOU NEED IT.
|
||||
#try:
|
||||
# final_flags.remove( '-stdlib=libc++' )
|
||||
#except ValueError:
|
||||
# pass
|
||||
else:
|
||||
relative_to = DirectoryOfThisScript()
|
||||
final_flags = MakeRelativePathsInFlagsAbsolute( flags, relative_to )
|
||||
|
||||
return {
|
||||
'flags': final_flags,
|
||||
'do_cache': True
|
||||
}
|
||||
+244
-347
@@ -1,6 +1,6 @@
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (c) 2017 - 2024 PX4 Development Team. All rights reserved.
|
||||
# Copyright (c) 2015 PX4 Development Team. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
@@ -40,7 +40,7 @@
|
||||
# * Common functions should be included in px_base.cmake.
|
||||
#
|
||||
# * OS/ board specific fucntions should be include in
|
||||
# px_impl_${PX4_PLATFORM}.cmake
|
||||
# px_impl_${OS}.cmake or px4_impl_${OS}_${BOARD}.cmake.
|
||||
#
|
||||
# Formatting
|
||||
# ---------------------------------------------------------------------------
|
||||
@@ -55,6 +55,24 @@
|
||||
#
|
||||
# * For else, endif, endfunction, etc, never put the name of the statement
|
||||
#
|
||||
# Instead of the very confusing:
|
||||
# if (${var} STREQUAL "1") <-- condition now becomes if name
|
||||
# # do somthing
|
||||
# elseif (${var} STREQUAL "2") <-- another condition
|
||||
# # do somthing
|
||||
# else (${var} STREQUAL "1") <-- tag is referring to name of if
|
||||
# # do somthing
|
||||
# endif (${var} STREQUAL "1") <-- tag is referring to name of if
|
||||
#
|
||||
# Do this:
|
||||
# if (${var} STREQUAL "1") <-- condition now becomes if name
|
||||
# # do somthing
|
||||
# elseif (${var} STREQUAL "2") <-- another condition
|
||||
# # do somthing
|
||||
# else () <-- leave blank
|
||||
# # do somthing
|
||||
# endif () <-- leave blank
|
||||
#
|
||||
# Functions/Macros
|
||||
# ---------------------------------------------------------------------------
|
||||
#
|
||||
@@ -69,7 +87,7 @@
|
||||
#
|
||||
# * Avoid use of global variables in functions. Functions in a nested
|
||||
# scope may use global variables, but this makes it difficult to
|
||||
# reuse functions.
|
||||
# resuse functions.
|
||||
#
|
||||
# Included CMake Files
|
||||
# ---------------------------------------------------------------------------
|
||||
@@ -83,7 +101,7 @@
|
||||
#
|
||||
# * Setting a global variable in a CMakeLists.txt file is ok, because
|
||||
# each CMakeLists.txt file has scope in the current directory and all
|
||||
# subdirectories, so it is not truly global.
|
||||
# subdirecties, so it is not truly global.
|
||||
#
|
||||
# * All toolchain files should be included in the cmake
|
||||
# directory and named Toolchain-"name".cmake.
|
||||
@@ -92,422 +110,301 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
#
|
||||
# * If referencing a string variable, don't put it in quotes.
|
||||
# Don't do "${PX4_PLATFORM}" STREQUAL "posix",
|
||||
# instead type ${PX4_PLATFORM} STREQUAL "posix". This will throw an
|
||||
# error when ${PX4_PLATFORM} is not defined instead of silently
|
||||
# Don't do "${OS}" STREQUAL "posix",
|
||||
# instead type ${OS} STREQUAL "posix". This will throw an
|
||||
# error when ${OS} is not defined instead of silently
|
||||
# evaluating to false.
|
||||
#
|
||||
#=============================================================================
|
||||
|
||||
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||
# Warning: Changing this modifies CMake's internal workings
|
||||
# and leads to wrong toolchain detection
|
||||
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
|
||||
|
||||
set(PX4_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}" CACHE FILEPATH "PX4 source directory" FORCE)
|
||||
set(PX4_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}" CACHE FILEPATH "PX4 binary directory" FORCE)
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH ${PX4_SOURCE_DIR}/cmake)
|
||||
include(px4_parse_function_args)
|
||||
# Use clang
|
||||
#SET (CMAKE_C_COMPILER /usr/bin/clang-3.6)
|
||||
#SET (CMAKE_CXX_COMPILER /usr/bin/clang++-3.6)
|
||||
|
||||
#=============================================================================
|
||||
# git
|
||||
# parameters
|
||||
#
|
||||
include(px4_git)
|
||||
|
||||
execute_process(
|
||||
COMMAND git describe --exclude ext/* --tags --match "v[0-9]*"
|
||||
OUTPUT_VARIABLE PX4_GIT_TAG
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
RESULTS_VARIABLE GIT_DESCRIBE_RESULT
|
||||
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
|
||||
)
|
||||
|
||||
# if proper git tag unavilable default to v0.0.0
|
||||
if(NOT ${GIT_DESCRIBE_RESULT} MATCHES "0")
|
||||
set(PX4_GIT_TAG "v0.0.0")
|
||||
endif()
|
||||
|
||||
message(STATUS "PX4_GIT_TAG: ${PX4_GIT_TAG}")
|
||||
|
||||
# git describe to X.Y.Z version
|
||||
string(REPLACE "." ";" VERSION_LIST ${PX4_GIT_TAG})
|
||||
|
||||
# major version
|
||||
list(GET VERSION_LIST 0 PX4_VERSION_MAJOR)
|
||||
string(REPLACE "v" "" PX4_VERSION_MAJOR ${PX4_VERSION_MAJOR})
|
||||
# minor version
|
||||
list(GET VERSION_LIST 1 PX4_VERSION_MINOR)
|
||||
# patch version
|
||||
list(GET VERSION_LIST 2 PX4_VERSION_PATCH)
|
||||
string(REPLACE "-" ";" PX4_VERSION_PATCH ${PX4_VERSION_PATCH})
|
||||
list(GET PX4_VERSION_PATCH 0 PX4_VERSION_PATCH)
|
||||
|
||||
# # Capture only the hash part after 'g'
|
||||
string(REGEX MATCH "g([a-f0-9]+)$" GIT_HASH "${PX4_GIT_TAG}")
|
||||
set(PX4_GIT_HASH ${CMAKE_MATCH_1})
|
||||
|
||||
define_property(GLOBAL PROPERTY PX4_MODULE_LIBRARIES
|
||||
BRIEF_DOCS "PX4 module libs"
|
||||
FULL_DOCS "List of all PX4 module libraries"
|
||||
)
|
||||
|
||||
define_property(GLOBAL PROPERTY PX4_KERNEL_MODULE_LIBRARIES
|
||||
BRIEF_DOCS "PX4 kernel side module libs"
|
||||
FULL_DOCS "List of all PX4 kernel module libraries"
|
||||
)
|
||||
|
||||
define_property(GLOBAL PROPERTY PX4_MODULE_PATHS
|
||||
BRIEF_DOCS "PX4 module paths"
|
||||
FULL_DOCS "List of paths to all PX4 modules"
|
||||
)
|
||||
|
||||
define_property(GLOBAL PROPERTY PX4_SRC_FILES
|
||||
BRIEF_DOCS "src files from all PX4 modules & libs"
|
||||
FULL_DOCS "SRC files from px4_add_{module,library}"
|
||||
)
|
||||
set(CMAKE_BUILD_TYPE "" CACHE STRING "build type")
|
||||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY
|
||||
STRINGS ";Debug;Release;RelWithDebInfo;MinSizeRel")
|
||||
set(CONFIG "posix_sitl_default" CACHE STRING "desired configuration")
|
||||
file(GLOB_RECURSE configs RELATIVE cmake/configs "cmake/configs/*.cmake")
|
||||
set_property(CACHE CONFIG PROPERTY STRINGS ${configs})
|
||||
set(THREADS "4" CACHE STRING
|
||||
"number of threads to use for external build processes")
|
||||
set(DEBUG_PORT "/dev/ttyACM0" CACHE STRING "debugging port")
|
||||
|
||||
#=============================================================================
|
||||
# configuration
|
||||
#
|
||||
# must come before project to set toolchain
|
||||
|
||||
include(px4_add_module)
|
||||
set(config_module_list)
|
||||
set(config_kernel_list)
|
||||
string(REPLACE "_" ";" config_args ${CONFIG})
|
||||
list(GET config_args 0 OS)
|
||||
list(GET config_args 1 BOARD)
|
||||
list(GET config_args 2 LABEL)
|
||||
set(target_name "${OS}-${BOARD}-${LABEL}")
|
||||
|
||||
# Find Python
|
||||
find_package(Python COMPONENTS Interpreter)
|
||||
message(STATUS "${target_name}")
|
||||
|
||||
# We have a custom error message to tell users how to install python3.
|
||||
if(NOT Python_FOUND)
|
||||
message(FATAL_ERROR "Python 3 not found. Please install Python 3:\n"
|
||||
" Ubuntu: sudo apt install python3 python3-dev python3-pip\n"
|
||||
" macOS: brew install python")
|
||||
endif()
|
||||
# Define GNU standard installation directories
|
||||
include(GNUInstallDirs)
|
||||
|
||||
option(PYTHON_COVERAGE "Python code coverage" OFF)
|
||||
if(PYTHON_COVERAGE)
|
||||
message(STATUS "python coverage enabled")
|
||||
set(Python_EXECUTABLE coverage run -p)
|
||||
endif()
|
||||
|
||||
include(px4_config)
|
||||
include(kconfig)
|
||||
message(STATUS "PX4 config: ${PX4_CONFIG}")
|
||||
message(STATUS "PX4 platform: ${PX4_PLATFORM}")
|
||||
|
||||
if($ENV{CLION_IDE})
|
||||
# CLion automatically executes some compiler commands after configuring the
|
||||
# project. This would fail on NuttX, as visibility.h tries to (indirectly)
|
||||
# include nuttx/config.h, which at that point does not exist yet
|
||||
add_definitions(-DPX4_DISABLE_GCC_POISON)
|
||||
endif()
|
||||
|
||||
if(${PX4_PLATFORM} STREQUAL "posix")
|
||||
if(ENABLE_LOCKSTEP_SCHEDULER)
|
||||
add_definitions(-DENABLE_LOCKSTEP_SCHEDULER)
|
||||
message(STATUS "PX4 lockstep: enabled")
|
||||
else()
|
||||
message(STATUS "PX4 lockstep: disabled")
|
||||
# Setup install paths
|
||||
if(NOT CMAKE_INSTALL_PREFIX)
|
||||
if (${OS} STREQUAL "posix")
|
||||
set(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "Install path prefix" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
message(STATUS "CMAKE_INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX}")
|
||||
|
||||
# external modules
|
||||
set(EXTERNAL_MODULES_LOCATION "" CACHE STRING "External modules source location")
|
||||
# switch to ros CMake file if building ros
|
||||
if (${OS} STREQUAL "ros")
|
||||
include("cmake/ros-CMakeLists.txt")
|
||||
else() # otherwise use the rest of this file
|
||||
|
||||
if(NOT EXTERNAL_MODULES_LOCATION STREQUAL "")
|
||||
get_filename_component(EXTERNAL_MODULES_LOCATION "${EXTERNAL_MODULES_LOCATION}" ABSOLUTE)
|
||||
endif()
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
|
||||
set(config_module "configs/${CONFIG}")
|
||||
include(${config_module})
|
||||
|
||||
set_property(GLOBAL PROPERTY PX4_MODULE_CONFIG_FILES)
|
||||
# cmake modules
|
||||
include(ExternalProject)
|
||||
|
||||
include(platforms/${PX4_PLATFORM}/cmake/px4_impl_os.cmake)
|
||||
list(APPEND CMAKE_MODULE_PATH ${PX4_SOURCE_DIR}/platforms/${PX4_PLATFORM}/cmake)
|
||||
# require px4 module interface
|
||||
set(px4_required_interface
|
||||
px4_os_prebuild_targets
|
||||
px4_os_add_flags
|
||||
)
|
||||
foreach(cmd ${px4_required_interface})
|
||||
if(NOT COMMAND ${cmd})
|
||||
message(FATAL_ERROR "${config_module} must implement ${cmd}")
|
||||
endif()
|
||||
endforeach()
|
||||
set(px4_required_config
|
||||
config_module_list
|
||||
)
|
||||
foreach(conf ${px4_required_config})
|
||||
if(NOT DEFINED ${conf})
|
||||
message(FATAL_ERROR "cmake/${config_module} must define ${conf}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if(EXISTS "${PX4_SOURCE_DIR}/platforms/${PX4_PLATFORM}/cmake/init.cmake")
|
||||
include(init)
|
||||
# List the DriverFramework drivers
|
||||
if(DEFINED config_df_driver_list)
|
||||
message("DF Drivers: ${config_df_driver_list}")
|
||||
endif()
|
||||
|
||||
#=============================================================================
|
||||
# project definition
|
||||
#
|
||||
project(px4 CXX C ASM)
|
||||
|
||||
# CMake build type (Debug Release RelWithDebInfo MinSizeRel Coverage)
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
if(${PX4_PLATFORM} STREQUAL "nuttx")
|
||||
set(PX4_BUILD_TYPE "MinSizeRel")
|
||||
else()
|
||||
set(PX4_BUILD_TYPE "RelWithDebInfo")
|
||||
endif()
|
||||
|
||||
set(CMAKE_BUILD_TYPE ${PX4_BUILD_TYPE} CACHE STRING "Build type" FORCE)
|
||||
endif()
|
||||
|
||||
if((CMAKE_BUILD_TYPE STREQUAL "Debug") OR (CMAKE_BUILD_TYPE STREQUAL "Coverage"))
|
||||
set(MAX_CUSTOM_OPT_LEVEL -O0)
|
||||
elseif(CMAKE_BUILD_TYPE MATCHES "Sanitizer")
|
||||
set(MAX_CUSTOM_OPT_LEVEL -O1)
|
||||
elseif(CMAKE_BUILD_TYPE MATCHES "Release")
|
||||
set(MAX_CUSTOM_OPT_LEVEL -O3)
|
||||
else()
|
||||
if(px4_constrained_flash_build)
|
||||
set(MAX_CUSTOM_OPT_LEVEL -Os)
|
||||
else()
|
||||
set(MAX_CUSTOM_OPT_LEVEL -O2)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug;Release;RelWithDebInfo;MinSizeRel;Coverage;AddressSanitizer;UndefinedBehaviorSanitizer")
|
||||
message(STATUS "cmake build type: ${CMAKE_BUILD_TYPE}")
|
||||
|
||||
# Check if LTO option and check if toolchain supports it
|
||||
if(LTO)
|
||||
include(CheckIPOSupported)
|
||||
check_ipo_supported()
|
||||
message(AUTHOR_WARNING "LTO enabled: LTO is highly experimental and should not be used in production")
|
||||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
|
||||
if (NOT ${CMAKE_VERSION} VERSION_LESS 3.0.0)
|
||||
cmake_policy(SET CMP0045 NEW) # error on non-existent target in get prop
|
||||
cmake_policy(SET CMP0046 NEW) # no non-existent targets as dependencies
|
||||
cmake_policy(SET CMP0025 OLD) # still report AppleClang as Clang
|
||||
endif()
|
||||
if (NOT ${CMAKE_VERSION} VERSION_LESS 3.1.0)
|
||||
cmake_policy(SET CMP0054 NEW) # don't dereference quoted variables
|
||||
endif()
|
||||
|
||||
set(version_major 1)
|
||||
set(version_minor 4)
|
||||
set(version_patch 1)
|
||||
set(version "${version_major}.${version_minor}.${version_patch}")
|
||||
set(package-contact "px4users@googlegroups.com")
|
||||
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_C_STANDARD 11)
|
||||
set(CMAKE_C_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PX4_BINARY_DIR})
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${PX4_BINARY_DIR})
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${PX4_BINARY_DIR})
|
||||
#=============================================================================
|
||||
# programs
|
||||
#
|
||||
find_package(PythonInterp REQUIRED)
|
||||
|
||||
#=============================================================================
|
||||
# cmake modules
|
||||
#
|
||||
enable_testing()
|
||||
|
||||
# gold linker - use if available (posix only for now)
|
||||
if(${PX4_PLATFORM} STREQUAL "posix")
|
||||
include(CMakeDependentOption)
|
||||
CMAKE_DEPENDENT_OPTION(USE_LD_GOLD
|
||||
"Use GNU gold linker" ON
|
||||
"NOT WIN32;NOT APPLE" OFF
|
||||
#=============================================================================
|
||||
# check required toolchain variables
|
||||
#
|
||||
set(required_variables
|
||||
CMAKE_C_COMPILER_ID
|
||||
)
|
||||
foreach(var ${required_variables})
|
||||
if (NOT ${var})
|
||||
message(FATAL_ERROR "Toolchain/config must define ${var}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
#=============================================================================
|
||||
# git
|
||||
#
|
||||
px4_add_git_submodule(TARGET git_genmsg PATH "Tools/genmsg")
|
||||
px4_add_git_submodule(TARGET git_gencpp PATH "Tools/gencpp")
|
||||
px4_add_git_submodule(TARGET git_mavlink PATH "mavlink/include/mavlink/v1.0")
|
||||
px4_add_git_submodule(TARGET git_gtest PATH "unittests/gtest")
|
||||
px4_add_git_submodule(TARGET git_uavcan PATH "src/modules/uavcan/libuavcan")
|
||||
px4_add_git_submodule(TARGET git_nuttx PATH "NuttX")
|
||||
px4_add_git_submodule(TARGET git_driverframework PATH "src/lib/DriverFramework")
|
||||
px4_add_git_submodule(TARGET git_ecl PATH "src/lib/ecl")
|
||||
px4_add_git_submodule(TARGET git_jmavsim PATH "Tools/jMAVSim")
|
||||
px4_add_git_submodule(TARGET git_gazebo PATH "Tools/sitl_gazebo")
|
||||
px4_add_git_submodule(TARGET git_matrix PATH "src/lib/matrix")
|
||||
px4_add_git_submodule(TARGET git_cmake_hexagon PATH "cmake/cmake_hexagon")
|
||||
|
||||
add_custom_target(submodule_clean
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
COMMAND git submodule deinit -f .
|
||||
COMMAND rm -rf .git/modules/*
|
||||
)
|
||||
|
||||
if(USE_LD_GOLD)
|
||||
execute_process(COMMAND ${CMAKE_C_COMPILER} -fuse-ld=gold -Wl,--version ERROR_QUIET OUTPUT_VARIABLE LD_VERSION)
|
||||
if("${LD_VERSION}" MATCHES "GNU gold")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fuse-ld=gold")
|
||||
else()
|
||||
set(USE_LD_GOLD OFF)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
#=============================================================================
|
||||
|
||||
# Setup install paths
|
||||
if(${PX4_PLATFORM} STREQUAL "posix")
|
||||
# This makes it possible to dynamically load code which depends on symbols
|
||||
# inside the px4 executable.
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
set(CMAKE_ENABLE_EXPORTS ON)
|
||||
|
||||
if(CMAKE_BUILD_TYPE MATCHES "Coverage")
|
||||
include(coverage)
|
||||
endif()
|
||||
|
||||
include(sanitizers)
|
||||
|
||||
# Define GNU standard installation directories
|
||||
include(GNUInstallDirs)
|
||||
|
||||
if (NOT CMAKE_INSTALL_PREFIX)
|
||||
set(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "Install path prefix" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(ccache)
|
||||
|
||||
#=============================================================================
|
||||
# get chip and chip manufacturer
|
||||
# misc targets
|
||||
#
|
||||
px4_os_determine_build_chip()
|
||||
if(NOT PX4_CHIP_MANUFACTURER)
|
||||
message(FATAL_ERROR "px4_os_determine_build_chip() needs to set PX4_CHIP_MANUFACTURER")
|
||||
endif()
|
||||
if(NOT PX4_CHIP)
|
||||
message(FATAL_ERROR "px4_os_determine_build_chip() needs to set PX4_CHIP")
|
||||
endif()
|
||||
add_custom_target(check_format
|
||||
COMMAND Tools/check_code_style.sh
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
)
|
||||
|
||||
add_custom_target(config
|
||||
COMMAND cmake-gui .
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
)
|
||||
|
||||
#=============================================================================
|
||||
# external libraries
|
||||
#
|
||||
px4_os_prebuild_targets(OUT prebuild_targets
|
||||
BOARD ${BOARD}
|
||||
THREADS ${THREADS})
|
||||
|
||||
#=============================================================================
|
||||
# build flags
|
||||
#
|
||||
include(px4_add_common_flags)
|
||||
px4_add_common_flags()
|
||||
px4_os_add_flags()
|
||||
px4_os_add_flags(
|
||||
BOARD ${BOARD}
|
||||
C_FLAGS c_flags
|
||||
CXX_FLAGS cxx_flags
|
||||
EXE_LINKER_FLAGS exe_linker_flags
|
||||
INCLUDE_DIRS include_dirs
|
||||
LINK_DIRS link_dirs
|
||||
DEFINITIONS definitions)
|
||||
|
||||
px4_join(OUT CMAKE_EXE_LINKER_FLAGS LIST "${exe_linker_flags}" GLUE " ")
|
||||
px4_join(OUT CMAKE_C_FLAGS LIST "${c_flags}" GLUE " ")
|
||||
px4_join(OUT CMAKE_CXX_FLAGS LIST "${cxx_flags}" GLUE " ")
|
||||
|
||||
include_directories(${include_dirs})
|
||||
#message("INCLUDE_DIRS=${include_dirs}")
|
||||
link_directories(${link_dirs})
|
||||
add_definitions(${definitions})
|
||||
|
||||
#=============================================================================
|
||||
# board cmake init (optional)
|
||||
# source code generation
|
||||
#
|
||||
if(EXISTS ${PX4_BOARD_DIR}/cmake/init.cmake)
|
||||
include(${PX4_BOARD_DIR}/cmake/init.cmake)
|
||||
endif()
|
||||
|
||||
#=============================================================================
|
||||
# message, and airframe generation
|
||||
#
|
||||
include(px4_metadata)
|
||||
|
||||
add_subdirectory(msg EXCLUDE_FROM_ALL)
|
||||
|
||||
px4_generate_airframes_xml(BOARD ${PX4_BOARD})
|
||||
add_subdirectory(msg)
|
||||
px4_generate_messages(TARGET msg_gen
|
||||
MSG_FILES ${msg_files}
|
||||
OS ${OS}
|
||||
DEPENDS git_genmsg git_gencpp prebuild_targets
|
||||
)
|
||||
px4_generate_parameters_xml(OUT parameters.xml BOARD ${BOARD})
|
||||
px4_generate_airframes_xml(OUT airframes.xml BOARD ${BOARD})
|
||||
add_custom_target(xml_gen
|
||||
DEPENDS parameters.xml airframes.xml)
|
||||
|
||||
#=============================================================================
|
||||
# external projects
|
||||
#
|
||||
set(ep_base ${PX4_BINARY_DIR}/external)
|
||||
|
||||
set(ep_base ${CMAKE_BINARY_DIR}/external)
|
||||
set_property(DIRECTORY PROPERTY EP_BASE ${ep_base})
|
||||
|
||||
# add external project install folders to build
|
||||
# add the directories so cmake won't warn
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${ep_base})
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${ep_base}/Install)
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${ep_base}/Install/lib)
|
||||
link_directories(${ep_base}/Install/lib)
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${ep_base}/Install/include)
|
||||
include_directories(${ep_base}/Install/include)
|
||||
# add the directories so cmake won't warn
|
||||
execute_process(COMMAND cmake -E make_directory ${ep_base}/Install/lib)
|
||||
execute_process(COMMAND cmake -E make_directory ${ep_base}/Install/include)
|
||||
|
||||
#=============================================================================
|
||||
# external modules
|
||||
# DriverFramework Drivers
|
||||
#
|
||||
set(external_module_paths)
|
||||
if (NOT EXTERNAL_MODULES_LOCATION STREQUAL "")
|
||||
message(STATUS "External modules: ${EXTERNAL_MODULES_LOCATION}")
|
||||
add_subdirectory("${EXTERNAL_MODULES_LOCATION}/src" external_modules)
|
||||
|
||||
foreach(external_module ${config_module_list_external})
|
||||
add_subdirectory(${EXTERNAL_MODULES_LOCATION}/src/${external_module} external_modules/${external_module})
|
||||
list(APPEND external_module_paths ${EXTERNAL_MODULES_LOCATION}/src/${external_module})
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
#=============================================================================
|
||||
# Testing - Automatic unit and integration testing with CTest
|
||||
#
|
||||
|
||||
# optionally enable cmake testing (supported only on posix)
|
||||
option(CMAKE_TESTING "Configure test targets" OFF)
|
||||
if(${PX4_CONFIG} STREQUAL "px4_sitl_test")
|
||||
set(CMAKE_TESTING ON)
|
||||
endif()
|
||||
if(CMAKE_TESTING)
|
||||
include(CTest) # sets BUILD_TESTING variable
|
||||
endif()
|
||||
|
||||
# enable test filtering to run only specific tests with the ctest -R regex functionality
|
||||
set(TESTFILTER "" CACHE STRING "Filter string for ctest to selectively only run specific tests (ctest -R)")
|
||||
|
||||
# if testing is enabled download and configure gtest
|
||||
list(APPEND CMAKE_MODULE_PATH ${PX4_SOURCE_DIR}/cmake/gtest/)
|
||||
include(px4_add_gtest)
|
||||
if(BUILD_TESTING)
|
||||
include(gtest)
|
||||
|
||||
# Ensure there's no -R without any filter expression since that trips newer ctest versions
|
||||
if(TESTFILTER)
|
||||
set(TESTFILTERARG "-R")
|
||||
else()
|
||||
set(TESTFILTERARG "")
|
||||
endif()
|
||||
|
||||
add_custom_target(test_results
|
||||
COMMAND GTEST_COLOR=1 ${CMAKE_CTEST_COMMAND} --output-on-failure -T Test ${TESTFILTERARG} ${TESTFILTER}
|
||||
DEPENDS
|
||||
px4
|
||||
examples__dyn_hello
|
||||
USES_TERMINAL
|
||||
COMMENT "Running tests"
|
||||
WORKING_DIRECTORY ${PX4_BINARY_DIR})
|
||||
set_target_properties(test_results PROPERTIES EXCLUDE_FROM_ALL TRUE)
|
||||
endif()
|
||||
|
||||
set(df_driver_libs)
|
||||
foreach(driver ${config_df_driver_list})
|
||||
add_subdirectory(src/lib/DriverFramework/drivers/${driver})
|
||||
list(APPEND df_driver_libs df_${driver})
|
||||
message("Adding DF driver: ${driver}")
|
||||
endforeach()
|
||||
|
||||
#=============================================================================
|
||||
# subdirectories
|
||||
#
|
||||
add_library(parameters_interface INTERFACE)
|
||||
add_library(kernel_parameters_interface INTERFACE)
|
||||
add_library(events_interface INTERFACE)
|
||||
add_library(kernel_events_interface INTERFACE)
|
||||
|
||||
include(px4_add_library)
|
||||
add_subdirectory(src/lib EXCLUDE_FROM_ALL)
|
||||
|
||||
add_subdirectory(platforms/${PX4_PLATFORM}/src/px4)
|
||||
add_subdirectory(platforms EXCLUDE_FROM_ALL)
|
||||
|
||||
if(EXISTS "${PX4_BOARD_DIR}/CMakeLists.txt")
|
||||
add_subdirectory(${PX4_BOARD_DIR})
|
||||
endif()
|
||||
|
||||
set(module_libraries)
|
||||
foreach(module ${config_module_list})
|
||||
add_subdirectory(src/${module})
|
||||
string(REGEX MATCH "^[./]" external_module ${module})
|
||||
if(external_module)
|
||||
STRING(REGEX REPLACE "//" "/" EXT_MODULE ${module})
|
||||
STRING(REGEX REPLACE "/" "__" EXT_MODULE_PREFIX ${EXT_MODULE})
|
||||
add_subdirectory(${module} ${CMAKE_BINARY_DIR}/${EXT_MODULE_PREFIX})
|
||||
else()
|
||||
add_subdirectory(src/${module})
|
||||
endif()
|
||||
px4_mangle_name(${module} mangled_name)
|
||||
list(APPEND module_libraries ${mangled_name})
|
||||
#message(STATUS "adding module: ${module}")
|
||||
endforeach()
|
||||
|
||||
# add events lib after modules and libs as it needs to know all source files (PX4_SRC_FILES)
|
||||
add_subdirectory(src/lib/events EXCLUDE_FROM_ALL)
|
||||
# metadata needs PX4_MODULE_CONFIG_FILES
|
||||
add_subdirectory(src/lib/metadata EXCLUDE_FROM_ALL)
|
||||
# Keep track of external shared libs required for modules
|
||||
set(module_external_libraries "${module_external_libraries}" CACHE INTERNAL "module_external_libraries")
|
||||
|
||||
# must be the last module before firmware
|
||||
add_subdirectory(src/lib/parameters EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(src/firmware/${OS})
|
||||
|
||||
if(${PX4_PLATFORM} STREQUAL "nuttx" AND NOT CONFIG_BUILD_FLAT)
|
||||
target_link_libraries(parameters_interface INTERFACE usr_parameters)
|
||||
target_link_libraries(kernel_parameters_interface INTERFACE parameters)
|
||||
target_link_libraries(events_interface INTERFACE usr_events)
|
||||
target_link_libraries(kernel_events_interface INTERFACE events)
|
||||
else()
|
||||
target_link_libraries(parameters_interface INTERFACE parameters)
|
||||
target_link_libraries(events_interface INTERFACE events)
|
||||
#add_dependencies(df_driver_framework nuttx_export_${CONFIG}.stamp)
|
||||
if (NOT "${OS}" STREQUAL "nuttx")
|
||||
endif()
|
||||
|
||||
# firmware added last to generate the builtin for included modules
|
||||
add_subdirectory(platforms/${PX4_PLATFORM})
|
||||
if (config_io_board)
|
||||
add_subdirectory(src/modules/px4iofirmware)
|
||||
endif()
|
||||
|
||||
#=============================================================================
|
||||
# uORB graph generation: add a custom target 'uorb_graph'
|
||||
# generate git version
|
||||
#
|
||||
set(uorb_graph_config ${PX4_BOARD})
|
||||
px4_create_git_hash_header(HEADER ${CMAKE_BINARY_DIR}/build_git_version.h)
|
||||
|
||||
set(graph_module_list "")
|
||||
foreach(module ${config_module_list})
|
||||
set(graph_module_list "${graph_module_list}" "--src-path" "src/${module}")
|
||||
endforeach()
|
||||
|
||||
add_custom_command(OUTPUT ${uorb_graph_config}
|
||||
COMMAND ${Python_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/uorb_graph/create.py
|
||||
${graph_module_list} --src-path src/lib
|
||||
--merge-depends
|
||||
--exclude-path src/examples
|
||||
--exclude-path src/lib/parameters # FIXME: enable & fix
|
||||
--file ${PX4_SOURCE_DIR}/Tools/uorb_graph/graph_${uorb_graph_config}
|
||||
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
|
||||
COMMENT "Generating uORB graph"
|
||||
)
|
||||
add_custom_target(uorb_graph DEPENDS ${uorb_graph_config})
|
||||
|
||||
|
||||
include(bloaty)
|
||||
|
||||
|
||||
include(doxygen)
|
||||
include(metadata)
|
||||
include(package)
|
||||
|
||||
# install python requirements using configured python
|
||||
add_custom_target(install_python_requirements
|
||||
COMMAND ${Python_EXECUTABLE} -m pip install --break-system-packages --requirement ${PX4_SOURCE_DIR}/Tools/setup/requirements.txt
|
||||
DEPENDS ${PX4_SOURCE_DIR}/Tools/setup/requirements.txt
|
||||
USES_TERMINAL
|
||||
)
|
||||
|
||||
if(EXISTS "${PX4_SOURCE_DIR}/platforms/${PX4_PLATFORM}/cmake/finalize.cmake")
|
||||
include(finalize)
|
||||
#=============================================================================
|
||||
# packaging
|
||||
#
|
||||
# Important to having packaging at end of cmake file.
|
||||
#
|
||||
set(CPACK_PACKAGE_NAME ${PROJECT_NAME}-${CONFIG})
|
||||
set(CPACK_PACKAGE_VERSION ${version})
|
||||
set(CPACK_PACKAGE_CONTACT ${package-contact})
|
||||
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
|
||||
set(CPACK_DEBIAN_PACKAGE_SECTION "devel")
|
||||
set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
|
||||
set(short-description "The px4 autopilot.")
|
||||
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${short-description})
|
||||
set(CPACK_GENERATOR "ZIP")
|
||||
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${CONFIG}-${version}")
|
||||
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${version}")
|
||||
set(CPACK_SOURCE_GENERATOR "ZIP;TBZ2")
|
||||
if ("${CMAKE_SYSTEM}" MATCHES "Linux")
|
||||
find_program(DPKG_PROGRAM dpkg)
|
||||
if (EXISTS ${DPKG_PROGRAM})
|
||||
list (APPEND CPACK_GENERATOR "DEB")
|
||||
endif()
|
||||
endif()
|
||||
if (${OS} STREQUAL "posix")
|
||||
set(CPACK_SET_DESTDIR "ON")
|
||||
endif()
|
||||
include(CPack)
|
||||
|
||||
endif() # ros alternative endif
|
||||
|
||||
# vim: set noet fenc=utf-8 ff=unix ft=cmake :
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at lorenz@px4.io. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
|
||||
|
||||
[homepage]: http://contributor-covenant.org
|
||||
[version]: http://contributor-covenant.org/version/1/4/
|
||||
+3
-3
@@ -8,7 +8,7 @@ First [fork and clone](https://help.github.com/articles/fork-a-repo) the project
|
||||
|
||||
### Create a feature branch
|
||||
|
||||
*Always* branch off main for new features.
|
||||
*Always* branch off master for new features.
|
||||
|
||||
```
|
||||
git checkout -b mydescriptivebranchname
|
||||
@@ -16,7 +16,7 @@ git checkout -b mydescriptivebranchname
|
||||
|
||||
### Edit and build the code
|
||||
|
||||
The [developer guide](https://docs.px4.io/main/en/development/development.html) explains how to set up the development environment on Mac OS, Linux or Windows. Please take note of our [coding style](https://docs.px4.io/main/en/contribute/code.html) when editing files.
|
||||
The [developer guide](http://dev.px4.io/) explains how to set up the development environment on Mac OS, Linux or Windows. Please take note of our [coding style](http://px4.io/dev/code_style) when editing files.
|
||||
|
||||
### Commit your changes
|
||||
|
||||
@@ -41,4 +41,4 @@ Since we care about safety, we will regularly ask you for test results. Best is
|
||||
|
||||
Push changes to your repo and send a [pull request](https://github.com/PX4/Firmware/compare/).
|
||||
|
||||
Make sure to provide some testing feedback and if possible the link to a flight log file. Upload flight log files to [Flight Review](http://logs.px4.io) and link the resulting report.
|
||||
Make sure to provide some testing feedback and if possible the link to a flight log file. Upload flight log files to [Log Muncher](http://dash.oznet.ch) and link the resulting report.
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
## This file should be placed in the root directory of your project.
|
||||
## Then modify the CMakeLists.txt file in the root directory of your
|
||||
## project to incorporate the testing dashboard.
|
||||
##
|
||||
## # The following are required to submit to the CDash dashboard:
|
||||
## ENABLE_TESTING()
|
||||
## INCLUDE(CTest)
|
||||
|
||||
set(CTEST_PROJECT_NAME "PX4 Firmware")
|
||||
set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")
|
||||
|
||||
set(CTEST_DROP_METHOD "http")
|
||||
set(CTEST_DROP_SITE "my.cdash.org")
|
||||
set(CTEST_DROP_LOCATION "/submit.php?project=PX4+Firmware")
|
||||
set(CTEST_DROP_SITE_CDASH TRUE)
|
||||
@@ -81,7 +81,7 @@ class NX_register_set(object):
|
||||
self.regs['LR'] = self.mon_reg_call('lr')
|
||||
self.regs['R15'] = self.mon_reg_call('r15')
|
||||
self.regs['PC'] = self.mon_reg_call('pc')
|
||||
#self.regs['XPSR'] = self.mon_reg_call('xPSR')
|
||||
self.regs['XPSR'] = self.mon_reg_call('xPSR')
|
||||
else:
|
||||
for key in self.v7em_regmap.keys():
|
||||
self.regs[key] = int(xcpt_regs[self.v7em_regmap[key]])
|
||||
@@ -91,11 +91,11 @@ class NX_register_set(object):
|
||||
register is the register as a string e.g. 'pc'
|
||||
return integer containing the value of the register
|
||||
"""
|
||||
str_to_eval = "info registers "+register
|
||||
str_to_eval = "mon reg "+register
|
||||
resp = gdb.execute(str_to_eval,to_string = True)
|
||||
content = resp.split()[-1]
|
||||
content = resp.split()[-1];
|
||||
try:
|
||||
return int(content)
|
||||
return int(content,16)
|
||||
except:
|
||||
return 0
|
||||
|
||||
@@ -211,7 +211,7 @@ class NX_task(object):
|
||||
def waiting_for(self):
|
||||
"""return a description of what the task is waiting for, if it is waiting"""
|
||||
if self._state_is('TSTATE_WAIT_SEM'):
|
||||
try:
|
||||
try:
|
||||
waitsem = self._tcb['waitsem'].dereference()
|
||||
waitsem_holder = waitsem['holder']
|
||||
holder = NX_task.for_tcb(waitsem_holder['htcb'])
|
||||
@@ -234,8 +234,8 @@ class NX_task(object):
|
||||
@property
|
||||
def is_runnable(self):
|
||||
"""tests whether the task is runnable"""
|
||||
if (self._state_is('TSTATE_TASK_PENDING') or
|
||||
self._state_is('TSTATE_TASK_READYTORUN') or
|
||||
if (self._state_is('TSTATE_TASK_PENDING') or
|
||||
self._state_is('TSTATE_TASK_READYTORUN') or
|
||||
self._state_is('TSTATE_TASK_RUNNING')):
|
||||
return True
|
||||
return False
|
||||
@@ -271,7 +271,7 @@ class NX_task(object):
|
||||
|
||||
def __str__(self):
|
||||
return "{}:{}".format(self.pid, self.name)
|
||||
|
||||
|
||||
def showoff(self):
|
||||
print("-------")
|
||||
print(self.pid,end = ", ")
|
||||
@@ -282,7 +282,7 @@ class NX_task(object):
|
||||
print(self._tcb['adj_stack_size'],end = ", ")
|
||||
print(self.file_descriptors)
|
||||
print(self.registers)
|
||||
|
||||
|
||||
def __format__(self, format_spec):
|
||||
return format_spec.format(
|
||||
pid = self.pid,
|
||||
@@ -294,7 +294,7 @@ class NX_task(object):
|
||||
file_descriptors = self.file_descriptors,
|
||||
registers = self.registers
|
||||
)
|
||||
|
||||
|
||||
class NX_show_task (gdb.Command):
|
||||
"""(NuttX) prints information about a task"""
|
||||
|
||||
@@ -391,7 +391,7 @@ class NX_show_interrupted_thread (gdb.Command):
|
||||
|
||||
def invoke(self, args, from_tty):
|
||||
regs = gdb.lookup_global_symbol('current_regs').value()
|
||||
if regs == 0:
|
||||
if regs is 0:
|
||||
raise gdb.GdbError('not in interrupt context')
|
||||
else:
|
||||
registers = NX_register_set.with_xcpt_regs(regs)
|
||||
@@ -409,14 +409,13 @@ class NX_check_tcb(gdb.Command):
|
||||
""" check the tcb of a task from a address """
|
||||
def __init__(self):
|
||||
super(NX_check_tcb,self).__init__('show tcb', gdb.COMMAND_USER)
|
||||
|
||||
|
||||
def invoke(self,args,sth):
|
||||
tasks = NX_task.tasks()
|
||||
print("tcb int: ",int(args))
|
||||
print(tasks[int(args)]._tcb)
|
||||
a = tasks[int(args)]._tcb['xcp']['regs']
|
||||
a =tasks[int(args)]._tcb['xcp']['regs']
|
||||
print("relevant registers:")
|
||||
regmap = NX_register_set.v7em_regmap
|
||||
for reg in regmap:
|
||||
hex_addr= hex(int(a[regmap[reg]]))
|
||||
eval_string = 'info line *'+str(hex_addr)
|
||||
@@ -426,29 +425,29 @@ NX_check_tcb()
|
||||
class NX_tcb(object):
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
|
||||
def is_in(self,arg,list):
|
||||
for i in list:
|
||||
if arg == i:
|
||||
return True
|
||||
return True;
|
||||
return False
|
||||
|
||||
|
||||
def find_tcb_list(self,dq_entry_t):
|
||||
tcb_list = []
|
||||
tcb_ptr = dq_entry_t.cast(gdb.lookup_type('struct tcb_s').pointer())
|
||||
first_tcb = tcb_ptr.dereference()
|
||||
tcb_list.append(first_tcb)
|
||||
tcb_list.append(first_tcb);
|
||||
next_tcb = first_tcb['flink'].dereference()
|
||||
while not self.is_in(parse_int(next_tcb['pid']),[parse_int(t['pid']) for t in tcb_list]):
|
||||
tcb_list.append(next_tcb)
|
||||
old_tcb = next_tcb
|
||||
tcb_list.append(next_tcb);
|
||||
old_tcb = next_tcb;
|
||||
next_tcb = old_tcb['flink'].dereference()
|
||||
|
||||
|
||||
return [t for t in tcb_list if parse_int(t['pid'])<2000]
|
||||
|
||||
|
||||
def getTCB(self):
|
||||
list_of_listsnames = ['g_pendingtasks','g_readytorun','g_waitingforsemaphore','g_waitingforsignal','g_inactivetasks']
|
||||
tcb_list = []
|
||||
tcb_list = [];
|
||||
for l in list_of_listsnames:
|
||||
li = gdb.lookup_global_symbol(l)
|
||||
print(li)
|
||||
@@ -457,49 +456,49 @@ class NX_tcb(object):
|
||||
|
||||
class NX_check_stack_order(gdb.Command):
|
||||
""" Check the Stack order corresponding to the tasks """
|
||||
|
||||
|
||||
def __init__(self):
|
||||
super(NX_check_stack_order,self).__init__('show check_stack', gdb.COMMAND_USER)
|
||||
|
||||
|
||||
def is_in(self,arg,list):
|
||||
for i in list:
|
||||
if arg == i:
|
||||
return True
|
||||
return True;
|
||||
return False
|
||||
|
||||
|
||||
def find_tcb_list(self,dq_entry_t):
|
||||
tcb_list = []
|
||||
tcb_ptr = dq_entry_t.cast(gdb.lookup_type('struct tcb_s').pointer())
|
||||
first_tcb = tcb_ptr.dereference()
|
||||
tcb_list.append(first_tcb)
|
||||
tcb_list.append(first_tcb);
|
||||
next_tcb = first_tcb['flink'].dereference()
|
||||
while not self.is_in(parse_int(next_tcb['pid']),[parse_int(t['pid']) for t in tcb_list]):
|
||||
tcb_list.append(next_tcb)
|
||||
old_tcb = next_tcb
|
||||
tcb_list.append(next_tcb);
|
||||
old_tcb = next_tcb;
|
||||
next_tcb = old_tcb['flink'].dereference()
|
||||
|
||||
|
||||
return [t for t in tcb_list if parse_int(t['pid'])<2000]
|
||||
|
||||
|
||||
def getTCB(self):
|
||||
list_of_listsnames = ['g_pendingtasks','g_readytorun','g_waitingforsemaphore','g_waitingforsignal','g_inactivetasks']
|
||||
tcb_list = []
|
||||
tcb_list = [];
|
||||
for l in list_of_listsnames:
|
||||
li = gdb.lookup_global_symbol(l)
|
||||
cursor = li.value()['head']
|
||||
tcb_list = tcb_list + self.find_tcb_list(cursor)
|
||||
return tcb_list
|
||||
|
||||
|
||||
def getSPfromTask(self,tcb):
|
||||
regmap = NX_register_set.v7em_regmap
|
||||
a =tcb['xcp']['regs']
|
||||
return parse_int(a[regmap['SP']])
|
||||
|
||||
|
||||
def find_closest(self,list,val):
|
||||
tmp_list = [abs(i-val) for i in list]
|
||||
tmp_min = min(tmp_list)
|
||||
idx = tmp_list.index(tmp_min)
|
||||
return idx,list[idx]
|
||||
|
||||
|
||||
def find_next_stack(self,address,_dict_in):
|
||||
add_list = []
|
||||
name_list = []
|
||||
@@ -511,28 +510,28 @@ class NX_check_stack_order(gdb.Command):
|
||||
name_list.append(self.check_name(key)+"_SP")
|
||||
else:
|
||||
name_list.append(self.check_name(key))
|
||||
|
||||
|
||||
idx,new_address = self.find_closest(add_list,address)
|
||||
return new_address,name_list[idx]
|
||||
|
||||
|
||||
def check_name(self,name):
|
||||
if isinstance(name,(list)):
|
||||
name = name[0]
|
||||
name = name[0];
|
||||
idx = name.find("\\")
|
||||
newname = name[:idx]
|
||||
|
||||
|
||||
return newname
|
||||
|
||||
|
||||
def invoke(self,args,sth):
|
||||
tcb = self.getTCB()
|
||||
stackadresses={}
|
||||
tcb = self.getTCB();
|
||||
stackadresses={};
|
||||
for t in tcb:
|
||||
p = []
|
||||
p = [];
|
||||
#print(t.name,t._tcb['stack_alloc_ptr'])
|
||||
p.append(parse_int(t['stack_alloc_ptr']))
|
||||
p.append(parse_int(t['adj_stack_ptr']))
|
||||
p.append(self.getSPfromTask(t))
|
||||
stackadresses[str(t['name'])] = p
|
||||
stackadresses[str(t['name'])] = p;
|
||||
address = int("0x30000000",0)
|
||||
print("stack address : process")
|
||||
for i in range(len(stackadresses)*3):
|
||||
@@ -540,12 +539,12 @@ class NX_check_stack_order(gdb.Command):
|
||||
print(hex(address),": ",name)
|
||||
|
||||
NX_check_stack_order()
|
||||
|
||||
|
||||
class NX_run_debug_util(gdb.Command):
|
||||
""" show the registers of a task corresponding to a tcb address"""
|
||||
def __init__(self):
|
||||
super(NX_run_debug_util,self).__init__('show regs', gdb.COMMAND_USER)
|
||||
|
||||
|
||||
def printRegisters(self,task):
|
||||
regmap = NX_register_set.v7em_regmap
|
||||
a =task._tcb['xcp']['regs']
|
||||
@@ -554,14 +553,14 @@ class NX_run_debug_util(gdb.Command):
|
||||
hex_addr= hex(int(a[regmap[reg]]))
|
||||
eval_string = 'info line *'+str(hex_addr)
|
||||
print(reg,": ",hex_addr,)
|
||||
|
||||
|
||||
def getPCfromTask(self,task):
|
||||
regmap = NX_register_set.v7em_regmap
|
||||
a =task._tcb['xcp']['regs']
|
||||
return hex(int(a[regmap['PC']]))
|
||||
|
||||
|
||||
def invoke(self,args,sth):
|
||||
tasks = NX_task.tasks()
|
||||
tasks = NX_task.tasks()
|
||||
if args == '':
|
||||
for t in tasks:
|
||||
self.printRegisters(t)
|
||||
@@ -569,56 +568,56 @@ class NX_run_debug_util(gdb.Command):
|
||||
print("this is the location in code where the current threads $pc is:")
|
||||
gdb.execute(eval_str)
|
||||
else:
|
||||
tcb_nr = int(args)
|
||||
tcb_nr = int(args);
|
||||
print("tcb_nr = ",tcb_nr)
|
||||
t = tasks[tcb_nr]
|
||||
self.printRegisters(t)
|
||||
eval_str = "list *"+str(self.getPCfromTask(t))
|
||||
print("this is the location in code where the current threads $pc is:")
|
||||
gdb.execute(eval_str)
|
||||
|
||||
|
||||
NX_run_debug_util()
|
||||
|
||||
|
||||
|
||||
class NX_search_tcb(gdb.Command):
|
||||
""" shot PID's of all running tasks """
|
||||
|
||||
|
||||
def __init__(self):
|
||||
super(NX_search_tcb,self).__init__('show alltcb', gdb.COMMAND_USER)
|
||||
|
||||
|
||||
def is_in(self,arg,list):
|
||||
for i in list:
|
||||
if arg == i:
|
||||
return True
|
||||
return True;
|
||||
return False
|
||||
|
||||
|
||||
def find_tcb_list(self,dq_entry_t):
|
||||
tcb_list = []
|
||||
tcb_ptr = dq_entry_t.cast(gdb.lookup_type('struct tcb_s').pointer())
|
||||
first_tcb = tcb_ptr.dereference()
|
||||
tcb_list.append(first_tcb)
|
||||
tcb_list.append(first_tcb);
|
||||
next_tcb = first_tcb['flink'].dereference()
|
||||
while not self.is_in(parse_int(next_tcb['pid']),[parse_int(t['pid']) for t in tcb_list]):
|
||||
tcb_list.append(next_tcb)
|
||||
old_tcb = next_tcb
|
||||
tcb_list.append(next_tcb);
|
||||
old_tcb = next_tcb;
|
||||
next_tcb = old_tcb['flink'].dereference()
|
||||
|
||||
|
||||
return [t for t in tcb_list if parse_int(t['pid'])<2000]
|
||||
|
||||
|
||||
def invoke(self,args,sth):
|
||||
list_of_listsnames = ['g_pendingtasks','g_readytorun','g_waitingforsemaphore','g_waitingforsignal','g_inactivetasks']
|
||||
tasks = []
|
||||
tasks = [];
|
||||
for l in list_of_listsnames:
|
||||
li = gdb.lookup_global_symbol(l)
|
||||
cursor = li.value()['head']
|
||||
tasks = tasks + self.find_tcb_list(cursor)
|
||||
|
||||
|
||||
# filter for tasks that are listed twice
|
||||
tasks_filt = {}
|
||||
for t in tasks:
|
||||
pid = parse_int(t['pid'])
|
||||
pid = parse_int(t['pid']);
|
||||
if not pid in tasks_filt.keys():
|
||||
tasks_filt[pid] = t['name']
|
||||
tasks_filt[pid] = t['name'];
|
||||
print('{num_t} Tasks found:'.format(num_t = len(tasks_filt)))
|
||||
for pid in tasks_filt.keys():
|
||||
print("PID: ",pid," ",tasks_filt[pid])
|
||||
@@ -627,36 +626,36 @@ NX_search_tcb()
|
||||
|
||||
|
||||
class NX_my_bt(gdb.Command):
|
||||
""" 'fake' backtrace: backtrace the stack of a process and check every suspicious address for the list
|
||||
""" 'fake' backtrace: backtrace the stack of a process and check every suspicious address for the list
|
||||
arg: tcb_address$
|
||||
(can easily be found by typing 'showtask').
|
||||
"""
|
||||
|
||||
|
||||
def __init__(self):
|
||||
super(NX_my_bt,self).__init__('show mybt', gdb.COMMAND_USER)
|
||||
|
||||
|
||||
def readmem(self,addr):
|
||||
'''
|
||||
read memory at addr and return nr
|
||||
'''
|
||||
'''
|
||||
str_to_eval = "x/x "+hex(addr)
|
||||
resp = gdb.execute(str_to_eval,to_string = True)
|
||||
idx = resp.find('\t')
|
||||
return int(resp[idx:],16)
|
||||
|
||||
|
||||
def is_in_bounds(self,val):
|
||||
lower_bound = int("08004000",16)
|
||||
upper_bound = int("080ae0c0",16)
|
||||
upper_bound = int("080ae0c0",16);
|
||||
#print(lower_bound," ",val," ",upper_bound)
|
||||
if val>lower_bound and val<upper_bound:
|
||||
return True
|
||||
return True;
|
||||
else:
|
||||
return False
|
||||
return False;
|
||||
def get_tcb_from_address(self,addr):
|
||||
addr_value = gdb.Value(addr)
|
||||
tcb_ptr = addr_value.cast(gdb.lookup_type('struct tcb_s').pointer())
|
||||
return tcb_ptr.dereference()
|
||||
|
||||
|
||||
def resolve_file_line_func(self,addr,stack_percentage):
|
||||
gdb.write(str(round(stack_percentage,2))+":")
|
||||
str_to_eval = "info line *"+hex(addr)
|
||||
@@ -671,7 +670,7 @@ class NX_my_bt(gdb.Command):
|
||||
if str(func) == "None":
|
||||
func = block.superblock.function
|
||||
return words[3].strip('"'), line, func
|
||||
|
||||
|
||||
def invoke(self,args,sth):
|
||||
try:
|
||||
addr_dec = parse_int(args) # Trying to interpret the input as TCB address
|
||||
@@ -688,9 +687,9 @@ class NX_my_bt(gdb.Command):
|
||||
curr_sp = parse_int(_tcb['xcp']['regs'][0]) #curr stack pointer
|
||||
other_sp = parse_int(_tcb['xcp']['regs'][8]) # other stack pointer
|
||||
stacksize = parse_int(_tcb['adj_stack_size']) # other stack pointer
|
||||
|
||||
|
||||
print("tasks current SP = ",hex(curr_sp),"stack max ptr is at ",hex(up_stack))
|
||||
|
||||
|
||||
item = 0
|
||||
for sp in range(other_sp if curr_sp == up_stack else curr_sp, up_stack, 4):
|
||||
mem = self.readmem(sp)
|
||||
@@ -701,5 +700,5 @@ class NX_my_bt(gdb.Command):
|
||||
filename,line,func = self.resolve_file_line_func(mem, stack_percentage)
|
||||
print('#%-2d ' % item, '0x%08x in ' % mem, func, ' at ', filename, ':', line, sep='')
|
||||
item += 1
|
||||
|
||||
|
||||
NX_my_bt()
|
||||
@@ -0,0 +1,55 @@
|
||||
#
|
||||
# Various PX4-specific macros
|
||||
#
|
||||
source Debug/NuttX
|
||||
source Debug/ARMv7M
|
||||
|
||||
echo Loading PX4 GDB macros. Use 'help px4' for more information.\n
|
||||
|
||||
define px4
|
||||
echo Use 'help px4' for more information.\n
|
||||
end
|
||||
|
||||
document px4
|
||||
. Various macros for working with the PX4 firmware.
|
||||
.
|
||||
. perf
|
||||
. Prints the state of all performance counters.
|
||||
.
|
||||
. Use 'help <macro>' for more specific help.
|
||||
end
|
||||
|
||||
|
||||
define _perf_print
|
||||
set $hdr = (struct perf_ctr_header *)$arg0
|
||||
#printf "%p\n", $hdr
|
||||
printf "%s: ", $hdr->name
|
||||
# PC_COUNT
|
||||
if $hdr->type == 0
|
||||
set $count = (struct perf_ctr_count *)$hdr
|
||||
printf "%llu events\n", $count->event_count
|
||||
end
|
||||
# PC_ELPASED
|
||||
if $hdr->type == 1
|
||||
set $elapsed = (struct perf_ctr_elapsed *)$hdr
|
||||
printf "%llu events, %lluus elapsed, min %lluus, max %lluus\n", $elapsed->event_count, $elapsed->time_total, $elapsed->time_least, $elapsed->time_most
|
||||
end
|
||||
# PC_INTERVAL
|
||||
if $hdr->type == 2
|
||||
set $interval = (struct perf_ctr_interval *)$hdr
|
||||
printf "%llu events, %llu avg, min %lluus max %lluus\n", $interval->event_count, ($interval->time_last - $interval->time_first) / $interval->event_count, $interval->time_least, $interval->time_most
|
||||
end
|
||||
end
|
||||
|
||||
define perf
|
||||
set $ctr = (sq_entry_t *)(perf_counters.head)
|
||||
while $ctr != 0
|
||||
_perf_print $ctr
|
||||
set $ctr = $ctr->flink
|
||||
end
|
||||
end
|
||||
|
||||
document perf
|
||||
. perf
|
||||
. Prints performance counters.
|
||||
end
|
||||
@@ -0,0 +1,13 @@
|
||||
# copy the file to .gdbinit in your Firmware tree, and adjust the path
|
||||
# below to match your system
|
||||
# For example:
|
||||
# target extended /dev/serial/by-id/usb-Black_Sphere_Technologies_Black_Magic_Probe_DDE5A1C4-if00
|
||||
# target extended /dev/ttyACM4
|
||||
|
||||
|
||||
monitor swdp_scan
|
||||
attach 1
|
||||
monitor vector_catch disable hard
|
||||
set mem inaccessible-by-default off
|
||||
set print pretty
|
||||
source Debug/PX4
|
||||
@@ -0,0 +1,22 @@
|
||||
# program a bootable device load on a mavstation
|
||||
# To run type openocd -f mavprogram.cfg
|
||||
|
||||
source [find interface/olimex-arm-usb-ocd-h.cfg]
|
||||
source [find px4fmu-v1-board.cfg]
|
||||
|
||||
init
|
||||
halt
|
||||
|
||||
# Find the flash inside this CPU
|
||||
flash probe 0
|
||||
|
||||
# erase it (128 pages) then program and exit
|
||||
|
||||
#flash erase_sector 0 0 127
|
||||
# stm32f1x mass_erase 0
|
||||
|
||||
# It seems that Pat's image has a start address offset of 0x1000 but the vectors need to be at zero, so fixbin.sh moves things around
|
||||
#flash write_bank 0 fixed.bin 0
|
||||
#flash write_image firmware.elf
|
||||
#shutdown
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
target remote :3333
|
||||
|
||||
# Don't let GDB get confused while stepping
|
||||
define hook-step
|
||||
mon cortex_m maskisr on
|
||||
end
|
||||
define hookpost-step
|
||||
mon cortex_m maskisr off
|
||||
end
|
||||
|
||||
mon init
|
||||
mon stm32_init
|
||||
# mon reset halt
|
||||
mon poll
|
||||
mon cortex_m maskisr auto
|
||||
set mem inaccessible-by-default off
|
||||
set print pretty
|
||||
source Debug/PX4
|
||||
|
||||
echo PX4 resumed, press ctrl-c to interrupt\n
|
||||
continue
|
||||
Executable
+260
@@ -0,0 +1,260 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Poor man's sampling profiler for NuttX.
|
||||
#
|
||||
# Usage: Install flamegraph.pl in your PATH, configure your .gdbinit, run the script with proper arguments and go
|
||||
# have a coffee. When you're back, you'll see the flamegraph. Note that frequent calls to GDB significantly
|
||||
# interfere with normal operation of the target, which means that you can't profile real-time tasks with it.
|
||||
#
|
||||
# Requirements: ARM GDB with Python support
|
||||
#
|
||||
|
||||
set -e
|
||||
root=$(dirname $0)/..
|
||||
|
||||
function die()
|
||||
{
|
||||
echo "$@"
|
||||
exit 1
|
||||
}
|
||||
|
||||
function usage()
|
||||
{
|
||||
echo "Invalid usage. Supported options:"
|
||||
cat $0 | sed -n 's/^\s*--\([^)\*]*\).*/\1/p' # Don't try this at home.
|
||||
exit 1
|
||||
}
|
||||
|
||||
which flamegraph.pl > /dev/null || die "Install flamegraph.pl first"
|
||||
|
||||
#
|
||||
# Parsing the arguments. Read this section for usage info.
|
||||
#
|
||||
nsamples=0
|
||||
sleeptime=0.1 # Doctors recommend 7-8 hours a day
|
||||
taskname=
|
||||
elf=$root/Build/px4fmu-v2_default.build/firmware.elf
|
||||
append=0
|
||||
fgfontsize=10
|
||||
fgwidth=1900
|
||||
|
||||
for i in "$@"
|
||||
do
|
||||
case $i in
|
||||
--nsamples=*)
|
||||
nsamples="${i#*=}"
|
||||
;;
|
||||
--sleeptime=*)
|
||||
sleeptime="${i#*=}"
|
||||
;;
|
||||
--taskname=*)
|
||||
taskname="${i#*=}"
|
||||
;;
|
||||
--elf=*)
|
||||
elf="${i#*=}"
|
||||
;;
|
||||
--append)
|
||||
append=1
|
||||
;;
|
||||
--fgfontsize=*)
|
||||
fgfontsize="${i#*=}"
|
||||
;;
|
||||
--fgwidth=*)
|
||||
fgwidth="${i#*=}"
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
#
|
||||
# Temporary files
|
||||
#
|
||||
stacksfile=/tmp/pmpn-stacks.log
|
||||
foldfile=/tmp/pmpn-folded.txt
|
||||
graphfile=/tmp/pmpn-flamegraph.svg
|
||||
gdberrfile=/tmp/pmpn-gdberr.log
|
||||
|
||||
#
|
||||
# Sampling if requested. Note that if $append is true, the stack file will not be rewritten.
|
||||
#
|
||||
cd $root
|
||||
|
||||
if [[ $nsamples > 0 ]]
|
||||
then
|
||||
[[ $append = 0 ]] && (rm -f $stacksfile; echo "Old stacks removed")
|
||||
|
||||
echo "Sampling the task '$taskname'..."
|
||||
|
||||
for x in $(seq 1 $nsamples)
|
||||
do
|
||||
if [[ "$taskname" = "" ]]
|
||||
then
|
||||
arm-none-eabi-gdb $elf --batch -ex "set print asm-demangle on" -ex bt \
|
||||
2> $gdberrfile \
|
||||
| sed -n 's/\(#.*\)/\1/p' \
|
||||
>> $stacksfile
|
||||
else
|
||||
arm-none-eabi-gdb $elf --batch -ex "set print asm-demangle on" \
|
||||
-ex "source $root/Debug/Nuttx.py" \
|
||||
-ex "show mybt $taskname" \
|
||||
2> $gdberrfile \
|
||||
| sed -n 's/0\.0:\(#.*\)/\1/p' \
|
||||
>> $stacksfile
|
||||
fi
|
||||
echo -e '\n\n' >> $stacksfile
|
||||
echo -ne "\r$x/$nsamples"
|
||||
sleep $sleeptime
|
||||
done
|
||||
|
||||
echo
|
||||
echo "Stacks saved to $stacksfile"
|
||||
else
|
||||
echo "Sampling skipped - set 'nsamples' to re-sample."
|
||||
fi
|
||||
|
||||
#
|
||||
# Folding the stacks.
|
||||
#
|
||||
[ -f $stacksfile ] || die "Where are the stack samples?"
|
||||
|
||||
cat << 'EOF' > /tmp/pmpn-folder.py
|
||||
#
|
||||
# This stack folder correctly handles C++ types.
|
||||
#
|
||||
from __future__ import print_function, division
|
||||
import fileinput, collections, os, sys
|
||||
|
||||
def enforce(x, msg='Invalid input'):
|
||||
if not x:
|
||||
raise Exception(msg)
|
||||
|
||||
def split_first_part_with_parens(line):
|
||||
LBRACES = {'(':'()', '<':'<>', '[':'[]', '{':'{}'}
|
||||
RBRACES = {')':'()', '>':'<>', ']':'[]', '}':'{}'}
|
||||
QUOTES = set(['"', "'"])
|
||||
quotes = collections.defaultdict(bool)
|
||||
braces = collections.defaultdict(int)
|
||||
out = ''
|
||||
for ch in line:
|
||||
out += ch
|
||||
# escape character cancels further processing
|
||||
if ch == '\\':
|
||||
continue
|
||||
# special cases
|
||||
if out.endswith('operator>') or out.endswith('operator>>') or out.endswith('operator->'): # gotta love c++
|
||||
braces['<>'] += 1
|
||||
if out.endswith('operator<') or out.endswith('operator<<'):
|
||||
braces['<>'] -= 1
|
||||
# switching quotes
|
||||
if ch in QUOTES:
|
||||
quotes[ch] = not quotes[ch]
|
||||
# counting parens only when outside quotes
|
||||
if sum(quotes.values()) == 0:
|
||||
if ch in LBRACES.keys():
|
||||
braces[LBRACES[ch]] += 1
|
||||
if ch in RBRACES.keys():
|
||||
braces[RBRACES[ch]] -= 1
|
||||
# sanity check
|
||||
for v in braces.values():
|
||||
enforce(v >= 0, 'Unaligned braces: ' + str(dict(braces)))
|
||||
# termination condition
|
||||
if ch == ' ' and sum(braces.values()) == 0:
|
||||
break
|
||||
out = out.strip()
|
||||
return out, line[len(out):]
|
||||
|
||||
def parse(line):
|
||||
def take_path(line, output):
|
||||
line = line.strip()
|
||||
if line.startswith('at '):
|
||||
line = line[3:].strip()
|
||||
if line:
|
||||
output['file_full_path'] = line.rsplit(':', 1)[0].strip()
|
||||
output['file_base_name'] = os.path.basename(output['file_full_path'])
|
||||
output['line'] = int(line.rsplit(':', 1)[1])
|
||||
return output
|
||||
|
||||
def take_args(line, output):
|
||||
line = line.lstrip()
|
||||
if line[0] == '(':
|
||||
output['args'], line = split_first_part_with_parens(line)
|
||||
return take_path(line.lstrip(), output)
|
||||
|
||||
def take_function(line, output):
|
||||
output['function'], line = split_first_part_with_parens(line.lstrip())
|
||||
return take_args(line.lstrip(), output)
|
||||
|
||||
def take_mem_loc(line, output):
|
||||
line = line.lstrip()
|
||||
if line.startswith('0x'):
|
||||
end = line.find(' ')
|
||||
num = line[:end]
|
||||
output['memloc'] = int(num, 16)
|
||||
line = line[end:].lstrip()
|
||||
end = line.find(' ')
|
||||
enforce(line[:end] == 'in')
|
||||
line = line[end:].lstrip()
|
||||
return take_function(line, output)
|
||||
|
||||
def take_frame_num(line, output):
|
||||
line = line.lstrip()
|
||||
enforce(line[0] == '#')
|
||||
end = line.find(' ')
|
||||
num = line[1:end]
|
||||
output['frame_num'] = int(num)
|
||||
return take_mem_loc(line[end:], output)
|
||||
|
||||
return take_frame_num(line, {})
|
||||
|
||||
stacks = collections.defaultdict(int)
|
||||
current = ''
|
||||
|
||||
stack_tops = collections.defaultdict(int)
|
||||
num_stack_frames = 0
|
||||
|
||||
for idx,line in enumerate(fileinput.input()):
|
||||
try:
|
||||
line = line.strip()
|
||||
if line:
|
||||
inf = parse(line)
|
||||
fun = inf['function']
|
||||
current = (fun + ';' + current) if current else fun
|
||||
|
||||
if inf['frame_num'] == 0:
|
||||
num_stack_frames += 1
|
||||
stack_tops[fun] += 1
|
||||
elif current:
|
||||
stacks[current] += 1
|
||||
current = ''
|
||||
except Exception, ex:
|
||||
print('ERROR (line %d):' % (idx + 1), ex, file=sys.stderr)
|
||||
|
||||
for s, f in sorted(stacks.items(), key=lambda (s, f): s):
|
||||
print(s, f)
|
||||
|
||||
print('Total stack frames:', num_stack_frames, file=sys.stderr)
|
||||
print('Top consumers (distribution of the stack tops):', file=sys.stderr)
|
||||
for name,num in sorted(stack_tops.items(), key=lambda (name, num): num, reverse=True)[:10]:
|
||||
print('% 5.1f%% ' % (100 * num / num_stack_frames), name, file=sys.stderr)
|
||||
EOF
|
||||
|
||||
cat $stacksfile | python /tmp/pmpn-folder.py > $foldfile
|
||||
|
||||
echo "Folded stacks saved to $foldfile"
|
||||
|
||||
#
|
||||
# Graphing.
|
||||
#
|
||||
cat $foldfile | flamegraph.pl --fontsize=$fgfontsize --width=$fgwidth > $graphfile
|
||||
echo "FlameGraph saved to $graphfile"
|
||||
|
||||
# On KDE, xdg-open prefers Gwenview by default, which doesn't handle interactive SVGs, so we need a browser.
|
||||
# The current implementation is hackish and stupid. Somebody, please do something about it.
|
||||
opener=xdg-open
|
||||
which firefox > /dev/null && opener=firefox
|
||||
which google-chrome > /dev/null && opener=google-chrome
|
||||
|
||||
$opener $graphfile
|
||||
@@ -0,0 +1,38 @@
|
||||
# The latest defaults in OpenOCD 0.7.0 are actually prettymuch correct for the px4fmu
|
||||
|
||||
# increase working area to 32KB for faster flash programming
|
||||
set WORKAREASIZE 0x8000
|
||||
|
||||
source [find target/stm32f4x.cfg]
|
||||
|
||||
# needed for px4
|
||||
reset_config trst_only
|
||||
|
||||
proc stm32_reset {} {
|
||||
reset halt
|
||||
# FIXME - needed to init periphs on reset
|
||||
# 0x40023800 RCC base
|
||||
# 0x24 RCC_APB2 0x75933
|
||||
# RCC_APB2 0
|
||||
}
|
||||
|
||||
# perform init that is required on each connection to the target
|
||||
proc stm32_init {} {
|
||||
|
||||
# force jtag to not shutdown during sleep
|
||||
#uint32_t cr = getreg32(STM32_DBGMCU_CR);
|
||||
#cr |= DBGMCU_CR_STANDBY | DBGMCU_CR_STOP | DBGMCU_CR_SLEEP;
|
||||
#putreg32(cr, STM32_DBGMCU_CR);
|
||||
mww 0xe0042004 00000007
|
||||
}
|
||||
|
||||
# if srst is not fitted use SYSRESETREQ to
|
||||
# perform a soft reset
|
||||
cortex_m reset_config sysresetreq
|
||||
|
||||
# Let GDB directly program elf binaries
|
||||
gdb_memory_map enable
|
||||
|
||||
# doesn't work yet
|
||||
gdb_flash_program disable
|
||||
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
openocd -f interface/olimex-arm-usb-ocd-h.cfg -f $DIR/px4fmu-v1-board.cfg
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,37 @@
|
||||
Linux/Mac OS X
|
||||
==============
|
||||
To install doxygen:
|
||||
$sudo apt-get install doxygen
|
||||
|
||||
If the above does not work go to:
|
||||
http://www.stack.nl/~dimitri/doxygen/download.html for the correct download.
|
||||
|
||||
Then go to the following website for inforamtion on the install:
|
||||
http://www.stack.nl/~dimitri/doxygen/install.html
|
||||
|
||||
Then to generate the html, run the following code while you are in this directory:
|
||||
$doxygen Doxyfile
|
||||
|
||||
The html file index.html should be in doc/html unless you changed the output directory.
|
||||
|
||||
The other option for generating the documentation is to use the wizard:
|
||||
$doxywizard &
|
||||
|
||||
doxywizard information:
|
||||
http://www.stack.nl/~dimitri/doxygen/doxywizard_usage.html
|
||||
|
||||
Or go to the Doxygen Manual for information at the website noted below.
|
||||
|
||||
Windows
|
||||
=======
|
||||
Go to the following website for the correct download and follow the wizard to install:
|
||||
http://www.stack.nl/~dimitri/doxygen/download.html
|
||||
|
||||
Run the wizard to generate the documentation.
|
||||
Go to the website below or the Doxygen Manual for information on running doxywizard.
|
||||
http://www.stack.nl/~dimitri/doxygen/doxywizard_usage.html
|
||||
|
||||
Doxygen Manual
|
||||
==============
|
||||
http://www.stack.nl/~dimitri/doxygen/
|
||||
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
rm -rf html
|
||||
doxygen
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 92 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 79 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 74 KiB |
@@ -0,0 +1,98 @@
|
||||
[TOC]
|
||||
|
||||
# Introduction
|
||||
|
||||
The HIL architecture allows you to test the flight stack replacing the real physical vehicle and sensors with a simulator of vehicle dynamics and sensor outputs. The flight stack "is not aware" that it is not on a real vehicle. This is a powerful tool for develping and testing code rapidly in a benchtop environment.
|
||||
|
||||
The flight stack can be run anywhere that supports a network connection to the simulator (with sufficient bandwidth and latency to transport the sensor and actuator messages). This can be on a standard linux workstation, an on-target linux image, or the on-target DSP image. These modes can be selected based on the goals of the testing. Workstation is useful for rapid testing in a tool-rich environment. DSP image testing is the closest to the final implementation, so is useful for testing actual HW operation, other than the physical sensing and actuation.
|
||||
|
||||
## Px4 High-level HIL Architecture
|
||||
|
||||
A diagram of the setup described is shown here. Note that UDP port numbers are only displayed on the socket server and are left blank on the socket client.
|
||||
|
||||
(???NOTES: This diagram needs to be updated to use control inputs over UDP, either from QGC or from other)
|
||||
|
||||

|
||||
|
||||
## Requirements
|
||||
The simulator that is currently supported is jMAVSim. The setup described here requires PX4 and jMAVSim installed and running. qGroundControl (QGC) is also required because it is the supported method of providing manual control commands.
|
||||
|
||||
## Assumptions
|
||||
|
||||
# Compiling Code
|
||||
|
||||
## JMAVSim
|
||||
|
||||
### Platform Requirements
|
||||
Linux with java-1.7.x or greater
|
||||
|
||||
### Build Instructions
|
||||
In a clean directory
|
||||
```
|
||||
> git clone https://github.com/PX4/jMAVSim.git
|
||||
> cd jMAVSim
|
||||
> git submodule init
|
||||
> git submodule update
|
||||
> ant
|
||||
```
|
||||
|
||||
## qGroundControl
|
||||
|
||||
### Platform Requirements
|
||||
Windows 7
|
||||
Logitech Gamepad F310 joystick controller
|
||||
|
||||
### Download/Install Instructions
|
||||
Download QGC from http://qgroundcontrol.org/downloads and install using the windows executable.
|
||||
|
||||
|
||||
## PX4
|
||||
|
||||
### Platform Requirements
|
||||
Linux or Eagle with a working IP interface (?? does this need further instructions?)
|
||||
|
||||
### Build Host Requirements
|
||||
(???Notes: Windows?)
|
||||
|
||||
### Download & Build Instructions
|
||||
|
||||
### Installing binaries on the Qualcomm Target
|
||||
|
||||
# Running PX4 in HIL Mode
|
||||
|
||||
## Starting PX4 on Qualcomm Eagle
|
||||
|
||||
```
|
||||
> adb shell
|
||||
# bash
|
||||
root@linaro-developer:/# cd ???
|
||||
root@linaro-developer:/# ./px4
|
||||
App name: px4
|
||||
Enter a command and its args:
|
||||
uorb start
|
||||
muorb start
|
||||
mavlink start -u 14556
|
||||
simulator start -p
|
||||
```
|
||||
|
||||
## Starting jMAVSim
|
||||
In the directory where jMAVSim is installed
|
||||
```
|
||||
java -cp lib/*:out/production/jmavsim.jar me.drton.jmavsim.Simulator -udp <IPADDR>:14560 -n 100
|
||||
```
|
||||
replacing <IPADDR> with the IP address of the machine running PX4 (Eagle). This can be found by running "ifconfig" on that machine.
|
||||
|
||||
## Starting qGroundControl
|
||||
Launch the qGroundControl application
|
||||
1. Set up the communication to the flight stack. In the menu File:Settings:CommLinks, select Add. Enter a Link Name of your choice. Select Link Type: UDP. Set the listening port to an unused port (example: 14561). Select Add. Enter the IP address and port of the PX4 Mavlink app, which is <IPADDR>:14556 with <IPADDR> being the IP address of the Eagle board. Select OK.
|
||||
1. Set up the joystick. Plug in the joystick to your Windows machine. In the menu File:Settings:CommLinks, check Enable Controllers. Select "Gamepad F310". Select "Manual". Set the axes/channel mapping to 0:Yaw, 1:Throttle, 2:unset, 3:Pitch, 4:Roll. Seletct "Inverted" for the throttle axis. Click "Calibrate range". Move the right joystick through its full range of motion. Move the left joystick full left then full right. Move the left joystick full forward (but not full backward). Click "end calibration."
|
||||
1. Connect to the flight stack. Click Analyze. Click the "Connect" button in the upper right, and select the connection that you created in the first step.
|
||||
|
||||
You should now be connected to the flight stack. You can see incoming Mavlink packets using the MAVLink Instpector (from Advanced:Tool Widgets)
|
||||
|
||||
|
||||
## Controlling PX4 flight in HIL Mode
|
||||
The joystick can now be used to fly the simulated vehicle. The jMAVSim world visualization gives a FPV view, and QGC can be used to display instruments such as artificial horizon and maps (if GPS simulation is enabled).
|
||||
|
||||
|
||||
# Debugging/FAQ
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Executable
+2
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
git log --pretty=format:"Last change: commit %h - %aN, %ar : %s" -1 $1 || echo no git
|
||||
@@ -0,0 +1,82 @@
|
||||
{
|
||||
"folders":
|
||||
[
|
||||
{
|
||||
"path": ".",
|
||||
"file_exclude_patterns":
|
||||
[
|
||||
"*.o",
|
||||
"*.a",
|
||||
"*.d",
|
||||
".built",
|
||||
".context",
|
||||
".depend",
|
||||
".config",
|
||||
".version",
|
||||
"Make.dep",
|
||||
".configured",
|
||||
"*.sublime-project",
|
||||
"*.sublime-workspace",
|
||||
".project",
|
||||
".cproject",
|
||||
"cscope.out"
|
||||
],
|
||||
"folder_exclude_patterns":
|
||||
[
|
||||
".settings",
|
||||
"nuttx/arch/arm/src/board",
|
||||
"nuttx/arch/arm/src/chip"
|
||||
]
|
||||
}
|
||||
],
|
||||
"settings":
|
||||
{
|
||||
"tab_size": 8,
|
||||
"translate_tabs_to_spaces": false,
|
||||
"highlight_line": true,
|
||||
"AStyleFormatter":
|
||||
{
|
||||
"options_c":
|
||||
{
|
||||
"use_only_additional_options": true,
|
||||
"additional_options_file": "${project_path}/Tools/astylerc"
|
||||
},
|
||||
"options_c++":
|
||||
{
|
||||
"use_only_additional_options": true,
|
||||
"additional_options_file": "${project_path}/Tools/astylerc"
|
||||
}
|
||||
}
|
||||
},
|
||||
"build_systems":
|
||||
[
|
||||
{
|
||||
"name": "PX4: make all",
|
||||
"working_dir": "${project_path}",
|
||||
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
|
||||
"cmd": ["make"],
|
||||
"shell": true
|
||||
},
|
||||
{
|
||||
"name": "PX4: make and upload",
|
||||
"working_dir": "${project_path}",
|
||||
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
|
||||
"cmd": ["make upload px4fmu-v2_default -j8"],
|
||||
"shell": true
|
||||
},
|
||||
{
|
||||
"name": "PX4: make posix",
|
||||
"working_dir": "${project_path}",
|
||||
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
|
||||
"cmd": ["make posix"],
|
||||
"shell": true
|
||||
},
|
||||
{
|
||||
"name": "MindPX_V2: make and upload",
|
||||
"working_dir": "${project_path}",
|
||||
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
|
||||
"cmd": ["make upload mindpx-v2_default -j8"],
|
||||
"shell": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"board_id": 19,
|
||||
"magic": "AeroCore",
|
||||
"description": "Firmware for the Gumstix AeroCore board",
|
||||
"image": "",
|
||||
"build_time": 0,
|
||||
"summary": "AEROCORE",
|
||||
"version": "0.1",
|
||||
"image_size": 0,
|
||||
"git_identity": "",
|
||||
"board_revision": 0
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"board_id": 88,
|
||||
"magic": "MindPX",
|
||||
"description": "Firmware for the MindPXFMUv2 board",
|
||||
"image": "",
|
||||
"build_time": 0,
|
||||
"summary": "MindPXFMUv2",
|
||||
"version": "2.1",
|
||||
"image_size": 0,
|
||||
"git_identity": "",
|
||||
"board_revision": 0
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"board_id": 99,
|
||||
"magic": "PX4FWv1",
|
||||
"description": "Firmware for the STM32F4Discovery board",
|
||||
"image": "",
|
||||
"build_time": 0,
|
||||
"summary": "PX4/STM32F4Discovery",
|
||||
"version": "0.1",
|
||||
"image_size": 0,
|
||||
"git_identity": "",
|
||||
"board_revision": 0
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"board_id": 5,
|
||||
"magic": "PX4FWv1",
|
||||
"description": "Firmware for the PX4FMU board",
|
||||
"image": "",
|
||||
"build_time": 0,
|
||||
"summary": "PX4FMU",
|
||||
"version": "0.1",
|
||||
"image_size": 0,
|
||||
"git_identity": "",
|
||||
"board_revision": 0
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"board_id": 9,
|
||||
"magic": "PX4FWv1",
|
||||
"description": "Firmware for the PX4FMUv2 board",
|
||||
"image": "",
|
||||
"build_time": 0,
|
||||
"summary": "PX4FMUv2",
|
||||
"version": "0.1",
|
||||
"image_size": 0,
|
||||
"git_identity": "",
|
||||
"board_revision": 0
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"board_id": 11,
|
||||
"magic": "PX4FWv1",
|
||||
"description": "Firmware for the PX4FMUv4 board",
|
||||
"image": "",
|
||||
"build_time": 0,
|
||||
"summary": "PX4FMUv4",
|
||||
"version": "0.1",
|
||||
"image_size": 0,
|
||||
"git_identity": "",
|
||||
"board_revision": 0
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"board_id": 7,
|
||||
"magic": "PX4FWv1",
|
||||
"description": "Firmware for the PX4IO board",
|
||||
"image": "",
|
||||
"build_time": 0,
|
||||
"summary": "PX4IO",
|
||||
"version": "0.1",
|
||||
"image_size": 0,
|
||||
"git_identity": "",
|
||||
"board_revision": 0
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"board_id": 10,
|
||||
"magic": "PX4FWv2",
|
||||
"description": "Firmware for the PX4IOv2 board",
|
||||
"image": "",
|
||||
"build_time": 0,
|
||||
"summary": "PX4IOv2",
|
||||
"version": "2.0",
|
||||
"image_size": 0,
|
||||
"git_identity": "",
|
||||
"board_revision": 0
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"board_id": 10,
|
||||
"magic": "PX4FWv2",
|
||||
"description": "Firmware for the PX4IOv2 board",
|
||||
"image": "",
|
||||
"build_time": 0,
|
||||
"summary": "PX4IOv2",
|
||||
"version": "2.0",
|
||||
"image_size": 0,
|
||||
"git_identity": "",
|
||||
"board_revision": 0
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"board_id": 78,
|
||||
"magic": "PX4FWv1",
|
||||
"description": "Firmware for the TAPv1 board",
|
||||
"image": "",
|
||||
"build_time": 0,
|
||||
"summary": "TAPv1",
|
||||
"version": "0.1",
|
||||
"image_size": 0,
|
||||
"git_identity": "",
|
||||
"board_revision": 0
|
||||
}
|
||||
Vendored
-293
@@ -1,293 +0,0 @@
|
||||
#!/usr/bin/env groovy
|
||||
|
||||
pipeline {
|
||||
agent none
|
||||
stages {
|
||||
|
||||
stage('Analysis') {
|
||||
when {
|
||||
anyOf {
|
||||
branch 'main'
|
||||
branch 'master' // should be removed, but in case there is something going on...
|
||||
branch 'pr-jenkins' // for testing
|
||||
}
|
||||
}
|
||||
parallel {
|
||||
|
||||
stage('Airframe') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
|
||||
}
|
||||
steps {
|
||||
sh 'make distclean; git clean -ff -x -d .'
|
||||
sh 'git fetch --all --tags'
|
||||
sh 'make airframe_metadata'
|
||||
dir('build/px4_sitl_default/docs') {
|
||||
archiveArtifacts(artifacts: 'airframes.md, airframes.xml')
|
||||
stash includes: 'airframes.md, airframes.xml', name: 'metadata_airframes'
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean; git clean -ff -x -d .'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Parameter') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
|
||||
}
|
||||
steps {
|
||||
sh 'make distclean; git clean -ff -x -d .'
|
||||
sh 'git fetch --all --tags'
|
||||
sh 'make parameters_metadata'
|
||||
dir('build/px4_sitl_default/docs') {
|
||||
archiveArtifacts(artifacts: 'parameters.md, parameters.xml, parameters.json.xz')
|
||||
stash includes: 'parameters.md, parameters.xml, parameters.json.xz', name: 'metadata_parameters'
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean; git clean -ff -x -d .'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Module') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
|
||||
}
|
||||
steps {
|
||||
sh 'make distclean; git clean -ff -x -d .'
|
||||
sh 'git fetch --all --tags'
|
||||
sh 'make module_documentation'
|
||||
dir('build/px4_sitl_default/docs') {
|
||||
archiveArtifacts(artifacts: 'modules/*.md')
|
||||
stash includes: 'modules/*.md', name: 'metadata_module_documentation'
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean; git clean -ff -x -d .'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('msg file docs') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
|
||||
}
|
||||
steps {
|
||||
sh 'mkdir -p build/msg_docs; ./Tools/msg/generate_msg_docs.py -d build/msg_docs'
|
||||
dir('build') {
|
||||
archiveArtifacts(artifacts: 'msg_docs/*.md')
|
||||
stash includes: 'msg_docs/*.md', name: 'msg_documentation'
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean; git clean -ff -x -d .'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('failsafe docs') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-nuttx-focal:2022-08-12' }
|
||||
}
|
||||
steps {
|
||||
sh '''#!/bin/bash -l
|
||||
echo $0;
|
||||
git clone https://github.com/emscripten-core/emsdk.git _emscripten_sdk;
|
||||
cd _emscripten_sdk;
|
||||
./emsdk install latest;
|
||||
./emsdk activate latest;
|
||||
cd ..;
|
||||
. ./_emscripten_sdk/emsdk_env.sh;
|
||||
git fetch --all --tags;
|
||||
make failsafe_web;
|
||||
cd build/px4_sitl_default_failsafe_web;
|
||||
mkdir -p failsafe_sim;
|
||||
cp index.* parameters.json failsafe_sim;
|
||||
'''
|
||||
dir('build/px4_sitl_default_failsafe_web') {
|
||||
archiveArtifacts(artifacts: 'failsafe_sim/*')
|
||||
stash includes: 'failsafe_sim/*', name: 'failsafe_sim'
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean; git clean -ff -x -d .'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('uORB graphs') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx-focal:2022-08-12'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean; git clean -ff -x -d .'
|
||||
sh 'git fetch --all --tags'
|
||||
sh 'make uorb_graphs'
|
||||
dir('Tools/uorb_graph') {
|
||||
archiveArtifacts(artifacts: 'graph_*.json')
|
||||
stash includes: 'graph_*.json', name: 'uorb_graph'
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean; git clean -ff -x -d .'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // parallel
|
||||
} // stage: Generate Metadata
|
||||
|
||||
stage('Deploy') {
|
||||
|
||||
parallel {
|
||||
|
||||
stage('Userguide') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
|
||||
}
|
||||
steps {
|
||||
sh('export')
|
||||
unstash 'metadata_airframes'
|
||||
unstash 'metadata_parameters'
|
||||
unstash 'metadata_module_documentation'
|
||||
unstash 'msg_documentation'
|
||||
unstash 'failsafe_sim'
|
||||
unstash 'uorb_graph'
|
||||
withCredentials([usernamePassword(credentialsId: 'px4buildbot_github_personal_token', passwordVariable: 'GIT_PASS', usernameVariable: 'GIT_USER')]) {
|
||||
sh('git clone https://${GIT_USER}:${GIT_PASS}@github.com/PX4/PX4-user_guide.git')
|
||||
sh('cp airframes.md PX4-user_guide/en/airframes/airframe_reference.md')
|
||||
sh('cp parameters.md PX4-user_guide/en/advanced_config/parameter_reference.md')
|
||||
sh('cp -R modules/*.md PX4-user_guide/en/modules/')
|
||||
sh('cp -R graph_*.json PX4-user_guide/public/middleware/') // vitepress
|
||||
sh('cp -R msg_docs/*.md PX4-user_guide/en/msg_docs/')
|
||||
sh('cp -R failsafe_sim/* PX4-user_guide/public/config/failsafe') // vitepress
|
||||
sh('cd PX4-user_guide; git status; git add .; git commit -a -m "Update PX4 Firmware metadata `date`" || true')
|
||||
sh('cd PX4-user_guide; git push origin main || true')
|
||||
sh('rm -rf PX4-user_guide')
|
||||
}
|
||||
}
|
||||
when {
|
||||
anyOf {
|
||||
branch 'main'
|
||||
branch 'master' // should be removed, but in case there is something going on...
|
||||
branch 'pr-jenkins' // for testing
|
||||
}
|
||||
}
|
||||
options {
|
||||
skipDefaultCheckout()
|
||||
}
|
||||
}
|
||||
|
||||
stage('QGroundControl') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
|
||||
}
|
||||
steps {
|
||||
sh('export')
|
||||
unstash 'metadata_airframes'
|
||||
unstash 'metadata_parameters'
|
||||
withCredentials([usernamePassword(credentialsId: 'px4buildbot_github_personal_token', passwordVariable: 'GIT_PASS', usernameVariable: 'GIT_USER')]) {
|
||||
sh('git clone https://${GIT_USER}:${GIT_PASS}@github.com/mavlink/qgroundcontrol.git')
|
||||
sh('cp airframes.xml qgroundcontrol/src/AutoPilotPlugins/PX4/AirframeFactMetaData.xml')
|
||||
sh('cp parameters.xml qgroundcontrol/src/FirmwarePlugin/PX4/PX4ParameterFactMetaData.xml')
|
||||
sh('cd qgroundcontrol; git status; git add .; git commit -a -m "Update PX4 Firmware metadata `date`" || true')
|
||||
sh('cd qgroundcontrol; git push origin master || true')
|
||||
sh('rm -rf qgroundcontrol')
|
||||
}
|
||||
}
|
||||
when {
|
||||
anyOf {
|
||||
branch 'main'
|
||||
branch 'master' // should be removed, but in case there is something going on...
|
||||
branch 'pr-jenkins' // for testing
|
||||
}
|
||||
}
|
||||
options {
|
||||
skipDefaultCheckout()
|
||||
}
|
||||
}
|
||||
|
||||
stage('PX4 ROS msgs') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
|
||||
}
|
||||
steps {
|
||||
sh('export')
|
||||
sh('make distclean; git clean -ff -x -d .')
|
||||
withCredentials([usernamePassword(credentialsId: 'px4buildbot_github_personal_token', passwordVariable: 'GIT_PASS', usernameVariable: 'GIT_USER')]) {
|
||||
sh("git clone https://${GIT_USER}:${GIT_PASS}@github.com/PX4/px4_msgs.git")
|
||||
// 'main' branch
|
||||
sh('rm -f px4_msgs/msg/*.msg')
|
||||
sh('rm -f px4_msgs/srv/*.srv')
|
||||
sh('cp msg/*.msg px4_msgs/msg/')
|
||||
sh('cp srv/*.srv px4_msgs/srv/')
|
||||
sh('cd px4_msgs; git status; git add .; git commit -a -m "Update message definitions `date`" || true')
|
||||
sh('cd px4_msgs; git push origin main || true')
|
||||
sh('rm -rf px4_msgs')
|
||||
}
|
||||
}
|
||||
when {
|
||||
anyOf {
|
||||
branch 'main'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('S3') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
|
||||
}
|
||||
steps {
|
||||
sh('export')
|
||||
unstash 'metadata_airframes'
|
||||
unstash 'metadata_parameters'
|
||||
sh('ls')
|
||||
withAWS(credentials: 'px4_aws_s3_key', region: 'us-east-1') {
|
||||
s3Upload(acl: 'PublicRead', bucket: 'px4-travis', file: 'airframes.xml', path: 'Firmware/master/')
|
||||
s3Upload(acl: 'PublicRead', bucket: 'px4-travis', file: 'parameters.xml', path: 'Firmware/master/')
|
||||
s3Upload(acl: 'PublicRead', bucket: 'px4-travis', file: 'parameters.json.xz', path: 'Firmware/master/')
|
||||
}
|
||||
}
|
||||
when {
|
||||
anyOf {
|
||||
branch 'main'
|
||||
branch 'master' // should be removed, but in case there is something going on...
|
||||
branch 'pr-jenkins' // for testing
|
||||
}
|
||||
}
|
||||
options {
|
||||
skipDefaultCheckout()
|
||||
}
|
||||
}
|
||||
|
||||
} // parallel
|
||||
} // stage: Generate Metadata
|
||||
|
||||
} // stages
|
||||
|
||||
environment {
|
||||
CCACHE_DIR = '/tmp/ccache'
|
||||
CI = true
|
||||
GIT_AUTHOR_EMAIL = "bot@px4.io"
|
||||
GIT_AUTHOR_NAME = "PX4BuildBot"
|
||||
GIT_COMMITTER_EMAIL = "bot@px4.io"
|
||||
GIT_COMMITTER_NAME = "PX4BuildBot"
|
||||
}
|
||||
options {
|
||||
buildDiscarder(logRotator(numToKeepStr: '20', artifactDaysToKeepStr: '30'))
|
||||
timeout(time: 90, unit: 'MINUTES')
|
||||
}
|
||||
}
|
||||
@@ -1,220 +0,0 @@
|
||||
# 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_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_ROMFSROOT
|
||||
string "ROMFSROOT"
|
||||
default "px4fmu_common"
|
||||
help
|
||||
relative path to the ROMFS root directory
|
||||
|
||||
config BOARD_ROOTFSDIR
|
||||
string "Root directory"
|
||||
depends on PLATFORM_POSIX
|
||||
default "."
|
||||
help
|
||||
Configure the root directory in the file system for PX4 files
|
||||
|
||||
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 "platforms"
|
||||
depends on PLATFORM_QURT || PLATFORM_POSIX
|
||||
source "platforms/common/Kconfig"
|
||||
endmenu
|
||||
|
||||
source "src/lib/*/Kconfig"
|
||||
@@ -1,29 +0,0 @@
|
||||
BSD 3-Clause License
|
||||
|
||||
Copyright (c) 2012 - 2023, PX4 Development Team
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
The PX4 firmware is licensed generally under a permissive 3-clause BSD license. Contributions are required
|
||||
to be made under the same license. Any exception to this general rule is listed below.
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2012-2015 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
- PX4 middleware: BSD 3-clause
|
||||
- PX4 flight control stack: BSD 3-clause
|
||||
- NuttX operating system: BSD 3-clause
|
||||
- Exceptions: Currently only this [400 LOC file](https://github.com/PX4/Firmware/blob/master/src/lib/external_lgpl/tecs/tecs.cpp) remains LGPL, but will be replaced with a BSD implementation.
|
||||
@@ -1,6 +1,6 @@
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (c) 2015 - 2024 PX4 Development Team. All rights reserved.
|
||||
# Copyright (c) 2015 - 2016 PX4 Development Team. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
@@ -39,6 +39,26 @@ ifeq ($(wildcard .git),)
|
||||
$(error YOU HAVE TO USE GIT TO DOWNLOAD THIS REPOSITORY. ABORTING.)
|
||||
endif
|
||||
|
||||
CMAKE_VER := $(shell Tools/check_cmake.sh; echo $$?)
|
||||
ifneq ($(CMAKE_VER),0)
|
||||
$(warning Not a valid CMake version or CMake not installed.)
|
||||
$(warning On Ubuntu, install or upgrade via:)
|
||||
$(warning )
|
||||
$(warning 3rd party PPA:)
|
||||
$(warning sudo add-apt-repository ppa:george-edison55/cmake-3.x -y)
|
||||
$(warning sudo apt-get update)
|
||||
$(warning sudo apt-get install cmake)
|
||||
$(warning )
|
||||
$(warning Official website:)
|
||||
$(warning wget https://cmake.org/files/v3.4/cmake-3.4.3-Linux-x86_64.sh)
|
||||
$(warning chmod +x cmake-3.4.3-Linux-x86_64.sh)
|
||||
$(warning sudo mkdir /opt/cmake-3.4.3)
|
||||
$(warning sudo ./cmake-3.4.3-Linux-x86_64.sh --prefix=/opt/cmake-3.4.3 --exclude-subdir)
|
||||
$(warning export PATH=/opt/cmake-3.4.3/bin:$$PATH)
|
||||
$(warning )
|
||||
$(error Fatal)
|
||||
endif
|
||||
|
||||
# Help
|
||||
# --------------------------------------------------------------------
|
||||
# Don't be afraid of this makefile, it is just passing
|
||||
@@ -48,79 +68,41 @@ endif
|
||||
#
|
||||
# Example usage:
|
||||
#
|
||||
# make px4_fmu-v2_default (builds)
|
||||
# make px4_fmu-v2_default upload (builds and uploads)
|
||||
# make px4_fmu-v2_default test (builds and tests)
|
||||
# make px4fmu-v2_default (builds)
|
||||
# make px4fmu-v2_default upload (builds and uploads)
|
||||
# make px4fmu-v2_default test (builds and tests)
|
||||
#
|
||||
# This tells cmake to build the nuttx px4_fmu-v2 default config in the
|
||||
# directory build/px4_fmu-v2_default and then call make
|
||||
# This tells cmake to build the nuttx px4fmu-v2 default config in the
|
||||
# directory build_nuttx_px4fmu-v2_default and then call make
|
||||
# in that directory with the target upload.
|
||||
|
||||
# explicity set default build target
|
||||
all: px4_sitl_default
|
||||
|
||||
# define a space character to be able to explicitly find it in strings
|
||||
space := $(subst ,, )
|
||||
|
||||
define make_list
|
||||
$(shell [ -f .github/workflows/compile_${1}.yml ] && cat .github/workflows/compile_${1}.yml | sed -E 's|[[:space:]]+(.*),|check_\1|g' | grep check_${2})
|
||||
endef
|
||||
# explicity set default build target
|
||||
all: posix_sitl_default
|
||||
|
||||
# Parsing
|
||||
# --------------------------------------------------------------------
|
||||
# assume 1st argument passed is the main target, the
|
||||
# rest are arguments to pass to the makefile generated
|
||||
# by cmake in the subdirectory
|
||||
FIRST_ARG := $(firstword $(MAKECMDGOALS))
|
||||
ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
|
||||
j ?= 4
|
||||
|
||||
# Get -j or --jobs argument as suggested in:
|
||||
# https://stackoverflow.com/a/33616144/8548472
|
||||
MAKE_PID := $(shell echo $$PPID)
|
||||
j := $(shell ps T | sed -n 's|.*$(MAKE_PID).*$(MAKE).* \(-j\|--jobs\) *\([0-9][0-9]*\).*|\2|p')
|
||||
|
||||
# Default j for clang-tidy
|
||||
j_clang_tidy := $(or $(j),4)
|
||||
|
||||
NINJA_BIN := ninja
|
||||
ifndef NO_NINJA_BUILD
|
||||
NINJA_BUILD := $(shell $(NINJA_BIN) --version 2>/dev/null)
|
||||
|
||||
ifndef NINJA_BUILD
|
||||
NINJA_BIN := ninja-build
|
||||
NINJA_BUILD := $(shell $(NINJA_BIN) --version 2>/dev/null)
|
||||
endif
|
||||
endif
|
||||
|
||||
NINJA_BUILD := $(shell ninja --version 2>/dev/null)
|
||||
ifdef NINJA_BUILD
|
||||
PX4_CMAKE_GENERATOR := Ninja
|
||||
PX4_MAKE := $(NINJA_BIN)
|
||||
|
||||
ifdef VERBOSE
|
||||
PX4_MAKE_ARGS := -v
|
||||
else
|
||||
PX4_MAKE_ARGS :=
|
||||
endif
|
||||
|
||||
# Only override ninja default if -j is set.
|
||||
ifneq ($(j),)
|
||||
PX4_MAKE_ARGS := $(PX4_MAKE_ARGS) -j$(j)
|
||||
endif
|
||||
PX4_CMAKE_GENERATOR ?= "Ninja"
|
||||
PX4_MAKE = ninja
|
||||
PX4_MAKE_ARGS =
|
||||
else
|
||||
ifdef SYSTEMROOT
|
||||
# Windows
|
||||
PX4_CMAKE_GENERATOR := "MSYS\ Makefiles"
|
||||
else
|
||||
PX4_CMAKE_GENERATOR := "Unix\ Makefiles"
|
||||
endif
|
||||
|
||||
# For non-ninja builds we default to -j4
|
||||
j := $(or $(j),4)
|
||||
PX4_MAKE = $(MAKE)
|
||||
PX4_MAKE_ARGS = -j$(j) --no-print-directory
|
||||
ifdef SYSTEMROOT
|
||||
# Windows
|
||||
PX4_CMAKE_GENERATOR ?= "MSYS Makefiles"
|
||||
else
|
||||
PX4_CMAKE_GENERATOR ?= "Unix Makefiles"
|
||||
endif
|
||||
PX4_MAKE = make
|
||||
PX4_MAKE_ARGS = -j$(j) --no-print-directory
|
||||
endif
|
||||
|
||||
SRC_DIR := $(shell dirname "$(realpath $(lastword $(MAKEFILE_LIST)))")
|
||||
|
||||
# check if replay env variable is set & set build dir accordingly
|
||||
ifdef replay
|
||||
@@ -129,474 +111,246 @@ else
|
||||
BUILD_DIR_SUFFIX :=
|
||||
endif
|
||||
|
||||
CMAKE_ARGS ?=
|
||||
|
||||
# additional config parameters passed to cmake
|
||||
ifdef EXTERNAL_MODULES_LOCATION
|
||||
override CMAKE_ARGS += -DEXTERNAL_MODULES_LOCATION:STRING=$(EXTERNAL_MODULES_LOCATION)
|
||||
endif
|
||||
|
||||
ifdef PX4_CMAKE_BUILD_TYPE
|
||||
override CMAKE_ARGS += -DCMAKE_BUILD_TYPE=${PX4_CMAKE_BUILD_TYPE}
|
||||
else
|
||||
|
||||
# Address Sanitizer
|
||||
ifdef PX4_ASAN
|
||||
override CMAKE_ARGS += -DCMAKE_BUILD_TYPE=AddressSanitizer
|
||||
endif
|
||||
|
||||
# Memory Sanitizer
|
||||
ifdef PX4_MSAN
|
||||
override CMAKE_ARGS += -DCMAKE_BUILD_TYPE=MemorySanitizer
|
||||
endif
|
||||
|
||||
# Thread Sanitizer
|
||||
ifdef PX4_TSAN
|
||||
override CMAKE_ARGS += -DCMAKE_BUILD_TYPE=ThreadSanitizer
|
||||
endif
|
||||
|
||||
# Undefined Behavior Sanitizer
|
||||
ifdef PX4_UBSAN
|
||||
override CMAKE_ARGS += -DCMAKE_BUILD_TYPE=UndefinedBehaviorSanitizer
|
||||
endif
|
||||
|
||||
# Fuzz Testing
|
||||
ifdef PX4_FUZZ
|
||||
override CMAKE_ARGS += -DCMAKE_BUILD_TYPE=FuzzTesting
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
# Pick up specific Python path if set
|
||||
ifdef PYTHON_EXECUTABLE
|
||||
override CMAKE_ARGS += -DPython_EXECUTABLE=${PYTHON_EXECUTABLE}
|
||||
endif
|
||||
|
||||
# Functions
|
||||
# --------------------------------------------------------------------
|
||||
# describe how to build a cmake config
|
||||
define cmake-build
|
||||
$(eval override CMAKE_ARGS += -DCONFIG=$(1))
|
||||
@$(eval BUILD_DIR = "$(SRC_DIR)/build/$(1)")
|
||||
@# check if the desired cmake configuration matches the cache then CMAKE_CACHE_CHECK stays empty
|
||||
@$(call cmake-cache-check)
|
||||
@# make sure to start from scratch when switching from GNU Make to Ninja
|
||||
@if [ $(PX4_CMAKE_GENERATOR) = "Ninja" ] && [ -e $(BUILD_DIR)/Makefile ]; then rm -rf $(BUILD_DIR); fi
|
||||
@# make sure to start from scratch if ninja build file is missing
|
||||
@if [ $(PX4_CMAKE_GENERATOR) = "Ninja" ] && [ ! -f $(BUILD_DIR)/build.ninja ]; then rm -rf $(BUILD_DIR); fi
|
||||
@# only excplicitly configure the first build, if cache file already exists the makefile will rerun cmake automatically if necessary
|
||||
@if [ ! -e $(BUILD_DIR)/CMakeCache.txt ] || [ $(CMAKE_CACHE_CHECK) ]; then \
|
||||
mkdir -p $(BUILD_DIR) \
|
||||
&& cd $(BUILD_DIR) \
|
||||
&& cmake "$(SRC_DIR)" -G"$(PX4_CMAKE_GENERATOR)" $(CMAKE_ARGS) \
|
||||
|| (rm -rf $(BUILD_DIR)); \
|
||||
fi
|
||||
@# run the build for the specified target
|
||||
@cmake --build $(BUILD_DIR) -- $(PX4_MAKE_ARGS) $(ARGS)
|
||||
+@if [ $(PX4_CMAKE_GENERATOR) = "Ninja" ] && [ -e ./build_$@$(BUILD_DIR_SUFFIX)/Makefile ]; then rm -rf ./build_$@$(BUILD_DIR_SUFFIX); fi
|
||||
+@if [ ! -e ./build_$@$(BUILD_DIR_SUFFIX)/CMakeCache.txt ]; then Tools/check_submodules.sh && mkdir -p ./build_$@$(BUILD_DIR_SUFFIX) && cd ./build_$@$(BUILD_DIR_SUFFIX) && cmake .. -G$(PX4_CMAKE_GENERATOR) -DCONFIG=$(1) || (cd .. && rm -rf ./build_$@$(BUILD_DIR_SUFFIX)); fi
|
||||
+@Tools/check_submodules.sh
|
||||
+@(echo "PX4 CONFIG: $@$(BUILD_DIR_SUFFIX)" && cd ./build_$@$(BUILD_DIR_SUFFIX) && $(PX4_MAKE) $(PX4_MAKE_ARGS) $(ARGS))
|
||||
endef
|
||||
|
||||
# check if the options we want to build with in CMAKE_ARGS match the ones which are already configured in the cache inside BUILD_DIR
|
||||
define cmake-cache-check
|
||||
@# change to build folder which fails if it doesn't exist and CACHED_CMAKE_OPTIONS stays empty
|
||||
@# fetch all previously configured and cached options from the build folder and transform them into the OPTION=VALUE format without type (e.g. :BOOL)
|
||||
@$(eval CACHED_CMAKE_OPTIONS = $(shell cd $(BUILD_DIR) 2>/dev/null && cmake -L 2>/dev/null | sed -n 's|\([^[:blank:]]*\):[^[:blank:]]*\(=[^[:blank:]]*\)|\1\2|gp' ))
|
||||
@# transform the options in CMAKE_ARGS into the OPTION=VALUE format without -D
|
||||
@$(eval DESIRED_CMAKE_OPTIONS = $(shell echo $(CMAKE_ARGS) | sed -n 's|-D\([^[:blank:]]*=[^[:blank:]]*\)|\1|gp' ))
|
||||
@# find each currently desired option in the already cached ones making sure the complete configured string value is the same
|
||||
@$(eval VERIFIED_CMAKE_OPTIONS = $(foreach option,$(DESIRED_CMAKE_OPTIONS),$(strip $(findstring $(option)$(space),$(CACHED_CMAKE_OPTIONS)))))
|
||||
@# if the complete list of desired options is found in the list of verified options we don't need to reconfigure and CMAKE_CACHE_CHECK stays empty
|
||||
@$(eval CMAKE_CACHE_CHECK = $(if $(findstring $(DESIRED_CMAKE_OPTIONS),$(VERIFIED_CMAKE_OPTIONS)),,y))
|
||||
define cmake-build-other
|
||||
+@if [ $(PX4_CMAKE_GENERATOR) = "Ninja" ] && [ -e ./build_$@/Makefile ]; then rm -rf ./build_$@; fi
|
||||
+@if [ ! -e ./build_$@/CMakeCache.txt ]; then Tools/check_submodules.sh && mkdir -p ./build_$@ && cd ./build_$@ && cmake $(2) -G$(PX4_CMAKE_GENERATOR) || (cd .. && rm -rf ./build_$@); fi
|
||||
+@(cd ./build_$@ && $(PX4_MAKE) $(PX4_MAKE_ARGS) $(ARGS))
|
||||
endef
|
||||
|
||||
COLOR_BLUE = \033[0;94m
|
||||
NO_COLOR = \033[m
|
||||
# create empty targets to avoid msgs for targets passed to cmake
|
||||
define cmake-targ
|
||||
$(1):
|
||||
@#
|
||||
.PHONY: $(1)
|
||||
endef
|
||||
|
||||
define colorecho
|
||||
+@echo -e '${COLOR_BLUE}${1} ${NO_COLOR}'
|
||||
@tput setaf 6
|
||||
@echo $1
|
||||
@tput sgr0
|
||||
endef
|
||||
|
||||
# Get a list of all config targets boards/*/*.px4board
|
||||
ALL_CONFIG_TARGETS := $(shell find boards -maxdepth 3 -mindepth 3 -name '*.px4board' -print | sed -e 's|boards\/||' | sed -e 's|\.px4board||' | sed -e 's|\/|_|g' | sort)
|
||||
|
||||
# ADD CONFIGS HERE
|
||||
# --------------------------------------------------------------------
|
||||
# Do not put any spaces between function arguments.
|
||||
|
||||
# All targets.
|
||||
$(ALL_CONFIG_TARGETS):
|
||||
@$(call cmake-build,$@$(BUILD_DIR_SUFFIX))
|
||||
tap-v1_default:
|
||||
$(call cmake-build,nuttx_tap-v1_default)
|
||||
|
||||
# Filter for only default targets to allow omiting the "_default" postfix
|
||||
CONFIG_TARGETS_DEFAULT := $(patsubst %_default,%,$(filter %_default,$(ALL_CONFIG_TARGETS)))
|
||||
$(CONFIG_TARGETS_DEFAULT):
|
||||
@$(call cmake-build,$@_default$(BUILD_DIR_SUFFIX))
|
||||
px4fmu-v1_default:
|
||||
$(call cmake-build,nuttx_px4fmu-v1_default)
|
||||
|
||||
all_config_targets: $(ALL_CONFIG_TARGETS)
|
||||
all_default_targets: $(CONFIG_TARGETS_DEFAULT)
|
||||
px4fmu-v2_default:
|
||||
$(call cmake-build,nuttx_px4fmu-v2_default)
|
||||
|
||||
updateconfig:
|
||||
@./Tools/kconfig/updateconfig.py
|
||||
px4fmu-v2_test:
|
||||
$(call cmake-build,nuttx_px4fmu-v2_test)
|
||||
|
||||
# board reorganization deprecation warnings (2018-11-22)
|
||||
define deprecation_warning
|
||||
$(warning $(1) has been deprecated and will be removed, please use $(2)!)
|
||||
endef
|
||||
px4fmu-v4_default:
|
||||
$(call cmake-build,nuttx_px4fmu-v4_default)
|
||||
|
||||
# All targets with just dependencies but no recipe must either be marked as phony (or have the special @: as recipe).
|
||||
.PHONY: all px4_sitl_default all_config_targets all_default_targets
|
||||
px4-stm32f4discovery_default:
|
||||
$(call cmake-build,nuttx_px4-stm32f4discovery_default)
|
||||
|
||||
px4fmu-v2_ekf2:
|
||||
$(call cmake-build,nuttx_px4fmu-v2_ekf2)
|
||||
|
||||
mindpx-v2_default:
|
||||
$(call cmake-build,nuttx_mindpx-v2_default)
|
||||
|
||||
posix_sitl_default:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
posix_sitl_lpe:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
posix_sitl_replay:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
posix_sitl_broadcast:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
ros_sitl_default:
|
||||
@echo "This target is deprecated. Use make 'posix_sitl_default gazebo' instead."
|
||||
|
||||
qurt_eagle_travis:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
qurt_eagle_default:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
posix_eagle_default:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
eagle_default: posix_eagle_default qurt_eagle_default
|
||||
eagle_legacy_default: posix_eagle_legacy_driver_default qurt_eagle_legacy_driver_default
|
||||
|
||||
qurt_eagle_legacy_driver_default:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
posix_eagle_legacy_driver_default:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
qurt_excelsior_default:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
posix_excelsior_default:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
excelsior_default: posix_excelsior_default qurt_excelsior_default
|
||||
|
||||
posix_rpi_native:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
posix_rpi_cross:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
posix_bebop_default:
|
||||
$(call cmake-build,$@)
|
||||
|
||||
posix: posix_sitl_default
|
||||
|
||||
broadcast: posix_sitl_broadcast
|
||||
|
||||
sitl_deprecation:
|
||||
@echo "Deprecated. Use 'make posix_sitl_default jmavsim' or"
|
||||
@echo "'make posix_sitl_default gazebo' if Gazebo is preferred."
|
||||
|
||||
run_sitl_quad: sitl_deprecation
|
||||
run_sitl_plane: sitl_deprecation
|
||||
run_sitl_ros: sitl_deprecation
|
||||
|
||||
# Other targets
|
||||
# --------------------------------------------------------------------
|
||||
|
||||
.PHONY: qgc_firmware px4fmu_firmware misc_qgc_extra_firmware
|
||||
.PHONY: gazebo_build uavcan_firmware check check_format unittest tests qgc_firmware package_firmware clean submodulesclean distclean
|
||||
.NOTPARALLEL: gazebo_build uavcan_firmware check check_format unittest tests qgc_firmware package_firmware clean submodulesclean distclean
|
||||
|
||||
# QGroundControl flashable NuttX firmware
|
||||
qgc_firmware: px4fmu_firmware misc_qgc_extra_firmware
|
||||
gazebo_build:
|
||||
@mkdir -p build_gazebo
|
||||
@if [ ! -e ./build_gazebo/CMakeCache.txt ];then cd build_gazebo && cmake -Wno-dev -G$(PX4_CMAKE_GENERATOR) ../Tools/sitl_gazebo; fi
|
||||
@cd build_gazebo && $(PX4_MAKE) $(PX4_MAKE_ARGS)
|
||||
@cd build_gazebo && $(PX4_MAKE) $(PX4_MAKE_ARGS) sdf
|
||||
|
||||
# px4fmu NuttX firmware
|
||||
px4fmu_firmware: \
|
||||
check_px4_io-v2_default \
|
||||
check_px4_fmu-v2_default \
|
||||
check_px4_fmu-v3_default \
|
||||
check_px4_fmu-v4_default \
|
||||
check_px4_fmu-v4pro_default \
|
||||
check_px4_fmu-v5_default \
|
||||
check_px4_fmu-v5x_default \
|
||||
sizes
|
||||
uavcan_firmware:
|
||||
ifeq ($(VECTORCONTROL),1)
|
||||
$(call colorecho,"Downloading and building Vector control (FOC) firmware for the S2740VC and PX4ESC 1.6")
|
||||
@(rm -rf vectorcontrol && git clone --quiet --depth 1 https://github.com/thiemar/vectorcontrol.git && cd vectorcontrol && BOARD=s2740vc_1_0 make --silent --no-print-directory && BOARD=px4esc_1_6 make --silent --no-print-directory && ../Tools/uavcan_copy.sh)
|
||||
endif
|
||||
|
||||
misc_qgc_extra_firmware: \
|
||||
check_nxp_fmuk66-v3_default \
|
||||
check_mro_x21_default \
|
||||
check_bitcraze_crazyflie_default \
|
||||
check_bitcraze_crazyflie21_default \
|
||||
check_airmind_mindpx-v2_default \
|
||||
sizes
|
||||
checks_defaults: \
|
||||
check_px4fmu-v1_default \
|
||||
check_px4fmu-v2_default \
|
||||
check_mindpx-v2_default \
|
||||
check_px4-stm32f4discovery_default \
|
||||
check_tap-v1_default \
|
||||
|
||||
.PHONY: sizes check quick_check uorb_graphs
|
||||
checks_bootloaders: \
|
||||
|
||||
sizes:
|
||||
@-find build -name *.elf -type f | xargs size 2> /dev/null || :
|
||||
|
||||
# All default targets that don't require a special build environment
|
||||
check: check_px4_sitl_default px4fmu_firmware misc_qgc_extra_firmware tests check_format
|
||||
checks_tests: \
|
||||
check_px4fmu-v2_test
|
||||
|
||||
# quick_check builds a single nuttx and SITL target, runs testing, and checks the style
|
||||
quick_check: check_px4_sitl_test check_px4_fmu-v5_default tests check_format
|
||||
checks_alts: \
|
||||
check_px4fmu-v2_ekf2 \
|
||||
|
||||
checks_uavcan: \
|
||||
check_px4fmu-v4_default_and_uavcan
|
||||
|
||||
checks_sitls: \
|
||||
check_posix_sitl_default
|
||||
|
||||
checks_last: \
|
||||
check_tests \
|
||||
check_format \
|
||||
|
||||
check: checks_defaults checks_tests checks_alts checks_uavcan checks_bootloaders checks_last
|
||||
quick_check: check_px4fmu-v2_default check_px4fmu-v4_default check_tests check_format
|
||||
|
||||
check_format:
|
||||
$(call colorecho,"Checking formatting with astyle")
|
||||
@./Tools/fix_code_style.sh
|
||||
@./Tools/check_code_style_all.sh
|
||||
|
||||
check_%:
|
||||
@echo
|
||||
$(call colorecho,'Building' $(subst check_,,$@))
|
||||
$(call colorecho,"Building" $(subst check_,,$@))
|
||||
@$(MAKE) --no-print-directory $(subst check_,,$@)
|
||||
@echo
|
||||
|
||||
all_variants_%:
|
||||
@echo 'Building all $(subst all_variants_,,$@) variants:' $(filter $(subst all_variants_,,$@)_%, $(ALL_CONFIG_TARGETS))
|
||||
check_px4fmu-v4_default: uavcan_firmware
|
||||
check_px4fmu-v4_default_and_uavcan: check_px4fmu-v4_default
|
||||
@echo
|
||||
$(foreach a,$(filter $(subst all_variants_,,$@)_%, $(ALL_CONFIG_TARGETS)), $(call cmake-build,$(a)$(BUILD_DIR_SUFFIX)))
|
||||
ifeq ($(VECTORCONTROL),1)
|
||||
@echo "Cleaning up vectorcontrol firmware"
|
||||
@rm -rf vectorcontrol
|
||||
@rm -rf ROMFS/px4fmu_common/uavcan
|
||||
endif
|
||||
|
||||
uorb_graphs:
|
||||
@./Tools/uorb_graph/create.py --src-path src --exclude-path src/examples --exclude-path src/lib/parameters --merge-depends --file Tools/uorb_graph/graph_full
|
||||
@./Tools/uorb_graph/create.py --src-path src --exclude-path src/examples --exclude-path src/lib/parameters --exclude-path src/modules/mavlink --merge-depends --file Tools/uorb_graph/graph_full_no_mavlink
|
||||
@$(MAKE) --no-print-directory px4_fmu-v2_default uorb_graph
|
||||
@$(MAKE) --no-print-directory px4_fmu-v4_default uorb_graph
|
||||
@$(MAKE) --no-print-directory px4_fmu-v5_default uorb_graph
|
||||
@$(MAKE) --no-print-directory px4_sitl_default uorb_graph
|
||||
unittest: posix_sitl_default
|
||||
$(call cmake-build-other,unittest, ../unittests)
|
||||
@(cd build_unittest && ctest -j2 --output-on-failure)
|
||||
|
||||
px4io_update:
|
||||
@$(MAKE) --no-print-directory px4_io-v2_default
|
||||
@$(MAKE) --no-print-directory cubepilot_io-v2_default
|
||||
# px4_io-v2_default
|
||||
cp build/px4_io-v2_default/px4_io-v2_default.bin boards/ark/fmu-v6x/extras/px4_io-v2_default.bin
|
||||
cp build/px4_io-v2_default/px4_io-v2_default.bin boards/holybro/durandal-v1/extras/px4_io-v2_default.bin
|
||||
cp build/px4_io-v2_default/px4_io-v2_default.bin boards/holybro/pix32v5/extras/px4_io-v2_default.bin
|
||||
cp build/px4_io-v2_default/px4_io-v2_default.bin boards/mro/x21/extras/px4_io-v2_default.bin
|
||||
cp build/px4_io-v2_default/px4_io-v2_default.bin boards/mro/x21-777/extras/px4_io-v2_default.bin
|
||||
cp build/px4_io-v2_default/px4_io-v2_default.bin boards/px4/fmu-v2/extras/px4_io-v2_default.bin
|
||||
cp build/px4_io-v2_default/px4_io-v2_default.bin boards/px4/fmu-v3/extras/px4_io-v2_default.bin
|
||||
cp build/px4_io-v2_default/px4_io-v2_default.bin boards/px4/fmu-v4pro/extras/px4_io-v2_default.bin
|
||||
cp build/px4_io-v2_default/px4_io-v2_default.bin boards/px4/fmu-v5/extras/px4_io-v2_default.bin
|
||||
cp build/px4_io-v2_default/px4_io-v2_default.bin boards/px4/fmu-v5x/extras/px4_io-v2_default.bin
|
||||
cp build/px4_io-v2_default/px4_io-v2_default.bin boards/px4/fmu-v6x/extras/px4_io-v2_default.bin
|
||||
cp build/px4_io-v2_default/px4_io-v2_default.bin boards/px4/fmu-v6c/extras/px4_io-v2_default.bin
|
||||
# cubepilot_io-v2_default
|
||||
cp build/cubepilot_io-v2_default/cubepilot_io-v2_default.bin boards/cubepilot/cubeorange/extras/cubepilot_io-v2_default.bin
|
||||
cp build/cubepilot_io-v2_default/cubepilot_io-v2_default.bin boards/cubepilot/cubeyellow/extras/cubepilot_io-v2_default.bin
|
||||
git status
|
||||
run_tests_posix: posix_sitl_default
|
||||
@mkdir -p build_posix_sitl_default/src/firmware/posix/rootfs/fs/microsd
|
||||
@mkdir -p build_posix_sitl_default/src/firmware/posix/rootfs/eeprom
|
||||
@touch build_posix_sitl_default/src/firmware/posix/rootfs/eeprom/parameters
|
||||
@(cd build_posix_sitl_default/src/firmware/posix && ./px4 -d ../../../../posix-configs/SITL/init/rcS_tests | tee test_output)
|
||||
@(cd build_posix_sitl_default/src/firmware/posix && grep --color=always "All tests passed" test_output)
|
||||
|
||||
bootloaders_update: \
|
||||
3dr_ctrl-zero-h7-oem-revg_bootloader \
|
||||
ark_fmu-v6x_bootloader \
|
||||
ark_fpv_bootloader \
|
||||
ark_pi6x_bootloader \
|
||||
cuav_nora_bootloader \
|
||||
cuav_x7pro_bootloader \
|
||||
cuav_7-nano_bootloader \
|
||||
cubepilot_cubeorange_bootloader \
|
||||
cubepilot_cubeorangeplus_bootloader \
|
||||
hkust_nxt-dual_bootloader \
|
||||
hkust_nxt-v1_bootloader \
|
||||
holybro_durandal-v1_bootloader \
|
||||
holybro_kakuteh7_bootloader \
|
||||
holybro_kakuteh7mini_bootloader \
|
||||
holybro_kakuteh7v2_bootloader \
|
||||
matek_h743_bootloader \
|
||||
matek_h743-mini_bootloader \
|
||||
matek_h743-slim_bootloader \
|
||||
micoair_h743_bootloader \
|
||||
micoair_h743-aio_bootloader \
|
||||
modalai_fc-v2_bootloader \
|
||||
mro_ctrl-zero-classic_bootloader \
|
||||
mro_ctrl-zero-h7_bootloader \
|
||||
mro_ctrl-zero-h7-oem_bootloader \
|
||||
mro_pixracerpro_bootloader \
|
||||
px4_fmu-v6c_bootloader \
|
||||
px4_fmu-v6u_bootloader \
|
||||
px4_fmu-v6x_bootloader \
|
||||
px4_fmu-v6xrt_bootloader \
|
||||
siyi_n7_bootloader
|
||||
git status
|
||||
tests: check_unittest run_tests_posix
|
||||
|
||||
.PHONY: coverity_scan
|
||||
# QGroundControl flashable firmware
|
||||
qgc_firmware: \
|
||||
check_px4fmu-v1_default \
|
||||
check_px4fmu-v2_default \
|
||||
check_mindpx-v2_default \
|
||||
check_px4fmu-v4_default_and_uavcan \
|
||||
check_format
|
||||
|
||||
coverity_scan: px4_sitl_default
|
||||
extra_firmware: \
|
||||
check_px4-stm32f4discovery_default \
|
||||
check_px4fmu-v2_test \
|
||||
check_px4fmu-v2_ekf2
|
||||
|
||||
# Documentation
|
||||
# --------------------------------------------------------------------
|
||||
.PHONY: parameters_metadata airframe_metadata module_documentation extract_events px4_metadata doxygen
|
||||
|
||||
parameters_metadata:
|
||||
@$(MAKE) --no-print-directory px4_sitl_default metadata_parameters ver_gen
|
||||
|
||||
airframe_metadata:
|
||||
@$(MAKE) --no-print-directory px4_sitl_default metadata_airframes ver_gen
|
||||
|
||||
module_documentation:
|
||||
@$(MAKE) --no-print-directory px4_sitl_default metadata_module_documentation
|
||||
|
||||
extract_events:
|
||||
@$(MAKE) --no-print-directory px4_sitl_default metadata_extract_events ver_gen
|
||||
|
||||
px4_metadata: parameters_metadata airframe_metadata module_documentation extract_events
|
||||
|
||||
doxygen:
|
||||
@mkdir -p "$(SRC_DIR)"/build/doxygen
|
||||
@cd "$(SRC_DIR)"/build/doxygen && cmake "$(SRC_DIR)" $(CMAKE_ARGS) -G"$(PX4_CMAKE_GENERATOR)" -DCONFIG=px4_sitl_default -DBUILD_DOXYGEN=ON
|
||||
@$(PX4_MAKE) -C "$(SRC_DIR)"/build/doxygen
|
||||
@touch "$(SRC_DIR)"/build/doxygen/Documentation/.nojekyll
|
||||
|
||||
# Style
|
||||
# --------------------------------------------------------------------
|
||||
.PHONY: check_format format check_newlines
|
||||
|
||||
check_format:
|
||||
$(call colorecho,'Checking formatting with astyle')
|
||||
@"$(SRC_DIR)"/Tools/astyle/check_code_style_all.sh
|
||||
@cd "$(SRC_DIR)" && git diff --check
|
||||
|
||||
format:
|
||||
$(call colorecho,'Formatting with astyle')
|
||||
@"$(SRC_DIR)"/Tools/astyle/check_code_style_all.sh --fix
|
||||
|
||||
check_newlines:
|
||||
$(call colorecho,'Checking for missing or duplicate newlines at the end of files')
|
||||
@"$(SRC_DIR)"/Tools/astyle/check_newlines.sh
|
||||
|
||||
# Testing
|
||||
# --------------------------------------------------------------------
|
||||
.PHONY: tests tests_coverage tests_mission tests_mission_coverage tests_offboard tests_avoidance
|
||||
.PHONY: rostest python_coverage
|
||||
|
||||
tests:
|
||||
$(eval override CMAKE_ARGS += -DTESTFILTER=$(TESTFILTER))
|
||||
$(eval ARGS += test_results)
|
||||
$(eval ASAN_OPTIONS += color=always:check_initialization_order=1:detect_stack_use_after_return=1)
|
||||
$(eval UBSAN_OPTIONS += color=always)
|
||||
$(call cmake-build,px4_sitl_test)
|
||||
|
||||
tests_coverage:
|
||||
@$(MAKE) clean
|
||||
@$(MAKE) --no-print-directory tests PX4_CMAKE_BUILD_TYPE=Coverage
|
||||
@mkdir -p coverage
|
||||
@lcov --directory build/px4_sitl_test --base-directory build/px4_sitl_test --gcov-tool gcov --capture -o coverage/lcov.info
|
||||
|
||||
|
||||
rostest: px4_sitl_default
|
||||
@$(MAKE) --no-print-directory px4_sitl_default sitl_gazebo-classic
|
||||
|
||||
tests_integration: px4_sitl_default
|
||||
@$(MAKE) --no-print-directory px4_sitl_default sitl_gazebo-classic
|
||||
@$(MAKE) --no-print-directory px4_sitl_default mavsdk_tests
|
||||
@"$(SRC_DIR)"/test/mavsdk_tests/mavsdk_test_runner.py --speed-factor 20 test/mavsdk_tests/configs/sitl.json
|
||||
|
||||
tests_integration_coverage:
|
||||
@$(MAKE) clean
|
||||
@$(MAKE) --no-print-directory px4_sitl_default PX4_CMAKE_BUILD_TYPE=Coverage
|
||||
@$(MAKE) --no-print-directory px4_sitl_default sitl_gazebo-classic
|
||||
@$(MAKE) --no-print-directory px4_sitl_default mavsdk_tests
|
||||
@"$(SRC_DIR)"/test/mavsdk_tests/mavsdk_test_runner.py --speed-factor 20 test/mavsdk_tests/configs/sitl.json
|
||||
@mkdir -p coverage
|
||||
@lcov --directory build/px4_sitl_default --base-directory build/px4_sitl_default --gcov-tool gcov --capture -o coverage/lcov.info
|
||||
|
||||
tests_mission: rostest
|
||||
@"$(SRC_DIR)"/test/rostest_px4_run.sh mavros_posix_tests_missions.test
|
||||
|
||||
rostest_run: px4_sitl_default
|
||||
@$(MAKE) --no-print-directory px4_sitl_default sitl_gazebo-classic
|
||||
@"$(SRC_DIR)"/test/rostest_px4_run.sh $(TEST_FILE) mission:=$(TEST_MISSION) vehicle:=$(TEST_VEHICLE)
|
||||
|
||||
tests_mission_coverage:
|
||||
@$(MAKE) clean
|
||||
@$(MAKE) --no-print-directory px4_sitl_default PX4_CMAKE_BUILD_TYPE=Coverage
|
||||
@$(MAKE) --no-print-directory px4_sitl_default sitl_gazebo-classic PX4_CMAKE_BUILD_TYPE=Coverage
|
||||
@"$(SRC_DIR)"/test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=VTOL_mission_1 vehicle:=standard_vtol
|
||||
@$(MAKE) --no-print-directory px4_sitl_default generate_coverage
|
||||
|
||||
tests_offboard: rostest
|
||||
@"$(SRC_DIR)"/test/rostest_px4_run.sh mavros_posix_tests_offboard_attctl.test
|
||||
@"$(SRC_DIR)"/test/rostest_px4_run.sh mavros_posix_tests_offboard_posctl.test
|
||||
@"$(SRC_DIR)"/test/rostest_px4_run.sh mavros_posix_tests_offboard_rpyrt_ctl.test
|
||||
|
||||
tests_avoidance: rostest
|
||||
@"$(SRC_DIR)"/test/rostest_avoidance_run.sh mavros_posix_test_avoidance.test
|
||||
@"$(SRC_DIR)"/test/rostest_avoidance_run.sh mavros_posix_test_safe_landing.test
|
||||
|
||||
python_coverage:
|
||||
@mkdir -p "$(SRC_DIR)"/build/python_coverage
|
||||
@cd "$(SRC_DIR)"/build/python_coverage && cmake "$(SRC_DIR)" $(CMAKE_ARGS) -G"$(PX4_CMAKE_GENERATOR)" -DCONFIG=px4_sitl_default -DPYTHON_COVERAGE=ON
|
||||
@$(PX4_MAKE) -C "$(SRC_DIR)"/build/python_coverage
|
||||
@$(PX4_MAKE) -C "$(SRC_DIR)"/build/python_coverage metadata_airframes
|
||||
@$(PX4_MAKE) -C "$(SRC_DIR)"/build/python_coverage metadata_parameters
|
||||
#@$(PX4_MAKE) -C "$(SRC_DIR)"/build/python_coverage module_documentation # TODO: fix within coverage.py
|
||||
@coverage combine `find . -name .coverage\*`
|
||||
@coverage report -m
|
||||
|
||||
|
||||
# static analyzers (scan-build, clang-tidy, cppcheck)
|
||||
# --------------------------------------------------------------------
|
||||
.PHONY: scan-build px4_sitl_default-clang clang-tidy clang-tidy-fix clang-tidy-quiet
|
||||
.PHONY: cppcheck shellcheck_all validate_module_configs
|
||||
|
||||
scan-build:
|
||||
@export CCC_CC=clang
|
||||
@export CCC_CXX=clang++
|
||||
@rm -rf "$(SRC_DIR)"/build/px4_sitl_default-scan-build
|
||||
@rm -rf "$(SRC_DIR)"/build/scan-build/report_latest
|
||||
@mkdir -p "$(SRC_DIR)"/build/px4_sitl_default-scan-build
|
||||
@cd "$(SRC_DIR)"/build/px4_sitl_default-scan-build && scan-build cmake "$(SRC_DIR)" -GNinja -DCONFIG=px4_sitl_default
|
||||
@scan-build -o "$(SRC_DIR)"/build/scan-build cmake --build "$(SRC_DIR)"/build/px4_sitl_default-scan-build
|
||||
@find "$(SRC_DIR)"/build/scan-build -maxdepth 1 -mindepth 1 -type d -exec cp -r "{}" "$(SRC_DIR)"/build/scan-build/report_latest \;
|
||||
|
||||
px4_sitl_default-clang:
|
||||
@mkdir -p "$(SRC_DIR)"/build/px4_sitl_default-clang
|
||||
@cd "$(SRC_DIR)"/build/px4_sitl_default-clang && cmake "$(SRC_DIR)" $(CMAKE_ARGS) -G"$(PX4_CMAKE_GENERATOR)" -DCONFIG=px4_sitl_default -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
|
||||
@$(PX4_MAKE) -C "$(SRC_DIR)"/build/px4_sitl_default-clang
|
||||
|
||||
clang-tidy: px4_sitl_default-clang
|
||||
@cd "$(SRC_DIR)"/build/px4_sitl_default-clang && "$(SRC_DIR)"/Tools/run-clang-tidy.py -header-filter=".*\.hpp" -j$(j_clang_tidy) -p .
|
||||
|
||||
# to automatically fix a single check at a time, eg modernize-redundant-void-arg
|
||||
# % run-clang-tidy-4.0.py -fix -j4 -checks=-\*,modernize-redundant-void-arg -p .
|
||||
clang-tidy-fix: px4_sitl_default-clang
|
||||
@cd "$(SRC_DIR)"/build/px4_sitl_default-clang && "$(SRC_DIR)"/Tools/run-clang-tidy.py -header-filter=".*\.hpp" -j$(j_clang_tidy) -fix -p .
|
||||
|
||||
# modified version of run-clang-tidy.py to return error codes and only output relevant results
|
||||
clang-tidy-quiet: px4_sitl_default-clang
|
||||
@cd "$(SRC_DIR)"/build/px4_sitl_default-clang && "$(SRC_DIR)"/Tools/run-clang-tidy.py -header-filter=".*\.hpp" -j$(j_clang_tidy) -p .
|
||||
|
||||
# TODO: Fix cppcheck errors then try --enable=warning,performance,portability,style,unusedFunction or --enable=all
|
||||
cppcheck: px4_sitl_default
|
||||
@mkdir -p "$(SRC_DIR)"/build/cppcheck
|
||||
@cppcheck -i"$(SRC_DIR)"/src/examples --enable=performance --std=c++14 --std=c99 --std=posix --project="$(SRC_DIR)"/build/px4_sitl_default/compile_commands.json --xml-version=2 2> "$(SRC_DIR)"/build/cppcheck/cppcheck-result.xml > /dev/null
|
||||
@cppcheck-htmlreport --source-encoding=ascii --file="$(SRC_DIR)"/build/cppcheck/cppcheck-result.xml --report-dir="$(SRC_DIR)"/build/cppcheck --source-dir="$(SRC_DIR)"/src/
|
||||
|
||||
shellcheck_all:
|
||||
@"$(SRC_DIR)"/Tools/run-shellcheck.sh "$(SRC_DIR)"/ROMFS/px4fmu_common/
|
||||
@make px4_fmu-v5_default shellcheck
|
||||
|
||||
validate_module_configs:
|
||||
@find "$(SRC_DIR)"/src/modules "$(SRC_DIR)"/src/drivers "$(SRC_DIR)"/src/lib -name *.yaml -type f \
|
||||
-not -path "$(SRC_DIR)/src/lib/mixer_module/*" \
|
||||
-not -path "$(SRC_DIR)/src/modules/uxrce_dds_client/dds_topics.yaml" \
|
||||
-not -path "$(SRC_DIR)/src/modules/zenoh/zenoh-pico/*" \
|
||||
-not -path "$(SRC_DIR)/src/lib/events/libevents/*" \
|
||||
-not -path "$(SRC_DIR)/src/lib/cdrstream/*" \
|
||||
-not -path "$(SRC_DIR)/src/lib/crypto/libtommath/*" -print0 | \
|
||||
xargs -0 "$(SRC_DIR)"/Tools/validate_yaml.py --schema-file "$(SRC_DIR)"/validation/module_schema.yaml
|
||||
|
||||
# Cleanup
|
||||
# --------------------------------------------------------------------
|
||||
.PHONY: clean submodulesclean submodulesupdate distclean
|
||||
package_firmware:
|
||||
@zip --junk-paths Firmware.zip `find . -name \*.px4`
|
||||
|
||||
clean:
|
||||
@[ ! -d "$(SRC_DIR)/build" ] || find "$(SRC_DIR)/build" -mindepth 1 -maxdepth 1 -type d -exec sh -c "echo {}; cmake --build {} -- clean || rm -rf {}" \; # use generated build system to clean, wipe build directory if it fails
|
||||
@git submodule foreach git clean -dX --force # some submodules generate build artifacts in source
|
||||
@rm -rf build_*/
|
||||
@(cd NuttX/nuttx && make clean)
|
||||
|
||||
submodulesclean:
|
||||
@git submodule foreach --quiet --recursive git clean -ff -x -d
|
||||
@git submodule update --quiet --init --recursive --force || true
|
||||
@git submodule sync --recursive
|
||||
@git submodule update --init --recursive --force --jobs 4
|
||||
@git submodule deinit -f .
|
||||
@git submodule update --init --recursive --force
|
||||
|
||||
submodulesupdate:
|
||||
@git submodule update --quiet --init --recursive --jobs 4 || true
|
||||
@git submodule sync --recursive
|
||||
@git submodule update --init --recursive --jobs 4
|
||||
@git fetch --all --tags --recurse-submodules=yes --jobs=4
|
||||
distclean: submodulesclean
|
||||
@git clean -ff -x -d -e ".project" -e ".cproject"
|
||||
|
||||
distclean:
|
||||
@git submodule deinit --force $(SRC_DIR)
|
||||
@rm -rf "$(SRC_DIR)/build"
|
||||
@git clean --force -X "$(SRC_DIR)/msg/" "$(SRC_DIR)/platforms/" "$(SRC_DIR)/posix-configs/" "$(SRC_DIR)/ROMFS/" "$(SRC_DIR)/src/" "$(SRC_DIR)/test/" "$(SRC_DIR)/Tools/"
|
||||
# targets handled by cmake
|
||||
cmake_targets = install test upload package package_source debug debug_tui debug_ddd debug_io debug_io_tui debug_io_ddd check_weak \
|
||||
run_cmake_config config gazebo gazebo_gdb gazebo_lldb jmavsim replay \
|
||||
jmavsim_gdb jmavsim_lldb gazebo_gdb_iris gazebo_lldb_tailsitter gazebo_iris gazebo_iris_opt_flow gazebo_tailsitter \
|
||||
gazebo_gdb_standard_vtol gazebo_lldb_standard_vtol gazebo_standard_vtol gazebo_plane gazebo_solo gazebo_typhoon_h480
|
||||
$(foreach targ,$(cmake_targets),$(eval $(call cmake-targ,$(targ))))
|
||||
|
||||
# Help / Error / Misc
|
||||
# --------------------------------------------------------------------
|
||||
.PHONY: clean
|
||||
|
||||
# All other targets are handled by PX4_MAKE. Add a rule here to avoid printing an error.
|
||||
%:
|
||||
$(if $(filter $(FIRST_ARG),$@), \
|
||||
$(error "Make target $@ not found. It either does not exist or $@ cannot be the first argument. Use '$(MAKE) list_config_targets' to get a list of all possible [configuration] targets."),@#)
|
||||
CONFIGS:=$(shell ls cmake/configs | sed -e "s~.*/~~" | sed -e "s~\..*~~")
|
||||
|
||||
# Print a list of non-config targets (based on http://stackoverflow.com/a/26339924/1487069)
|
||||
help:
|
||||
@echo "Usage: $(MAKE) <target>"
|
||||
@echo "Where <target> is one of:"
|
||||
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | \
|
||||
awk -v RS= -F: '/(^|\n)# Files(\n|$$)/,/(^|\n)# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | \
|
||||
egrep -v -e '^[^[:alnum:]]' -e '^($(subst $(space),|,$(ALL_CONFIG_TARGETS)))$$' -e '_default$$' -e '^(Makefile)'
|
||||
@echo
|
||||
@echo "Or, $(MAKE) <config_target> [<make_target(s)>]"
|
||||
@echo "Use '$(MAKE) list_config_targets' for a list of configuration targets."
|
||||
|
||||
# Print a list of all config targets.
|
||||
list_config_targets:
|
||||
@for targ in $(patsubst %_default,%[_default],$(ALL_CONFIG_TARGETS)); do echo $$targ; done
|
||||
|
||||
check_nuttx : $(call make_list,nuttx) \
|
||||
sizes
|
||||
|
||||
check_linux : $(call make_list,linux) \
|
||||
sizes
|
||||
|
||||
check_px4: $(call make_list,nuttx,"px4") \
|
||||
sizes
|
||||
|
||||
check_nxp: $(call make_list,nuttx,"nxp") \
|
||||
sizes
|
||||
|
||||
# helpers for running olddefconfig (nuttx) and px4_savedefconfig on all boards
|
||||
.PHONY: all_oldconfig all_px4_savedefconfig
|
||||
all_oldconfig:
|
||||
@for targ in $(ALL_CONFIG_TARGETS); do $(MAKE) $$targ oldconfig; done
|
||||
|
||||
all_px4_savedefconfig:
|
||||
@for targ in $(ALL_CONFIG_TARGETS); do $(MAKE) $$targ px4_savedefconfig; done
|
||||
|
||||
.PHONY: failsafe_web run_failsafe_web_server
|
||||
failsafe_web:
|
||||
@if ! command -v emcc; then echo -e "Install emscripten first: https://emscripten.org/docs/getting_started/downloads.html\nAnd source the env: source <path>/emsdk_env.sh"; exit 1; fi
|
||||
@$(MAKE) --no-print-directory px4_sitl_default failsafe_test parameters_xml \
|
||||
PX4_CMAKE_BUILD_TYPE=Release BUILD_DIR_SUFFIX=_failsafe_web \
|
||||
CMAKE_ARGS="-DCMAKE_CXX_COMPILER=em++ -DCMAKE_C_COMPILER=emcc"
|
||||
run_failsafe_web_server: failsafe_web
|
||||
@cd build/px4_sitl_default_failsafe_web && \
|
||||
python3 -m http.server
|
||||
#help:
|
||||
# @echo
|
||||
# @echo "Type 'make ' and hit the tab key twice to see a list of the available"
|
||||
# @echo "build configurations."
|
||||
# @echo
|
||||
|
||||
Submodule
+1
Submodule NuttX added at 93df871201
@@ -1,139 +1,35 @@
|
||||
# PX4 Drone Autopilot
|
||||
## PX4 Pro Drone Autopilot ##
|
||||
|
||||
[](https://github.com/PX4/PX4-Autopilot/releases) [](https://zenodo.org/badge/latestdoi/22634/PX4/PX4-Autopilot)
|
||||
[](https://github.com/PX4/Firmware/releases) [](https://zenodo.org/badge/latestdoi/22634/PX4/Firmware) [](https://travis-ci.org/PX4/Firmware) [](https://scan.coverity.com/projects/3966?tab=overview)
|
||||
|
||||
[](https://github.com/PX4/PX4-Autopilot/actions?query=workflow%3A%22Nuttx+Targets%22?branch=master) [](https://github.com/PX4/PX4-Autopilot/actions?query=workflow%3A%22SITL+Tests%22)
|
||||
[](https://gitter.im/PX4/Firmware?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
[](https://discord.gg/dronecode)
|
||||
This repository holds the [PX4 Pro](http://px4.io) flight control solution for drones, with the main applications located in the src/modules directory. It also contains the PX4 Drone Middleware Platform, which provides drivers and middleware to run drones.
|
||||
|
||||
This repository holds the [PX4](http://px4.io) flight control solution for drones, with the main applications located in the [src/modules](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules) directory. It also contains the PX4 Drone Middleware Platform, which provides drivers and middleware to run drones.
|
||||
* Official Website: http://px4.io
|
||||
* License: BSD 3-clause (see [LICENSE.md](https://github.com/PX4/Firmware/blob/master/LICENSE.md))
|
||||
* Supported airframes (more experimental are supported):
|
||||
* [Multicopters](http://px4.io/portfolio_category/multicopter/)
|
||||
* [Fixed wing](http://px4.io/portfolio_category/plane/)
|
||||
* [VTOL](http://px4.io/portfolio_category/vtol/)
|
||||
* Releases
|
||||
* [Downloads](https://github.com/PX4/Firmware/releases)
|
||||
|
||||
PX4 is highly portable, OS-independent and supports Linux, NuttX and MacOS out of the box.
|
||||
### Users ###
|
||||
|
||||
* Official Website: http://px4.io (License: BSD 3-clause, [LICENSE](https://github.com/PX4/PX4-Autopilot/blob/main/LICENSE))
|
||||
* [Supported airframes](https://docs.px4.io/main/en/airframes/airframe_reference.html) ([portfolio](https://px4.io/ecosystem/commercial-systems/)):
|
||||
* [Multicopters](https://docs.px4.io/main/en/frames_multicopter/)
|
||||
* [Fixed wing](https://docs.px4.io/main/en/frames_plane/)
|
||||
* [VTOL](https://docs.px4.io/main/en/frames_vtol/)
|
||||
* [Autogyro](https://docs.px4.io/main/en/frames_autogyro/)
|
||||
* [Rover](https://docs.px4.io/main/en/frames_rover/)
|
||||
* many more experimental types (Blimps, Boats, Submarines, High altitude balloons, etc)
|
||||
* Releases: [Downloads](https://github.com/PX4/PX4-Autopilot/releases)
|
||||
Please refer to the [user documentation](http://px4.io) and [user forum](http://discuss.px4.io) for flying drones with the PX4 flight stack.
|
||||
|
||||
### Developers ###
|
||||
|
||||
* [Developer Forum / Mailing list](http://groups.google.com/group/px4users)
|
||||
* [Guide for Contributions](https://github.com/PX4/Firmware/blob/master/CONTRIBUTING.md)
|
||||
* [Developer guide](http://dev.px4.io)
|
||||
|
||||
|
||||
## Building a PX4 based drone, rover, boat or robot
|
||||
|
||||
The [PX4 User Guide](https://docs.px4.io/main/en/) explains how to assemble [supported vehicles](https://docs.px4.io/main/en/airframes/airframe_reference.html) and fly drones with PX4.
|
||||
See the [forum and chat](https://docs.px4.io/main/en/#getting-help) if you need help!
|
||||
|
||||
|
||||
## Changing code and contributing
|
||||
|
||||
This [Developer Guide](https://docs.px4.io/main/en/development/development.html) is for software developers who want to modify the flight stack and middleware (e.g. to add new flight modes), hardware integrators who want to support new flight controller boards and peripherals, and anyone who wants to get PX4 working on a new (unsupported) airframe/vehicle.
|
||||
|
||||
Developers should read the [Guide for Contributions](https://docs.px4.io/main/en/contribute/).
|
||||
See the [forum and chat](https://docs.px4.io/main/en/#getting-help) if you need help!
|
||||
|
||||
|
||||
### Weekly Dev Call
|
||||
|
||||
The PX4 Dev Team syncs up on a [weekly dev call](https://docs.px4.io/main/en/contribute/).
|
||||
|
||||
> **Note** The dev call is open to all interested developers (not just the core dev team). This is a great opportunity to meet the team and contribute to the ongoing development of the platform. It includes a QA session for newcomers. All regular calls are listed in the [Dronecode calendar](https://www.dronecode.org/calendar/).
|
||||
|
||||
|
||||
## Maintenance Team
|
||||
|
||||
Note: This is the source of truth for the active maintainers of PX4 ecosystem.
|
||||
|
||||
| Sector | Maintainer |
|
||||
|---|---|
|
||||
| Founder | [Lorenz Meier](https://github.com/LorenzMeier) |
|
||||
| Architecture | [Daniel Agar](https://github.com/dagar) / [Beat Küng](https://github.com/bkueng)|
|
||||
| State Estimation | [Mathieu Bresciani](https://github.com/bresch) / [Paul Riseborough](https://github.com/priseborough) |
|
||||
| OS/NuttX | [David Sidrane](https://github.com/davids5) |
|
||||
| Drivers | [Daniel Agar](https://github.com/dagar) |
|
||||
| Simulation | [Jaeyoung Lim](https://github.com/Jaeyoung-Lim) |
|
||||
| ROS2 | [Beniamino Pozzan](https://github.com/beniaminopozzan) |
|
||||
| Community QnA Call | [Ramon Roche](https://github.com/mrpollo) |
|
||||
| [Documentation](https://docs.px4.io/main/en/) | [Hamish Willee](https://github.com/hamishwillee) |
|
||||
|
||||
| Vehicle Type | Maintainer |
|
||||
|---|---|
|
||||
| Multirotor | [Matthias Grob](https://github.com/MaEtUgR) |
|
||||
| Fixed Wing | [Thomas Stastny](https://github.com/tstastny) |
|
||||
| Hybrid VTOL | [Silvan Fuhrer](https://github.com/sfuhrer) |
|
||||
| Rover | [Christian Friedrich](https://github.com/chfriedrich98) |
|
||||
| Boat | x |
|
||||
|
||||
|
||||
See also [maintainers list](https://px4.io/community/maintainers/) (px4.io) and the [contributors list](https://github.com/PX4/PX4-Autopilot/graphs/contributors) (Github). However it may be not up to date.
|
||||
|
||||
## Supported Hardware
|
||||
|
||||
Pixhawk standard boards and proprietary boards are shown below (discontinued boards aren't listed).
|
||||
|
||||
For the most up to date information, please visit [PX4 user Guide > Autopilot Hardware](https://docs.px4.io/main/en/flight_controller/).
|
||||
|
||||
### Pixhawk Standard Boards
|
||||
|
||||
These boards fully comply with Pixhawk Standard, and are maintained by the PX4-Autopilot maintainers and Dronecode team
|
||||
|
||||
* FMUv6X and FMUv6C
|
||||
* [CUAV Pixahwk V6X (FMUv6X)](https://docs.px4.io/main/en/flight_controller/cuav_pixhawk_v6x.html)
|
||||
* [Holybro Pixhawk 6X (FMUv6X)](https://docs.px4.io/main/en/flight_controller/pixhawk6x.html)
|
||||
* [Holybro Pixhawk 6C (FMUv6C)](https://docs.px4.io/main/en/flight_controller/pixhawk6c.html)
|
||||
* [Holybro Pix32 v6 (FMUv6C)](https://docs.px4.io/main/en/flight_controller/holybro_pix32_v6.html)
|
||||
* FMUv5 and FMUv5X (STM32F7, 2019/20)
|
||||
* [Pixhawk 4 (FMUv5)](https://docs.px4.io/main/en/flight_controller/pixhawk4.html)
|
||||
* [Pixhawk 4 mini (FMUv5)](https://docs.px4.io/main/en/flight_controller/pixhawk4_mini.html)
|
||||
* [CUAV V5+ (FMUv5)](https://docs.px4.io/main/en/flight_controller/cuav_v5_plus.html)
|
||||
* [CUAV V5 nano (FMUv5)](https://docs.px4.io/main/en/flight_controller/cuav_v5_nano.html)
|
||||
* [Auterion Skynode (FMUv5X)](https://docs.auterion.com/avionics/skynode)
|
||||
* FMUv4 (STM32F4, 2015)
|
||||
* [Pixracer](https://docs.px4.io/main/en/flight_controller/pixracer.html)
|
||||
* [Pixhawk 3 Pro](https://docs.px4.io/main/en/flight_controller/pixhawk3_pro.html)
|
||||
* FMUv3 (STM32F4, 2014)
|
||||
* [Pixhawk 2](https://docs.px4.io/main/en/flight_controller/pixhawk-2.html)
|
||||
* [Pixhawk Mini](https://docs.px4.io/main/en/flight_controller/pixhawk_mini.html)
|
||||
* [CUAV Pixhack v3](https://docs.px4.io/main/en/flight_controller/pixhack_v3.html)
|
||||
* FMUv2 (STM32F4, 2013)
|
||||
* [Pixhawk](https://docs.px4.io/main/en/flight_controller/pixhawk.html)
|
||||
|
||||
### Manufacturer supported
|
||||
|
||||
These boards are maintained to be compatible with PX4-Autopilot by the Manufacturers.
|
||||
|
||||
* [ARK Electronics ARKV6X](https://docs.px4.io/main/en/flight_controller/ark_v6x.html)
|
||||
* [CubePilot Cube Orange+](https://docs.px4.io/main/en/flight_controller/cubepilot_cube_orangeplus.html)
|
||||
* [CubePilot Cube Orange](https://docs.px4.io/main/en/flight_controller/cubepilot_cube_orange.html)
|
||||
* [CubePilot Cube Yellow](https://docs.px4.io/main/en/flight_controller/cubepilot_cube_yellow.html)
|
||||
* [Holybro Durandal](https://docs.px4.io/main/en/flight_controller/durandal.html)
|
||||
* [Airmind MindPX V2.8](http://www.mindpx.net/assets/accessories/UserGuide_MindPX.pdf)
|
||||
* [Airmind MindRacer V1.2](http://mindpx.net/assets/accessories/mindracer_user_guide_v1.2.pdf)
|
||||
* [Holybro Kakute F7](https://docs.px4.io/main/en/flight_controller/kakutef7.html)
|
||||
|
||||
### Community supported
|
||||
|
||||
These boards don't fully comply industry standards, and thus is solely maintained by the PX4 public community members.
|
||||
|
||||
### Experimental
|
||||
|
||||
These boards are not maintained by PX4 team nor Manufacturer, and is not guaranteed to be compatible with up to date PX4 releases.
|
||||
|
||||
* [Raspberry PI with Navio 2](https://docs.px4.io/main/en/flight_controller/raspberry_pi_navio2.html)
|
||||
* [Bitcraze Crazyflie 2.0](https://docs.px4.io/main/en/complete_vehicles/crazyflie2.html)
|
||||
|
||||
## Project Roadmap
|
||||
|
||||
**Note: Outdated**
|
||||
|
||||
A high level project roadmap is available [here](https://github.com/orgs/PX4/projects/25).
|
||||
|
||||
## Project Governance
|
||||
|
||||
The PX4 Autopilot project including all of its trademarks is hosted under [Dronecode](https://www.dronecode.org/), part of the Linux Foundation.
|
||||
|
||||
<a href="https://www.dronecode.org/" style="padding:20px" ><img src="https://mavlink.io/assets/site/logo_dronecode.png" alt="Dronecode Logo" width="110px"/></a>
|
||||
<a href="https://www.linuxfoundation.org/projects" style="padding:20px;"><img src="https://mavlink.io/assets/site/logo_linux_foundation.png" alt="Linux Foundation Logo" width="80px" /></a>
|
||||
<div style="padding:10px"> </div>
|
||||
This repository contains code supporting these boards:
|
||||
* [Snapdragon Flight](http://dev.px4.io/hardware-snapdragon.html)
|
||||
* FMUv1.x
|
||||
* FMUv2.x ([Pixhawk](http://dev.px4.io/hardware-pixhawk.html), Pixhawk 2 and [Pixfalcon](http://dev.px4.io/hardware-pixfalcon.html))
|
||||
* FMUv4.x (Pixhawk X and [Pixracer](http://dev.px4.io/hardware-pixracer.html))
|
||||
* AeroCore (v1 and v2)
|
||||
* STM32F4Discovery (basic support) [Tutorial](https://pixhawk.org/modules/stm32f4discovery)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user