mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-23 21:07:35 +08:00
Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b076cfd4ed | |||
| 6de6235fa9 | |||
| c5ec557a38 | |||
| 106905871d | |||
| c92c90d4d9 | |||
| 7ab48dae57 | |||
| 1fe70b2d6a | |||
| 220f5cc565 | |||
| 4a1d16a06b | |||
| 92e9228fcd | |||
| f8db8650d0 | |||
| 415b366c54 | |||
| 40e804d393 | |||
| 7195ae9ebb | |||
| 6956d85e10 | |||
| 011f4990ff | |||
| 413acc57be | |||
| 0c110a4443 |
@@ -0,0 +1,160 @@
|
||||
#!/usr/bin/env groovy
|
||||
|
||||
pipeline {
|
||||
agent none
|
||||
|
||||
stages {
|
||||
|
||||
stage('Build') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-ros-kinetic:2019-03-08'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'ccache -z'
|
||||
sh 'git fetch --tags'
|
||||
sh 'make px4_sitl_default'
|
||||
sh 'make px4_sitl_default sitl_gazebo'
|
||||
sh 'make px4_sitl_default package'
|
||||
sh 'ccache -s'
|
||||
stash(name: "px4_sitl_package", includes: "build/px4_sitl_default/*.bz2")
|
||||
archiveArtifacts(artifacts: "build/px4_sitl_default/*.bz2", fingerprint: true, onlyIfSuccessful: true)
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
} // stage Build
|
||||
|
||||
stage('ROS Tests') {
|
||||
steps {
|
||||
script {
|
||||
def missions = [
|
||||
[
|
||||
name: "FW",
|
||||
test: "mavros_posix_test_mission.test",
|
||||
mission: "FW_mission_1",
|
||||
vehicle: "plane"
|
||||
],
|
||||
|
||||
[
|
||||
name: "MC_box",
|
||||
test: "mavros_posix_test_mission.test",
|
||||
mission: "MC_mission_box",
|
||||
vehicle: "iris"
|
||||
],
|
||||
[
|
||||
name: "MC_offboard_att",
|
||||
test: "mavros_posix_tests_offboard_attctl.test",
|
||||
mission: "",
|
||||
vehicle: "iris"
|
||||
],
|
||||
[
|
||||
name: "MC_offboard_pos",
|
||||
test: "mavros_posix_tests_offboard_posctl.test",
|
||||
mission: "",
|
||||
vehicle: "iris"
|
||||
],
|
||||
|
||||
[
|
||||
name: "VTOL_standard",
|
||||
test: "mavros_posix_test_mission.test",
|
||||
mission: "VTOL_mission_1",
|
||||
vehicle: "standard_vtol"
|
||||
],
|
||||
[
|
||||
name: "VTOL_tailsitter",
|
||||
test: "mavros_posix_test_mission.test",
|
||||
mission: "VTOL_mission_1",
|
||||
vehicle: "tailsitter"
|
||||
],
|
||||
[
|
||||
name: "VTOL_tiltrotor",
|
||||
test: "mavros_posix_test_mission.test",
|
||||
mission: "VTOL_mission_1",
|
||||
vehicle: "tiltrotor"
|
||||
],
|
||||
[
|
||||
name: "MC_avoidance",
|
||||
test: "mavros_posix_test_avoidance.test",
|
||||
mission: "avoidance",
|
||||
vehicle: "iris_obs_avoid",
|
||||
run_script: "rostest_avoidance_run.sh"
|
||||
],
|
||||
|
||||
]
|
||||
|
||||
def test_nodes = [:]
|
||||
for (def i = 0; i < missions.size(); i++) {
|
||||
test_nodes.put(missions[i].name, createTestNode(missions[i]))
|
||||
}
|
||||
|
||||
parallel test_nodes
|
||||
} // script
|
||||
} // steps
|
||||
} // stage ROS Tests
|
||||
|
||||
} //stages
|
||||
|
||||
environment {
|
||||
CCACHE_DIR = '/tmp/ccache'
|
||||
CI = true
|
||||
}
|
||||
|
||||
options {
|
||||
buildDiscarder(logRotator(numToKeepStr: '10', artifactDaysToKeepStr: '30'))
|
||||
timeout(time: 60, unit: 'MINUTES')
|
||||
}
|
||||
} // pipeline
|
||||
|
||||
def createTestNode(Map test_def) {
|
||||
return {
|
||||
node {
|
||||
cleanWs()
|
||||
docker.image("px4io/px4-dev-ros-kinetic:2019-03-08").inside('-e HOME=${WORKSPACE}') {
|
||||
stage(test_def.name) {
|
||||
def run_script = test_def.get('run_script', 'rostest_px4_run.sh')
|
||||
def test_ok = true
|
||||
sh('export')
|
||||
|
||||
unstash('px4_sitl_package')
|
||||
sh('tar -xjpvf build/px4_sitl_default/px4-px4_sitl_default*.bz2')
|
||||
|
||||
// run test
|
||||
try {
|
||||
sh('px4-px4_sitl_default*/px4/test/' + run_script + ' ' + test_def.test + ' mission:=' + test_def.mission + ' vehicle:=' + test_def.vehicle)
|
||||
|
||||
} catch (exc) {
|
||||
// save all test artifacts for debugging
|
||||
archiveArtifacts(allowEmptyArchive: false, artifacts: '.ros/**/*.ulg, .ros/**/rosunit-*.xml, .ros/**/rostest-*.log')
|
||||
test_ok = false
|
||||
}
|
||||
|
||||
// log analysis
|
||||
// process ekf log data
|
||||
try {
|
||||
sh('px4-px4_sitl_default*/px4/Tools/ecl_ekf/process_logdata_ekf.py .ros/log/*/*.ulg')
|
||||
} catch (exc) {
|
||||
// save log analysis artifacts for debugging
|
||||
archiveArtifacts(allowEmptyArchive: false, artifacts: '.ros/**/*.pdf, .ros/**/*.csv')
|
||||
// FIXME: don't let the script to fail the build
|
||||
// test_ok = false
|
||||
}
|
||||
|
||||
// upload log to flight review (https://logs.px4.io/)
|
||||
sh('px4-px4_sitl_default*/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/log/*/*.ulg')
|
||||
|
||||
if (!test_ok) {
|
||||
error('ROS Test failed')
|
||||
}
|
||||
} // stage
|
||||
cleanWs()
|
||||
} // docker.image
|
||||
} // node
|
||||
} // return
|
||||
} // createTestNode
|
||||
@@ -0,0 +1,153 @@
|
||||
#!/usr/bin/env groovy
|
||||
|
||||
pipeline {
|
||||
agent none
|
||||
|
||||
stages {
|
||||
|
||||
stage('Build') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-ros-kinetic:2019-03-08'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'ccache -z'
|
||||
sh 'git fetch --tags'
|
||||
sh 'make px4_sitl_default'
|
||||
sh 'make px4_sitl_default sitl_gazebo'
|
||||
sh 'make px4_sitl_default package'
|
||||
sh 'ccache -s'
|
||||
stash(name: "px4_sitl_package", includes: "build/px4_sitl_default/*.bz2")
|
||||
//archiveArtifacts(artifacts: "build/px4_sitl_default/*.bz2", fingerprint: true, onlyIfSuccessful: true)
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
} // stage Build
|
||||
|
||||
stage('ROS Tests') {
|
||||
steps {
|
||||
script {
|
||||
def missions = [
|
||||
[
|
||||
name: "FW",
|
||||
test: "mavros_posix_test_mission.test",
|
||||
mission: "FW_mission_1",
|
||||
vehicle: "plane"
|
||||
],
|
||||
|
||||
[
|
||||
name: "MC_box",
|
||||
test: "mavros_posix_test_mission.test",
|
||||
mission: "MC_mission_box",
|
||||
vehicle: "iris"
|
||||
],
|
||||
[
|
||||
name: "MC_offboard_att",
|
||||
test: "mavros_posix_tests_offboard_attctl.test",
|
||||
mission: "",
|
||||
vehicle: "iris"
|
||||
],
|
||||
[
|
||||
name: "MC_offboard_pos",
|
||||
test: "mavros_posix_tests_offboard_posctl.test",
|
||||
mission: "",
|
||||
vehicle: "iris"
|
||||
],
|
||||
|
||||
[
|
||||
name: "VTOL_standard",
|
||||
test: "mavros_posix_test_mission.test",
|
||||
mission: "VTOL_mission_1",
|
||||
vehicle: "standard_vtol"
|
||||
],
|
||||
[
|
||||
name: "VTOL_tailsitter",
|
||||
test: "mavros_posix_test_mission.test",
|
||||
mission: "VTOL_mission_1",
|
||||
vehicle: "tailsitter"
|
||||
],
|
||||
[
|
||||
name: "VTOL_tiltrotor",
|
||||
test: "mavros_posix_test_mission.test",
|
||||
mission: "VTOL_mission_1",
|
||||
vehicle: "tiltrotor"
|
||||
],
|
||||
|
||||
]
|
||||
|
||||
def test_nodes = [:]
|
||||
for (def i = 0; i < missions.size(); i++) {
|
||||
test_nodes.put(missions[i].name, createTestNode(missions[i]))
|
||||
}
|
||||
|
||||
parallel test_nodes
|
||||
} // script
|
||||
} // steps
|
||||
} // stage ROS Tests
|
||||
|
||||
} //stages
|
||||
|
||||
environment {
|
||||
CCACHE_DIR = '/tmp/ccache'
|
||||
CI = true
|
||||
PX4_CMAKE_BUILD_TYPE = 'AddressSanitizer'
|
||||
}
|
||||
|
||||
options {
|
||||
buildDiscarder(logRotator(numToKeepStr: '10', artifactDaysToKeepStr: '30'))
|
||||
timeout(time: 60, unit: 'MINUTES')
|
||||
}
|
||||
} // pipeline
|
||||
|
||||
def createTestNode(Map test_def) {
|
||||
return {
|
||||
node {
|
||||
cleanWs()
|
||||
docker.image("px4io/px4-dev-ros-kinetic:2019-03-08").inside('-e HOME=${WORKSPACE}') {
|
||||
stage(test_def.name) {
|
||||
def test_ok = true
|
||||
sh('export')
|
||||
|
||||
unstash('px4_sitl_package')
|
||||
sh('tar -xjpvf build/px4_sitl_default/px4-px4_sitl_default*.bz2')
|
||||
|
||||
// run test
|
||||
try {
|
||||
sh('px4-px4_sitl_default*/px4/test/rostest_px4_run.sh ' + test_def.test + ' mission:=' + test_def.mission + ' vehicle:=' + test_def.vehicle)
|
||||
|
||||
} catch (exc) {
|
||||
// save all test artifacts for debugging
|
||||
archiveArtifacts(allowEmptyArchive: false, artifacts: '.ros/**/*.ulg, .ros/**/rosunit-*.xml, .ros/**/rostest-*.log')
|
||||
test_ok = false
|
||||
}
|
||||
|
||||
// log analysis
|
||||
// process ekf log data
|
||||
try {
|
||||
sh('px4-px4_sitl_default*/px4/Tools/ecl_ekf/process_logdata_ekf.py .ros/log/*/*.ulg')
|
||||
} catch (exc) {
|
||||
// save log analysis artifacts for debugging
|
||||
archiveArtifacts(allowEmptyArchive: false, artifacts: '.ros/**/*.pdf, .ros/**/*.csv')
|
||||
// FIXME: don't let the script to fail the build
|
||||
// test_ok = false
|
||||
}
|
||||
|
||||
// upload log to flight review (https://logs.px4.io/)
|
||||
sh('px4-px4_sitl_default*/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/log/*/*.ulg')
|
||||
|
||||
if (!test_ok) {
|
||||
error('ROS Test failed')
|
||||
}
|
||||
} // stage
|
||||
cleanWs()
|
||||
} // docker.image
|
||||
} // node
|
||||
} // return
|
||||
} // createTestNode
|
||||
@@ -0,0 +1,182 @@
|
||||
#!/usr/bin/env groovy
|
||||
|
||||
pipeline {
|
||||
agent none
|
||||
|
||||
stages {
|
||||
|
||||
stage('ROS Tests') {
|
||||
steps {
|
||||
script {
|
||||
def missions = [
|
||||
[
|
||||
name: "FW",
|
||||
test: "mavros_posix_test_mission.test",
|
||||
mission: "FW_mission_1",
|
||||
vehicle: "plane"
|
||||
],
|
||||
|
||||
[
|
||||
name: "MC_box",
|
||||
test: "mavros_posix_test_mission.test",
|
||||
mission: "MC_mission_box",
|
||||
vehicle: "iris"
|
||||
],
|
||||
[
|
||||
name: "MC_offboard_att",
|
||||
test: "mavros_posix_tests_offboard_attctl.test",
|
||||
mission: "",
|
||||
vehicle: "iris"
|
||||
],
|
||||
[
|
||||
name: "MC_offboard_pos",
|
||||
test: "mavros_posix_tests_offboard_posctl.test",
|
||||
mission: "",
|
||||
vehicle: "iris"
|
||||
],
|
||||
|
||||
[
|
||||
name: "VTOL_standard",
|
||||
test: "mavros_posix_test_mission.test",
|
||||
mission: "VTOL_mission_1",
|
||||
vehicle: "standard_vtol"
|
||||
],
|
||||
[
|
||||
name: "VTOL_tailsitter",
|
||||
test: "mavros_posix_test_mission.test",
|
||||
mission: "VTOL_mission_1",
|
||||
vehicle: "tailsitter"
|
||||
],
|
||||
[
|
||||
name: "VTOL_tiltrotor",
|
||||
test: "mavros_posix_test_mission.test",
|
||||
mission: "VTOL_mission_1",
|
||||
vehicle: "tiltrotor"
|
||||
],
|
||||
|
||||
]
|
||||
|
||||
def test_nodes = [:]
|
||||
for (def i = 0; i < missions.size(); i++) {
|
||||
test_nodes.put(missions[i].name, createTestNode(missions[i]))
|
||||
}
|
||||
|
||||
parallel test_nodes
|
||||
} // script
|
||||
} // steps
|
||||
} // stage ROS Tests
|
||||
|
||||
stage('Coverage') {
|
||||
parallel {
|
||||
|
||||
stage('code coverage (python)') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-base-bionic:2019-03-08'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'make python_coverage'
|
||||
withCredentials([string(credentialsId: 'FIRMWARE_CODECOV_TOKEN', variable: 'CODECOV_TOKEN')]) {
|
||||
sh 'curl -s https://codecov.io/bash | bash -s - -F python'
|
||||
}
|
||||
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
|
||||
stage('unit tests') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-base-bionic:2019-03-08'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'make px4_sitl_test test_results_junit'
|
||||
withCredentials([string(credentialsId: 'FIRMWARE_CODECOV_TOKEN', variable: 'CODECOV_TOKEN')]) {
|
||||
sh 'curl -s https://codecov.io/bash | bash -s - -F unittest'
|
||||
}
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
|
||||
} // parallel
|
||||
} // stage Coverage
|
||||
|
||||
} //stages
|
||||
|
||||
environment {
|
||||
CCACHE_DIR = '/tmp/ccache'
|
||||
CI = true
|
||||
CTEST_OUTPUT_ON_FAILURE = 1
|
||||
PX4_CMAKE_BUILD_TYPE = 'Coverage'
|
||||
}
|
||||
|
||||
options {
|
||||
buildDiscarder(logRotator(numToKeepStr: '10', artifactDaysToKeepStr: '30'))
|
||||
timeout(time: 60, unit: 'MINUTES')
|
||||
}
|
||||
} // pipeline
|
||||
|
||||
def createTestNode(Map test_def) {
|
||||
return {
|
||||
node {
|
||||
cleanWs()
|
||||
docker.image("px4io/px4-dev-ros-kinetic:2019-03-08").inside('-e HOME=${WORKSPACE}') {
|
||||
stage(test_def.name) {
|
||||
def test_ok = true
|
||||
sh('export')
|
||||
|
||||
checkout(scm)
|
||||
|
||||
// run test
|
||||
try {
|
||||
sh('make distclean')
|
||||
sh('ccache -z')
|
||||
sh('make px4_sitl_default')
|
||||
sh('make px4_sitl_default sitl_gazebo')
|
||||
sh('ccache -s')
|
||||
sh('make rostest_run TEST_FILE=' + test_def.test + ' TEST_MISSION=' + test_def.mission + ' TEST_VEHICLE=' + test_def.vehicle)
|
||||
} catch (exc) {
|
||||
// save all test artifacts for debugging
|
||||
archiveArtifacts(allowEmptyArchive: false, artifacts: '.ros/**/*.ulg, .ros/**/rosunit-*.xml, .ros/**/rostest-*.log')
|
||||
test_ok = false
|
||||
}
|
||||
|
||||
// log analysis
|
||||
withCredentials([string(credentialsId: 'FIRMWARE_CODECOV_TOKEN', variable: 'CODECOV_TOKEN')]) {
|
||||
sh 'curl -s https://codecov.io/bash | bash -s - -F sitl_mission_${STAGE_NAME}'
|
||||
|
||||
// process log data (with python code coverage)
|
||||
try {
|
||||
//sh('coverage run -p Tools/ecl_ekf/process_logdata_ekf.py .ros/log/*/*.ulg')
|
||||
sh('Tools/ecl_ekf/process_logdata_ekf.py .ros/log/*/*.ulg')
|
||||
} catch (exc) {
|
||||
// save log analysis artifacts for debugging
|
||||
archiveArtifacts(allowEmptyArchive: false, artifacts: '.ros/**/*.pdf, .ros/**/*.csv')
|
||||
// FIXME: don't let the script to fail the build
|
||||
// test_ok = false
|
||||
}
|
||||
|
||||
// upload log to flight review (https://logs.px4.io/) with python code coverage
|
||||
sh('coverage run -p Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/log/*/*.ulg')
|
||||
|
||||
// upload python code coverage to codecov.io
|
||||
sh 'curl -s https://codecov.io/bash | bash -s - -X gcov -F sitl_python_${STAGE_NAME}'
|
||||
}
|
||||
|
||||
if (!test_ok) {
|
||||
error('ROS Test failed')
|
||||
}
|
||||
} // stage
|
||||
cleanWs()
|
||||
} // docker.image
|
||||
} // node
|
||||
} // return
|
||||
} // createTestNode
|
||||
@@ -0,0 +1,153 @@
|
||||
#!/usr/bin/env groovy
|
||||
|
||||
pipeline {
|
||||
agent none
|
||||
stages {
|
||||
|
||||
stage('Build') {
|
||||
steps {
|
||||
script {
|
||||
def build_nodes = [:]
|
||||
def docker_images = [
|
||||
armhf: "px4io/px4-dev-armhf:2019-03-08",
|
||||
base: "px4io/px4-dev-base-bionic:2019-03-08",
|
||||
nuttx: "px4io/px4-dev-nuttx:2019-03-08",
|
||||
ros: "px4io/px4-dev-ros-kinetic:2019-03-08",
|
||||
rpi: "px4io/px4-dev-raspi:2019-03-08",
|
||||
snapdragon: "lorenzmeier/px4-dev-snapdragon:2018-09-12"
|
||||
]
|
||||
|
||||
def armhf_builds = [
|
||||
target: ["aerotenna_ocpoc_ubuntu"],
|
||||
image: docker_images.armhf,
|
||||
archive: false
|
||||
]
|
||||
|
||||
def base_builds = [
|
||||
target: ["px4_sitl_rtps"],
|
||||
image: docker_images.base,
|
||||
archive: false
|
||||
]
|
||||
|
||||
def nuttx_builds_archive = [
|
||||
target: [
|
||||
"px4_fmu-v2_default", "px4_fmu-v2_fixedwing", "px4_fmu-v2_lpe", "px4_fmu-v2_multicopter", "px4_fmu-v2_rover", "px4_fmu-v2_test",
|
||||
"px4_fmu-v3_default",
|
||||
"px4_fmu-v4_default",
|
||||
"px4_fmu-v4pro_default",
|
||||
"px4_fmu-v5_default", "px4_fmu-v5_fixedwing", "px4_fmu-v5_multicopter", "px4_fmu-v5_rover", "px4_fmu-v5_rtps", "px4_fmu-v5_stackcheck",
|
||||
"intel_aerofc-v1_default", "auav_x21_default", "av_x-v1_default", "bitcraze_crazyflie_default", "airmind_mindpx-v2_default",
|
||||
"nxp_fmuk66-v3_default", "omnibus_f4sd_default"],
|
||||
image: docker_images.nuttx,
|
||||
archive: true
|
||||
]
|
||||
|
||||
def nuttx_builds_other = [
|
||||
target: ["px4_cannode-v1_default", "px4_esc-v1_default", "thiemar_s2740vc-v1_default"],
|
||||
image: docker_images.nuttx,
|
||||
archive: false
|
||||
]
|
||||
|
||||
def rpi_builds = [
|
||||
target: ["emlid_navio2_cross", "parrot_bebop_default"],
|
||||
image: docker_images.rpi,
|
||||
archive: false
|
||||
]
|
||||
|
||||
def snapdragon_builds = [
|
||||
target: ["atlflight_eagle_qurt-default", "atlflight_eagle_default"],
|
||||
image: docker_images.snapdragon,
|
||||
archive: false
|
||||
]
|
||||
|
||||
def docker_builds = [
|
||||
armhf_builds, base_builds, nuttx_builds_archive, nuttx_builds_other, rpi_builds, snapdragon_builds
|
||||
]
|
||||
|
||||
for (def build_type = 0; build_type < docker_builds.size(); build_type++) {
|
||||
for (def build_target = 0; build_target < docker_builds[build_type].target.size(); build_target++) {
|
||||
build_nodes.put(docker_builds[build_type].target[build_target],
|
||||
createBuildNode(docker_builds[build_type].archive, docker_builds[build_type].image, docker_builds[build_type].target[build_target])
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
parallel build_nodes
|
||||
|
||||
} // script
|
||||
} // steps
|
||||
} // stage Build
|
||||
|
||||
// TODO: actually upload artifacts to S3
|
||||
// stage('S3 Upload') {
|
||||
// agent {
|
||||
// docker { image 'px4io/px4-dev-base-bionic:2019-03-08' }
|
||||
// }
|
||||
// options {
|
||||
// skipDefaultCheckout()
|
||||
// }
|
||||
// when {
|
||||
// anyOf {
|
||||
// branch 'master'
|
||||
// branch 'beta'
|
||||
// branch 'stable'
|
||||
// branch 'pr-jenkins' // for testing
|
||||
// }
|
||||
// }
|
||||
// steps {
|
||||
// sh 'echo "uploading to S3"'
|
||||
// }
|
||||
// }
|
||||
|
||||
} // stages
|
||||
environment {
|
||||
CCACHE_DIR = '/tmp/ccache'
|
||||
CI = true
|
||||
}
|
||||
options {
|
||||
buildDiscarder(logRotator(numToKeepStr: '2', artifactDaysToKeepStr: '14'))
|
||||
timeout(time: 60, unit: 'MINUTES')
|
||||
}
|
||||
}
|
||||
|
||||
def createBuildNode(Boolean archive, String docker_image, String target) {
|
||||
return {
|
||||
|
||||
// TODO: fix the snapdragon image
|
||||
bypass_entrypoint = ''
|
||||
if (docker_image == 'lorenzmeier/px4-dev-snapdragon:2018-09-12') {
|
||||
bypass_entrypoint = ' --entrypoint=""'
|
||||
}
|
||||
|
||||
node {
|
||||
docker.withRegistry('https://registry.hub.docker.com', 'docker_hub_dagar') {
|
||||
docker.image(docker_image).inside('-e CCACHE_BASEDIR=${WORKSPACE} -v ${CCACHE_DIR}:${CCACHE_DIR}:rw' + bypass_entrypoint) {
|
||||
stage(target) {
|
||||
try {
|
||||
sh('export')
|
||||
checkout(scm)
|
||||
sh('make distclean')
|
||||
sh('git fetch --tags')
|
||||
sh('ccache -z')
|
||||
sh('make ' + target)
|
||||
sh('ccache -s')
|
||||
sh('make sizes')
|
||||
if (archive) {
|
||||
archiveArtifacts(allowEmptyArchive: false, artifacts: 'build/*/*.px4, build/*/*.elf, build/*/*.bin', fingerprint: true, onlyIfSuccessful: true)
|
||||
}
|
||||
sh('make ' + target + ' package')
|
||||
archiveArtifacts(allowEmptyArchive: true, artifacts: 'build/*/*.tar.bz2', fingerprint: true, onlyIfSuccessful: true)
|
||||
archiveArtifacts(allowEmptyArchive: true, artifacts: 'build/*/*.deb', fingerprint: true, onlyIfSuccessful: true)
|
||||
}
|
||||
catch (exc) {
|
||||
throw (exc)
|
||||
}
|
||||
finally {
|
||||
sh('make distclean')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
#!/usr/bin/env groovy
|
||||
|
||||
pipeline {
|
||||
agent none
|
||||
stages {
|
||||
|
||||
stage('Build') {
|
||||
|
||||
parallel {
|
||||
|
||||
stage('px4_sitl_default (OSX)') {
|
||||
agent {
|
||||
label 'mac'
|
||||
}
|
||||
environment {
|
||||
CCACHE_BASEDIR = "${env.WORKSPACE}"
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'ccache -z'
|
||||
sh 'make px4_sitl_default'
|
||||
sh 'ccache -s'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
} // stage px4_sitl_default
|
||||
|
||||
stage('px4_fmu-v5_default (OSX)') {
|
||||
agent {
|
||||
label 'mac'
|
||||
}
|
||||
environment {
|
||||
CCACHE_BASEDIR = "${env.WORKSPACE}"
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'ccache -z'
|
||||
sh 'make px4_fmu-v5_default'
|
||||
sh 'ccache -s'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
} // stage px4_fmu-v5_default
|
||||
|
||||
stage('sitl tests (OSX)') {
|
||||
agent {
|
||||
label 'mac'
|
||||
}
|
||||
environment {
|
||||
CCACHE_BASEDIR = "${env.WORKSPACE}"
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'ccache -z'
|
||||
sh 'make tests'
|
||||
sh 'ccache -s'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
} // stage sitl tests
|
||||
|
||||
} // parallel
|
||||
} // stage Build
|
||||
|
||||
} // stages
|
||||
environment {
|
||||
CCACHE_CPP2 = '1'
|
||||
CCACHE_DIR = '/tmp/ccache'
|
||||
CI = true
|
||||
}
|
||||
options {
|
||||
buildDiscarder(logRotator(numToKeepStr: '10', artifactDaysToKeepStr: '30'))
|
||||
timeout(time: 120, unit: 'MINUTES')
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,366 @@
|
||||
#!/usr/bin/env groovy
|
||||
|
||||
pipeline {
|
||||
agent none
|
||||
stages {
|
||||
|
||||
stage('Build') {
|
||||
|
||||
parallel {
|
||||
|
||||
stage('px4_fmu-v2_test') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx:2019-03-08'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'ccache -z'
|
||||
sh 'git fetch --tags'
|
||||
sh 'make px4_fmu-v2_default'
|
||||
sh 'make sizes'
|
||||
sh 'ccache -s'
|
||||
stash includes: 'build/px4_fmu-v2_default/px4_fmu-v2_default.elf', name: 'px4_fmu-v2_test'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('px4_fmu-v3_default') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx:2019-03-08'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'ccache -z'
|
||||
sh 'git fetch --tags'
|
||||
sh 'make px4_fmu-v3_default'
|
||||
sh 'make sizes'
|
||||
sh 'ccache -s'
|
||||
stash includes: 'build/px4_fmu-v3_default/px4_fmu-v3_default.elf', name: 'px4_fmu-v3_default'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('px4_fmu-v4_default') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx:2019-03-08'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'ccache -z'
|
||||
sh 'git fetch --tags'
|
||||
sh 'make px4_fmu-v4_default'
|
||||
sh 'make sizes'
|
||||
sh 'ccache -s'
|
||||
stash includes: 'build/px4_fmu-v4_default/px4_fmu-v4_default.elf', name: 'px4_fmu-v4_default'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('px4_fmu-v4pro_default') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx:2019-03-08'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'ccache -z'
|
||||
sh 'git fetch --tags'
|
||||
sh 'make px4_fmu-v4pro_default'
|
||||
sh 'make sizes'
|
||||
sh 'ccache -s'
|
||||
stash includes: 'build/px4_fmu-v4pro_default/px4_fmu-v4pro_default.elf', name: 'px4_fmu-v4pro_default'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('px4_fmu-v5_default') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx:2019-03-08'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'ccache -z'
|
||||
sh 'git fetch --tags'
|
||||
sh 'make px4_fmu-v5_default'
|
||||
sh 'make sizes'
|
||||
sh 'ccache -s'
|
||||
stash includes: 'build/px4_fmu-v5_default/px4_fmu-v5_default.elf', name: 'px4_fmu-v5_default'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('px4_fmu-v5_stackcheck') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx:2019-03-08'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'ccache -z'
|
||||
sh 'git fetch --tags'
|
||||
sh 'make px4_fmu-v5_stackcheck'
|
||||
sh 'make sizes'
|
||||
sh 'ccache -s'
|
||||
stash includes: 'build/px4_fmu-v5_stackcheck/px4_fmu-v5_stackcheck.elf', name: 'px4_fmu-v5_stackcheck'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('nxp_fmuk66-v3_default') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx:2019-03-08'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'ccache -z'
|
||||
sh 'git fetch --tags'
|
||||
sh 'make nxp_fmuk66-v3_default'
|
||||
sh 'make sizes'
|
||||
sh 'ccache -s'
|
||||
stash includes: 'build/nxp_fmuk66-v3_default/nxp_fmuk66-v3_default.elf', name: 'nxp_fmuk66-v3_default'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // parallel
|
||||
} // stage Build
|
||||
|
||||
stage('Flash and Run') {
|
||||
|
||||
parallel {
|
||||
|
||||
stage('px4_fmu-v2_test') {
|
||||
agent {
|
||||
label 'px4_fmu-v2'
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
try {
|
||||
sh 'export'
|
||||
sh 'find /dev/serial'
|
||||
unstash 'px4_fmu-v2_test'
|
||||
sh 'platforms/nuttx/Debug/jlink_gdb_upload.sh build/px4_fmu-v2_test/px4_fmu-v2_test.elf'
|
||||
sh './Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-FTDI_*` --baudrate 57600'
|
||||
//sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_*`'
|
||||
} catch (Exception err) {
|
||||
// always report passed for now
|
||||
currentBuild.result = 'SUCCESS'
|
||||
}
|
||||
} // script
|
||||
}
|
||||
options {
|
||||
timeout(time: 600, unit: 'SECONDS')
|
||||
}
|
||||
}
|
||||
|
||||
stage('px4_fmu-v3_default') {
|
||||
agent {
|
||||
label 'px4_fmu-v3'
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
try {
|
||||
sh 'export'
|
||||
sh 'find /dev/serial'
|
||||
unstash 'px4_fmu-v3_default'
|
||||
sh 'platforms/nuttx/Debug/jlink_gdb_upload.sh build/px4_fmu-v3_default/px4_fmu-v3_default.elf'
|
||||
sh './Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-FTDI_*` --baudrate 57600'
|
||||
sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_*`'
|
||||
} catch (Exception err) {
|
||||
// always report passed for now
|
||||
currentBuild.result = 'SUCCESS'
|
||||
}
|
||||
} // script
|
||||
}
|
||||
options {
|
||||
timeout(time: 600, unit: 'SECONDS')
|
||||
}
|
||||
}
|
||||
|
||||
stage('px4_fmu-v4_default') {
|
||||
agent {
|
||||
label 'px4_fmu-v4'
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
try {
|
||||
sh 'export'
|
||||
sh 'find /dev/serial'
|
||||
unstash 'px4_fmu-v4_default'
|
||||
sh 'platforms/nuttx/Debug/jlink_gdb_upload.sh build/px4_fmu-v4_default/px4_fmu-v4_default.elf'
|
||||
sh './Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-FTDI_*` --baudrate 57600'
|
||||
sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_*`'
|
||||
} catch (Exception err) {
|
||||
// always report passed for now
|
||||
currentBuild.result = 'SUCCESS'
|
||||
}
|
||||
} // script
|
||||
}
|
||||
options {
|
||||
timeout(time: 600, unit: 'SECONDS')
|
||||
}
|
||||
}
|
||||
|
||||
stage('px4_fmu-v4pro_default') {
|
||||
agent {
|
||||
label 'px4_fmu-v4pro'
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
try {
|
||||
sh 'export'
|
||||
sh 'find /dev/serial'
|
||||
unstash 'px4_fmu-v4pro_default'
|
||||
sh 'platforms/nuttx/Debug/jlink_gdb_upload.sh build/px4_fmu-v4pro_default/px4_fmu-v4pro_default.elf'
|
||||
sh './Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-FTDI_*` --baudrate 57600'
|
||||
sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_*`'
|
||||
} catch (Exception err) {
|
||||
// always report passed for now
|
||||
currentBuild.result = 'SUCCESS'
|
||||
}
|
||||
} // script
|
||||
}
|
||||
options {
|
||||
timeout(time: 600, unit: 'SECONDS')
|
||||
}
|
||||
}
|
||||
|
||||
stage('px4_fmu-v5_default') {
|
||||
agent {
|
||||
label 'px4_fmu-v5'
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
try {
|
||||
sh 'export'
|
||||
sh 'find /dev/serial'
|
||||
unstash 'px4_fmu-v5_default'
|
||||
sh './platforms/nuttx/Debug/jlink_gdb_upload.sh build/px4_fmu-v5_default/px4_fmu-v5_default.elf'
|
||||
sh './Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-FTDI_*` --baudrate 57600'
|
||||
sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_*`'
|
||||
} catch (Exception err) {
|
||||
// always report passed for now
|
||||
currentBuild.result = 'SUCCESS'
|
||||
}
|
||||
} // script
|
||||
}
|
||||
options {
|
||||
timeout(time: 600, unit: 'SECONDS')
|
||||
}
|
||||
}
|
||||
|
||||
stage('px4_fmu-v5_stackcheck') {
|
||||
agent {
|
||||
label 'px4_fmu-v5'
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
try {
|
||||
sh 'export'
|
||||
sh 'find /dev/serial'
|
||||
unstash 'px4_fmu-v5_stackcheck'
|
||||
sh './platforms/nuttx/Debug/jlink_gdb_upload.sh build/px4_fmu-v5_stackcheck/px4_fmu-v5_stackcheck.elf'
|
||||
sh './Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-FTDI_*` --baudrate 57600'
|
||||
sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_*`'
|
||||
} catch (Exception err) {
|
||||
// always report passed for now
|
||||
currentBuild.result = 'SUCCESS'
|
||||
}
|
||||
} // script
|
||||
}
|
||||
options {
|
||||
timeout(time: 600, unit: 'SECONDS')
|
||||
}
|
||||
}
|
||||
|
||||
stage('nxp_fmuk66-v3_default') {
|
||||
agent {
|
||||
label 'nxp_fmuk66-v3'
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
try {
|
||||
sh 'export'
|
||||
sh 'find /dev/serial'
|
||||
unstash 'nxp_fmuk66-v3_default'
|
||||
sh './platforms/nuttx/Debug/jlink_gdb_upload.sh build/nxp_fmuk66-v3_default/nxp_fmuk66-v3_default.elf'
|
||||
sh './Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-FTDI*` --baudrate 57600'
|
||||
sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_*`'
|
||||
} catch (Exception err) {
|
||||
// always report passed for now
|
||||
currentBuild.result = 'SUCCESS'
|
||||
}
|
||||
} // script
|
||||
}
|
||||
options {
|
||||
timeout(time: 600, unit: 'SECONDS')
|
||||
}
|
||||
}
|
||||
|
||||
} // parallel
|
||||
} // stage Flash
|
||||
|
||||
} // stages
|
||||
environment {
|
||||
CCACHE_DIR = '/tmp/ccache'
|
||||
CI = true
|
||||
}
|
||||
options {
|
||||
buildDiscarder(logRotator(numToKeepStr: '20', artifactDaysToKeepStr: '30'))
|
||||
timeout(time: 60, unit: 'MINUTES')
|
||||
}
|
||||
}
|
||||
+82
-183
@@ -1,190 +1,89 @@
|
||||
---
|
||||
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,
|
||||
-altera-struct-pack-align,
|
||||
-bugprone-easily-swappable-parameters,
|
||||
-concurrency-mt-unsafe,
|
||||
-cppcoreguidelines-avoid-const-or-ref-data-members,
|
||||
-cppcoreguidelines-macro-usage,
|
||||
-cppcoreguidelines-non-private-member-variables-in-classes,
|
||||
-hicpp-uppercase-literal-suffix,
|
||||
-llvm-qualified-auto,
|
||||
-misc-non-private-member-variables-in-classes,
|
||||
-misc-use-anonymous-namespace,
|
||||
-modernize-concat-nested-namespaces,
|
||||
-readability-const-return-type,
|
||||
-readability-identifier-length,
|
||||
-readability-isolate-declaration,
|
||||
-readability-qualified-auto,
|
||||
-readability-redundant-access-specifiers,
|
||||
-cppcoreguidelines-avoid-do-while,
|
||||
-misc-include-cleaner,
|
||||
-misc-const-correctness,
|
||||
-llvm-else-after-return,
|
||||
-readability-function-cognitive-complexity,
|
||||
-cppcoreguidelines-init-variables,
|
||||
-bugprone-reserved-identifier,
|
||||
-cert-dcl37-c,
|
||||
-cert-dcl51-cpp,
|
||||
-modernize-use-nodiscard,
|
||||
-misc-confusable-identifiers,
|
||||
-cert-err33-c,
|
||||
-readability-redundant-inline-specifier,
|
||||
-readability-uppercase-literal-suffix,
|
||||
-bugprone-narrowing-conversions,
|
||||
-cppcoreguidelines-narrowing-conversions,
|
||||
-bugprone-switch-missing-default-case,
|
||||
-cppcoreguidelines-avoid-goto,
|
||||
-hicpp-avoid-goto,
|
||||
-bugprone-branch-clone,
|
||||
-performance-enum-size,
|
||||
-readability-avoid-nested-conditional-operator,
|
||||
-cppcoreguidelines-prefer-member-initializer,
|
||||
-cppcoreguidelines-explicit-virtual-functions,
|
||||
-readability-convert-member-functions-to-static,
|
||||
-readability-make-member-function-const,
|
||||
-bugprone-implicit-widening-of-multiplication-result,
|
||||
-bugprone-multi-level-implicit-pointer-conversion,
|
||||
-bugprone-signed-char-misuse,
|
||||
-cppcoreguidelines-avoid-non-const-global-variables,
|
||||
-cppcoreguidelines-use-default-member-init,
|
||||
-hicpp-multiway-paths-covered,
|
||||
-hicpp-named-parameter,
|
||||
-misc-header-include-cycle,
|
||||
-misc-no-recursion,
|
||||
-performance-no-int-to-ptr,
|
||||
-readability-avoid-return-with-void-value,
|
||||
-readability-avoid-unconditional-preprocessor-if,
|
||||
-readability-delete-null-pointer,
|
||||
-readability-redundant-casting,
|
||||
-readability-redundant-member-init,
|
||||
-readability-reference-to-constructed-temporary,
|
||||
-readability-simplify-boolean-expr,
|
||||
-cert-msc32-c,
|
||||
-cert-msc33-c,
|
||||
-cert-msc51-cpp,
|
||||
-cert-str34-c,
|
||||
-cppcoreguidelines-macro-to-enum,
|
||||
-modernize-macro-to-enum,
|
||||
-abseil-string-find-str-contains,
|
||||
-bugprone-suspicious-include,
|
||||
-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,
|
||||
-clang-analyzer-optin.core.EnumCastOutOfRange,
|
||||
-modernize-type-traits,
|
||||
-misc-definitions-in-headers,
|
||||
-bugprone-casting-through-void,
|
||||
-readability-redundant-string-init,
|
||||
'
|
||||
Checks: '*
|
||||
,-cert-dcl50-cpp
|
||||
,-cert-env33-c
|
||||
,-cert-err34-c
|
||||
,-cert-err58-cpp
|
||||
,-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.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-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
|
||||
,-google-build-using-namespace
|
||||
,-google-explicit-constructor
|
||||
,-google-global-names-in-headers
|
||||
,-google-readability-casting
|
||||
,-google-readability-namespace-comments
|
||||
,-google-readability-todo
|
||||
,-google-runtime-int
|
||||
,-google-runtime-references
|
||||
,-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-use-auto
|
||||
,-modernize-use-bool-literals
|
||||
,-modernize-use-default-member-init
|
||||
,-modernize-use-emplace
|
||||
,-modernize-use-equals-default
|
||||
,-modernize-use-equals-delete
|
||||
,-modernize-use-override
|
||||
,-modernize-use-using
|
||||
,-modernize-pass-by-value
|
||||
,-performance-inefficient-string-concatenation
|
||||
,-readability-avoid-const-params-in-decls
|
||||
,-readability-else-after-return
|
||||
,-readability-implicit-bool-cast
|
||||
,-readability-inconsistent-declaration-parameter-name
|
||||
,-readability-non-const-parameter
|
||||
,-readability-redundant-declaration
|
||||
,-readability-redundant-member-init
|
||||
,-readability-simplify-boolean-expr
|
||||
'
|
||||
WarningsAsErrors: '*'
|
||||
CheckOptions:
|
||||
CheckOptions:
|
||||
- key: google-readability-braces-around-statements.ShortStatementLines
|
||||
value: '1'
|
||||
- key: google-readability-function-size.BranchThreshold
|
||||
value: '600'
|
||||
- key: google-readability-function-size.LineThreshold
|
||||
value: '4000'
|
||||
- key: google-readability-function-size.StatementThreshold
|
||||
value: '4000'
|
||||
...
|
||||
- key: readability-braces-around-statements.ShortStatementLines
|
||||
value: '1'
|
||||
- key: readability-function-size.LineThreshold
|
||||
value: '4000'
|
||||
- key: readability-function-size.StatementThreshold
|
||||
value: '4000'
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
---
|
||||
name: commit
|
||||
description: Create a conventional commit for PX4 changes
|
||||
disable-model-invocation: true
|
||||
argument-hint: "[optional: description of changes]"
|
||||
allowed-tools: Bash, Read, Glob, Grep
|
||||
---
|
||||
|
||||
# PX4 Conventional Commit
|
||||
|
||||
Create a git commit: `type(scope): description`
|
||||
|
||||
**NEVER add Co-Authored-By lines. No Claude attribution in commits.**
|
||||
|
||||
Follow [CONTRIBUTING.md](../../CONTRIBUTING.md) for full project conventions.
|
||||
|
||||
## Steps
|
||||
|
||||
1. **Read [CONTRIBUTING.md](../../CONTRIBUTING.md)** for commit message format, types, scopes, and conventions.
|
||||
2. Check branch (`git branch --show-current`). If on `main`, create a feature branch. Use `<username>/<description>` format where `<username>` comes from `gh api user --jq .login`. If unavailable, just use `<description>`.
|
||||
3. Run `git status` and `git diff --staged`. If nothing staged, ask what to stage.
|
||||
4. Follow the commit message convention from CONTRIBUTING.md: pick the correct **type** and **scope**, write a concise imperative description.
|
||||
5. Body (if needed): explain **why**, not what.
|
||||
6. Run `make format` or `./Tools/astyle/fix_code_style.sh <file>` on changed C/C++ files before committing.
|
||||
7. Check if GPG signing is available: `git config --get user.signingkey`. If set, use `git commit -S -s`. Otherwise, use `git commit -s`.
|
||||
8. Stage and commit. No `Co-Authored-By`.
|
||||
|
||||
If the user provided arguments, use them as context: $ARGUMENTS
|
||||
@@ -1,24 +0,0 @@
|
||||
---
|
||||
name: pr
|
||||
description: Create a pull request with conventional commit title and description
|
||||
disable-model-invocation: true
|
||||
argument-hint: "[optional: target branch or description]"
|
||||
allowed-tools: Bash, Read, Glob, Grep
|
||||
---
|
||||
|
||||
# PX4 Pull Request
|
||||
|
||||
**No Claude attribution anywhere (no Co-Authored-By, no "Generated with Claude").**
|
||||
|
||||
Follow [CONTRIBUTING.md](../../CONTRIBUTING.md) for full project conventions.
|
||||
|
||||
## Steps
|
||||
|
||||
1. Check branch. If on `main`, create a feature branch. Use `<username>/<description>` format where `<username>` comes from `gh api user --jq .login`. If unavailable, just use `<description>`.
|
||||
2. Gather context: `git status`, `git log --oneline main..HEAD`, `git diff main...HEAD --stat`, check if remote tracking branch exists.
|
||||
3. PR **title**: `type(scope): description` — under 72 chars, describes the overall change across all commits. This becomes the squash-merge commit message.
|
||||
4. PR **body**: brief summary + bullet points for key changes. No filler.
|
||||
5. Push with `-u` if needed, then `gh pr create`. Default base is `main` unless user says otherwise.
|
||||
6. Return the PR URL.
|
||||
|
||||
If the user provided arguments, use them as context: $ARGUMENTS
|
||||
@@ -1,73 +0,0 @@
|
||||
---
|
||||
name: rebase-onto-main
|
||||
description: Rebase a branch onto main, handling squash-merged parent branches cleanly
|
||||
argument-hint: "[optional: branch name, defaults to current branch]"
|
||||
allowed-tools: Bash, Read, Glob, Grep, Agent
|
||||
---
|
||||
|
||||
# Rebase Branch onto Main
|
||||
|
||||
Rebase the current (or specified) branch onto `main`, correctly handling the case where the branch was built on top of another branch that has since been squash-merged into `main`.
|
||||
|
||||
## Background
|
||||
|
||||
When a parent branch is squash-merged, its individual commits become a single new commit on `main` with a different hash. A normal `git rebase main` will try to replay the parent's original commits, causing messy conflicts. The fix is to **cherry-pick only the commits unique to this branch** onto a fresh branch from `main`.
|
||||
|
||||
## Steps
|
||||
|
||||
1. **Identify the branch.** Use `$ARGUMENTS` if provided, otherwise use the current branch.
|
||||
|
||||
2. **Fetch and update main:**
|
||||
```
|
||||
git fetch origin main:main
|
||||
```
|
||||
|
||||
3. **Find the merge base** between the branch and `main`:
|
||||
```
|
||||
git merge-base <branch> main
|
||||
```
|
||||
|
||||
4. **List all commits** on the branch since the merge base:
|
||||
```
|
||||
git log --oneline <merge-base>..<branch>
|
||||
```
|
||||
|
||||
5. **Identify which commits are unique to this branch** vs. inherited from a parent branch. Look for:
|
||||
- Squash-merged commits on `main` that correspond to a group of commits at the bottom of the branch's history (check PR titles, commit message keywords).
|
||||
- The boundary commit: the first commit that belongs to *this* branch's work, not the parent's.
|
||||
- If ALL commits are unique (no parent branch), just do a normal `git rebase main` and skip the rest.
|
||||
|
||||
6. **Create a fresh branch from `main`:**
|
||||
```
|
||||
git checkout -b <branch>-rebase main
|
||||
```
|
||||
|
||||
7. **Cherry-pick only the unique commits** (oldest first):
|
||||
```
|
||||
git cherry-pick <first-unique-commit>^..<branch>
|
||||
```
|
||||
The `A^..B` range means "from the parent of A through B inclusive."
|
||||
|
||||
8. **Handle conflicts** if any arise during cherry-pick. Resolve and `git cherry-pick --continue`.
|
||||
|
||||
9. **Replace the old branch:**
|
||||
```
|
||||
git branch -m <branch> <branch>-old
|
||||
git branch -m <branch>-rebase <branch>
|
||||
```
|
||||
|
||||
10. **Verify** the result:
|
||||
```
|
||||
git log --oneline main..<branch>
|
||||
```
|
||||
Confirm only the expected commits are present.
|
||||
|
||||
11. **Ask the user** before force-pushing. When approved:
|
||||
```
|
||||
git push origin <branch> --force-with-lease
|
||||
```
|
||||
|
||||
12. **Clean up** the old branch:
|
||||
```
|
||||
git branch -D <branch>-old
|
||||
```
|
||||
@@ -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,22 +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
|
||||
|
||||
[*.sh]
|
||||
indent_style = tab
|
||||
indent_size = 2
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
# Not in the official standard, but supported by many editors
|
||||
max_line_length = 80
|
||||
@@ -1,80 +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
|
||||
*.hex binary
|
||||
|
||||
# everything else
|
||||
.gitattributes text eol=lf
|
||||
.gitignore text eol=lf
|
||||
Makefile text eol=lf
|
||||
@@ -0,0 +1,32 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of the bug.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Drone switched on '...'
|
||||
2. Uploaded mission '....' (attach QGC mission file)
|
||||
3. Took off '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Log Files and Screenshots**
|
||||
*Always* provide a link to the flight log file:
|
||||
- Download the flight log file from the vehicle ([tutorial](https://docs.px4.io/en/getting_started/flight_reporting.html)).
|
||||
- Share the link to a log showing the problem on [PX4 Flight Review](http://logs.px4.io/).
|
||||
|
||||
Add screenshots to help explain your problem.
|
||||
|
||||
**Drone (please complete the following information):**
|
||||
- Describe the type of drone.
|
||||
- Photo of the IMU / autopilot setup if possible.
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
@@ -0,0 +1,19 @@
|
||||
---
|
||||
name: 🚀 Feature Request
|
||||
about: Suggest an idea for this project
|
||||
|
||||
---
|
||||
|
||||
For general questions please use [PX4 Discuss](http://discuss.px4.io/) or [Slack](http://slack.px4.io/).
|
||||
|
||||
**Describe problem solved by the proposed feature**
|
||||
A clear and concise description of the problem, if any, this feature will solve. E.g. I'm always frustrated when ...
|
||||
|
||||
**Describe your preferred solution**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe possible alternatives**
|
||||
A clear and concise description of alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots for the feature request here.
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
name: ⛔ Support Question
|
||||
about: See [PX4 Discuss](http://discuss.px4.io/) for questions about using PX4.
|
||||
|
||||
---
|
||||
|
||||
We use GitHub issues only to discuss PX4 bugs and new features. For
|
||||
questions about using PX4 or related components, please use [PX4 Discuss](http://discuss.px4.io/).
|
||||
|
||||
Thanks!
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
name: ⛔ Documentation Issue
|
||||
about: See https://github.com/PX4/Devguide for documentation issues
|
||||
|
||||
---
|
||||
|
||||
PX4 has dedicated repositories for developer documentation (https://github.com/PX4/Devguide) and user documentation (https://github.com/PX4/px4_user_guide).
|
||||
|
||||
Thanks!
|
||||
@@ -1,47 +0,0 @@
|
||||
name: 🐛 Bug report
|
||||
description: Create a report to help us improve
|
||||
title: "[Bug] "
|
||||
labels: ["bug-report"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
**Tips for a great bug report:**
|
||||
- Describe what went wrong and what you expected
|
||||
- Include a flight log link from [logs.px4.io](http://logs.px4.io/) if possible
|
||||
- Mention your PX4 version, flight controller, and vehicle type if relevant
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Describe the bug
|
||||
description: A clear description of the bug and what you expected to happen.
|
||||
placeholder: |
|
||||
What happened and what did you expect instead?
|
||||
|
||||
Steps to reproduce (if applicable):
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Flight Log / Additional Information
|
||||
description: |
|
||||
**Flight log** (highly recommended for flight-related issues):
|
||||
- Upload to [PX4 Flight Review](http://logs.px4.io/) and paste the link
|
||||
|
||||
**Additional details** (if relevant):
|
||||
- PX4 version (output of `ver all` in MAVLink Shell)
|
||||
- Flight controller model
|
||||
- Vehicle type (multicopter, fixed-wing, VTOL, etc.)
|
||||
- Screenshots or media
|
||||
placeholder: |
|
||||
Flight log link:
|
||||
|
||||
Version:
|
||||
|
||||
Hardware:
|
||||
validations:
|
||||
required: false
|
||||
@@ -1,5 +0,0 @@
|
||||
blank_issues_enabled: true
|
||||
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
|
||||
@@ -1,33 +0,0 @@
|
||||
name: 📑 Documentation Bug report
|
||||
description: Create a report to help us improve the docs
|
||||
title: "[Docs] [Bug] "
|
||||
labels: ["Documentation 📑"]
|
||||
body:
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Describe the bug
|
||||
description: A clear and concise description of the bug.
|
||||
placeholder: |
|
||||
# A PR to fix the bug is often better than adding this issue!
|
||||
#
|
||||
# If you can't create a PR please provide the following:
|
||||
# - What page and/or section has the problem
|
||||
# - What is the problem - missing information, incorrect information?
|
||||
# - Suggested fixes, links to corresponding code PRs
|
||||
# - Any additional context
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
attributes:
|
||||
label: Page URL
|
||||
description: The URL of the problem page.
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Screenshot / Media
|
||||
description: Add screenshot / media if you have them
|
||||
validations:
|
||||
required: false
|
||||
@@ -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,23 +0,0 @@
|
||||
<!--
|
||||
|
||||
### Solved Problem
|
||||
Fixes #{Github issue ID}
|
||||
|
||||
### Solution
|
||||
|
||||
### Changelog Entry
|
||||
For release notes:
|
||||
```
|
||||
Feature/Bugfix XYZ
|
||||
New parameter: XYZ_Z
|
||||
Documentation: Need to clarify page ... / done, read docs.px4.io/...
|
||||
```
|
||||
|
||||
### Alternatives
|
||||
|
||||
### Test coverage
|
||||
|
||||
### Context
|
||||
Related links, screenshot before/after, video
|
||||
|
||||
-->
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
title: '[CI] Fuzzing Workflow Failed'
|
||||
labels: ['Fuzzing']
|
||||
---
|
||||
The automated fuzzing workflow has failed.
|
||||
See {{ env.WORKFLOW_RUN_URL }} for details.
|
||||
@@ -1,50 +0,0 @@
|
||||
---
|
||||
applyTo: "docs/en/**"
|
||||
---
|
||||
|
||||
# Review Guidelines docs/en Tree
|
||||
|
||||
## File System & Structure
|
||||
|
||||
- **Naming:** Use `lowercase_with_underscores` for all filenames. No spaces.
|
||||
- **Hierarchy:** Markdown files must reside exactly in a first-level category folder.
|
||||
- Valid: `docs/en/category/file.md`
|
||||
- Invalid: `docs/en/category/subcategory/file.md`
|
||||
- **Text Files:** Any `.txt` or `.text` files must start with an underscore (e.g., `_notes.txt`).
|
||||
- **Assets:** All images/non-docs must be in `/docs/assets/`. Deep nesting is permitted here.
|
||||
- **Formats:** Prefer **SVG** for diagrams and **PNG** for screenshots. Flag JPG files.
|
||||
|
||||
## Markdown & Style
|
||||
|
||||
- **Headings:** Use Title Case ("First Letter Capitalisation").
|
||||
- The Page Title must be the only H1 (`#`). All others must be `##` or lower.
|
||||
- Do not apply bold or italic styling inside a heading.
|
||||
- **Formatting:**
|
||||
- **Bold:** Only for UI elements (buttons, menu items).
|
||||
- **Inline Code:** Use backticks for file paths, parameters, and CLI commands (e.g., `prettier`).
|
||||
Backticks are optional for hyperlinked CLI commands and tool names.
|
||||
- **Italics (Emphasis):** Use for application names (e.g., *QGroundControl*).
|
||||
Emphasis is optional for hyperlinked applications.
|
||||
- **Structure:** End every line at the end of a sentence (Semantic Line Breaks).
|
||||
|
||||
## Linking & Navigation
|
||||
|
||||
- **Standard Links:** Use standard inline syntax: `[link text](../category/filename.md)`.
|
||||
Note relative link.
|
||||
- **Table Links:** To keep tables readable, use reference-style links.
|
||||
- Definition: `[Link Name]: https://example.com` (placed below the table).
|
||||
- Usage: `[Link Name]` within the table cell.
|
||||
- **Images:** All image links must include a descriptive, accessible alt-text in the brackets: ``.
|
||||
Note that all images should be relative references to images stored in the assets folder, which should be two folders below the any markdown file (as they are stored in a "category" subfolder)
|
||||
|
||||
- **Standard Links:** Use standard inline syntax: `[link text](../category/filename.md)`. Note the use of relative links.
|
||||
- **Table Links:** To keep tables easier to edit, prefer reference-style links.
|
||||
- Definition: `[Link Name]: https://example.com` (placed below the table).
|
||||
- Usage: `[Link Name]` within the table cell.
|
||||
- **Images:** All image links must include a descriptive, accessible alt-text: ``.
|
||||
- **Note:** All images must be relative references to the `/docs/assets/` folder. Since documents are nested in a category folder, this is usually two levels up (`../../assets/`).
|
||||
|
||||
## Quality Control
|
||||
|
||||
- **Prettier Check:** Ensure Prettier rules have been applied. If there is evidence of inconsistent indentation or spacing, request the author run `npx prettier --write .` before merging.
|
||||
- **Language:** Enforce **UK English** spelling and grammar.
|
||||
@@ -1,10 +0,0 @@
|
||||
# Labeler configuration file for GitHub Actions
|
||||
# The action is ./.github/workflows/label.yml
|
||||
# Docs for the syntax in this file can be found at
|
||||
# https://github.com/actions/labeler
|
||||
|
||||
|
||||
# Add 'Documentation' label to any changes within 'docs' folder or any subfolders
|
||||
"Documentation 📑":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: docs/**
|
||||
@@ -1,24 +0,0 @@
|
||||
runners:
|
||||
x86-small-runner:
|
||||
cpu: [1, 2]
|
||||
ram: [1, 4]
|
||||
disk: default
|
||||
spot: price-capacity-optimized
|
||||
image: ubuntu24-full-x64
|
||||
extras: s3-cache
|
||||
x86-firmware-builder:
|
||||
cpu: [4, 8]
|
||||
ram: [8, 16]
|
||||
disk: default
|
||||
family: ["c7i", "m7i", "r7i"]
|
||||
spot: price-capacity-optimized
|
||||
image: ubuntu24-full-x64
|
||||
extras: s3-cache
|
||||
arm64-firmware-builder:
|
||||
cpu: [4, 8]
|
||||
ram: [8, 16]
|
||||
disk: default
|
||||
family: ["c7g", "m7g", "r7g"]
|
||||
spot: price-capacity-optimized
|
||||
image: ubuntu24-full-arm64
|
||||
extras: s3-cache
|
||||
@@ -0,0 +1,18 @@
|
||||
# Number of days of inactivity before an issue becomes stale
|
||||
daysUntilStale: 90
|
||||
# Number of days of inactivity before a stale issue is closed
|
||||
daysUntilClose: 14
|
||||
# Issues with these labels will never be considered stale
|
||||
exemptLabels:
|
||||
- pinned
|
||||
- security
|
||||
# Label to use when marking an issue as stale
|
||||
staleLabel: wontfix
|
||||
# Comment to post when marking an issue as stale. Set to `false` to disable
|
||||
markComment: >
|
||||
This issue has been automatically marked as stale because it has not had
|
||||
recent activity. It will be closed if no further activity occurs. Thank you
|
||||
for your contributions.
|
||||
# Comment to post when closing a stale issue. Set to `false` to disable
|
||||
closeComment: >
|
||||
Closing as stale.
|
||||
@@ -1,272 +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
|
||||
#
|
||||
# ===================================================================================
|
||||
# RELEASE UPLOAD LOGIC
|
||||
# ===================================================================================
|
||||
# This workflow handles building firmware and uploading to S3 + GitHub Releases.
|
||||
#
|
||||
# S3 Bucket Structure (s3://px4-travis/Firmware/):
|
||||
# - master/ <- Latest main branch build (for QGC compatibility)
|
||||
# - stable/ <- Latest stable release, controlled by 'stable' branch
|
||||
# - beta/ <- Latest pre-release, controlled by 'beta' branch
|
||||
# - vX.Y.Z/ <- Archived stable release
|
||||
# - vX.Y.Z-beta1/ <- Archived pre-release
|
||||
#
|
||||
# Trigger Behavior:
|
||||
# - Tag v1.16.1 -> Upload to: v1.16.1/ only (versioned archive)
|
||||
# - Tag v1.17.0-beta1 -> Upload to: v1.17.0-beta1/ only (versioned archive)
|
||||
# - Branch main -> Upload to: master/ (for QGC compatibility)
|
||||
# - Branch stable -> Upload to: stable/ (QGC stable firmware)
|
||||
# - Branch beta -> Upload to: beta/ (QGC beta firmware)
|
||||
# - Branch release/** -> Build only, no S3 upload (CI validation)
|
||||
# - Pull requests -> Build only, no S3 upload (CI validation)
|
||||
#
|
||||
# GitHub Releases:
|
||||
# - All version tags create a draft GitHub Release
|
||||
# - Pre-releases (alpha/beta/rc suffixes) are automatically marked as such
|
||||
#
|
||||
# IMPORTANT: Version tags do NOT upload to stable/ or beta/. Only the
|
||||
# corresponding branch pushes control those directories. This prevents
|
||||
# pre-release tags from accidentally overwriting stable firmware (#26340)
|
||||
# and avoids race conditions between tag and branch builds.
|
||||
# ===================================================================================
|
||||
|
||||
name: Build all targets
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
branches:
|
||||
- 'main'
|
||||
- 'stable'
|
||||
- 'beta'
|
||||
- 'release/**'
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- '**'
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
actions: read
|
||||
packages: read
|
||||
|
||||
jobs:
|
||||
group_targets:
|
||||
name: Scan for Board Targets
|
||||
# runs-on: ubuntu-latest
|
||||
runs-on: [runs-on,runner=1cpu-linux-x64,image=ubuntu24-full-x64,"run-id=${{ github.run_id }}",spot=false]
|
||||
outputs:
|
||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||
timestamp: ${{ steps.set-timestamp.outputs.timestamp }}
|
||||
branchname: ${{ steps.set-branch.outputs.branchname }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Cache Python pip
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('**./Tools/setup/requirements.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
|
||||
- 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
|
||||
name: Generate Build Matrix
|
||||
run: echo "matrix=$(./Tools/ci/generate_board_targets_json.py --group)" >> $GITHUB_OUTPUT
|
||||
|
||||
- id: set-timestamp
|
||||
name: Save Current Timestamp
|
||||
run: echo "timestamp=$(date +"%Y%m%d%H%M%S")" >> $GITHUB_OUTPUT
|
||||
|
||||
- id: set-branch
|
||||
name: Save Current Branch Name
|
||||
run: |
|
||||
echo "branchname=${{
|
||||
github.event_name == 'pull_request' &&
|
||||
format('pr-{0}', github.event.pull_request.number) ||
|
||||
github.head_ref ||
|
||||
github.ref_name
|
||||
}}" >> $GITHUB_OUTPUT
|
||||
|
||||
- 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 [${{ matrix.runner }}][${{ matrix.group }}]
|
||||
# runs-on: ubuntu-latest
|
||||
runs-on: [runs-on,"runner=8cpu-linux-${{ matrix.runner }}","image=ubuntu24-full-${{ matrix.runner }}","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 }}
|
||||
credentials:
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
steps:
|
||||
- uses: runs-on/action@v2
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Git ownership workaround
|
||||
run: git config --system --add safe.directory '*'
|
||||
|
||||
# ccache key breakdown:
|
||||
# ccache-<system os>-<system arch>-<builder group>-
|
||||
# ccache-<linux>-<arm64>-<aarch64-0>-
|
||||
# ccache-<linux>-<x64>-<nuttx-0>-
|
||||
- name: Cache Restore from Key
|
||||
id: cc_restore
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: ~/.ccache
|
||||
key: ${{ format('ccache-{0}-{1}-{2}', runner.os, matrix.runner, matrix.group) }}
|
||||
restore-keys: |
|
||||
ccache-${{ runner.os }}-${{ matrix.runner }}-${{ matrix.group }}-
|
||||
ccache-${{ runner.os }}-${{ matrix.runner }}-
|
||||
ccache-${{ runner.os }}-${{ matrix.runner }}-
|
||||
ccache-${{ runner.os }}-
|
||||
ccache-
|
||||
|
||||
- name: Cache Config and Stats
|
||||
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
|
||||
echo "compiler_check = content" >> ~/.ccache/ccache.conf
|
||||
ccache -s
|
||||
ccache -z
|
||||
|
||||
- name: Building Artifacts for [${{ matrix.targets }}]
|
||||
run: |
|
||||
./Tools/ci/build_all_runner.sh ${{matrix.targets}} ${{matrix.arch}}
|
||||
|
||||
- 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 Post Build Stats
|
||||
if: always()
|
||||
run: |
|
||||
ccache -s
|
||||
ccache -z
|
||||
|
||||
- name: Cache Save
|
||||
if: always()
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: ~/.ccache
|
||||
key: ${{ steps.cc_restore.outputs.cache-primary-key }}
|
||||
|
||||
# ===========================================================================
|
||||
# ARTIFACT UPLOAD JOB
|
||||
# ===========================================================================
|
||||
# Uploads build artifacts to S3 and creates GitHub Releases.
|
||||
# Runs for version tags (v*), main, stable, and beta branch pushes.
|
||||
# See header comments for full upload logic documentation.
|
||||
# ===========================================================================
|
||||
artifacts:
|
||||
name: Upload Artifacts
|
||||
# runs-on: ubuntu-latest
|
||||
runs-on: [runs-on,runner=1cpu-linux-x64,image=ubuntu24-full-x64,"run-id=${{ github.run_id }}",spot=false]
|
||||
needs: [setup, group_targets]
|
||||
if: startsWith(github.ref, 'refs/tags/v') || contains(fromJSON('["main","stable","beta"]'), needs.group_targets.outputs.branchname)
|
||||
outputs:
|
||||
uploadlocation: ${{ steps.upload-location.outputs.uploadlocation }}
|
||||
steps:
|
||||
- name: Download Artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: artifacts/
|
||||
merge-multiple: true
|
||||
|
||||
- name: Choose Upload Location
|
||||
id: upload-location
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
ref="${GITHUB_REF}"
|
||||
branch=${{ needs.group_targets.outputs.branchname }}
|
||||
location="$branch"
|
||||
is_prerelease="false"
|
||||
|
||||
# Main branch uploads to "master" for QGC backward compatibility
|
||||
if [[ "$branch" == "main" ]]; then
|
||||
location="master"
|
||||
fi
|
||||
|
||||
# Version tags: upload to versioned directory (e.g., v1.16.1/)
|
||||
if [[ "$ref" == refs/tags/v[0-9]* ]]; then
|
||||
tag="${ref#refs/tags/}"
|
||||
location="$tag"
|
||||
|
||||
# Pre-release tags contain -alpha, -beta, or -rc suffix
|
||||
if [[ "$tag" =~ -(alpha|beta|rc) ]]; then
|
||||
is_prerelease="true"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "uploadlocation=$location" >> $GITHUB_OUTPUT
|
||||
echo "is_prerelease=$is_prerelease" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Uploading Artifacts to S3 [${{ steps.upload-location.outputs.uploadlocation }}]
|
||||
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/${{ steps.upload-location.outputs.uploadlocation }}/
|
||||
|
||||
# Create a draft GitHub Release for all version tags
|
||||
# Pre-releases are automatically marked as such
|
||||
- name: Upload Artifacts to GitHub Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
with:
|
||||
draft: true
|
||||
prerelease: ${{ steps.upload-location.outputs.is_prerelease == 'true' }}
|
||||
files: |
|
||||
artifacts/*.px4
|
||||
artifacts/*.deb
|
||||
artifacts/**/*.sbom.spdx.json
|
||||
name: ${{ steps.upload-location.outputs.uploadlocation }}
|
||||
@@ -1,62 +0,0 @@
|
||||
name: Checks
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- '**'
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
container:
|
||||
image: px4io/px4-dev:v1.16.0-rc1-258-g0369abd556
|
||||
|
||||
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",
|
||||
"module_documentation",
|
||||
]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Building [${{ matrix.check }}]
|
||||
env:
|
||||
PX4_SBOM_DISABLE: 1
|
||||
run: |
|
||||
cd "$GITHUB_WORKSPACE"
|
||||
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
make ${{ matrix.check }}
|
||||
|
||||
- name: Uploading Coverage to Codecov.io
|
||||
if: contains(matrix.check, 'coverage')
|
||||
uses: codecov/codecov-action@v1
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
flags: unittests
|
||||
file: coverage/lcov.info
|
||||
@@ -1,69 +0,0 @@
|
||||
name: Static Analysis
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- '**'
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
clang_tidy:
|
||||
name: Clang-Tidy
|
||||
runs-on: [runs-on, runner=16cpu-linux-x64, "run-id=${{ github.run_id }}", "extras=s3-cache"]
|
||||
container:
|
||||
image: px4io/px4-dev:v1.17.0-beta1
|
||||
steps:
|
||||
- uses: runs-on/action@v2
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
|
||||
- name: Configure Git Safe Directory
|
||||
run: git config --system --add safe.directory '*'
|
||||
|
||||
- name: Restore Compiler Cache
|
||||
id: cc_restore
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: ~/.ccache
|
||||
key: ccache-clang-tidy-${{ github.head_ref || github.ref_name }}
|
||||
restore-keys: |
|
||||
ccache-clang-tidy-${{ github.head_ref || github.ref_name }}-
|
||||
ccache-clang-tidy-main-
|
||||
ccache-clang-tidy-
|
||||
|
||||
- name: Configure Compiler Cache
|
||||
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
|
||||
echo "compiler_check = content" >> ~/.ccache/ccache.conf
|
||||
ccache -s
|
||||
ccache -z
|
||||
|
||||
- name: Run Clang-Tidy Analysis
|
||||
run: make -j16 clang-tidy
|
||||
|
||||
- name: Compiler Cache Stats
|
||||
if: always()
|
||||
run: ccache -s
|
||||
|
||||
- name: Save Compiler Cache
|
||||
if: always()
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: ~/.ccache
|
||||
key: ${{ steps.cc_restore.outputs.cache-primary-key }}
|
||||
@@ -1,148 +0,0 @@
|
||||
name: Commit Quality
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, edited, synchronize, reopened]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
issues: write
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||
IS_FORK: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
|
||||
|
||||
jobs:
|
||||
pr-title:
|
||||
name: PR Title
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
sparse-checkout: Tools/ci
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Check PR title
|
||||
id: check
|
||||
run: |
|
||||
python3 Tools/ci/check_pr_title.py "${{ github.event.pull_request.title }}" --markdown-file comment.md && rc=0 || rc=$?
|
||||
echo "exit_code=$rc" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Post or clear comment
|
||||
if: env.IS_FORK == 'false'
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
if [ "${{ steps.check.outputs.exit_code }}" != "0" ]; then
|
||||
python3 Tools/ci/pr_comment.py --marker pr-title --pr "$PR_NUMBER" --result fail < comment.md
|
||||
else
|
||||
python3 Tools/ci/pr_comment.py --marker pr-title --pr "$PR_NUMBER" --result pass
|
||||
fi
|
||||
|
||||
- name: Result
|
||||
if: steps.check.outputs.exit_code != '0'
|
||||
run: |
|
||||
echo "::error::PR title does not follow conventional commits format. See the PR comment for details."
|
||||
exit 1
|
||||
|
||||
commit-messages:
|
||||
name: Commit Messages
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
sparse-checkout: Tools/ci
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Check commit messages
|
||||
id: check
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
gh api \
|
||||
"repos/${{ github.repository }}/pulls/${PR_NUMBER}/commits?per_page=100" \
|
||||
| python3 Tools/ci/check_commit_messages.py --markdown-file comment.md && rc=0 || rc=$?
|
||||
echo "exit_code=$rc" >> "$GITHUB_OUTPUT"
|
||||
# Check for warnings (non-empty markdown on exit 0)
|
||||
if [ "$rc" -eq 0 ] && [ -s comment.md ]; then
|
||||
echo "has_warnings=true" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "has_warnings=false" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: Post or clear comment
|
||||
if: env.IS_FORK == 'false'
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
if [ "${{ steps.check.outputs.exit_code }}" != "0" ]; then
|
||||
python3 Tools/ci/pr_comment.py --marker commit-msgs --pr "$PR_NUMBER" --result fail < comment.md
|
||||
elif [ "${{ steps.check.outputs.has_warnings }}" == "true" ]; then
|
||||
python3 Tools/ci/pr_comment.py --marker commit-msgs --pr "$PR_NUMBER" --result warn < comment.md
|
||||
else
|
||||
python3 Tools/ci/pr_comment.py --marker commit-msgs --pr "$PR_NUMBER" --result pass
|
||||
fi
|
||||
|
||||
- name: Result
|
||||
if: steps.check.outputs.exit_code != '0'
|
||||
run: |
|
||||
echo "::error::Commit message errors found. See the PR comment for details."
|
||||
exit 1
|
||||
|
||||
pr-body:
|
||||
name: PR Description
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
if: env.IS_FORK == 'false'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
sparse-checkout: Tools/ci
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Check PR body
|
||||
id: check
|
||||
env:
|
||||
PR_BODY: ${{ github.event.pull_request.body }}
|
||||
run: |
|
||||
message=""
|
||||
if [ -z "$PR_BODY" ]; then
|
||||
message="PR description is empty. Please add a summary of the changes."
|
||||
echo "::warning::PR description is empty."
|
||||
else
|
||||
cleaned=$(echo "$PR_BODY" | sed 's/<!--.*-->//g' | tr -d '[:space:]')
|
||||
if [ -z "$cleaned" ]; then
|
||||
message="PR description contains only template comments. Please fill in the details."
|
||||
echo "::warning::PR description contains only template comments."
|
||||
fi
|
||||
fi
|
||||
echo "message=$message" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Post or clear comment
|
||||
if: env.IS_FORK == 'false'
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
if [ -n "${{ steps.check.outputs.message }}" ]; then
|
||||
printf '%s\n' \
|
||||
"## PR Description (advisory)" \
|
||||
"" \
|
||||
"This is **not blocking**, but your PR description appears to be empty or incomplete." \
|
||||
"" \
|
||||
"${{ steps.check.outputs.message }}" \
|
||||
"" \
|
||||
"A good PR description helps reviewers understand what changed and why." \
|
||||
"" \
|
||||
"---" \
|
||||
"*This comment will be automatically removed once the issue is resolved.*" \
|
||||
| python3 Tools/ci/pr_comment.py --marker pr-body --pr "$PR_NUMBER" --result warn
|
||||
else
|
||||
python3 Tools/ci/pr_comment.py --marker pr-body --pr "$PR_NUMBER" --result pass
|
||||
fi
|
||||
@@ -1,67 +0,0 @@
|
||||
name: MacOS build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- '**'
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
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@v5
|
||||
with:
|
||||
python-version: "3.10"
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: setup
|
||||
run: |
|
||||
./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)
|
||||
file(APPEND "$ENV{GITHUB_OUTPUT}" "timestamp=${current_date}\n")
|
||||
- name: ccache cache files
|
||||
uses: actions/cache@v4
|
||||
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,57 +0,0 @@
|
||||
name: Ubuntu environment build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
- 'stable'
|
||||
- 'beta'
|
||||
- 'release/**'
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- '**'
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
|
||||
env:
|
||||
RUNS_IN_DOCKER: true
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
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=4cpu-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,192 +0,0 @@
|
||||
name: Container build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
- 'stable'
|
||||
- 'beta'
|
||||
- 'release/**'
|
||||
tags:
|
||||
- 'v*'
|
||||
pull_request:
|
||||
branches:
|
||||
- '**'
|
||||
paths:
|
||||
- '.github/workflows/dev_container.yml'
|
||||
- 'Tools/setup/ubuntu.sh'
|
||||
- 'Tools/setup/requirements.txt'
|
||||
- 'Tools/setup/Dockerfile'
|
||||
- 'Tools/setup/docker-entrypoint.sh'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
px4_version:
|
||||
description: 'Container tag (e.g. v1.16.0)'
|
||||
required: true
|
||||
type: string
|
||||
deploy_to_registry:
|
||||
description: 'Whether to push built images to the registry'
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
setup:
|
||||
name: Set Tags and Variables
|
||||
permissions:
|
||||
contents: read
|
||||
runs-on: [runs-on,"runner=1cpu-linux-x64","image=ubuntu24-full-x64","run-id=${{ github.run_id }}",extras=s3-cache,spot=false]
|
||||
outputs:
|
||||
px4_version: ${{ steps.px4_version.outputs.px4_version }}
|
||||
meta_tags: ${{ steps.meta.outputs.tags }}
|
||||
meta_labels: ${{ steps.meta.outputs.labels }}
|
||||
steps:
|
||||
- uses: runs-on/action@v1
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-tags: true
|
||||
submodules: false
|
||||
fetch-depth: 0
|
||||
|
||||
# If manual dispatch, take the user‐provided input
|
||||
- name: Set PX4 Tag Version
|
||||
id: px4_version
|
||||
run: |
|
||||
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
|
||||
echo "px4_version=${{ github.event.inputs.px4_version }}" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "px4_version=$(git describe --tags --match 'v[0-9]*')" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- 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=raw,enable=true,value=${{ steps.px4_version.outputs.px4_version }},priority=1000
|
||||
|
||||
build:
|
||||
name: Build Container (${{ matrix.arch }})
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
needs: setup
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- platform: linux/arm64
|
||||
arch: arm64
|
||||
runner: arm64
|
||||
- platform: linux/amd64
|
||||
arch: amd64
|
||||
runner: x64
|
||||
runs-on: [runs-on,"runner=4cpu-linux-${{ matrix.runner }}","image=ubuntu24-full-${{ matrix.runner }}","run-id=${{ github.run_id }}",extras=s3-cache,spot=false]
|
||||
steps:
|
||||
- uses: runs-on/action@v1
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-tags: true
|
||||
submodules: false
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/') || (github.event_name == 'workflow_dispatch' && github.event.inputs.deploy_to_registry) }}
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/') || (github.event_name == 'workflow_dispatch' && github.event.inputs.deploy_to_registry) }}
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
driver: docker-container
|
||||
platforms: ${{ matrix.platform }}
|
||||
|
||||
- name: Build and Load Container Image
|
||||
uses: docker/build-push-action@v6
|
||||
id: docker
|
||||
with:
|
||||
context: Tools/setup
|
||||
tags: |
|
||||
ghcr.io/px4/px4-dev:${{ needs.setup.outputs.px4_version }}-${{ matrix.arch }}
|
||||
px4io/px4-dev:${{ needs.setup.outputs.px4_version }}-${{ matrix.arch }}
|
||||
labels: ${{ needs.setup.outputs.meta_labels }}
|
||||
platforms: ${{ matrix.platform }}
|
||||
load: false
|
||||
push: ${{ startsWith(github.ref, 'refs/tags/') || (github.event_name == 'workflow_dispatch' && github.event.inputs.deploy_to_registry) }}
|
||||
provenance: false
|
||||
cache-from: type=gha,scope=${{ matrix.arch }}
|
||||
cache-to: type=gha,mode=max,scope=${{ matrix.arch }}
|
||||
|
||||
deploy:
|
||||
name: Deploy To Registry
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
runs-on: [runs-on,"runner=4cpu-linux-x64","image=ubuntu24-full-x64","run-id=${{ github.run_id }}",extras=s3-cache,spot=false]
|
||||
needs: [build, setup]
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/') || (github.event_name == 'workflow_dispatch' && github.event.inputs.deploy_to_registry) }}
|
||||
steps:
|
||||
- uses: runs-on/action@v1
|
||||
- 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: Verify Images Exist Before Creating Manifest
|
||||
run: |
|
||||
docker manifest inspect px4io/px4-dev:${{ needs.setup.outputs.px4_version }}-arm64 || echo "⚠️ Warning: No ARM64 image found!"
|
||||
docker manifest inspect px4io/px4-dev:${{ needs.setup.outputs.px4_version }}-amd64 || echo "⚠️ Warning: No AMD64 image found!"
|
||||
docker manifest inspect ghcr.io/px4/px4-dev:${{ needs.setup.outputs.px4_version }}-arm64 || echo "⚠️ Warning: No ARM64 image found!"
|
||||
docker manifest inspect ghcr.io/px4/px4-dev:${{ needs.setup.outputs.px4_version }}-amd64 || echo "⚠️ Warning: No AMD64 image found!"
|
||||
|
||||
- name: Create and Push Multi-Arch Manifest for Docker Hub
|
||||
run: |
|
||||
docker manifest create px4io/px4-dev:${{ needs.setup.outputs.px4_version }} \
|
||||
--amend px4io/px4-dev:${{ needs.setup.outputs.px4_version }}-arm64 \
|
||||
--amend px4io/px4-dev:${{ needs.setup.outputs.px4_version }}-amd64
|
||||
|
||||
docker manifest annotate px4io/px4-dev:${{ needs.setup.outputs.px4_version }} px4io/px4-dev:${{ needs.setup.outputs.px4_version }}-arm64 --arch arm64
|
||||
docker manifest annotate px4io/px4-dev:${{ needs.setup.outputs.px4_version }} px4io/px4-dev:${{ needs.setup.outputs.px4_version }}-amd64 --arch amd64
|
||||
|
||||
docker manifest push px4io/px4-dev:${{ needs.setup.outputs.px4_version }}
|
||||
|
||||
- name: Create and Push Multi-Arch Manifest for GHCR
|
||||
run: |
|
||||
docker manifest create ghcr.io/px4/px4-dev:${{ needs.setup.outputs.px4_version }} \
|
||||
--amend ghcr.io/px4/px4-dev:${{ needs.setup.outputs.px4_version }}-arm64 \
|
||||
--amend ghcr.io/px4/px4-dev:${{ needs.setup.outputs.px4_version }}-amd64
|
||||
|
||||
docker manifest annotate ghcr.io/px4/px4-dev:${{ needs.setup.outputs.px4_version }} ghcr.io/px4/px4-dev:${{ needs.setup.outputs.px4_version }}-arm64 --arch arm64
|
||||
docker manifest annotate ghcr.io/px4/px4-dev:${{ needs.setup.outputs.px4_version }} ghcr.io/px4/px4-dev:${{ needs.setup.outputs.px4_version }}-amd64 --arch amd64
|
||||
|
||||
docker manifest push ghcr.io/px4/px4-dev:${{ needs.setup.outputs.px4_version }}
|
||||
@@ -1,416 +0,0 @@
|
||||
# Docs - Orchestrator
|
||||
#
|
||||
# Trigger paths:
|
||||
# push (main, release/**) → metadata-regen → build-site → deploy-aws
|
||||
# pull_request → detect-changes → pr-metadata-regen → link-check → build-site (if docs/source changed)
|
||||
# workflow_dispatch → metadata-regen → build-site → deploy-aws
|
||||
#
|
||||
# Container jobs (pr-metadata-regen, metadata-regen) run in px4-dev image and
|
||||
# require safe.directory + fetch-depth: 0 for git operations.
|
||||
|
||||
name: Docs - Orchestrator
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "main"
|
||||
- "release/**"
|
||||
paths:
|
||||
- "docs/**"
|
||||
- "src/**"
|
||||
- "msg/**"
|
||||
- "ROMFS/**"
|
||||
- "Tools/module_config/**"
|
||||
- ".github/workflows/docs-orchestrator.yml"
|
||||
pull_request:
|
||||
paths:
|
||||
- "docs/**"
|
||||
- ".github/workflows/docs-orchestrator.yml"
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: docs-orchestrator-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
# =============================================================================
|
||||
# Detect Changes (PR only)
|
||||
# =============================================================================
|
||||
detect-changes:
|
||||
name: "T1: Detect Changes"
|
||||
if: github.event_name == 'pull_request'
|
||||
permissions:
|
||||
contents: read
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
source_changed: ${{ steps.changes.outputs.source }}
|
||||
docs_changed: ${{ steps.changes.outputs.docs }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dorny/paths-filter@v3
|
||||
id: changes
|
||||
with:
|
||||
filters: |
|
||||
source:
|
||||
- 'src/**'
|
||||
- 'msg/**'
|
||||
- 'ROMFS/**'
|
||||
- 'Tools/module_config/**'
|
||||
docs:
|
||||
- 'docs/**'
|
||||
|
||||
# =============================================================================
|
||||
# PR Metadata Regen (conditional - only when PR touches source files)
|
||||
# =============================================================================
|
||||
pr-metadata-regen:
|
||||
name: "T2: PR Metadata"
|
||||
needs: [detect-changes]
|
||||
if: github.event_name == 'pull_request' && needs.detect-changes.outputs.source_changed == 'true'
|
||||
permissions:
|
||||
contents: read
|
||||
runs-on: [runs-on,runner=4cpu-linux-x64,image=ubuntu24-full-x64,"run-id=${{ github.run_id }}",spot=false,extras=s3-cache]
|
||||
container:
|
||||
image: px4io/px4-dev:v1.17.0-beta1
|
||||
steps:
|
||||
- uses: runs-on/action@v1
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: Git ownership workaround
|
||||
run: git config --system --add safe.directory '*'
|
||||
|
||||
- name: Cache Restore - ccache
|
||||
id: cache-ccache
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: ~/.ccache
|
||||
key: ccache-docs-metadata-${{ github.sha }}
|
||||
restore-keys: |
|
||||
ccache-docs-metadata-
|
||||
|
||||
- name: Setup ccache
|
||||
run: |
|
||||
mkdir -p ~/.ccache
|
||||
echo "max_size = 1G" > ~/.ccache/ccache.conf
|
||||
|
||||
- name: Build px4_sitl_default
|
||||
run: |
|
||||
make px4_sitl_default
|
||||
env:
|
||||
CCACHE_DIR: ~/.ccache
|
||||
|
||||
- name: Cache Save - ccache
|
||||
uses: actions/cache/save@v4
|
||||
if: always()
|
||||
with:
|
||||
path: ~/.ccache
|
||||
key: ccache-docs-metadata-${{ github.sha }}
|
||||
|
||||
- name: Generate and sync metadata
|
||||
run: Tools/ci/metadata_sync.sh --generate --sync parameters airframes modules msg_docs failsafe_web
|
||||
env:
|
||||
CCACHE_DIR: ~/.ccache
|
||||
|
||||
- name: Upload metadata artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: pr-metadata
|
||||
path: docs/
|
||||
retention-days: 1
|
||||
|
||||
# =============================================================================
|
||||
# Push Metadata Regen (main/release branches)
|
||||
# =============================================================================
|
||||
metadata-regen:
|
||||
name: "T2: Metadata Sync"
|
||||
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
|
||||
permissions:
|
||||
contents: write
|
||||
runs-on: [runs-on,runner=4cpu-linux-x64,image=ubuntu24-full-x64,"run-id=${{ github.run_id }}",spot=false,extras=s3-cache]
|
||||
container:
|
||||
image: px4io/px4-dev:v1.17.0-beta1
|
||||
steps:
|
||||
- uses: runs-on/action@v1
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
token: ${{ secrets.PX4BUILTBOT_PERSONAL_ACCESS_TOKEN }}
|
||||
|
||||
- name: Git ownership workaround
|
||||
run: git config --system --add safe.directory '*'
|
||||
|
||||
- name: Cache Restore - ccache
|
||||
id: cache-ccache
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: ~/.ccache
|
||||
key: ccache-docs-metadata-${{ github.sha }}
|
||||
restore-keys: |
|
||||
ccache-docs-metadata-
|
||||
|
||||
- name: Setup ccache
|
||||
run: |
|
||||
mkdir -p ~/.ccache
|
||||
echo "max_size = 1G" > ~/.ccache/ccache.conf
|
||||
|
||||
- name: Build px4_sitl_default
|
||||
run: |
|
||||
make px4_sitl_default
|
||||
env:
|
||||
CCACHE_DIR: ~/.ccache
|
||||
|
||||
- name: Cache Save - ccache
|
||||
uses: actions/cache/save@v4
|
||||
if: always()
|
||||
with:
|
||||
path: ~/.ccache
|
||||
key: ccache-docs-metadata-${{ github.sha }}
|
||||
|
||||
- name: Generate and sync metadata
|
||||
run: Tools/ci/metadata_sync.sh --generate --sync parameters airframes modules msg_docs failsafe_web
|
||||
env:
|
||||
CCACHE_DIR: ~/.ccache
|
||||
|
||||
- name: Install Node.js and Yarn
|
||||
run: |
|
||||
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
|
||||
apt-get install -y nodejs
|
||||
corepack enable
|
||||
|
||||
- name: Format markdown with Prettier
|
||||
run: |
|
||||
cd docs
|
||||
yarn install --frozen-lockfile
|
||||
yarn prettier --write "en/**/*.md"
|
||||
|
||||
- name: Commit and push changes
|
||||
run: |
|
||||
git config --global user.name "${{ secrets.PX4BUILDBOT_USER }}"
|
||||
git config --global user.email "${{ secrets.PX4BUILDBOT_EMAIL }}"
|
||||
git add docs/
|
||||
if git diff --staged --quiet; then
|
||||
echo "No changes to commit"
|
||||
else
|
||||
git commit -m "docs: auto-sync metadata [skip ci]
|
||||
|
||||
Co-Authored-By: PX4 BuildBot <${{ secrets.PX4BUILDBOT_EMAIL }}>"
|
||||
git push
|
||||
fi
|
||||
|
||||
# =============================================================================
|
||||
# Link Check
|
||||
# =============================================================================
|
||||
link-check:
|
||||
name: "T2: Link Check"
|
||||
needs: [detect-changes, pr-metadata-regen]
|
||||
if: always() && (github.event_name == 'pull_request')
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Download metadata artifact
|
||||
if: needs.pr-metadata-regen.result == 'success'
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: pr-metadata
|
||||
path: docs/
|
||||
|
||||
- name: Get changed doc files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v46.0.5
|
||||
with:
|
||||
json: true
|
||||
write_output_files: true
|
||||
output_dir: ./logs
|
||||
base_sha: ${{ github.event.pull_request.base.sha }}
|
||||
sha: ${{ github.event.pull_request.head.sha }}
|
||||
files: |
|
||||
docs/en/**/*.md
|
||||
|
||||
- name: Save changed files list
|
||||
run: |
|
||||
mv ./logs/all_changed_files.json ./logs/prFiles.json
|
||||
echo "Changed files:"
|
||||
cat ./logs/prFiles.json
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
|
||||
- name: Run filtered link checker (changed files)
|
||||
run: |
|
||||
npm -g install markdown_link_checker_sc@0.0.138
|
||||
if [ "$(jq length ./logs/prFiles.json)" -gt 0 ]; then
|
||||
markdown_link_checker_sc \
|
||||
-r "$GITHUB_WORKSPACE" \
|
||||
-d docs \
|
||||
-e en \
|
||||
-f ./logs/prFiles.json \
|
||||
-i assets \
|
||||
-u docs.px4.io/main/ \
|
||||
> ./logs/filtered-link-check-results.md || true
|
||||
fi
|
||||
if [ ! -s ./logs/filtered-link-check-results.md ]; then
|
||||
echo "No broken links found in changed files." > ./logs/filtered-link-check-results.md
|
||||
fi
|
||||
cat ./logs/filtered-link-check-results.md
|
||||
|
||||
- name: Run full link checker
|
||||
run: |
|
||||
markdown_link_checker_sc \
|
||||
-r "$GITHUB_WORKSPACE" \
|
||||
-d docs \
|
||||
-e en \
|
||||
-i assets \
|
||||
-u docs.px4.io/main/ \
|
||||
> ./logs/link-check-results.md || true
|
||||
cat ./logs/link-check-results.md
|
||||
|
||||
- name: Post PR comment with link check results
|
||||
if: github.event.pull_request.head.repo.full_name == github.repository
|
||||
uses: marocchino/sticky-pull-request-comment@v2
|
||||
with:
|
||||
header: flaws
|
||||
path: ./logs/filtered-link-check-results.md
|
||||
|
||||
- name: Upload link check results
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: link-check-results
|
||||
path: logs/
|
||||
retention-days: 7
|
||||
|
||||
# =============================================================================
|
||||
# Build Site
|
||||
# =============================================================================
|
||||
build-site:
|
||||
name: "T3: Build Site"
|
||||
needs: [detect-changes, pr-metadata-regen, metadata-regen, link-check]
|
||||
if: >-
|
||||
always() &&
|
||||
(needs.metadata-regen.result == 'success' || needs.metadata-regen.result == 'skipped') &&
|
||||
(needs.link-check.result == 'success' || needs.link-check.result == 'skipped') &&
|
||||
(github.event_name != 'pull_request' || needs.detect-changes.outputs.docs_changed == 'true' || needs.detect-changes.outputs.source_changed == 'true')
|
||||
permissions:
|
||||
contents: read
|
||||
runs-on: [runs-on,runner=4cpu-linux-x64,image=ubuntu24-full-x64,"run-id=${{ github.run_id }}",spot=false,extras=s3-cache]
|
||||
outputs:
|
||||
branchname: ${{ steps.set-branch.outputs.branchname }}
|
||||
releaseversion: ${{ steps.set-version.outputs.releaseversion }}
|
||||
steps:
|
||||
- uses: runs-on/action@v1
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
|
||||
|
||||
- name: Download metadata artifact (PR)
|
||||
if: github.event_name == 'pull_request' && needs.pr-metadata-regen.result == 'success'
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: pr-metadata
|
||||
path: docs/
|
||||
|
||||
- id: set-branch
|
||||
run: echo "branchname=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
|
||||
|
||||
- id: set-version
|
||||
run: |
|
||||
branch="${{ steps.set-branch.outputs.branchname }}"
|
||||
if [[ "$branch" == "main" ]]; then
|
||||
version="main"
|
||||
elif [[ "$branch" =~ ^release/ ]]; then
|
||||
version="v${branch#release/}"
|
||||
elif [[ "${{ github.event_name }}" == "pull_request" ]]; then
|
||||
version="main"
|
||||
else
|
||||
echo "::error::Unsupported branch for docs deploy: $branch (expected main or release/*)"
|
||||
exit 1
|
||||
fi
|
||||
echo "releaseversion=$version" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
cache: npm
|
||||
cache-dependency-path: ./docs/yarn.lock
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn install --frozen-lockfile --cwd ./docs
|
||||
|
||||
- name: Build with VitePress
|
||||
working-directory: ./docs
|
||||
env:
|
||||
BRANCH_NAME: ${{ steps.set-version.outputs.releaseversion }}
|
||||
run: |
|
||||
npm run docs:build_ubuntu
|
||||
touch .vitepress/dist/.nojekyll
|
||||
npm run docs:sitemap
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: px4_docs_build
|
||||
path: docs/.vitepress/dist/
|
||||
retention-days: 1
|
||||
|
||||
# =============================================================================
|
||||
# Deploy to AWS (push + workflow_dispatch)
|
||||
# =============================================================================
|
||||
deploy-aws:
|
||||
name: "T4: Deploy"
|
||||
needs: [metadata-regen, build-site]
|
||||
if: >-
|
||||
always() &&
|
||||
needs.metadata-regen.result == 'success' &&
|
||||
needs.build-site.result == 'success' &&
|
||||
(github.event_name == 'push' || github.event_name == 'workflow_dispatch')
|
||||
permissions:
|
||||
id-token: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Download Artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: px4_docs_build
|
||||
path: ~/_book
|
||||
|
||||
- name: Configure AWS from OIDC
|
||||
uses: aws-actions/configure-aws-credentials@v4
|
||||
with:
|
||||
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
|
||||
aws-region: us-west-2
|
||||
|
||||
- name: Sanity check AWS credentials
|
||||
run: aws sts get-caller-identity
|
||||
|
||||
- name: Upload HTML with short cache
|
||||
run: |
|
||||
aws s3 sync ~/_book/ s3://px4-docs/${{ needs.build-site.outputs.releaseversion }}/ \
|
||||
--delete \
|
||||
--exclude "*" --include "*.html" \
|
||||
--cache-control "public, max-age=60"
|
||||
|
||||
- name: Upload assets with long cache
|
||||
run: |
|
||||
aws s3 sync ~/_book/ s3://px4-docs/${{ needs.build-site.outputs.releaseversion }}/ \
|
||||
--delete \
|
||||
--exclude "*.html" \
|
||||
--cache-control "public, max-age=86400, immutable"
|
||||
@@ -1,55 +0,0 @@
|
||||
name: Docs - Crowdin - Download Guide Translations
|
||||
|
||||
# https://github.com/crowdin/github-action/tree/master
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 * * 0' # Runs every Sunday at 00:00 UTC
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
synchronize-with-crowdin:
|
||||
name: Synchronize with Crowdin
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
max-parallel: 1 # Should be 1 to avoid parallel builds
|
||||
matrix:
|
||||
lc: [ko, uk, zh-CN] # Target languages https://developer.crowdin.com/language-codes/
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Debug Environment Variables
|
||||
run: |
|
||||
echo "CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_DOCS_PROJECT_ID }}"
|
||||
echo "CROWDIN_PERSONAL_TOKEN: ${{ secrets.PX4BUILDBOT_CROWDIN_PERSONAL_TOKEN }}"
|
||||
- name: Matrix
|
||||
uses: crowdin/github-action@v2
|
||||
with:
|
||||
config: 'docs/crowdin_docs.yml'
|
||||
upload_sources: false
|
||||
upload_translations: false
|
||||
download_translations: true
|
||||
commit_message: 'docs(i18n): PX4 guide translations (Crowdin) - ${{ matrix.lc }}'
|
||||
localization_branch_name: l10n_crowdin_docs_translations_${{ matrix.lc }}
|
||||
crowdin_branch_name: main
|
||||
create_pull_request: true
|
||||
pull_request_base_branch_name: 'main'
|
||||
pull_request_title: 'docs(i18n): PX4 guide translations (Crowdin) - ${{ matrix.lc }}'
|
||||
pull_request_body: 'docs(i18n): PX4 guide Crowdin translations by [Crowdin GH Action](https://github.com/crowdin/github-action) for ${{ matrix.lc }}'
|
||||
pull_request_labels: 'Documentation 📑'
|
||||
pull_request_reviewers: hamishwillee
|
||||
download_language: ${{ matrix.lc }}
|
||||
env:
|
||||
# A classic GitHub Personal Access Token with the 'repo' scope selected (the user should have write access to the repository).
|
||||
GITHUB_TOKEN: ${{ secrets.PX4BUILTBOT_PERSONAL_ACCESS_TOKEN }}
|
||||
|
||||
# A numeric ID, found at https://crowdin.com/project/<projectName>/tools/api
|
||||
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_DOCS_PROJECT_ID }}
|
||||
|
||||
# Visit https://crowdin.com/settings#api-key to create this token
|
||||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.PX4BUILDBOT_CROWDIN_PERSONAL_TOKEN }}
|
||||
@@ -1,44 +0,0 @@
|
||||
name: Docs - Crowdin - Upload Guide sources (en)
|
||||
|
||||
# https://github.com/crowdin/github-action/tree/master
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'docs/en/**'
|
||||
#pull_request:
|
||||
# types:
|
||||
# - closed
|
||||
# branches:
|
||||
# - main
|
||||
# paths:
|
||||
# - 'docs/en/**'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
upload-to-crowdin:
|
||||
#if: github.event.pull_request.merged == true || github.event_name == 'push' || github.event_name == 'workflow_dispatch'
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: crowdin push
|
||||
uses: crowdin/github-action@v2
|
||||
with:
|
||||
config: 'docs/crowdin_docs.yml'
|
||||
upload_sources: true
|
||||
upload_translations: false
|
||||
download_translations: false
|
||||
crowdin_branch_name: main
|
||||
env:
|
||||
# A classic GitHub Personal Access Token with the 'repo' scope selected (the user should have write access to the repository).
|
||||
GITHUB_TOKEN: ${{ secrets.PX4BUILDBOT_ACCESSTOKEN }}
|
||||
|
||||
# A numeric ID, found at https://crowdin.com/project/<projectName>/tools/api
|
||||
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_DOCS_PROJECT_ID }}
|
||||
|
||||
# Visit https://crowdin.com/settings#api-key to create this token
|
||||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.PX4BUILDBOT_CROWDIN_PERSONAL_TOKEN }}
|
||||
@@ -1,86 +0,0 @@
|
||||
name: Docs - Deploy PX4 User Guide to Github pages (Manual)
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
|
||||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
|
||||
concurrency:
|
||||
group: pages
|
||||
cancel-in-progress: false
|
||||
|
||||
env:
|
||||
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: [runs-on,runner=4cpu-linux-x64,image=ubuntu24-full-x64,"run-id=${{ github.run_id }}",extras=s3-cache,spot=false]
|
||||
steps:
|
||||
- uses: runs-on/action@v1
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
cache: npm
|
||||
# Specify the path to lock file for correct caching
|
||||
cache-dependency-path: ./docs/yarn.lock
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn install --frozen-lockfile --cwd ./docs
|
||||
|
||||
- name: Build with VitePress
|
||||
working-directory: ./docs
|
||||
run: |
|
||||
npm run docs:build_ubuntu
|
||||
touch .vitepress/dist/.nojekyll
|
||||
npm run docs:sitemap
|
||||
|
||||
- name: Upload artifact
|
||||
if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.merged) || github.event_name == 'workflow_dispatch' }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: px4_docs_build
|
||||
path: docs/.vitepress/dist/
|
||||
retention-days: 1
|
||||
|
||||
deploy:
|
||||
if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.merged) || github.event_name == 'workflow_dispatch' }}
|
||||
needs: build
|
||||
runs-on: [runs-on,runner=4cpu-linux-x64,image=ubuntu24-full-x64,"run-id=${{ github.run_id }}",spot=false]
|
||||
|
||||
steps:
|
||||
- name: Download Artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: px4_docs_build
|
||||
path: ~/_book
|
||||
|
||||
- name: Deploy
|
||||
run: |
|
||||
git clone --single-branch --branch main --depth 1 https://${{ secrets.PX4BUILTBOT_PERSONAL_ACCESS_TOKEN }}@github.com/PX4/docs.px4.io.git
|
||||
# make it an orphan branch
|
||||
cd docs.px4.io
|
||||
CURRENT_DATETIME=$(date +'%Y%m%d_%H_%M')
|
||||
git checkout --orphan "${CURRENT_DATETIME}_main"
|
||||
rm -rf ${BRANCH_NAME}
|
||||
mkdir -p ${BRANCH_NAME}
|
||||
cp -r ~/_book/* ${BRANCH_NAME}/
|
||||
git config --global user.name "${{ secrets.PX4BUILDBOT_USER }}"
|
||||
git config --global user.email "${{ secrets.PX4BUILDBOT_EMAIL }}"
|
||||
git add .
|
||||
git commit -a -m "PX4 docs build update (vitepress) `date`"
|
||||
# push branch as backup
|
||||
git push origin "${CURRENT_DATETIME}_main"
|
||||
# Now make main from backup and push updated
|
||||
git branch -D main
|
||||
git checkout -b main
|
||||
git push origin main -f
|
||||
@@ -1,35 +0,0 @@
|
||||
name: EKF Change Indicator
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- '**'
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
|
||||
# If two events are triggered within a short time in the same PR, cancel the run of the oldest event
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
unit_tests:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
container:
|
||||
image: px4io/px4-dev:v1.16.0-rc1-258-g0369abd556
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: main test
|
||||
run: |
|
||||
cd "$GITHUB_WORKSPACE"
|
||||
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
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,54 +0,0 @@
|
||||
name: EKF Update Change Indicator
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
|
||||
jobs:
|
||||
unit_tests:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
container:
|
||||
image: px4io/px4-dev:v1.16.0-rc1-258-g0369abd556
|
||||
|
||||
env:
|
||||
GIT_COMMITTER_EMAIL: bot@px4.io
|
||||
GIT_COMMITTER_NAME: PX4BuildBot
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: main test
|
||||
run: |
|
||||
cd "$GITHUB_WORKSPACE"
|
||||
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
make tests TESTFILTER=EKF
|
||||
|
||||
- name: Check if there exists diff and save result in variable
|
||||
id: diff-check
|
||||
working-directory: src/modules/ekf2/test/change_indication
|
||||
run: |
|
||||
if git diff --quiet; then
|
||||
echo "CHANGE_INDICATED=false" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "CHANGE_INDICATED=true" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: auto-commit any changes to change indication
|
||||
if: steps.diff-check.outputs.CHANGE_INDICATED == 'true'
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
with:
|
||||
file_pattern: 'src/modules/ekf2/test/change_indication/*.csv'
|
||||
commit_user_name: ${{ env.GIT_COMMITTER_NAME }}
|
||||
commit_user_email: ${{ env.GIT_COMMITTER_EMAIL }}
|
||||
commit_message: |
|
||||
[AUTO COMMIT] update change indication
|
||||
|
||||
See .github/workflows/ekf_update_change_indicator.yml for more details
|
||||
|
||||
- name: if there is a functional change, fail check
|
||||
if: steps.diff-check.outputs.CHANGE_INDICATED == 'true'
|
||||
run: exit 1
|
||||
@@ -1,58 +0,0 @@
|
||||
name: Failsafe Simulator Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- '**'
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
check: [
|
||||
"failsafe_web",
|
||||
]
|
||||
container:
|
||||
image: px4io/px4-dev:v1.16.0-rc1-258-g0369abd556
|
||||
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
|
||||
steps:
|
||||
- name: Install Node v20.18.0
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.18.0
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Git ownership workaround
|
||||
run: git config --system --add safe.directory '*'
|
||||
|
||||
- name: Install empscripten
|
||||
run: |
|
||||
git clone https://github.com/emscripten-core/emsdk.git _emscripten_sdk
|
||||
cd _emscripten_sdk
|
||||
git checkout 4.0.15
|
||||
./emsdk install latest
|
||||
./emsdk activate latest
|
||||
|
||||
- name: Testing [${{ matrix.check }}]
|
||||
run: |
|
||||
. ./_emscripten_sdk/emsdk_env.sh
|
||||
make ${{ matrix.check }}
|
||||
@@ -1,154 +0,0 @@
|
||||
name: FLASH usage analysis
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
issues: write
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- '**'
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
|
||||
env:
|
||||
MIN_FLASH_POS_DIFF_FOR_COMMENT: 50
|
||||
MIN_FLASH_NEG_DIFF_FOR_COMMENT: -50
|
||||
|
||||
jobs:
|
||||
analyze_flash:
|
||||
name: Analyzing ${{ matrix.target }}
|
||||
runs-on: [runs-on,runner=4cpu-linux-x64,image=ubuntu24-full-x64,"run-id=${{ github.run_id }}",spot=false]
|
||||
container:
|
||||
image: px4io/px4-dev:v1.16.0-rc1-258-g0369abd556
|
||||
strategy:
|
||||
matrix:
|
||||
target: [px4_fmu-v5x, px4_fmu-v6x]
|
||||
outputs:
|
||||
px4_fmu-v5x-bloaty-output: ${{ steps.gen-output.outputs.px4_fmu-v5x-bloaty-output }}
|
||||
px4_fmu-v5x-bloaty-summary-map: ${{ steps.gen-output.outputs.px4_fmu-v5x-bloaty-summary-map }}
|
||||
px4_fmu-v6x-bloaty-output: ${{ steps.gen-output.outputs.px4_fmu-v6x-bloaty-output }}
|
||||
px4_fmu-v6x-bloaty-summary-map: ${{ steps.gen-output.outputs.px4_fmu-v6x-bloaty-summary-map }}
|
||||
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 }}_flash-analysis
|
||||
|
||||
- name: Store the ELF with the change
|
||||
run: cp ./build/**/*.elf ./with-change.elf
|
||||
|
||||
- name: Clean previous build
|
||||
run: |
|
||||
make clean
|
||||
make distclean
|
||||
make submodulesclean
|
||||
|
||||
- name: If it's a PR checkout the base branch
|
||||
if: ${{ github.event.pull_request }}
|
||||
# As checkout creates a merge commit (merging the base branch into the PR branch), the base branch is the base for a diff of the PR changes.
|
||||
run: git checkout ${{ github.event.pull_request.base.ref }}
|
||||
|
||||
- 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 }}_flash-analysis
|
||||
|
||||
- name: Store the ELF before the change
|
||||
run: cp ./build/**/*.elf ./before-change.elf
|
||||
|
||||
- name: bloaty-action
|
||||
uses: PX4/bloaty-action@v1.0.0
|
||||
id: bloaty-step
|
||||
with:
|
||||
bloaty-file-args: ./with-change.elf -- ./before-change.elf
|
||||
bloaty-additional-args: -d sections,symbols -s vm -n 20
|
||||
output-to-summary: true
|
||||
|
||||
- name: Generate output
|
||||
id: gen-output
|
||||
run: |
|
||||
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
|
||||
echo "${{ matrix.target }}-bloaty-output<<$EOF" >> $GITHUB_OUTPUT
|
||||
echo "${{ steps.bloaty-step.outputs.bloaty-output-encoded }}" >> $GITHUB_OUTPUT
|
||||
echo "$EOF" >> $GITHUB_OUTPUT
|
||||
echo "${{ matrix.target }}-bloaty-summary-map<<$EOF" >> $GITHUB_OUTPUT
|
||||
echo '${{ steps.bloaty-step.outputs.bloaty-summary-map }}' >> $GITHUB_OUTPUT
|
||||
echo "$EOF" >> $GITHUB_OUTPUT
|
||||
|
||||
# TODO:
|
||||
# This part of the workflow is causing errors for forks. We should find a way to fix this and enable it again for forks.
|
||||
# Track this issue https://github.com/PX4/PX4-Autopilot/issues/24408
|
||||
post_pr_comment:
|
||||
name: Publish Results
|
||||
runs-on: [runs-on,runner=1cpu-linux-x64,image=ubuntu24-full-x64,"run-id=${{ github.run_id }}"]
|
||||
needs: [analyze_flash]
|
||||
env:
|
||||
V5X-SUMMARY-MAP-ABS: ${{ fromJSON(fromJSON(needs.analyze_flash.outputs.px4_fmu-v5x-bloaty-summary-map).vm-absolute) }}
|
||||
V5X-SUMMARY-MAP-PERC: ${{ fromJSON(fromJSON(needs.analyze_flash.outputs.px4_fmu-v5x-bloaty-summary-map).vm-percentage) }}
|
||||
V6X-SUMMARY-MAP-ABS: ${{ fromJSON(fromJSON(needs.analyze_flash.outputs.px4_fmu-v6x-bloaty-summary-map).vm-absolute) }}
|
||||
V6X-SUMMARY-MAP-PERC: ${{ fromJSON(fromJSON(needs.analyze_flash.outputs.px4_fmu-v6x-bloaty-summary-map).vm-percentage) }}
|
||||
if: github.event.pull_request && github.event.pull_request.head.repo.full_name == github.repository
|
||||
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
|
||||
# This can't be moved to the job-level conditions, as GH actions don't allow a job-level if condition to access the env.
|
||||
if: |
|
||||
steps.fc.outputs.comment-id != '' ||
|
||||
env.V5X-SUMMARY-MAP-ABS >= fromJSON(env.MIN_FLASH_POS_DIFF_FOR_COMMENT) ||
|
||||
env.V5X-SUMMARY-MAP-ABS <= fromJSON(env.MIN_FLASH_NEG_DIFF_FOR_COMMENT) ||
|
||||
env.V6X-SUMMARY-MAP-ABS >= fromJSON(env.MIN_FLASH_POS_DIFF_FOR_COMMENT) ||
|
||||
env.V6X-SUMMARY-MAP-ABS <= fromJSON(env.MIN_FLASH_NEG_DIFF_FOR_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 [Total VM Diff: ${{ env.V5X-SUMMARY-MAP-ABS }} byte (${{ env.V5X-SUMMARY-MAP-PERC}} %)]</summary>
|
||||
|
||||
```
|
||||
${{ needs.analyze_flash.outputs.px4_fmu-v5x-bloaty-output }}
|
||||
```
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>px4_fmu-v6x [Total VM Diff: ${{ env.V6X-SUMMARY-MAP-ABS }} byte (${{ env.V6X-SUMMARY-MAP-PERC }} %)]</summary>
|
||||
|
||||
```
|
||||
${{ needs.analyze_flash.outputs.px4_fmu-v6x-bloaty-output }}
|
||||
```
|
||||
</details>
|
||||
|
||||
**Updated: _${{ steps.bt.outputs.timestamp }}_**
|
||||
edit-mode: replace
|
||||
@@ -1,49 +0,0 @@
|
||||
name: Fuzzing
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 6 * * *' # UTC 6am every day.
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write # for JasonEtco/create-an-issue
|
||||
|
||||
env:
|
||||
RUNS_IN_DOCKER: true
|
||||
|
||||
jobs:
|
||||
Fuzzing:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: px4io/px4-dev:v1.16.0-rc2-4-gb67c65bfe6
|
||||
steps:
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
apt update && apt install -y clang
|
||||
|
||||
- name: Fix git in Container
|
||||
run: |
|
||||
git config --global --add safe.directory $(realpath .)
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Build and Run Fuzz Tests
|
||||
run: |
|
||||
# Only build the tests
|
||||
export CC=clang
|
||||
export CXX=clang++
|
||||
make tests TESTFILTER=__no_tests__
|
||||
|
||||
# Run the fuzz tests
|
||||
for fuzz_binary in build/px4_sitl_test/*fuzz*; do
|
||||
./Tools/ci/run_fuzz_tests.sh $fuzz_binary 15m
|
||||
done
|
||||
|
||||
# Create a github issue in case of a failure
|
||||
- name: Create Issue
|
||||
if: ${{ failure() }}
|
||||
uses: JasonEtco/create-an-issue@v2
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
WORKFLOW_RUN_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||||
with:
|
||||
filename: .github/fuzzing_issue_template.md
|
||||
@@ -1,67 +0,0 @@
|
||||
name: ITCM check
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- '**'
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
check_itcm:
|
||||
name: Checking ${{ matrix.target }}
|
||||
runs-on: [runs-on,runner=4cpu-linux-x64,image=ubuntu24-full-x64,"run-id=${{ github.run_id }}",spot=false]
|
||||
container:
|
||||
image: px4io/px4-dev:v1.16.0-rc1-258-g0369abd556
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- target: px4_fmu-v5x
|
||||
scripts: >
|
||||
boards/px4/fmu-v5x/nuttx-config/scripts/itcm_gen_functions.ld
|
||||
boards/px4/fmu-v5x/nuttx-config/scripts/itcm_static_functions.ld
|
||||
- target: px4_fmu-v6xrt
|
||||
scripts: >
|
||||
boards/px4/fmu-v6xrt/nuttx-config/scripts/itcm_functions_includes.ld
|
||||
boards/px4/fmu-v6xrt/nuttx-config/scripts/itcm_static_functions.ld
|
||||
- target: nxp_tropic-community
|
||||
scripts: >
|
||||
boards/nxp/tropic-community/nuttx-config/scripts/itcm_functions_includes.ld
|
||||
boards/nxp/tropic-community/nuttx-config/scripts/itcm_static_functions.ld
|
||||
- target: nxp_mr-tropic
|
||||
scripts: >
|
||||
boards/nxp/mr-tropic/nuttx-config/scripts/itcm_functions_includes.ld
|
||||
boards/nxp/mr-tropic/nuttx-config/scripts/itcm_static_functions.ld
|
||||
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: Copy built ELF
|
||||
run: cp ./build/**/*.elf ./built.elf
|
||||
|
||||
- name: Install itcm-check dependencies
|
||||
run: pip3 install -r Tools/setup/optional-requirements.txt --break-system-packages
|
||||
|
||||
- name: Execute the itcm-check
|
||||
run: python3 Tools/itcm_check.py --elf-file built.elf --script-files ${{ matrix.scripts }}
|
||||
@@ -1,21 +0,0 @@
|
||||
# This workflow will triage pull requests and apply a label based on the
|
||||
# paths that are modified in the pull request.
|
||||
# The paths are set up in .github/labeler.yml
|
||||
#
|
||||
# See: https://github.com/actions/labeler
|
||||
|
||||
name: Labeler
|
||||
on: [pull_request_target]
|
||||
|
||||
jobs:
|
||||
label:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
|
||||
steps:
|
||||
- uses: actions/labeler@v5
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
@@ -1,45 +0,0 @@
|
||||
name: MAVROS Mission Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- '**'
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Build SITL and Run Tests (inside old ROS container)
|
||||
run: |
|
||||
docker run --rm \
|
||||
-v "${GITHUB_WORKSPACE}:/workspace" \
|
||||
-w /workspace \
|
||||
px4io/px4-dev-ros-melodic:2021-09-08 \
|
||||
bash -c '
|
||||
git config --global --add safe.directory /workspace
|
||||
PX4_SBOM_DISABLE=1 make px4_sitl_default
|
||||
PX4_SBOM_DISABLE=1 make px4_sitl_default sitl_gazebo-classic
|
||||
./test/rostest_px4_run.sh \
|
||||
mavros_posix_test_mission.test \
|
||||
mission:=MC_mission_box \
|
||||
vehicle:=iris
|
||||
'
|
||||
@@ -1,44 +0,0 @@
|
||||
name: MAVROS Offboard Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- '**'
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Build SITL and Run Tests (inside old ROS container)
|
||||
run: |
|
||||
docker run --rm \
|
||||
-v "${GITHUB_WORKSPACE}:/workspace" \
|
||||
-w /workspace \
|
||||
px4io/px4-dev-ros-melodic:2021-09-08 \
|
||||
bash -c '
|
||||
git config --global --add safe.directory /workspace
|
||||
PX4_SBOM_DISABLE=1 make px4_sitl_default
|
||||
PX4_SBOM_DISABLE=1 make px4_sitl_default sitl_gazebo-classic
|
||||
./test/rostest_px4_run.sh \
|
||||
mavros_posix_tests_offboard_posctl.test \
|
||||
vehicle:=iris
|
||||
'
|
||||
@@ -1,46 +0,0 @@
|
||||
name: Nuttx Target with extra env config
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- '**'
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
container:
|
||||
image: px4io/px4-dev:v1.16.0-rc1-258-g0369abd556
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
config:
|
||||
- px4_fmu-v5_default
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Build PX4 and Run Test [${{ matrix.config }}]
|
||||
run: |
|
||||
cd "$GITHUB_WORKSPACE"
|
||||
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
export PX4_EXTRA_NUTTX_CONFIG='CONFIG_NSH_LOGIN_PASSWORD="test";CONFIG_NSH_CONSOLE_LOGIN=y'
|
||||
echo "PX4_EXTRA_NUTTX_CONFIG: $PX4_EXTRA_NUTTX_CONFIG"
|
||||
|
||||
make ${{ matrix.config }} nuttx_context
|
||||
|
||||
echo "Check that the config option is set"
|
||||
grep CONFIG_NSH_LOGIN_PASSWORD build/${{ matrix.config }}/NuttX/nuttx/.config
|
||||
@@ -1,33 +0,0 @@
|
||||
name: Python CI Checks
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- '**'
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- 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,144 +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: ROS Integration Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- '**'
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: [runs-on,runner=4cpu-linux-x64,image=ubuntu22-full-x64,"run-id=${{ github.run_id }}",spot=false]
|
||||
container:
|
||||
image: px4io/px4-dev-ros2-galactic:2021-09-08
|
||||
options: --privileged --ulimit core=-1 --security-opt seccomp=unconfined
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Git Ownership Workaround
|
||||
run: git config --system --add safe.directory '*'
|
||||
|
||||
- name: Update ROS Keys
|
||||
run: |
|
||||
sudo rm /etc/apt/sources.list.d/ros2.list && \
|
||||
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg && \
|
||||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
|
||||
|
||||
- name: Install gazebo
|
||||
run: |
|
||||
apt update && apt install -y gazebo11 libgazebo11-dev gstreamer1.0-plugins-bad gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly libgstreamer-plugins-base1.0-dev
|
||||
|
||||
- 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@v4
|
||||
with:
|
||||
path: ~/.ccache
|
||||
key: ros_integration_tests-${{matrix.config.build_type}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
|
||||
restore-keys: ros_integration_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 = 300M" >> ~/.ccache/ccache.conf
|
||||
echo "hash_dir = false" >> ~/.ccache/ccache.conf
|
||||
ccache -s
|
||||
ccache -z
|
||||
|
||||
- name: Get and build micro-xrce-dds-agent
|
||||
run: |
|
||||
cd /opt
|
||||
git clone --recursive https://github.com/eProsima/Micro-XRCE-DDS-Agent.git
|
||||
cd Micro-XRCE-DDS-Agent
|
||||
git checkout v2.2.1 # recent versions require cmake 3.22, but px4-dev-ros2-galactic:2021-09-08 is on 3.16
|
||||
sed -i 's/_fastdds_tag 2.8.x/_fastdds_tag 2.8.2/g' CMakeLists.txt
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
make -j2
|
||||
- name: ccache post-run micro-xrce-dds-agent
|
||||
run: ccache -s
|
||||
|
||||
- name: Get and build the ros2 interface library
|
||||
shell: bash
|
||||
run: |
|
||||
PX4_DIR="$(pwd)"
|
||||
. /opt/ros/galactic/setup.bash
|
||||
mkdir -p /opt/px4_ws/src
|
||||
cd /opt/px4_ws/src
|
||||
BRANCH="${GITHUB_HEAD_REF:-$GITHUB_REF_NAME}"
|
||||
REPO_URL="https://github.com/Auterion/px4-ros2-interface-lib.git"
|
||||
if git ls-remote --heads "$REPO_URL" "$BRANCH" | grep -q "$BRANCH"; then
|
||||
echo "Cloning px4-ros2-interface-lib with matching branch: $BRANCH"
|
||||
git clone --recursive --branch "$BRANCH" "$REPO_URL"
|
||||
else
|
||||
echo "Branch '$BRANCH' not found in px4-ros2-interface-lib, using default (main)"
|
||||
git clone --recursive "$REPO_URL"
|
||||
fi
|
||||
# Ignore python packages due to compilation issue (can be enabled when updating ROS)
|
||||
touch px4-ros2-interface-lib/px4_ros2_py/COLCON_IGNORE || true
|
||||
touch px4-ros2-interface-lib/examples/python/COLCON_IGNORE || true
|
||||
cd ..
|
||||
# Copy messages to ROS workspace
|
||||
"${PX4_DIR}/Tools/copy_to_ros_ws.sh" "$(pwd)"
|
||||
rm -rf src/translation_node src/px4_msgs_old
|
||||
colcon build --symlink-install
|
||||
- name: ccache post-run ros workspace
|
||||
run: ccache -s
|
||||
|
||||
- name: Build PX4
|
||||
env:
|
||||
PX4_SBOM_DISABLE: 1
|
||||
run: make px4_sitl_default
|
||||
- name: ccache post-run px4/firmware
|
||||
run: ccache -s
|
||||
- name: Build SITL Gazebo
|
||||
run: make px4_sitl_default sitl_gazebo-classic
|
||||
- name: ccache post-run sitl_gazebo-classic
|
||||
run: ccache -s
|
||||
|
||||
- name: Core dump settings
|
||||
run: |
|
||||
ulimit -c unlimited
|
||||
echo "`pwd`/%e.core" > /proc/sys/kernel/core_pattern
|
||||
|
||||
- name: Run tests
|
||||
shell: bash
|
||||
run: |
|
||||
. /opt/px4_ws/install/setup.bash
|
||||
/opt/Micro-XRCE-DDS-Agent/build/MicroXRCEAgent udp4 localhost -p 8888 -v 0 &
|
||||
test/ros_test_runner.py --verbose --model iris --upload --force-color
|
||||
timeout-minutes: 45
|
||||
|
||||
- name: Upload failed logs
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: failed-logs.zip
|
||||
path: |
|
||||
logs/**/**/**/*.log
|
||||
logs/**/**/**/*.ulg
|
||||
build/px4_sitl_default/tmp_ros_tests/rootfs/log/**/*.ulg
|
||||
@@ -1,61 +0,0 @@
|
||||
name: ROS Translation Node Tests
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- '**'
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build_and_test:
|
||||
name: Build and test
|
||||
runs-on: [runs-on,runner=4cpu-linux-x64,image=ubuntu24-full-x64,"run-id=${{ github.run_id }}",spot=false]
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
config:
|
||||
- {ros_version: "humble", ubuntu: "jammy"}
|
||||
- {ros_version: "jazzy", ubuntu: "noble"}
|
||||
container:
|
||||
image: rostooling/setup-ros-docker:ubuntu-${{ matrix.config.ubuntu }}-latest
|
||||
steps:
|
||||
- name: Setup ROS 2 (${{ matrix.config.ros_version }})
|
||||
uses: ros-tooling/setup-ros@v0.7
|
||||
with:
|
||||
required-ros-distributions: ${{ matrix.config.ros_version }}
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
# Workaround for https://github.com/actions/runner/issues/2033
|
||||
- name: ownership workaround
|
||||
run: git config --system --add safe.directory '*'
|
||||
|
||||
- name: Check .msg file versioning
|
||||
if: github.event_name == 'pull_request'
|
||||
run: |
|
||||
./Tools/ci/check_msg_versioning.sh ${{ github.event.pull_request.base.sha }} ${{github.event.pull_request.head.sha}}
|
||||
|
||||
- name: Build and test
|
||||
run: |
|
||||
ros_ws=/ros_ws
|
||||
mkdir -p $ros_ws/src
|
||||
./Tools/copy_to_ros_ws.sh $ros_ws
|
||||
cd $ros_ws
|
||||
source /opt/ros/${{ matrix.config.ros_version }}/setup.sh
|
||||
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --symlink-install --event-handlers=console_cohesion+
|
||||
source ./install/setup.sh
|
||||
./build/translation_node/translation_node_unit_tests
|
||||
@@ -1,42 +0,0 @@
|
||||
name: SBOM License Check
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
- 'release/**'
|
||||
- 'stable'
|
||||
paths:
|
||||
- '.gitmodules'
|
||||
- 'Tools/ci/license-overrides.yaml'
|
||||
- 'Tools/ci/generate_sbom.py'
|
||||
pull_request:
|
||||
branches:
|
||||
- '**'
|
||||
paths:
|
||||
- '.gitmodules'
|
||||
- 'Tools/ci/license-overrides.yaml'
|
||||
- 'Tools/ci/generate_sbom.py'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
verify-licenses:
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
submodules: false
|
||||
|
||||
- name: Install PyYAML
|
||||
run: pip install pyyaml --break-system-packages
|
||||
|
||||
- name: Verify submodule licenses
|
||||
run: python3 Tools/ci/generate_sbom.py --verify-licenses --source-dir .
|
||||
@@ -1,132 +0,0 @@
|
||||
name: SBOM Monthly Audit
|
||||
|
||||
on:
|
||||
schedule:
|
||||
# First Monday of each month at 09:00 UTC
|
||||
- cron: '0 9 1-7 * 1'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
branch:
|
||||
description: 'Branch to audit (leave empty for current)'
|
||||
required: false
|
||||
type: string
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
|
||||
jobs:
|
||||
audit:
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ inputs.branch || github.ref }}
|
||||
fetch-depth: 1
|
||||
submodules: recursive
|
||||
|
||||
- name: Install PyYAML
|
||||
run: pip install pyyaml --break-system-packages
|
||||
|
||||
- name: Run license verification
|
||||
id: verify
|
||||
continue-on-error: true
|
||||
run: |
|
||||
python3 Tools/ci/generate_sbom.py --verify-licenses --source-dir . 2>&1 | tee /tmp/sbom-verify.txt
|
||||
echo "exit_code=$?" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Check for issues
|
||||
id: check
|
||||
run: |
|
||||
if grep -q "NOASSERTION" /tmp/sbom-verify.txt; then
|
||||
echo "has_issues=true" >> "$GITHUB_OUTPUT"
|
||||
# Extract NOASSERTION lines
|
||||
grep "NOASSERTION" /tmp/sbom-verify.txt | grep -v "skipped" > /tmp/sbom-issues.txt || true
|
||||
# Extract copyleft lines
|
||||
sed -n '/Copyleft licenses detected/,/^$/p' /tmp/sbom-verify.txt > /tmp/sbom-copyleft.txt || true
|
||||
else
|
||||
echo "has_issues=false" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: Create issue if problems found
|
||||
if: steps.check.outputs.has_issues == 'true'
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const fs = require('fs');
|
||||
|
||||
const fullOutput = fs.readFileSync('/tmp/sbom-verify.txt', 'utf8');
|
||||
let issueLines = '';
|
||||
try {
|
||||
issueLines = fs.readFileSync('/tmp/sbom-issues.txt', 'utf8');
|
||||
} catch (e) {
|
||||
issueLines = 'No specific NOASSERTION lines captured.';
|
||||
}
|
||||
let copyleftLines = '';
|
||||
try {
|
||||
copyleftLines = fs.readFileSync('/tmp/sbom-copyleft.txt', 'utf8');
|
||||
} catch (e) {
|
||||
copyleftLines = '';
|
||||
}
|
||||
|
||||
const date = new Date().toISOString().split('T')[0];
|
||||
const branch = '${{ inputs.branch || github.ref_name }}';
|
||||
|
||||
// Check for existing open issue to avoid duplicates
|
||||
const existing = await github.rest.issues.listForRepo({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
labels: 'sbom-audit',
|
||||
state: 'open',
|
||||
});
|
||||
|
||||
if (existing.data.length > 0) {
|
||||
// Update existing issue with new findings
|
||||
await github.rest.issues.createComment({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: existing.data[0].number,
|
||||
body: `## Monthly audit update (${date})\n\nIssues still present:\n\n\`\`\`\n${issueLines}\n\`\`\`\n${copyleftLines ? `\n### Copyleft warnings\n\`\`\`\n${copyleftLines}\n\`\`\`` : ''}`,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
await github.rest.issues.create({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
title: `chore(sbom): license audit found NOASSERTION entries on ${branch} (${date})`,
|
||||
labels: ['sbom-audit'],
|
||||
assignees: ['mrpollo'],
|
||||
body: [
|
||||
`## SBOM Monthly Audit -- ${branch} -- ${date}`,
|
||||
'',
|
||||
'The automated SBOM license audit found submodules with unresolved licenses.',
|
||||
'',
|
||||
'### NOASSERTION entries',
|
||||
'',
|
||||
'```',
|
||||
issueLines,
|
||||
'```',
|
||||
'',
|
||||
copyleftLines ? `### Copyleft warnings\n\n\`\`\`\n${copyleftLines}\n\`\`\`\n` : '',
|
||||
'### How to fix',
|
||||
'',
|
||||
'1. Check the submodule repo for a LICENSE file',
|
||||
'2. Add an override to `Tools/ci/license-overrides.yaml`',
|
||||
'3. Run `python3 Tools/ci/generate_sbom.py --verify-licenses --source-dir .` to confirm',
|
||||
'',
|
||||
'### Full output',
|
||||
'',
|
||||
'<details>',
|
||||
'<summary>Click to expand</summary>',
|
||||
'',
|
||||
'```',
|
||||
fullOutput,
|
||||
'```',
|
||||
'',
|
||||
'</details>',
|
||||
'',
|
||||
'cc @mrpollo',
|
||||
].join('\n'),
|
||||
});
|
||||
@@ -1,164 +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'
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- '**'
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Testing PX4 ${{ matrix.config.model }}
|
||||
runs-on: [runs-on,runner=4cpu-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
|
||||
# VTOL/tailsitter disabled: persistent flaky CI failures (timeouts, erratic
|
||||
# transitions). Re-enable once the test infrastructure is stabilized.
|
||||
# - {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}}
|
||||
PX4_SBOM_DISABLE: 1
|
||||
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}} test/mavsdk_tests/configs/sitl.json --verbose --force-color
|
||||
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/log/**/*.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,21 +0,0 @@
|
||||
name: 'Handle stale issues and PRs'
|
||||
on:
|
||||
schedule:
|
||||
- cron: '30 1 * * *'
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v10
|
||||
with:
|
||||
operations-per-run: 250
|
||||
days-before-stale: 90
|
||||
days-before-close: 30
|
||||
stale-issue-label: 'stale'
|
||||
stale-pr-label: 'stale'
|
||||
remove-stale-when-updated: true
|
||||
stale-issue-message: ''
|
||||
close-issue-message: 'This issue has been automatically closed due to 120 days of inactivity. If you believe this is still relevant, please feel free to reopen it or create a new issue.'
|
||||
stale-pr-message: ''
|
||||
close-pr-message: 'This pull request has been automatically closed due to 120 days of inactivity. If you would like to continue, please feel free to reopen it or submit a new PR.'
|
||||
@@ -1,43 +0,0 @@
|
||||
name: Sync release branch to px4-ros2-interface-lib
|
||||
|
||||
on:
|
||||
create:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
branch:
|
||||
description: 'Release branch name (e.g. release/1.18)'
|
||||
required: true
|
||||
type: string
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
notify-interface-lib:
|
||||
if: >-
|
||||
github.repository == 'PX4/PX4-Autopilot' &&
|
||||
(
|
||||
(github.event_name == 'create' && github.ref_type == 'branch' && startsWith(github.ref_name, 'release/')) ||
|
||||
github.event_name == 'workflow_dispatch'
|
||||
)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Determine branch name
|
||||
id: params
|
||||
run: |
|
||||
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
|
||||
BRANCH="${{ inputs.branch }}"
|
||||
else
|
||||
BRANCH="${{ github.ref_name }}"
|
||||
fi
|
||||
echo "branch=$BRANCH" >> "$GITHUB_OUTPUT"
|
||||
echo "Dispatching for branch: $BRANCH"
|
||||
|
||||
- name: Dispatch release branch creation
|
||||
run: |
|
||||
BRANCH="${{ steps.params.outputs.branch }}"
|
||||
curl -s -f -X POST \
|
||||
-H "Authorization: token ${{ secrets.PX4BUILTBOT_PERSONAL_ACCESS_TOKEN }}" \
|
||||
-H "Accept: application/vnd.github.v3+json" \
|
||||
https://api.github.com/repos/Auterion/px4-ros2-interface-lib/dispatches \
|
||||
-d "{\"event_type\":\"px4_release_branch\",\"client_payload\":{\"branch\":\"$BRANCH\"}}"
|
||||
echo "Dispatched px4_release_branch event for $BRANCH"
|
||||
@@ -1,62 +0,0 @@
|
||||
name: Sync ROS 2 messages to px4_msgs
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
- 'stable'
|
||||
- 'beta'
|
||||
- 'release/**'
|
||||
paths:
|
||||
- 'msg/**'
|
||||
- 'srv/**'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
sync_to_px4_msgs:
|
||||
if: github.repository == 'PX4/PX4-Autopilot'
|
||||
runs-on: [runs-on,runner=4cpu-linux-x64,image=ubuntu22-full-x64,"run-id=${{ github.run_id }}",spot=false]
|
||||
steps:
|
||||
- name: Checkout PX4 repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup git credentials
|
||||
run: |
|
||||
git config --global user.name "${{ secrets.PX4BUILDBOT_USER }}"
|
||||
git config --global user.email "${{ secrets.PX4BUILDBOT_EMAIL }}"
|
||||
|
||||
- name: Clone PX4_msgs repo
|
||||
run: |
|
||||
git clone https://${{ secrets.PX4BUILTBOT_PERSONAL_ACCESS_TOKEN }}@github.com/PX4/px4_msgs.git
|
||||
|
||||
- name: Check out the same branch as the PX4 repo
|
||||
run: |
|
||||
cd px4_msgs
|
||||
if git checkout ${{ github.ref_name }}; then
|
||||
echo "Checked out existing branch"
|
||||
else
|
||||
git checkout -b ${{ github.ref_name }}
|
||||
fi
|
||||
|
||||
- name: Copy ROS 2 messages
|
||||
run: |
|
||||
rm -f px4_msgs/msg/*.msg
|
||||
rm -f px4_msgs/msg/versioned/*.msg
|
||||
rm -f px4_msgs/srv/*.srv
|
||||
rm -f px4_msgs/srv/versioned/*.srv
|
||||
cp msg/*.msg px4_msgs/msg/
|
||||
cp msg/versioned/*.msg px4_msgs/msg/ || true
|
||||
cp srv/*.srv px4_msgs/srv/
|
||||
cp srv/versioned/*.srv px4_msgs/srv/ || true
|
||||
|
||||
- name: Commit and push changes
|
||||
run: |
|
||||
cd px4_msgs
|
||||
git status
|
||||
git add .
|
||||
git commit -a -m "Update to PX4 ${{ github.sha }}" || true
|
||||
git push origin ${{ github.ref_name }} || true
|
||||
cd ..
|
||||
rm -rf px4_msgs
|
||||
@@ -1,135 +0,0 @@
|
||||
name: Tag px4_msgs from PX4 release tags
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*.*.*'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag_name:
|
||||
description: 'PX4 tag to propagate (example: v1.17.0)'
|
||||
required: true
|
||||
type: string
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
tag_px4_msgs:
|
||||
if: github.repository == 'PX4/PX4-Autopilot'
|
||||
runs-on: [runs-on,runner=4cpu-linux-x64,image=ubuntu22-full-x64,"run-id=${{ github.run_id }}",spot=false]
|
||||
env:
|
||||
TAG_NAME: ${{ github.event_name == 'workflow_dispatch' && inputs.tag_name || github.ref_name }}
|
||||
steps:
|
||||
- name: Checkout PX4 repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
|
||||
- name: Setup git credentials
|
||||
run: |
|
||||
git config --global user.name "${{ secrets.PX4BUILDBOT_USER }}"
|
||||
git config --global user.email "${{ secrets.PX4BUILDBOT_EMAIL }}"
|
||||
|
||||
- name: Resolve release branch from tag
|
||||
id: tag_info
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
if [[ ! "${TAG_NAME}" =~ ^v([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then
|
||||
echo "Tag format is not stable vX.Y.Z, skipping: ${TAG_NAME}"
|
||||
echo "should_run=false" >> "$GITHUB_OUTPUT"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "should_run=true" >> "$GITHUB_OUTPUT"
|
||||
|
||||
major="${BASH_REMATCH[1]}"
|
||||
minor="${BASH_REMATCH[2]}"
|
||||
release_branch="release/${major}.${minor}"
|
||||
|
||||
git show-ref --verify --quiet "refs/heads/${release_branch}" || {
|
||||
echo "PX4 branch ${release_branch} not found"
|
||||
exit 1
|
||||
}
|
||||
|
||||
tag_date="$(git for-each-ref --format='%(creatordate:iso8601)' "refs/tags/${TAG_NAME}")"
|
||||
if [[ -z "${tag_date}" ]]; then
|
||||
echo "Unable to resolve tag date for ${TAG_NAME}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "release_branch=${release_branch}" >> "$GITHUB_OUTPUT"
|
||||
echo "tag_date=${tag_date}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Clone px4_msgs repo
|
||||
if: steps.tag_info.outputs.should_run == 'true'
|
||||
run: |
|
||||
git clone https://${{ secrets.PX4BUILTBOT_PERSONAL_ACCESS_TOKEN }}@github.com/PX4/px4_msgs.git
|
||||
|
||||
- name: Checkout matching px4_msgs release branch
|
||||
if: steps.tag_info.outputs.should_run == 'true'
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
cd px4_msgs
|
||||
|
||||
release_branch="${{ steps.tag_info.outputs.release_branch }}"
|
||||
if git show-ref --verify --quiet "refs/remotes/origin/${release_branch}"; then
|
||||
git checkout -B "${release_branch}" "origin/${release_branch}"
|
||||
else
|
||||
echo "px4_msgs branch ${release_branch} does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Verify msg and srv trees are identical
|
||||
if: steps.tag_info.outputs.should_run == 'true'
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
release_branch="${{ steps.tag_info.outputs.release_branch }}"
|
||||
git checkout "${release_branch}"
|
||||
|
||||
# Use the same synchronization logic as sync_to_px4_msgs.yml,
|
||||
# then verify there are no changes in px4_msgs.
|
||||
rm -f px4_msgs/msg/*.msg
|
||||
rm -f px4_msgs/msg/versioned/*.msg
|
||||
rm -f px4_msgs/srv/*.srv
|
||||
rm -f px4_msgs/srv/versioned/*.srv
|
||||
cp msg/*.msg px4_msgs/msg/
|
||||
cp msg/versioned/*.msg px4_msgs/msg/ || true
|
||||
cp srv/*.srv px4_msgs/srv/
|
||||
cp srv/versioned/*.srv px4_msgs/srv/ || true
|
||||
|
||||
if ! git -C px4_msgs diff --exit-code -- msg srv; then
|
||||
echo "Message/service definitions differ between PX4 ${release_branch} and px4_msgs ${release_branch}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Create and push tag in px4_msgs
|
||||
if: steps.tag_info.outputs.should_run == 'true'
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
cd px4_msgs
|
||||
|
||||
target="$(git rev-parse HEAD)"
|
||||
existing_target="$(git rev-parse "refs/tags/${TAG_NAME}^{}" 2>/dev/null || true)"
|
||||
|
||||
if [[ -n "${existing_target}" ]]; then
|
||||
if [[ "${existing_target}" == "${target}" ]]; then
|
||||
echo "Tag ${TAG_NAME} already exists on ${target}; nothing to do"
|
||||
exit 0
|
||||
fi
|
||||
echo "Tag ${TAG_NAME} already exists on ${existing_target}, expected ${target}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
GIT_COMMITTER_DATE="${{ steps.tag_info.outputs.tag_date }}" \
|
||||
git tag -a "${TAG_NAME}" "${target}" \
|
||||
-m "PX4 msgs and srvs definitions matching PX4 stable release ${TAG_NAME#v}"
|
||||
|
||||
git push origin "refs/tags/${TAG_NAME}"
|
||||
@@ -0,0 +1,33 @@
|
||||
# How to install:
|
||||
# gem install github_changelog_generator
|
||||
# How to run:
|
||||
# github_changelog_generator -u PX4 -p Firmware
|
||||
# Description:
|
||||
# The following params are sensible defaults for the PX4 project,
|
||||
# if you want to do a changelog before a release you need to update since-tag and future-releases,
|
||||
|
||||
# Params:
|
||||
# github_changelog_generator --help for all options
|
||||
|
||||
# max-issues
|
||||
# max threshold for github api queries
|
||||
# make sure you set your CHANGELOG_GITHUB_TOKEN before
|
||||
# running
|
||||
max-issues=1500
|
||||
|
||||
# exclude-tags-regex
|
||||
# excludes release candidates
|
||||
exclude-tags-regex=rc[0-9]{1,}|beta[0-9]{1,}
|
||||
|
||||
# since-tag
|
||||
# version of last stable release
|
||||
# you need to change this depending on what you need
|
||||
# if you want a changelog between versions this is the lowest version
|
||||
since-tag=1.6.5
|
||||
|
||||
# future-release
|
||||
# version you are about to release
|
||||
# if you want a changelog between a version and all unreleased changes grouped as a release
|
||||
# eg: v1.6.5 to v1.7.0
|
||||
future-release=v1.7.0
|
||||
|
||||
+1
-52
@@ -17,6 +17,7 @@ Testing/
|
||||
Packages/*
|
||||
build/*
|
||||
build_*/
|
||||
core
|
||||
cscope.out
|
||||
cscope.in.out
|
||||
cscope.po.out
|
||||
@@ -63,55 +64,3 @@ posix-configs/SITL/init/test/*_generated
|
||||
*.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/
|
||||
keys/
|
||||
|
||||
# metadata
|
||||
_emscripten_sdk/
|
||||
|
||||
# virtual Python environment
|
||||
.venv
|
||||
|
||||
+49
-106
@@ -1,117 +1,60 @@
|
||||
[submodule "src/modules/mavlink/mavlink"]
|
||||
path = src/modules/mavlink/mavlink
|
||||
url = https://github.com/mavlink/mavlink.git
|
||||
[submodule "mavlink/include/mavlink/v2.0"]
|
||||
path = mavlink/include/mavlink/v2.0
|
||||
url = https://github.com/mavlink/c_library_v2.git
|
||||
branch = master
|
||||
[submodule "Tools/simulation/jmavsim/jMAVSim"]
|
||||
path = Tools/simulation/jmavsim/jMAVSim
|
||||
[submodule "src/drivers/uavcan/libuavcan"]
|
||||
path = src/drivers/uavcan/libuavcan
|
||||
url = https://github.com/PX4/uavcan.git
|
||||
branch = px4
|
||||
[submodule "msg/tools/genmsg"]
|
||||
path = msg/tools/genmsg
|
||||
url = https://github.com/PX4/genmsg.git
|
||||
branch = px4
|
||||
[submodule "msg/tools/gencpp"]
|
||||
path = msg/tools/gencpp
|
||||
url = https://github.com/PX4/gencpp.git
|
||||
branch = px4
|
||||
[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
|
||||
branch = master
|
||||
[submodule "Tools/sitl_gazebo"]
|
||||
path = Tools/sitl_gazebo
|
||||
url = https://github.com/PX4/sitl_gazebo.git
|
||||
branch = master
|
||||
[submodule "src/lib/matrix"]
|
||||
path = src/lib/matrix
|
||||
url = https://github.com/PX4/Matrix.git
|
||||
branch = master
|
||||
[submodule "src/lib/DriverFramework"]
|
||||
path = src/lib/DriverFramework
|
||||
url = https://github.com/PX4/DriverFramework.git
|
||||
branch = master
|
||||
[submodule "src/lib/ecl"]
|
||||
path = src/lib/ecl
|
||||
url = https://github.com/PX4/ecl.git
|
||||
branch = master
|
||||
[submodule "boards/atlflight/cmake_hexagon"]
|
||||
path = boards/atlflight/cmake_hexagon
|
||||
url = https://github.com/PX4/cmake_hexagon.git
|
||||
branch = px4
|
||||
[submodule "src/drivers/gps/devices"]
|
||||
path = src/drivers/gps/devices
|
||||
url = https://github.com/PX4/PX4-GPSDrivers.git
|
||||
branch = main
|
||||
url = https://github.com/PX4/GpsDrivers.git
|
||||
branch = master
|
||||
[submodule "src/modules/micrortps_bridge/micro-CDR"]
|
||||
path = src/modules/micrortps_bridge/micro-CDR
|
||||
url = https://github.com/PX4/micro-CDR.git
|
||||
branch = px4
|
||||
[submodule "platforms/nuttx/NuttX/nuttx"]
|
||||
path = platforms/nuttx/NuttX/nuttx
|
||||
url = https://github.com/PX4/NuttX.git
|
||||
branch = px4_firmware_nuttx-10.3.0+
|
||||
branch = px4_firmware_nuttx-7.28+
|
||||
[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 = px4_firmware_nuttx-7.28+
|
||||
[submodule "cmake/configs/uavcan_board_ident"]
|
||||
path = cmake/configs/uavcan_board_ident
|
||||
url = https://github.com/PX4/uavcan_board_ident.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
|
||||
[submodule "test/fuzztest"]
|
||||
path = test/fuzztest
|
||||
url = https://github.com/google/fuzztest.git
|
||||
branch = main
|
||||
[submodule "src/lib/tensorflow_lite_micro/tflite_micro"]
|
||||
path = src/lib/tensorflow_lite_micro/tflite_micro
|
||||
url = https://github.com/PX4/tflite-micro.git
|
||||
branch = main
|
||||
[submodule "src/drivers/ins/microstrain/mip_sdk"]
|
||||
path = src/drivers/ins/microstrain/mip_sdk
|
||||
url = https://github.com/PX4/LORD-MicroStrain_mip_sdk.git
|
||||
[submodule "src/drivers/ins/sbgecom/sbgECom"]
|
||||
path = src/drivers/ins/sbgecom/sbgECom
|
||||
url = https://github.com/PX4/sbgECom.git
|
||||
[submodule "src/modules/mc_raptor/blob"]
|
||||
path = src/modules/mc_raptor/blob
|
||||
url = https://github.com/rl-tools/px4-blob
|
||||
[submodule "src/lib/rl_tools/rl_tools"]
|
||||
path = src/lib/rl_tools/rl_tools
|
||||
url = https://github.com/rl-tools/rl-tools.git
|
||||
[submodule "libmodal-json"]
|
||||
path = boards/modalai/voxl2/src/lib/mpa/libmodal-json
|
||||
url = https://gitlab.com/voxl-public/voxl-sdk/core-libs/libmodal-json.git
|
||||
[submodule "libmodal-pipe"]
|
||||
path = boards/modalai/voxl2/src/lib/mpa/libmodal-pipe
|
||||
url = https://gitlab.com/voxl-public/voxl-sdk/core-libs/libmodal-pipe.git
|
||||
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
language: cpp
|
||||
|
||||
git:
|
||||
depth: 100
|
||||
submodules: false
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
include:
|
||||
- os: linux
|
||||
dist: xenial
|
||||
if: branch = coverity_scan
|
||||
|
||||
before_install:
|
||||
- echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-
|
||||
|
||||
install:
|
||||
- export PATH=$HOME/.local/bin:$PATH
|
||||
- pip install --user --upgrade pip
|
||||
- pip install --user -r Tools/setup/requirements.txt
|
||||
|
||||
script:
|
||||
- make
|
||||
|
||||
addons:
|
||||
coverity_scan:
|
||||
project:
|
||||
name: "PX4/Firmware"
|
||||
description: "Build submitted via Travis CI"
|
||||
notification_email: ci@px4.io
|
||||
build_command_prepend: "make distclean"
|
||||
build_command: "make px4_sitl_default"
|
||||
branch_pattern: coverity_scan
|
||||
@@ -2,13 +2,5 @@
|
||||
.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
+26
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Linux",
|
||||
"intelliSenseMode": "gcc-x64",
|
||||
"includePath": [
|
||||
"${workspaceFolder}/**"
|
||||
],
|
||||
"defines": [],
|
||||
"browse": {
|
||||
"path": [
|
||||
"${workspaceFolder}/src/",
|
||||
"${workspaceFolder}/src/lib/",
|
||||
"${workspaceFolder}/src/lib/matrix",
|
||||
"${workspaceFolder}/src/platforms",
|
||||
"${workspaceFolder}/platforms/",
|
||||
"."
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true
|
||||
},
|
||||
"compileCommands": "${workspaceFolder}/.vscode/compile_commands.json",
|
||||
"configurationProvider": "vector-of-bool.cmake-tools"
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
||||
Vendored
+1
-1
@@ -2,4 +2,4 @@
|
||||
{
|
||||
"name": "PX4 detect"
|
||||
}
|
||||
]
|
||||
]
|
||||
Vendored
+10
-505
@@ -2,60 +2,20 @@ CONFIG:
|
||||
default: px4_sitl_default
|
||||
choices:
|
||||
px4_sitl_default:
|
||||
short: px4_sitl_default
|
||||
short: px4_sitl
|
||||
buildType: RelWithDebInfo
|
||||
settings:
|
||||
CONFIG: px4_sitl_default
|
||||
px4_sitl_raptor:
|
||||
short: px4_sitl_raptor
|
||||
buildType: RelWithDebInfo
|
||||
settings:
|
||||
CONFIG: px4_sitl_raptor
|
||||
px4_sitl_raptor_debug:
|
||||
short: px4_sitl_raptor_debug
|
||||
px4_sitl_default_Debug:
|
||||
short: px4_sitl (Debug)
|
||||
buildType: Debug
|
||||
settings:
|
||||
CONFIG: px4_sitl_raptor
|
||||
px4_sitl_spacecraft:
|
||||
short: px4_sitl_spacecraft
|
||||
buildType: RelWithDebInfo
|
||||
settings:
|
||||
CONFIG: px4_sitl_spacecraft
|
||||
px4_sitl_nolockstep:
|
||||
short: px4_sitl_nolockstep
|
||||
buildType: RelWithDebInfo
|
||||
settings:
|
||||
CONFIG: px4_sitl_nolockstep
|
||||
px4_sitl_asan:
|
||||
short: px4_sitl (AddressSanitizer)
|
||||
CONFIG: px4_sitl_default
|
||||
px4_sitl_default_ASan:
|
||||
short: px4_sitl (Address Sanitizer)
|
||||
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_sitl_zenoh:
|
||||
short: px4_sitl_zenoh
|
||||
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
|
||||
@@ -81,478 +41,23 @@ CONFIG:
|
||||
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-flow-mr_default:
|
||||
short: ark_can-flow-mr_default
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: ark_can-flow-mr_default
|
||||
ark_can-flow-mr_canbootloader:
|
||||
short: ark_can-flow-mr_canbootloader
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: ark_can-flow-mr_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_teseo-gps_canbootloader:
|
||||
short: ark_teseo-gps_canbootloader
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: ark_teseo-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_dist_default:
|
||||
short: ark_dist_default
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: ark_dist_default
|
||||
ark_dist_canbootloader:
|
||||
short: ark_dist_canbootloader
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: ark_dist_canbootloader
|
||||
ark_f9p-gps_default:
|
||||
short: ark_f9p-gps_default
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: ark_f9p-gps_default
|
||||
ark_f9p-gps_canbootloader:
|
||||
short: ark_f9p-gps_canbootloader
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: ark_f9p-gps_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_mag_canbootloader:
|
||||
short: ark_mag_canbootloader
|
||||
buildType: MiniSizeRel
|
||||
settings:
|
||||
CONFIG: ark_mag_canbootloader
|
||||
ark_mag_default:
|
||||
short: ark_mag_default
|
||||
buildType: MiniSizeRel
|
||||
settings:
|
||||
CONFIG: ark_mag_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
|
||||
ark_x20-gps_default:
|
||||
short: ark_x20-gps_default
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: ark_x20-gps_default
|
||||
ark_x20-gps_canbootloader:
|
||||
short: ark_x20-gps_canbootloader
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: ark_x20-gps_canbootloader
|
||||
atl_mantis-edu_default:
|
||||
short: atl_mantis-edu
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: atl_mantis-edu_default
|
||||
av_x-v1_default:
|
||||
short: av_x-v1
|
||||
short: av-x
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: av_x-v1_default
|
||||
bitcraze_crazyflie_default:
|
||||
short: bitcraze_crazyflie
|
||||
intel_aerofc-v1_default:
|
||||
short: intel_aerofc-v1
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: bitcraze_crazyflie_default
|
||||
bluerobotics_navigator_default:
|
||||
short: bluerobotics_navigator
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: bluerobotics_navigator_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
|
||||
cuav_fmu-v6x_default:
|
||||
short: cuav_fmu-v6x
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: cuav_fmu-v6x_default
|
||||
cuav_x25_default:
|
||||
short: cuav_x25-evo
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: cuav_x25-evo_default
|
||||
cuav_x25-super_default:
|
||||
short: cuav_x25-super
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: cuav_x25-super_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
|
||||
holybro_kakuteh7-wing_default:
|
||||
short: holybro_kakuteh7-wing
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: holybro_kakuteh7-wing_default
|
||||
holybro_kakuteh7dualimu_default:
|
||||
short: holybro_kakuteh7dualimu
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: holybro_kakuteh7dualimu_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_bootloader:
|
||||
short: micoair_h743_bootloader
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: micoair_h743_bootloader
|
||||
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
|
||||
micoair_h743-v2_bootloader:
|
||||
short: micoair_h743-v2_bootloader
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: micoair_h743-v2_bootloader
|
||||
micoair_h743-v2_default:
|
||||
short: micoair_h743-v2
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: micoair_h743-v2_default
|
||||
micoair_h743-lite_bootloader:
|
||||
short: micoair_h743-lite_bootloader
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: micoair_h743-lite_bootloader
|
||||
micoair_h743-lite_default:
|
||||
short: micoair_h743-lite
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: micoair_h743-lite_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
|
||||
CONFIG: intel_aerofc-v1_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_mr-tropic_default:
|
||||
short: nxp_mr-tropic_default
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: nxp_mr-tropic_default
|
||||
nxp_mr-tropic_bootloader:
|
||||
short: nxp_mr-tropic_bootloader
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: nxp_mr-tropic_bootloader
|
||||
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
|
||||
svehicle_e2_bootloader:
|
||||
short: svehicle_e2_bootloader
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: svehicle_e2_bootloader
|
||||
svehicle_e2_default:
|
||||
short: svehicle_e2
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: svehicle_e2_default
|
||||
x-mav_ap-h743r1_bootloader:
|
||||
short: x-mav_ap-h743r1-boot
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: x-mav_ap-h743r1_bootloader
|
||||
x-mav_ap-h743r1_default:
|
||||
short: x-mav_ap-h743r1
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: x-mav_ap-h743r1_default
|
||||
|
||||
Vendored
+4
-11
@@ -2,24 +2,17 @@
|
||||
// See http://go.microsoft.com/fwlink/?LinkId=827846
|
||||
// for the documentation about the extensions.json format
|
||||
"recommendations": [
|
||||
"ajshort.ros",
|
||||
"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",
|
||||
"peterjausovec.vscode-docker",
|
||||
"twxs.cmake",
|
||||
"uavcan.dsdl",
|
||||
"wholroyd.jinja",
|
||||
"zixuanwang.linkerscript",
|
||||
"ms-vscode.makefile-tools"
|
||||
"vector-of-bool.cmake-tools",
|
||||
"wholroyd.jinja"
|
||||
]
|
||||
}
|
||||
|
||||
Vendored
+194
@@ -0,0 +1,194 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "SITL shell",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${command:cmake.launchTargetPath}",
|
||||
"args": [
|
||||
"${workspaceFolder}/ROMFS/px4fmu_common",
|
||||
"-s",
|
||||
"etc/init.d-posix/rcS",
|
||||
"-t",
|
||||
"${workspaceFolder}/test_data"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}/build/px4_sitl_default/tmp",
|
||||
"environment": [
|
||||
{
|
||||
"name": "PX4_SIM_MODEL",
|
||||
"value": "shell"
|
||||
}
|
||||
],
|
||||
"externalConsole": false,
|
||||
"linux": {
|
||||
"MIMode": "gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
},
|
||||
{
|
||||
"description": "PX4 ignore wq signals",
|
||||
"text": "handle SIGCONT nostop noprint nopass",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"osx": {
|
||||
"MIMode": "lldb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"text": "pro hand -p true -s false -n false SIGCONT",
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "SITL jmavsim iris",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${command:cmake.launchTargetPath}",
|
||||
"args": [
|
||||
"${workspaceFolder}/ROMFS/px4fmu_common",
|
||||
"-s",
|
||||
"etc/init.d-posix/rcS",
|
||||
"-t",
|
||||
"${workspaceFolder}/test_data"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}/build/px4_sitl_default/tmp",
|
||||
"environment": [
|
||||
{
|
||||
"name": "PX4_SIM_MODEL",
|
||||
"value": "iris"
|
||||
}
|
||||
],
|
||||
"externalConsole": false,
|
||||
"preLaunchTask": "jmavsim",
|
||||
"postDebugTask": "jmavsim kill",
|
||||
"linux": {
|
||||
"MIMode": "gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
},
|
||||
{
|
||||
"description": "PX4 ignore wq signals",
|
||||
"text": "handle SIGCONT nostop noprint nopass",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"osx": {
|
||||
"MIMode": "lldb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"text": "pro hand -p true -s false -n false SIGCONT",
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "SITL gazebo iris",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${command:cmake.launchTargetPath}",
|
||||
"args": [
|
||||
"${workspaceFolder}/ROMFS/px4fmu_common",
|
||||
"-s",
|
||||
"etc/init.d-posix/rcS",
|
||||
"-t",
|
||||
"${workspaceFolder}/test_data"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}/build/px4_sitl_default/tmp",
|
||||
"environment": [
|
||||
{
|
||||
"name": "PX4_SIM_MODEL",
|
||||
"value": "iris"
|
||||
}
|
||||
],
|
||||
"externalConsole": false,
|
||||
"preLaunchTask": "gazebo iris",
|
||||
"postDebugTask": "gazebo kill",
|
||||
"linux": {
|
||||
"MIMode": "gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
},
|
||||
{
|
||||
"description": "PX4 ignore wq signals",
|
||||
"text": "handle SIGCONT nostop noprint nopass",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"osx": {
|
||||
"MIMode": "lldb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"text": "pro hand -p true -s false -n false SIGCONT",
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "px4_fmu-v2 (jlink) ",
|
||||
"executable": "${command:cmake.launchTargetPath}",
|
||||
"request": "launch",
|
||||
"type": "cortex-debug",
|
||||
"servertype": "jlink",
|
||||
"device": "STM32F427VI",
|
||||
"svdFile": "${workspaceRoot}/../cmsis-svd/data/STMicro/STM32F427.svd",
|
||||
"interface": "swd"
|
||||
},
|
||||
{
|
||||
"name": "px4_fmu-v3 (jlink)",
|
||||
"executable": "${command:cmake.launchTargetPath}",
|
||||
"request": "launch",
|
||||
"type": "cortex-debug",
|
||||
"servertype": "jlink",
|
||||
"device": "STM32F427VI",
|
||||
"svdFile": "${workspaceRoot}/../cmsis-svd/data/STMicro/STM32F427.svd",
|
||||
"interface": "swd"
|
||||
},
|
||||
{
|
||||
"name": "px4_fmu-v4 (jlink)",
|
||||
"executable": "${command:cmake.launchTargetPath}",
|
||||
"request": "launch",
|
||||
"type": "cortex-debug",
|
||||
"servertype": "jlink",
|
||||
"device": "STM32F427VI",
|
||||
"svdFile": "${workspaceRoot}/../cmsis-svd/data/STMicro/STM32F427.svd",
|
||||
"interface": "swd"
|
||||
},
|
||||
{
|
||||
"name": "px4_fmu-v4pro (jlink)",
|
||||
"executable": "${command:cmake.launchTargetPath}",
|
||||
"request": "launch",
|
||||
"type": "cortex-debug",
|
||||
"servertype": "jlink",
|
||||
"device": "STM32F469VI",
|
||||
"svdFile": "${workspaceRoot}/../cmsis-svd/data/STMicro/STM32F469.svd",
|
||||
"interface": "swd"
|
||||
},
|
||||
{
|
||||
"name": "px4_fmu-v5 (jlink)",
|
||||
"executable": "${command:cmake.launchTargetPath}",
|
||||
"request": "launch",
|
||||
"type": "cortex-debug",
|
||||
"servertype": "jlink",
|
||||
"device": "STM32F765VI",
|
||||
"svdFile": "${workspaceRoot}/../cmsis-svd/data/STMicro/STM32F7x5.svd",
|
||||
"interface": "swd"
|
||||
},
|
||||
]
|
||||
}
|
||||
Vendored
+67
-108
@@ -2,131 +2,90 @@
|
||||
"astyle.astylerc": "${workspaceFolder}/Tools/astyle/astylerc",
|
||||
"astyle.c.enable": true,
|
||||
"astyle.cpp.enable": true,
|
||||
"C_Cpp.autoAddFileAssociations": false,
|
||||
"breadcrumbs.enabled": true,
|
||||
"cmake.autoRestartBuild": true,
|
||||
"cmake.buildDirectory": "${workspaceFolder}/build/${variant:CONFIG}",
|
||||
"cmake.buildBeforeRun": true,
|
||||
"cmake.configureOnOpen": true,
|
||||
"cmake.copyCompileCommands": "${workspaceFolder}/.vscode/compile_commands.json",
|
||||
"cmake.debugConfig": {
|
||||
"name": "SITL shell (gdb)",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${command:cmake.launchTargetPath}",
|
||||
"args": [
|
||||
"${workspaceFolder}/ROMFS/px4fmu_common",
|
||||
"-s",
|
||||
"etc/init.d-posix/rcS",
|
||||
"-t",
|
||||
"${workspaceFolder}/test_data"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}/build/px4_sitl_default/tmp",
|
||||
"environment": [
|
||||
{
|
||||
"name": "PX4_SIM_MODEL",
|
||||
"value": "shell"
|
||||
}
|
||||
],
|
||||
"externalConsole": false,
|
||||
"linux": {
|
||||
"MIMode": "gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
},
|
||||
{
|
||||
"description": "PX4 ignore wq signals",
|
||||
"text": "handle SIGCONT nostop noprint nopass",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"osx": {
|
||||
"MIMode": "lldb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"text": "pro hand -p true -s false -n false SIGCONT",
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"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.configurationWarnings": "Disabled",
|
||||
"C_Cpp.default.cppStandard": "c++11",
|
||||
"C_Cpp.default.cStandard": "c99",
|
||||
"C_Cpp.default.intelliSenseMode": "gcc-x64",
|
||||
"C_Cpp.errorSquiggles": "Disabled",
|
||||
"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"
|
||||
],
|
||||
"C_Cpp.intelliSenseEngineFallback": "Disabled",
|
||||
"debug.toolBarLocation": "docked",
|
||||
"editor.defaultFormatter": "chiehyu.vscode-astyle",
|
||||
"editor.insertSpaces": false,
|
||||
"editor.minimap.maxColumn": 120,
|
||||
"editor.minimap.renderCharacters": false,
|
||||
"editor.minimap.showSlider": "always",
|
||||
"editor.smoothScrolling": true,
|
||||
"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": 25,
|
||||
"git.ignoreLimitWarning": true,
|
||||
"githubPullRequests.defaultMergeMethod": "squash",
|
||||
"githubPullRequests.telemetry.enabled": false,
|
||||
"git.detectSubmodulesLimit": 20,
|
||||
"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"
|
||||
"*.jinja": "jinja"
|
||||
},
|
||||
"search.exclude": {
|
||||
"${workspaceFolder}/build": true
|
||||
"build/**": true
|
||||
},
|
||||
"search.showLineNumbers": true,
|
||||
"terminal.integrated.scrollback": 15000,
|
||||
"yaml.schemas": {
|
||||
"${workspaceFolder}/validation/module_schema.yaml": "${workspaceFolder}/src/modules/*/module.yaml"
|
||||
},
|
||||
"window.title": "${dirty} ${activeEditorMedium}${separator}${rootName}",
|
||||
"workbench.editor.enablePreview": false,
|
||||
"workbench.editor.enablePreviewFromQuickOpen": false,
|
||||
"workbench.editor.highlightModifiedTabs": true,
|
||||
"workbench.settings.enableNaturalLanguageSearch": false,
|
||||
"workbench.statusBar.feedback.visible": false
|
||||
}
|
||||
|
||||
Vendored
+58
-271
@@ -4,307 +4,94 @@
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "build",
|
||||
"label": "jmavsim",
|
||||
"type": "shell",
|
||||
"command": "/bin/bash",
|
||||
"command": "Tools/jmavsim_run.sh",
|
||||
"isBackground": true,
|
||||
"args": [
|
||||
"-c",
|
||||
"${command:cmake.tasksBuildCommand}"
|
||||
"-r",
|
||||
"500"
|
||||
],
|
||||
"options": {
|
||||
"cwd": "${command:cmake.buildDirectory}"
|
||||
"cwd": "${workspaceRoot}"
|
||||
},
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true,
|
||||
"presentation": {
|
||||
"reveal": "always",
|
||||
"panel": "dedicated"
|
||||
},
|
||||
"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"
|
||||
}
|
||||
"problemMatcher": [
|
||||
{
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": ".",
|
||||
"file": 1,
|
||||
"location": 2,
|
||||
"message": 3
|
||||
}
|
||||
],
|
||||
"background": {
|
||||
"activeOnStart": true,
|
||||
"beginsPattern": ".",
|
||||
"endsPattern": ".",
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"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"]
|
||||
"command": "kill $(ps aux | grep jmavsim | grep -v 'grep' | awk '{print $2}')",
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "gazebo-classic build",
|
||||
"label": "gazebo build",
|
||||
"type": "shell",
|
||||
"command": "make px4_sitl_default sitl_gazebo-classic",
|
||||
"command": "make px4_sitl_default sitl_gazebo",
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}"
|
||||
"cwd": "${workspaceRoot}"
|
||||
},
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "never",
|
||||
"revealProblems": "onProblem",
|
||||
"focus": false,
|
||||
"panel": "dedicated",
|
||||
"showReuseMessage": false,
|
||||
"clear": false,
|
||||
"close": true
|
||||
},
|
||||
"problemMatcher": [],
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "gazebo-classic start",
|
||||
"label": "gazebo iris",
|
||||
"type": "shell",
|
||||
"dependsOn": "gazebo-classic build",
|
||||
"dependsOn": "gazebo build",
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}",
|
||||
"cwd": "${workspaceRoot}",
|
||||
"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"
|
||||
"GAZEBO_PLUGIN_PATH": "${workspaceRoot}/build/px4_sitl_default/build_gazebo",
|
||||
"GAZEBO_MODEL_PATH": "${workspaceRoot}/Tools/sitl_gazebo/models"
|
||||
}
|
||||
},
|
||||
"command": "gzserver --verbose ${workspaceFolder}/Tools/simulation/gazebo-classic/sitl_gazebo-classic/worlds/empty.world",
|
||||
"command": "gzserver --verbose ${workspaceRoot}/Tools/sitl_gazebo/worlds/iris.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
|
||||
"panel": "dedicated"
|
||||
},
|
||||
"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"]
|
||||
"problemMatcher": [
|
||||
{
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": ".",
|
||||
"file": 1,
|
||||
"location": 2,
|
||||
"message": 3
|
||||
}
|
||||
],
|
||||
"background": {
|
||||
"activeOnStart": true,
|
||||
"beginsPattern": ".",
|
||||
"endsPattern": ".",
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"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
|
||||
},
|
||||
"command": "killall gzserver",
|
||||
"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,172 @@
|
||||
# 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/px4_io-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
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
cff-version: 1.2.0
|
||||
title: "PX4 Autopilot"
|
||||
message: "If you use PX4 in your research, please cite it using this metadata."
|
||||
type: software
|
||||
authors:
|
||||
- family-names: Meier
|
||||
given-names: Lorenz
|
||||
- name: "The PX4 Contributors"
|
||||
repository-code: "https://github.com/PX4/PX4-Autopilot"
|
||||
url: "https://px4.io"
|
||||
abstract: >-
|
||||
PX4 is an open-source autopilot stack for drones and
|
||||
unmanned vehicles. It supports multirotors, fixed-wing,
|
||||
VTOL, rovers, and many more platforms. PX4 runs on both
|
||||
RTOS and POSIX-compatible operating systems.
|
||||
keywords:
|
||||
- autopilot
|
||||
- drone
|
||||
- uav
|
||||
- flight-controller
|
||||
- robotics
|
||||
- ros2
|
||||
license: BSD-3-Clause
|
||||
identifiers:
|
||||
- type: doi
|
||||
value: "10.5281/zenodo.595432"
|
||||
description: "Zenodo concept DOI (resolves to latest version)"
|
||||
+314
-219
@@ -1,6 +1,6 @@
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (c) 2017 - 2024 PX4 Development Team. All rights reserved.
|
||||
# Copyright (c) 2017 - 2019 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_${PX4_PLATFORM}.cmake or px4_impl_${PX4_PLATFORM}_${PX4_BOARD}.cmake.
|
||||
#
|
||||
# Formatting
|
||||
# ---------------------------------------------------------------------------
|
||||
@@ -99,13 +99,12 @@
|
||||
#
|
||||
#=============================================================================
|
||||
|
||||
cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 3.2 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)
|
||||
set(PX4_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
set(PX4_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH ${PX4_SOURCE_DIR}/cmake)
|
||||
include(px4_parse_function_args)
|
||||
|
||||
#=============================================================================
|
||||
# git
|
||||
@@ -113,105 +112,121 @@ include(px4_parse_function_args)
|
||||
include(px4_git)
|
||||
|
||||
execute_process(
|
||||
COMMAND git describe --exclude ext/* --tags --match "v[0-9]*"
|
||||
COMMAND git describe --always --tags
|
||||
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}"
|
||||
)
|
||||
|
||||
#=============================================================================
|
||||
# configuration
|
||||
#
|
||||
|
||||
set(CONFIG "px4_sitl_default" CACHE STRING "desired configuration")
|
||||
|
||||
include(px4_add_module)
|
||||
set(config_module_list)
|
||||
set(config_kernel_list)
|
||||
set(config_df_driver_list)
|
||||
|
||||
# Find Python
|
||||
find_package(PythonInterp 3)
|
||||
# We have a custom error message to tell users how to install python3.
|
||||
if(NOT PYTHONINTERP_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")
|
||||
# find PX4 config
|
||||
# look for in tree board config that matches CONFIG input
|
||||
if(NOT PX4_CONFIG_FILE)
|
||||
|
||||
file(GLOB_RECURSE board_configs
|
||||
RELATIVE "${PX4_SOURCE_DIR}/boards"
|
||||
"boards/*.cmake"
|
||||
)
|
||||
|
||||
set(PX4_CONFIGS ${board_configs} CACHE STRING "PX4 board configs" FORCE)
|
||||
|
||||
foreach(filename ${board_configs})
|
||||
# parse input CONFIG into components to match with existing in tree configs
|
||||
# the platform prefix (eg nuttx_) is historical, and removed if present
|
||||
string(REPLACE ".cmake" "" filename_stripped ${filename})
|
||||
string(REPLACE "/" ";" config ${filename_stripped})
|
||||
list(LENGTH config config_len)
|
||||
|
||||
if(${config_len} EQUAL 3)
|
||||
|
||||
|
||||
list(GET config 0 vendor)
|
||||
list(GET config 1 model)
|
||||
list(GET config 2 label)
|
||||
|
||||
set(board "${vendor}${model}")
|
||||
|
||||
# <VENDOR>_<MODEL>_<LABEL> (eg px4_fmu-v2_default)
|
||||
# <VENDOR>_<MODEL>_default (eg px4_fmu-v2) # allow skipping label if "default"
|
||||
if ((${CONFIG} MATCHES "${vendor}_${model}_${label}") OR # match full vendor, model, label
|
||||
((${label} STREQUAL "default") AND (${CONFIG} STREQUAL "${vendor}_${model}")) # default label can be omitted
|
||||
)
|
||||
set(PX4_CONFIG_FILE "${PX4_SOURCE_DIR}/boards/${filename}" CACHE FILEPATH "path to PX4 CONFIG file" FORCE)
|
||||
break()
|
||||
endif()
|
||||
|
||||
# <BOARD>_<LABEL> (eg px4_fmu-v2_default)
|
||||
# <BOARD>_default (eg px4_fmu-v2) # allow skipping label if "default"
|
||||
if ((${CONFIG} MATCHES "${board}_${label}") OR # match full board, label
|
||||
((${label} STREQUAL "default") AND (${CONFIG} STREQUAL "${board}")) # default label can be omitted
|
||||
)
|
||||
set(PX4_CONFIG_FILE "${PX4_SOURCE_DIR}/boards/${filename}" CACHE FILEPATH "path to PX4 CONFIG file" FORCE)
|
||||
break()
|
||||
endif()
|
||||
|
||||
|
||||
# LEGACY form
|
||||
# <OS>_<BOARD>_<LABEL> (eg nuttx_px4_fmu-v2_default)
|
||||
string(REGEX REPLACE "^nuttx_|^posix_|^qurt_" "" config_no_os ${CONFIG}) # ignore OS prefix
|
||||
|
||||
if ((${config_no_os} MATCHES "${board}_${label}"))
|
||||
set(PX4_CONFIG_FILE "${PX4_SOURCE_DIR}/boards/${filename}" CACHE FILEPATH "path to PX4 CONFIG file" FORCE)
|
||||
break()
|
||||
endif()
|
||||
|
||||
|
||||
# LEGACY form special case to ease board layout transition (2018-11-18)
|
||||
# match board with model and label only: eg sitl_default -> px4_sitl_default
|
||||
if ((${config_no_os} MATCHES "${model}_${label}"))
|
||||
set(PX4_CONFIG_FILE "${PX4_SOURCE_DIR}/boards/${filename}" CACHE FILEPATH "path to PX4 CONFIG file" FORCE)
|
||||
break()
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
option(PYTHON_COVERAGE "Python code coverage" OFF)
|
||||
if(PYTHON_COVERAGE)
|
||||
message(STATUS "python coverage enabled")
|
||||
set(PYTHON_EXECUTABLE coverage run -p)
|
||||
if(NOT PX4_CONFIG_FILE)
|
||||
message(FATAL_ERROR "PX4 config file not set, try one of ${PX4_CONFIGS}")
|
||||
endif()
|
||||
|
||||
include(px4_config)
|
||||
include(kconfig)
|
||||
message(STATUS "PX4 config file: ${PX4_CONFIG_FILE}")
|
||||
include(px4_add_board)
|
||||
include(${PX4_CONFIG_FILE})
|
||||
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")
|
||||
endif()
|
||||
if (ENABLE_LOCKSTEP_SCHEDULER)
|
||||
add_definitions(-DENABLE_LOCKSTEP_SCHEDULER)
|
||||
message(STATUS "PX4 lockstep: enabled")
|
||||
else()
|
||||
message(STATUS "PX4 lockstep: disabled")
|
||||
endif()
|
||||
|
||||
# external modules
|
||||
set(EXTERNAL_MODULES_LOCATION "" CACHE STRING "External modules source location")
|
||||
|
||||
if(NOT EXTERNAL_MODULES_LOCATION STREQUAL "")
|
||||
if (NOT EXTERNAL_MODULES_LOCATION STREQUAL "")
|
||||
get_filename_component(EXTERNAL_MODULES_LOCATION "${EXTERNAL_MODULES_LOCATION}" ABSOLUTE)
|
||||
endif()
|
||||
|
||||
@@ -224,14 +239,9 @@ if(EXISTS "${PX4_SOURCE_DIR}/platforms/${PX4_PLATFORM}/cmake/init.cmake")
|
||||
include(init)
|
||||
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")
|
||||
if (NOT CMAKE_BUILD_TYPE)
|
||||
if (${PX4_PLATFORM} STREQUAL "nuttx")
|
||||
set(PX4_BUILD_TYPE "MinSizeRel")
|
||||
else()
|
||||
set(PX4_BUILD_TYPE "RelWithDebInfo")
|
||||
@@ -240,84 +250,47 @@ if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE ${PX4_BUILD_TYPE} CACHE STRING "Build type" FORCE)
|
||||
endif()
|
||||
|
||||
if(CONFIG_BOARD_SUPPORT_FORTIFIED_TOOLCHAIN)
|
||||
set(PX4_DEBUG_OPT_LEVEL -Og)
|
||||
message(STATUS "fortified toolchain support enabled: PX4_DEBUG_OPT_LEVEL=${PX4_DEBUG_OPT_LEVEL}")
|
||||
else()
|
||||
set(PX4_DEBUG_OPT_LEVEL -O0)
|
||||
endif()
|
||||
|
||||
if((CMAKE_BUILD_TYPE STREQUAL "Debug") OR (CMAKE_BUILD_TYPE STREQUAL "Coverage"))
|
||||
set(MAX_CUSTOM_OPT_LEVEL ${PX4_DEBUG_OPT_LEVEL})
|
||||
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)
|
||||
endif()
|
||||
|
||||
set(package-contact "px4users@googlegroups.com")
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
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})
|
||||
|
||||
#=============================================================================
|
||||
|
||||
# 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
|
||||
)
|
||||
message(STATUS "PX4 version: ${PX4_GIT_TAG}")
|
||||
message(STATUS "cmake build type: ${CMAKE_BUILD_TYPE}")
|
||||
|
||||
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()
|
||||
#=============================================================================
|
||||
# project definition
|
||||
#
|
||||
project(px4 CXX C ASM)
|
||||
|
||||
set(package-contact "px4users@googlegroups.com")
|
||||
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
set(CMAKE_C_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
# For the catkin build process, unset build of dynamically-linked binaries
|
||||
# and do not change CMAKE_RUNTIME_OUTPUT_DIRECTORY
|
||||
if (NOT CATKIN_DEVEL_PREFIX)
|
||||
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})
|
||||
else()
|
||||
SET(BUILD_SHARED_LIBS OFF)
|
||||
endif()
|
||||
|
||||
#=============================================================================
|
||||
|
||||
# Setup install paths
|
||||
if(${PX4_PLATFORM} STREQUAL "posix")
|
||||
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(coverage)
|
||||
include(sanitizers)
|
||||
|
||||
# Define GNU standard installation directories
|
||||
@@ -328,44 +301,50 @@ if(${PX4_PLATFORM} STREQUAL "posix")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(ccache)
|
||||
|
||||
#=============================================================================
|
||||
# get chip and chip manufacturer
|
||||
# ccache
|
||||
#
|
||||
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()
|
||||
option(CCACHE "Use ccache if available" ON)
|
||||
find_program(CCACHE_PROGRAM ccache)
|
||||
if (CCACHE AND CCACHE_PROGRAM AND NOT DEFINED ENV{CCACHE_DISABLE})
|
||||
|
||||
#=============================================================================
|
||||
# Testing - Automatic unit and integration testing with CTest
|
||||
# (Needs to be before setting the common compile flags)
|
||||
#
|
||||
get_filename_component(ccache_real_path ${CCACHE_PROGRAM} REALPATH)
|
||||
get_filename_component(cxx_real_path ${CMAKE_CXX_COMPILER} REALPATH)
|
||||
get_filename_component(cxx_abs_path ${CMAKE_CXX_COMPILER} ABSOLUTE)
|
||||
|
||||
# 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)")
|
||||
|
||||
include(px4_add_gtest)
|
||||
if(BUILD_TESTING)
|
||||
# Setting FUZZTEST_FUZZING_MODE=on enables ASAN, and is only supported with Clang
|
||||
if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") OR ("${CMAKE_CXX_COMPILER_ID}" MATCHES "AppleClang"))
|
||||
set(FUZZTEST_FUZZING_MODE ON)
|
||||
if ("${ccache_real_path}" STREQUAL "${cxx_real_path}")
|
||||
message(STATUS "ccache enabled via symlink (${cxx_abs_path} -> ${cxx_real_path})")
|
||||
else()
|
||||
message(STATUS "ccache enabled (export CCACHE_DISABLE=1 to disable)")
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
|
||||
endif()
|
||||
add_subdirectory(test)
|
||||
fuzztest_setup_fuzzing_flags()
|
||||
|
||||
endif()
|
||||
|
||||
#=============================================================================
|
||||
# find programs and packages
|
||||
#
|
||||
|
||||
# see if catkin was invoked to build this
|
||||
if (CATKIN_DEVEL_PREFIX)
|
||||
message(STATUS "catkin ENABLED")
|
||||
find_package(catkin REQUIRED)
|
||||
if (catkin_FOUND)
|
||||
catkin_package()
|
||||
else()
|
||||
message(FATAL_ERROR "catkin not found")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_package(PythonInterp REQUIRED)
|
||||
|
||||
option(PYTHON_COVERAGE "Python code coverage" OFF)
|
||||
if(PYTHON_COVERAGE)
|
||||
message(STATUS "python coverage enabled")
|
||||
set(PYTHON_EXECUTABLE coverage run -p)
|
||||
else()
|
||||
# run normally (broken under coveragepy)
|
||||
px4_find_python_module(jinja2 REQUIRED)
|
||||
endif()
|
||||
|
||||
#=============================================================================
|
||||
@@ -375,13 +354,6 @@ include(px4_add_common_flags)
|
||||
px4_add_common_flags()
|
||||
px4_os_add_flags()
|
||||
|
||||
#=============================================================================
|
||||
# board cmake init (optional)
|
||||
#
|
||||
if(EXISTS ${PX4_BOARD_DIR}/cmake/init.cmake)
|
||||
include(${PX4_BOARD_DIR}/cmake/init.cmake)
|
||||
endif()
|
||||
|
||||
#=============================================================================
|
||||
# message, and airframe generation
|
||||
#
|
||||
@@ -391,6 +363,25 @@ add_subdirectory(msg EXCLUDE_FROM_ALL)
|
||||
|
||||
px4_generate_airframes_xml(BOARD ${PX4_BOARD})
|
||||
|
||||
#=============================================================================
|
||||
# DriverFramework
|
||||
#
|
||||
px4_add_git_submodule(TARGET git_driverframework PATH "src/lib/DriverFramework")
|
||||
set(OS ${PX4_PLATFORM})
|
||||
add_subdirectory(src/lib/DriverFramework/framework)
|
||||
|
||||
# List the DriverFramework drivers
|
||||
if (DEFINED config_df_driver_list)
|
||||
message("DF Drivers: ${config_df_driver_list}")
|
||||
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()
|
||||
|
||||
#=============================================================================
|
||||
# external projects
|
||||
#
|
||||
@@ -398,13 +389,11 @@ set(ep_base ${PX4_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
|
||||
@@ -420,19 +409,51 @@ if (NOT EXTERNAL_MODULES_LOCATION STREQUAL "")
|
||||
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)
|
||||
endif()
|
||||
|
||||
add_custom_target(test_results
|
||||
COMMAND GTEST_COLOR=1 ${CMAKE_CTEST_COMMAND} --output-on-failure -T Test -R ${TESTFILTER} USES_TERMINAL
|
||||
DEPENDS
|
||||
px4
|
||||
examples__dyn_hello
|
||||
test_mixer_multirotor
|
||||
USES_TERMINAL
|
||||
COMMENT "Running tests"
|
||||
WORKING_DIRECTORY ${PX4_BINARY_DIR})
|
||||
set_target_properties(test_results PROPERTIES EXCLUDE_FROM_ALL TRUE)
|
||||
|
||||
#=============================================================================
|
||||
# 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)
|
||||
add_subdirectory(src/platforms EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(src/modules/uORB EXCLUDE_FROM_ALL) # TODO: platform layer
|
||||
add_subdirectory(src/drivers/boards EXCLUDE_FROM_ALL)
|
||||
|
||||
if(EXISTS "${PX4_BOARD_DIR}/CMakeLists.txt")
|
||||
add_subdirectory(${PX4_BOARD_DIR})
|
||||
@@ -442,23 +463,9 @@ foreach(module ${config_module_list})
|
||||
add_subdirectory(src/${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)
|
||||
|
||||
# must be the last module before firmware
|
||||
add_subdirectory(src/lib/parameters EXCLUDE_FROM_ALL)
|
||||
|
||||
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)
|
||||
endif()
|
||||
target_link_libraries(parameters_interface INTERFACE parameters)
|
||||
|
||||
# firmware added last to generate the builtin for included modules
|
||||
add_subdirectory(platforms/${PX4_PLATFORM})
|
||||
@@ -475,31 +482,119 @@ 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
|
||||
${module_list}
|
||||
--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})
|
||||
|
||||
#=============================================================================
|
||||
# Doxygen
|
||||
#
|
||||
option(BUILD_DOXYGEN "Build doxygen documentation" OFF)
|
||||
|
||||
include(bloaty)
|
||||
if (BUILD_DOXYGEN)
|
||||
find_package(Doxygen)
|
||||
if (DOXYGEN_FOUND)
|
||||
# set input and output files
|
||||
set(DOXYGEN_IN ${CMAKE_SOURCE_DIR}/Documentation/Doxyfile.in)
|
||||
set(DOXYGEN_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
|
||||
|
||||
# request to configure the file
|
||||
configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY)
|
||||
|
||||
include(metadata)
|
||||
include(package)
|
||||
include(sbom)
|
||||
# note the option ALL which allows to build the docs together with the application
|
||||
add_custom_target(doxygen ALL
|
||||
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMENT "Generating documentation with Doxygen"
|
||||
DEPENDS uorb_msgs parameters
|
||||
VERBATIM
|
||||
USES_TERMINAL
|
||||
)
|
||||
|
||||
# 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
|
||||
else()
|
||||
message("Doxygen needs to be installed to generate documentation")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
#=============================================================================
|
||||
# Metadata - helpers for generating documentation
|
||||
#
|
||||
|
||||
add_custom_target(metadata_airframes
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${PX4_BINARY_DIR}/docs
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/px_process_airframes.py
|
||||
-v -a ${PX4_SOURCE_DIR}/ROMFS/px4fmu_common/init.d
|
||||
--markdown ${PX4_BINARY_DIR}/docs/airframes.md
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/px_process_airframes.py
|
||||
-v -a ${PX4_SOURCE_DIR}/ROMFS/px4fmu_common/init.d
|
||||
--xml ${PX4_BINARY_DIR}/docs/airframes.xml
|
||||
COMMENT "Generating full airframe metadata (markdown and xml)"
|
||||
USES_TERMINAL
|
||||
)
|
||||
|
||||
if(EXISTS "${PX4_SOURCE_DIR}/platforms/${PX4_PLATFORM}/cmake/finalize.cmake")
|
||||
include(finalize)
|
||||
file(GLOB_RECURSE yaml_config_files ${PX4_SOURCE_DIR}/src/modules/*.yaml
|
||||
${PX4_SOURCE_DIR}/src/drivers/*.yaml ${PX4_SOURCE_DIR}/src/lib/*.yaml)
|
||||
add_custom_target(metadata_parameters
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${PX4_BINARY_DIR}/docs
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
${PX4_SOURCE_DIR}/Tools/serial/generate_config.py --all-ports --params-file ${PX4_SOURCE_DIR}/src/generated_serial_params.c --config-files ${yaml_config_files}
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/src/lib/parameters/px_process_params.py
|
||||
--src-path `find ${PX4_SOURCE_DIR}/src -maxdepth 4 -type d`
|
||||
--inject-xml ${PX4_SOURCE_DIR}/src/lib/parameters/parameters_injected.xml
|
||||
--markdown ${PX4_BINARY_DIR}/docs/parameters.md
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/src/lib/parameters/px_process_params.py
|
||||
--src-path `find ${PX4_SOURCE_DIR}/src -maxdepth 4 -type d`
|
||||
--inject-xml ${PX4_SOURCE_DIR}/src/lib/parameters/parameters_injected.xml
|
||||
--xml ${PX4_BINARY_DIR}/docs/parameters.xml
|
||||
COMMENT "Generating full parameter metadata (markdown and xml)"
|
||||
USES_TERMINAL
|
||||
)
|
||||
|
||||
add_custom_target(metadata_module_documentation
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${PX4_BINARY_DIR}/docs
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/px_process_module_doc.py -v --src-path ${PX4_SOURCE_DIR}/src
|
||||
--markdown ${PX4_BINARY_DIR}/docs/modules
|
||||
COMMENT "Generating module documentation"
|
||||
USES_TERMINAL
|
||||
)
|
||||
|
||||
add_custom_target(all_metadata
|
||||
DEPENDS
|
||||
metadata_airframes
|
||||
metadata_parameters
|
||||
metadata_module_documentation
|
||||
)
|
||||
|
||||
#=============================================================================
|
||||
# packaging
|
||||
#
|
||||
# Important to having packaging at end of cmake file.
|
||||
#
|
||||
set(CPACK_PACKAGE_NAME ${PROJECT_NAME}-${PX4_CONFIG})
|
||||
set(CPACK_PACKAGE_VERSION ${PX4_GIT_TAG})
|
||||
set(CPACK_PACKAGE_CONTACT ${package-contact})
|
||||
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OFF) # TODO: review packaging for linux boards
|
||||
set(CPACK_DEBIAN_PACKAGE_SECTION "devel")
|
||||
set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
|
||||
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "The PX4 Pro autopilot.")
|
||||
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PX4_CONFIG}-${PX4_GIT_TAG}")
|
||||
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PX4_GIT_TAG}")
|
||||
set(CPACK_SOURCE_GENERATOR "ZIP;TBZ2")
|
||||
set(CPACK_PACKAGING_INSTALL_PREFIX "")
|
||||
set(CPACK_SET_DESTDIR "OFF")
|
||||
|
||||
if ("${CMAKE_SYSTEM}" MATCHES "Linux")
|
||||
set(CPACK_GENERATOR "TBZ2")
|
||||
find_program(DPKG_PROGRAM dpkg)
|
||||
if (EXISTS ${DPKG_PROGRAM})
|
||||
list (APPEND CPACK_GENERATOR "DEB")
|
||||
endif()
|
||||
else()
|
||||
set(CPACK_GENERATOR "ZIP")
|
||||
endif()
|
||||
|
||||
include(CPack)
|
||||
|
||||
+22
-148
@@ -1,170 +1,44 @@
|
||||
# Contributing to PX4-Autopilot
|
||||
# Contributing to PX4 Firmware
|
||||
|
||||
We follow the [GitHub flow](https://guides.github.com/introduction/flow/) development model.
|
||||
We follow the [Github flow](https://guides.github.com/introduction/flow/) development model.
|
||||
|
||||
## Fork the project, then clone your repo
|
||||
### Fork the project, then clone your repo
|
||||
|
||||
First [fork and clone](https://help.github.com/articles/fork-a-repo) the project.
|
||||
First [fork and clone](https://help.github.com/articles/fork-a-repo) the project project.
|
||||
|
||||
## Create a feature branch
|
||||
### Create a feature branch
|
||||
|
||||
Always branch off `main` for new features.
|
||||
*Always* branch off master for new features.
|
||||
|
||||
```
|
||||
git checkout -b mydescriptivebranchname
|
||||
```
|
||||
|
||||
## Edit and build the code
|
||||
### 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.
|
||||
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](https://dev.px4.io/master/en/contribute/code.html) when editing files.
|
||||
|
||||
### Coding standards
|
||||
### Commit your changes
|
||||
|
||||
All C/C++ code must follow the [PX4 coding style](https://docs.px4.io/main/en/contribute/code.html). Formatting is enforced by [astyle](http://astyle.sourceforge.net/) in CI (`make check_format`). Code quality checks run via [clang-tidy](https://clang.llvm.org/extra/clang-tidy/). Pull requests that fail either check will not be merged.
|
||||
Always write descriptive commit messages and add a fixes or relates note to them with an [issue number](https://github.com/px4/Firmware/issues) (Github will link these then conveniently)
|
||||
|
||||
Python code is checked with [mypy](https://mypy-lang.org/) and [flake8](https://flake8.pycqa.org/).
|
||||
|
||||
## Commit message convention
|
||||
|
||||
PX4 uses [conventional commits](https://www.conventionalcommits.org/) for all commit messages and PR titles.
|
||||
|
||||
### Format
|
||||
**Example:**
|
||||
|
||||
```
|
||||
type(scope): short description of the change
|
||||
Change how the attitude controller works
|
||||
|
||||
- Fixes rate feed forward
|
||||
- Allows a local body rate override
|
||||
|
||||
Fixes issue #123
|
||||
```
|
||||
|
||||
| Part | Rule |
|
||||
|------|------|
|
||||
| **type** | Category of change (see types table below) |
|
||||
| **scope** | The module, driver, board, or area of PX4 affected |
|
||||
| **`!`** (optional) | Append before `:` to mark a breaking change |
|
||||
| **description** | What the change does, at least 5 characters, written in imperative form |
|
||||
### Test your changes
|
||||
|
||||
### Types
|
||||
Since we care about safety, we will regularly ask you for test results. Best is to do a test flight (or bench test where it applies) and upload the logfile from it (on the microSD card in the logs directory) to Google Drive or Dropbox and share the link.
|
||||
|
||||
| Type | Description |
|
||||
|------|-------------|
|
||||
| `feat` | A new feature |
|
||||
| `fix` | A bug fix |
|
||||
| `docs` | Documentation only changes |
|
||||
| `style` | Formatting, whitespace, no code change |
|
||||
| `refactor` | Code change that neither fixes a bug nor adds a feature |
|
||||
| `perf` | Performance improvement |
|
||||
| `test` | Adding or correcting tests |
|
||||
| `build` | Build system or external dependencies |
|
||||
| `ci` | CI configuration files and scripts |
|
||||
| `chore` | Other changes that don't modify src or test files |
|
||||
| `revert` | Reverts a previous commit |
|
||||
### Push your changes
|
||||
|
||||
### Scopes
|
||||
Push changes to your repo and send a [pull request](https://github.com/PX4/Firmware/compare/).
|
||||
|
||||
The scope identifies which part of PX4 is affected. Common scopes:
|
||||
|
||||
| Scope | Area |
|
||||
|-------|------|
|
||||
| `ekf2` | Extended Kalman Filter (state estimation) |
|
||||
| `mavlink` | MAVLink messaging protocol |
|
||||
| `commander` | Commander and mode management |
|
||||
| `navigator` | Mission, RTL, Land, and other navigation modes |
|
||||
| `sensors` | Sensor drivers and processing |
|
||||
| `drivers` | Hardware drivers |
|
||||
| `boards/px4_fmu-v6x` | Board-specific changes (use the board name) |
|
||||
| `mc_att_control` | Multicopter attitude control |
|
||||
| `mc_pos_control` | Multicopter position control |
|
||||
| `fw_att_control` | Fixed-wing attitude control |
|
||||
| `vtol` | VTOL-specific logic |
|
||||
| `actuators` | Mixer and actuator output |
|
||||
| `battery` | Battery monitoring and estimation |
|
||||
| `logger` | On-board logging |
|
||||
| `param` | Parameter system |
|
||||
| `simulation` | SITL, Gazebo, SIH |
|
||||
| `ci` | Continuous integration and workflows |
|
||||
| `docs` | Documentation |
|
||||
| `build` | CMake, toolchain, build system |
|
||||
| `uorb` | Inter-module messaging |
|
||||
|
||||
For changes spanning multiple subsystems, use the primary one affected. Look at the directory path of the files you changed to find the right scope: `src/modules/ekf2/` uses `ekf2`, `src/drivers/imu/` uses `drivers/imu`, `.github/workflows/` uses `ci`.
|
||||
|
||||
### Breaking changes
|
||||
|
||||
Append `!` before the colon to indicate a breaking change:
|
||||
|
||||
```
|
||||
feat(ekf2)!: remove deprecated height fusion API
|
||||
```
|
||||
|
||||
### Good commit messages
|
||||
|
||||
```
|
||||
feat(ekf2): add height fusion timeout
|
||||
fix(mavlink): correct BATTERY_STATUS_V2 parsing
|
||||
refactor(navigator): simplify RTL altitude logic
|
||||
ci(workflows): migrate to reusable workflows
|
||||
docs(ekf2): update tuning guide
|
||||
feat(boards/px4_fmu-v6x)!: remove deprecated driver API
|
||||
perf(mc_rate_control): reduce loop latency
|
||||
```
|
||||
|
||||
### Commits to avoid
|
||||
|
||||
These will be flagged by CI and should be squashed or reworded before merging:
|
||||
|
||||
```
|
||||
fix # too vague, no type or scope
|
||||
update # too vague, no type or scope
|
||||
ekf2: fix something # missing type prefix
|
||||
apply suggestions from code review # squash into parent commit
|
||||
do make format # squash into parent commit
|
||||
WIP: trying something # not ready for main
|
||||
oops # not descriptive
|
||||
```
|
||||
|
||||
### PR titles
|
||||
|
||||
The PR title follows the same `type(scope): description` format. This is enforced by CI and is especially important because the PR title becomes the commit message when a PR is squash-merged.
|
||||
|
||||
### Merge policy
|
||||
|
||||
Commits should be atomic and independently revertable. Squash at reviewer discretion for obvious cases (multiple WIP commits, messy review-response history). When your commits are clean and logical, they will be preserved as individual commits on `main`.
|
||||
|
||||
### Cleaning up commits
|
||||
|
||||
If CI flags your commit messages, you can fix them with an interactive rebase:
|
||||
|
||||
```bash
|
||||
# Squash all commits into one:
|
||||
git rebase -i HEAD~N # replace N with the number of commits
|
||||
# mark all commits except the first as 'squash' or 'fixup'
|
||||
# reword the remaining commit to follow the format
|
||||
git push --force-with-lease
|
||||
|
||||
# Or reword specific commits:
|
||||
git rebase -i HEAD~N
|
||||
# mark the bad commits as 'reword'
|
||||
git push --force-with-lease
|
||||
```
|
||||
|
||||
## Test your changes
|
||||
|
||||
PX4 is safety-critical software. All contributions must include adequate testing where practical:
|
||||
|
||||
- **New features** must include unit tests and/or integration tests that exercise the new functionality, where practical. Hardware-dependent changes that cannot be tested in SITL should include bench test or flight test evidence.
|
||||
- **Bug fixes** must include a regression test where practical. When automated testing is not feasible (hardware-specific issues, race conditions, etc.), provide a link to a flight log demonstrating the fix and the reproduction steps for the original bug.
|
||||
- **Reviewers** will verify that tests or test evidence exist before approving a pull request.
|
||||
|
||||
### Types of tests
|
||||
|
||||
| Test type | When to use | How to run |
|
||||
|-----------|-------------|------------|
|
||||
| **Unit tests** (gtest) | Module-level logic, math, parsing | `make tests` |
|
||||
| **SITL integration tests** (MAVSDK) | Flight behavior, failsafes, missions | `test/mavsdk_tests/` |
|
||||
| **Bench tests / flight logs** | Hardware-dependent changes | Upload logs to [Flight Review](https://logs.px4.io) |
|
||||
|
||||
Since we care about safety, we will regularly ask you for test results. Best is to do a test flight (or bench test where it applies) and upload the log file from it (on the microSD card in the logs directory) to Google Drive or Dropbox and share the link.
|
||||
|
||||
## Push your changes
|
||||
|
||||
Push changes to your repo and send a [pull request](https://github.com/PX4/PX4-Autopilot/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.
|
||||
MuncherMake 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.
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
## 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)
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,83 @@
|
||||
{
|
||||
"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",
|
||||
"build_*"
|
||||
]
|
||||
}
|
||||
],
|
||||
"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/astyle/astylerc"
|
||||
},
|
||||
"options_c++":
|
||||
{
|
||||
"use_only_additional_options": true,
|
||||
"additional_options_file": "${project_path}/Tools/astyle/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 px4_fmu-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
|
||||
}
|
||||
]
|
||||
}
|
||||
Vendored
+503
-101
@@ -5,22 +5,399 @@ pipeline {
|
||||
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('Catkin build on ROS workspace') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-ros-melodic:2019-03-08'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'ls -l'
|
||||
sh '''#!/bin/bash -l
|
||||
echo $0;
|
||||
mkdir -p catkin_ws/src;
|
||||
cd catkin_ws;
|
||||
git -C ${WORKSPACE}/catkin_ws/src/Firmware submodule update --init --recursive --force Tools/sitl_gazebo
|
||||
git clone --recursive ${WORKSPACE}/catkin_ws/src/Firmware/Tools/sitl_gazebo src/mavlink_sitl_gazebo;
|
||||
source /opt/ros/melodic/setup.bash;
|
||||
catkin init;
|
||||
catkin build -j$(nproc) -l$(nproc);
|
||||
'''
|
||||
// test if the binary was correctly installed and runs using 'mavros_posix_silt.launch'
|
||||
sh '''#!/bin/bash -l
|
||||
echo $0;
|
||||
source catkin_ws/devel/setup.bash;
|
||||
rostest px4 pub_test.launch;
|
||||
'''
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'rm -rf catkin_ws'
|
||||
}
|
||||
}
|
||||
options {
|
||||
checkoutToSubdirectory('catkin_ws/src/Firmware')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Colcon build on ROS2 workspace') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-ros2-bouncy:2019-03-08'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'ls -l'
|
||||
sh '''#!/bin/bash -l
|
||||
echo $0;
|
||||
unset ROS_DISTRO;
|
||||
mkdir -p colcon_ws/src;
|
||||
cd colcon_ws;
|
||||
git -C ${WORKSPACE}/colcon_ws/src/Firmware submodule update --init --recursive --force Tools/sitl_gazebo
|
||||
git clone --recursive ${WORKSPACE}/colcon_ws/src/Firmware/Tools/sitl_gazebo src/mavlink_sitl_gazebo;
|
||||
source /opt/ros/bouncy/setup.sh;
|
||||
source /opt/ros/melodic/setup.sh;
|
||||
colcon build --event-handlers console_direct+ --symlink-install;
|
||||
'''
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'rm -rf colcon_ws'
|
||||
}
|
||||
}
|
||||
options {
|
||||
checkoutToSubdirectory('colcon_ws/src/Firmware')
|
||||
}
|
||||
}
|
||||
|
||||
stage('Style check') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-bionic:2019-03-08' }
|
||||
}
|
||||
steps {
|
||||
sh 'make check_format'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'rm -rf catkin_ws'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Bloaty px4_fmu-v2') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx:2019-03-08'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'ccache -z'
|
||||
sh 'git fetch --tags'
|
||||
sh 'make px4_fmu-v2_default'
|
||||
sh 'make px4_fmu-v2_default bloaty_symbols'
|
||||
sh 'make px4_fmu-v2_default bloaty_compileunits'
|
||||
sh 'make px4_fmu-v2_default bloaty_inlines'
|
||||
sh 'make px4_fmu-v2_default bloaty_templates'
|
||||
sh 'make px4_fmu-v2_default bloaty_compare_master'
|
||||
sh 'make sizes'
|
||||
sh 'ccache -s'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Bloaty px4_fmu-v5') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx:2019-03-08'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'ccache -z'
|
||||
sh 'git fetch --tags'
|
||||
sh 'make px4_fmu-v5_default'
|
||||
sh 'make px4_fmu-v5_default bloaty_symbols'
|
||||
sh 'make px4_fmu-v5_default bloaty_compileunits'
|
||||
sh 'make px4_fmu-v5_default bloaty_inlines'
|
||||
sh 'make px4_fmu-v5_default bloaty_templates'
|
||||
sh 'make px4_fmu-v5_default bloaty_compare_master'
|
||||
sh 'make sizes'
|
||||
sh 'ccache -s'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('No-ninja px4_fmu-v2') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx:2019-03-08'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'ccache -z'
|
||||
sh 'git fetch --tags'
|
||||
sh 'NO_NINJA_BUILD=1 make px4_fmu-v2_default'
|
||||
sh 'ccache -s'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('No-ninja px4_fmu-v5') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx:2019-03-08'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'ccache -z'
|
||||
sh 'git fetch --tags'
|
||||
sh 'NO_NINJA_BUILD=1 make px4_fmu-v5_default'
|
||||
sh 'ccache -s'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('No-ninja SITL build') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-base-bionic:2019-03-08'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'ccache -z'
|
||||
sh 'git fetch --tags'
|
||||
sh 'NO_NINJA_BUILD=1 make px4_sitl_default'
|
||||
sh 'ccache -s'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('SITL unit tests') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-base-bionic:2019-03-08'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'ccache -z'
|
||||
sh 'git fetch --tags'
|
||||
sh 'make tests'
|
||||
sh 'ccache -s'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Clang analyzer') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-clang:2019-03-08'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'make scan-build'
|
||||
// publish html
|
||||
publishHTML target: [
|
||||
reportTitles: 'clang static analyzer',
|
||||
allowMissing: false,
|
||||
alwaysLinkToLastBuild: true,
|
||||
keepAll: true,
|
||||
reportDir: 'build/scan-build/report_latest',
|
||||
reportFiles: '*',
|
||||
reportName: 'Clang Static Analyzer'
|
||||
]
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
when {
|
||||
anyOf {
|
||||
branch 'master'
|
||||
branch 'beta'
|
||||
branch 'stable'
|
||||
branch 'pr-jenkins' // for testing
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// stage('Clang tidy') {
|
||||
// agent {
|
||||
// docker {
|
||||
// image 'px4io/px4-dev-clang:2019-03-08'
|
||||
// args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
// }
|
||||
// }
|
||||
// steps {
|
||||
// sh 'export'
|
||||
// retry (3) {
|
||||
// sh 'make distclean'
|
||||
// sh 'make clang-tidy-quiet'
|
||||
// }
|
||||
// }
|
||||
// post {
|
||||
// always {
|
||||
// sh 'make distclean'
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
stage('Cppcheck') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-base-bionic:2019-03-08'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'make cppcheck'
|
||||
// publish html
|
||||
publishHTML target: [
|
||||
reportTitles: 'Cppcheck',
|
||||
allowMissing: false,
|
||||
alwaysLinkToLastBuild: true,
|
||||
keepAll: true,
|
||||
reportDir: 'build/cppcheck/',
|
||||
reportFiles: '*',
|
||||
reportName: 'Cppcheck'
|
||||
]
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
when {
|
||||
anyOf {
|
||||
branch 'master'
|
||||
branch 'beta'
|
||||
branch 'stable'
|
||||
branch 'pr-jenkins' // for testing
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Check stack') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx:2019-03-08'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'make px4_fmu-v2_default stack_check'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('ShellCheck') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx:2019-03-08'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'make shellcheck_all'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Module config validation') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-base-bionic:2019-03-08'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'make validate_module_configs'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // parallel
|
||||
} // stage Analysis
|
||||
|
||||
stage('Generate Metadata') {
|
||||
|
||||
parallel {
|
||||
|
||||
stage('Airframe') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
|
||||
docker { image 'px4io/px4-dev-base-bionic:2019-03-08' }
|
||||
}
|
||||
steps {
|
||||
sh 'make distclean; git clean -ff -x -d .'
|
||||
sh 'git fetch --all --tags'
|
||||
sh 'make distclean'
|
||||
sh 'make airframe_metadata'
|
||||
dir('build/px4_sitl_default/docs') {
|
||||
archiveArtifacts(artifacts: 'airframes.md, airframes.xml')
|
||||
@@ -29,38 +406,36 @@ pipeline {
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean; git clean -ff -x -d .'
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Parameter') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
|
||||
docker { image 'px4io/px4-dev-base-bionic:2019-03-08' }
|
||||
}
|
||||
steps {
|
||||
sh 'make distclean; git clean -ff -x -d .'
|
||||
sh 'git fetch --all --tags'
|
||||
sh 'make distclean'
|
||||
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'
|
||||
archiveArtifacts(artifacts: 'parameters.md, parameters.xml')
|
||||
stash includes: 'parameters.md, parameters.xml', name: 'metadata_parameters'
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean; git clean -ff -x -d .'
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Module') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
|
||||
docker { image 'px4io/px4-dev-base-bionic:2019-03-08' }
|
||||
}
|
||||
steps {
|
||||
sh 'make distclean; git clean -ff -x -d .'
|
||||
sh 'git fetch --all --tags'
|
||||
sh 'make distclean'
|
||||
sh 'make module_documentation'
|
||||
dir('build/px4_sitl_default/docs') {
|
||||
archiveArtifacts(artifacts: 'modules/*.md')
|
||||
@@ -69,57 +444,7 @@ pipeline {
|
||||
}
|
||||
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;
|
||||
git checkout 4.0.15;
|
||||
./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 .'
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -127,23 +452,22 @@ pipeline {
|
||||
stage('uORB graphs') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-nuttx-focal:2022-08-12'
|
||||
image 'px4io/px4-dev-nuttx:2019-03-08'
|
||||
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 distclean'
|
||||
sh 'make uorb_graphs'
|
||||
dir('Tools/uorb_graph') {
|
||||
archiveArtifacts(artifacts: 'graph_*.json')
|
||||
stash includes: 'graph_*.json', name: 'uorb_graph'
|
||||
archiveArtifacts(artifacts: 'graph_px4_sitl.json')
|
||||
stash includes: 'graph_px4_sitl.json', name: 'uorb_graph'
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh 'make distclean; git clean -ff -x -d .'
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -155,35 +479,56 @@ pipeline {
|
||||
|
||||
parallel {
|
||||
|
||||
stage('Userguide') {
|
||||
stage('Devguide') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
|
||||
docker { image 'px4io/px4-dev-base-bionic:2019-03-08' }
|
||||
}
|
||||
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')
|
||||
sh('git clone https://${GIT_USER}:${GIT_PASS}@github.com/PX4/Devguide.git')
|
||||
sh('cp airframes.md Devguide/en/airframes/airframe_reference.md')
|
||||
sh('cp parameters.md Devguide/en/advanced/parameter_reference.md')
|
||||
sh('cp -R modules/*.md Devguide/en/middleware/')
|
||||
sh('cd Devguide; git status; git add .; git commit -a -m "Update PX4 Firmware metadata `date`" || true')
|
||||
sh('cd Devguide; git push origin master || true')
|
||||
sh('rm -rf Devguide')
|
||||
}
|
||||
}
|
||||
when {
|
||||
anyOf {
|
||||
branch 'main'
|
||||
branch 'master' // should be removed, but in case there is something going on...
|
||||
branch 'master'
|
||||
branch 'pr-jenkins' // for testing
|
||||
}
|
||||
}
|
||||
options {
|
||||
skipDefaultCheckout()
|
||||
}
|
||||
}
|
||||
|
||||
stage('Userguide') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-bionic:2019-03-08' }
|
||||
}
|
||||
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/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('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 master || true')
|
||||
sh('rm -rf px4_user_guide')
|
||||
}
|
||||
}
|
||||
when {
|
||||
anyOf {
|
||||
branch 'master'
|
||||
branch 'pr-jenkins' // for testing
|
||||
}
|
||||
}
|
||||
@@ -194,7 +539,7 @@ pipeline {
|
||||
|
||||
stage('QGroundControl') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
|
||||
docker { image 'px4io/px4-dev-base-bionic:2019-03-08' }
|
||||
}
|
||||
steps {
|
||||
sh('export')
|
||||
@@ -211,8 +556,7 @@ pipeline {
|
||||
}
|
||||
when {
|
||||
anyOf {
|
||||
branch 'main'
|
||||
branch 'master' // should be removed, but in case there is something going on...
|
||||
branch 'master'
|
||||
branch 'pr-jenkins' // for testing
|
||||
}
|
||||
}
|
||||
@@ -221,9 +565,69 @@ pipeline {
|
||||
}
|
||||
}
|
||||
|
||||
stage('PX4 ROS msgs') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-bionic:2019-03-08' }
|
||||
}
|
||||
steps {
|
||||
sh('export')
|
||||
sh('make distclean')
|
||||
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")
|
||||
// 'master' branch
|
||||
sh('python msg/tools/uorb_to_ros_msgs.py msg/ px4_msgs/msg/')
|
||||
sh('cd px4_msgs; git status; git add .; git commit -a -m "Update message definitions `date`" || true')
|
||||
sh('cd px4_msgs; git push origin master || true')
|
||||
// 'ros1' branch
|
||||
sh('cd px4_msgs; git checkout ros1')
|
||||
sh('python msg/tools/uorb_to_ros_msgs.py msg/ px4_msgs/msg/')
|
||||
sh('cd px4_msgs; git status; git add .; git commit -a -m "Update message definitions `date`" || true')
|
||||
sh('cd px4_msgs; git push origin ros1 || true')
|
||||
sh('rm -rf px4_msgs')
|
||||
}
|
||||
}
|
||||
when {
|
||||
anyOf {
|
||||
branch 'master'
|
||||
branch 'pr-jenkins' // for testing
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('PX4 ROS2 bridge') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-bionic:2019-03-08' }
|
||||
}
|
||||
steps {
|
||||
sh('export')
|
||||
sh('make distclean')
|
||||
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_ros_com.git -b ${BRANCH_NAME}")
|
||||
// deploy uORB RTPS ID map
|
||||
sh('python msg/tools/uorb_to_ros_rtps_ids.py -i msg/tools/uorb_rtps_message_ids.yaml -o px4_ros_com/templates/uorb_rtps_message_ids.yaml')
|
||||
sh('cd px4_ros_com; git status; git add .; git commit -a -m "Update uORB RTPS ID map `date`" || true')
|
||||
sh('cd px4_ros_com; git push origin ${BRANCH_NAME} || true')
|
||||
// deploy uORB RTPS required tools
|
||||
sh('cp msg/tools/uorb_rtps_classifier.py px4_ros_com/scripts/uorb_rtps_classifier.py')
|
||||
sh('cp msg/tools/generate_microRTPS_bridge.py px4_ros_com/scripts/generate_microRTPS_bridge.py')
|
||||
sh('cp msg/tools/px_generate_uorb_topic_files.py px4_ros_com/scripts/px_generate_uorb_topic_files.py')
|
||||
sh('cp msg/tools/px_generate_uorb_topic_helper.py px4_ros_com/scripts/px_generate_uorb_topic_helper.py')
|
||||
sh('cd px4_ros_com; git status; git add .; git commit -a -m "Update uORB RTPS script tools `date`" || true')
|
||||
sh('cd px4_ros_com; git push origin ${BRANCH_NAME} || true')
|
||||
sh('rm -rf px4_msgs')
|
||||
}
|
||||
}
|
||||
when {
|
||||
anyOf {
|
||||
branch 'master'
|
||||
branch 'pr-jenkins' // for testing
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('S3') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
|
||||
docker { image 'px4io/px4-dev-base-bionic:2019-03-08' }
|
||||
}
|
||||
steps {
|
||||
sh('export')
|
||||
@@ -233,13 +637,11 @@ pipeline {
|
||||
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 'master'
|
||||
branch 'pr-jenkins' // for testing
|
||||
}
|
||||
}
|
||||
@@ -263,6 +665,6 @@ pipeline {
|
||||
}
|
||||
options {
|
||||
buildDiscarder(logRotator(numToKeepStr: '20', artifactDaysToKeepStr: '30'))
|
||||
timeout(time: 90, unit: 'MINUTES')
|
||||
timeout(time: 60, unit: 'MINUTES')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,228 +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_SUPPORT_FORTIFIED_TOOLCHAIN
|
||||
bool "Fortified toolchain support"
|
||||
default n
|
||||
help
|
||||
Enable compatibility with toolchains that define
|
||||
_FORTIFY_SOURCE.
|
||||
|
||||
This switches PX4_DEBUG_OPT_LEVEL from -O0 to -Og. Keep this
|
||||
disabled unless the fortified toolchain requires optimization.
|
||||
|
||||
config BOARD_ROMFSROOT
|
||||
string "ROMFSROOT"
|
||||
default "px4fmu_common"
|
||||
help
|
||||
relative path to the ROMFS root directory
|
||||
|
||||
config BOARD_ADDITIONAL_INIT
|
||||
string "Additional init file"
|
||||
help
|
||||
additional configurable init file to include in the ROMFS
|
||||
|
||||
config BOARD_IO
|
||||
string "IO board name"
|
||||
default "px4_io-v2_default"
|
||||
depends on DRIVERS_PX4IO
|
||||
help
|
||||
name of IO board to be built and included in the ROMFS (requires a valid ROMFSROOT)
|
||||
|
||||
config BOARD_CONSTRAINED_FLASH
|
||||
bool "Contrained flash"
|
||||
help
|
||||
flag to enable constrained flash options (eg limit init script status text)
|
||||
|
||||
config BOARD_NO_HELP
|
||||
bool "No help"
|
||||
help
|
||||
optional condition flag to disable help text on constrained flash systems
|
||||
|
||||
config BOARD_CONSTRAINED_MEMORY
|
||||
bool "Contrained memory"
|
||||
help
|
||||
flag to enable constrained memory options (eg limit maximum number of uORB publications)
|
||||
|
||||
config BOARD_EXTERNAL_METADATA
|
||||
bool "External metadata"
|
||||
help
|
||||
flag to exclude metadata to reduce flash
|
||||
|
||||
config BOARD_LINKER_PREFIX
|
||||
string "linker prefix"
|
||||
help
|
||||
optional to prefix on the Linker script.
|
||||
|
||||
config BOARD_COMPILE_DEFINITIONS
|
||||
string "add custom compile definitions"
|
||||
help
|
||||
add custom compile defitions to this specific target
|
||||
endmenu #Toolchain
|
||||
|
||||
config BOARD_TESTING
|
||||
bool "Testing"
|
||||
select SYSTEMCMDS_TESTS
|
||||
help
|
||||
flag to enable automatic inclusion of PX4 testing modules
|
||||
|
||||
|
||||
config BOARD_ETHERNET
|
||||
bool "Ethernet"
|
||||
help
|
||||
flag to indicate that ethernet is enabled
|
||||
|
||||
config BOARD_CRYPTO
|
||||
bool "Crypto support"
|
||||
help
|
||||
Enable PX4 Crypto Support. Select the implementation under drivers
|
||||
|
||||
config BOARD_PROTECTED
|
||||
bool "Memory protection"
|
||||
help
|
||||
Enable memory protection via MPU/MMU
|
||||
|
||||
menu "Serial ports"
|
||||
|
||||
config BOARD_SERIAL_URT6
|
||||
string "URT6 tty port"
|
||||
|
||||
config BOARD_SERIAL_GPS1
|
||||
string "GPS1 tty port"
|
||||
|
||||
config BOARD_SERIAL_GPS2
|
||||
string "GPS2 tty port"
|
||||
|
||||
config BOARD_SERIAL_GPS3
|
||||
string "GPS3 tty port"
|
||||
|
||||
config BOARD_SERIAL_GPS4
|
||||
string "GPS4 tty port"
|
||||
|
||||
config BOARD_SERIAL_GPS5
|
||||
string "GPS5 tty port"
|
||||
|
||||
config BOARD_SERIAL_TEL1
|
||||
string "TEL1 tty port"
|
||||
|
||||
config BOARD_SERIAL_TEL2
|
||||
string "TEL2 tty port"
|
||||
|
||||
config BOARD_SERIAL_TEL3
|
||||
string "TEL3 tty port"
|
||||
|
||||
config BOARD_SERIAL_TEL4
|
||||
string "TEL4 tty port"
|
||||
|
||||
config BOARD_SERIAL_TEL5
|
||||
string "TEL5 tty port"
|
||||
|
||||
config BOARD_SERIAL_RC
|
||||
string "RC tty port"
|
||||
|
||||
config BOARD_SERIAL_WIFI
|
||||
string "WIFI tty port"
|
||||
|
||||
config BOARD_SERIAL_EXT2
|
||||
string "EXT2 tty port"
|
||||
endmenu
|
||||
|
||||
menu "File paths"
|
||||
|
||||
config BOARD_ROOT_PATH
|
||||
string "PX4 Root file path"
|
||||
default "/fs/microsd"
|
||||
|
||||
config BOARD_PARAM_FILE
|
||||
string "Parameter file"
|
||||
default "/fs/mtd_params"
|
||||
endmenu
|
||||
|
||||
menu "drivers"
|
||||
source "src/drivers/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "modules"
|
||||
source "src/modules/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "systemcmds"
|
||||
source "src/systemcmds/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "examples"
|
||||
source "src/examples/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "platforms"
|
||||
depends on PLATFORM_QURT || PLATFORM_POSIX || PLATFORM_NUTTX
|
||||
source "platforms/Kconfig"
|
||||
endmenu
|
||||
|
||||
source "src/lib/*/Kconfig"
|
||||
@@ -1,6 +1,6 @@
|
||||
BSD 3-Clause License
|
||||
|
||||
Copyright (c) 2012 - 2025, PX4 Development Team
|
||||
Copyright (c) 2012 - 2019, PX4 Development Team
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
Maintainers
|
||||
===========
|
||||
|
||||
See [the documentation on Maintainers](https://docs.px4.io/main/en/contribute/maintainers.html) to learn about the role of the maintainers and the process to become one.
|
||||
|
||||
**Active Maintainers**
|
||||
|
||||
| Name | Sector | GitHub | Chat | email
|
||||
|-------------------------|--------|--------|------|----------------
|
||||
| Lorenz Meier | Founder | [@LorenzMeier](https://github.com/LorenzMeier) | | <lorenz@px4.io>
|
||||
| Daniel Agar | Architecture | [@dagar](https://github.com/dagar) | daniel_agar | <daniel@agar.ca>
|
||||
| Beat Küng | Architecture | [@bkueng](https://github.com/bkueng) | beatkueng | <beat-kueng@gmx.net>
|
||||
| Ramón Roche | CI / Testing | [@mrpollo](https://github.com/mrpollo) | rroche | <rroche@linuxfoundation.org>
|
||||
| Mathieu Bresciani | State Estimation | [@bresch](https://github.com/bresch) | mbresch |
|
||||
| Paul Riseborough | State Estimation | [@priseborough](https://github.com/priseborough) | |
|
||||
| David Sidrane | RTOS / NuttX | [@davids5](https://github.com/davids5) | david_s5 | <David.Sidrane@Nscdg.com>
|
||||
| Jayoung Lim | Simulation | [@Jaeyoung-Lim](https://github.com/Jaeyoung-Lim) | jaeyounglim. | <jalim@ethz.ch>
|
||||
| Beniamino Pozzan | ROS 2 | [@beniaminopozzan](https://github.com/beniaminopozzan) | beniaminopozzan | <beniamino.pozzan@gmail.com>
|
||||
| Matthias Grob | Multirotor | [@MaEtUgR](https://github.com/MaEtUgR) | maetugr |
|
||||
| Silvan Fuhrer | Fixed-Wing / VTOL | [@sfuhrer](https://github.com/sfuhrer) | sfuhrer |
|
||||
| Christian Friedrich | Rover | [@chfriedrich98](https://github.com/chfriedrich98) | christian982564 |
|
||||
| Pedro Roque | Spacecraft | [@Pedro-Roque](https://github.com/Pedro-Roque) | .pedroroque | <roque@caltech.edu>
|
||||
| Jacob Dahl | Simulation | [@dakejahl](https://github.com/dakejahl) | dakejahl | <dahl.jakejacob@gmail.com>
|
||||
|
||||
|
||||
**Documentation Maintainers**
|
||||
|
||||
| Name | GitHub | Chat | email
|
||||
|------|--------|------|----------------------
|
||||
| Hamish Willee | [@hamishwillee](https://github.com/hamishwillee) | hamishwillee |
|
||||
|
||||
**Release Managers**
|
||||
|
||||
| Name | GitHub | Chat | email
|
||||
|------|--------|------|----------------------
|
||||
| Ramón Roche | [@mrpollo](https://github.com/mrpollo) | rroche | <rroche@linuxfoundation.org>
|
||||
| Daniel Agar | [@dagar](https://github.com/dagar) | daniel_agar | <daniel@agar.ca>
|
||||
|
||||
**Retired Maintainers**
|
||||
|
||||
| Name | GitHub | Chat | email
|
||||
|------|--------|------|----------------------
|
||||
| | | |
|
||||
@@ -1,6 +1,6 @@
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (c) 2015 - 2024 PX4 Development Team. All rights reserved.
|
||||
# Copyright (c) 2015 - 2019 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
|
||||
@@ -62,10 +62,6 @@ 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
|
||||
|
||||
# Parsing
|
||||
# --------------------------------------------------------------------
|
||||
# assume 1st argument passed is the main target, the
|
||||
@@ -73,14 +69,7 @@ endef
|
||||
# by cmake in the subdirectory
|
||||
FIRST_ARG := $(firstword $(MAKECMDGOALS))
|
||||
ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
|
||||
|
||||
# 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)
|
||||
j ?= 4
|
||||
|
||||
NINJA_BIN := ninja
|
||||
ifndef NO_NINJA_BUILD
|
||||
@@ -101,11 +90,6 @@ ifdef NINJA_BUILD
|
||||
else
|
||||
PX4_MAKE_ARGS :=
|
||||
endif
|
||||
|
||||
# Only override ninja default if -j is set.
|
||||
ifneq ($(j),)
|
||||
PX4_MAKE_ARGS := $(PX4_MAKE_ARGS) -j$(j)
|
||||
endif
|
||||
else
|
||||
ifdef SYSTEMROOT
|
||||
# Windows
|
||||
@@ -113,9 +97,6 @@ else
|
||||
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
|
||||
endif
|
||||
@@ -129,62 +110,46 @@ 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)
|
||||
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}
|
||||
CMAKE_ARGS += -DCMAKE_BUILD_TYPE=${PX4_CMAKE_BUILD_TYPE}
|
||||
else
|
||||
|
||||
# Address Sanitizer
|
||||
ifdef PX4_ASAN
|
||||
override CMAKE_ARGS += -DCMAKE_BUILD_TYPE=AddressSanitizer
|
||||
CMAKE_ARGS += -DCMAKE_BUILD_TYPE=AddressSanitizer
|
||||
endif
|
||||
|
||||
# Memory Sanitizer
|
||||
ifdef PX4_MSAN
|
||||
override CMAKE_ARGS += -DCMAKE_BUILD_TYPE=MemorySanitizer
|
||||
CMAKE_ARGS += -DCMAKE_BUILD_TYPE=MemorySanitizer
|
||||
endif
|
||||
|
||||
# Thread Sanitizer
|
||||
ifdef PX4_TSAN
|
||||
override CMAKE_ARGS += -DCMAKE_BUILD_TYPE=ThreadSanitizer
|
||||
CMAKE_ARGS += -DCMAKE_BUILD_TYPE=ThreadSanitizer
|
||||
endif
|
||||
|
||||
# Undefined Behavior Sanitizer
|
||||
ifdef PX4_UBSAN
|
||||
override CMAKE_ARGS += -DCMAKE_BUILD_TYPE=UndefinedBehaviorSanitizer
|
||||
CMAKE_ARGS += -DCMAKE_BUILD_TYPE=UndefinedBehaviorSanitizer
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
# Prefer the interpreter from an active Python virtual environment.
|
||||
# Otherwise leave PYTHON_EXECUTABLE unset and let CMake resolve Python.
|
||||
ifneq ($(strip $(VIRTUAL_ENV)),)
|
||||
PYTHON_EXECUTABLE ?= $(VIRTUAL_ENV)/bin/python
|
||||
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) \
|
||||
@@ -200,9 +165,9 @@ endef
|
||||
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' ))
|
||||
@$(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' ))
|
||||
@$(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
|
||||
@@ -216,8 +181,8 @@ define colorecho
|
||||
+@echo -e '${COLOR_BLUE}${1} ${NO_COLOR}'
|
||||
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)
|
||||
# Get a list of all config targets boards/*/*.cmake
|
||||
ALL_CONFIG_TARGETS := $(shell find boards -maxdepth 3 -mindepth 3 ! -name '*common*' ! -name '*sdflight*' -name '*.cmake' -print | sed -e 's/boards\///' | sed -e 's/\.cmake//' | sed -e 's/\//_/g' | sort)
|
||||
|
||||
# ADD CONFIGS HERE
|
||||
# --------------------------------------------------------------------
|
||||
@@ -225,44 +190,52 @@ ALL_CONFIG_TARGETS := $(shell find boards -maxdepth 3 -mindepth 3 -name '*.px4bo
|
||||
|
||||
# All targets.
|
||||
$(ALL_CONFIG_TARGETS):
|
||||
@$(call cmake-build,$@$(BUILD_DIR_SUFFIX))
|
||||
@$(eval PX4_CONFIG = $@)
|
||||
@$(eval CMAKE_ARGS += -DCONFIG=$(PX4_CONFIG))
|
||||
@$(call cmake-build,$(PX4_CONFIG)$(BUILD_DIR_SUFFIX))
|
||||
|
||||
# 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))
|
||||
|
||||
# Multi-processor boards: build all processor targets together
|
||||
# VOXL2 apps processor (default) depends on SLPI DSP being built first
|
||||
modalai_voxl2_default: modalai_voxl2_slpi
|
||||
modalai_voxl2: modalai_voxl2_slpi
|
||||
modalai_voxl2_deb: modalai_voxl2_slpi
|
||||
@$(eval PX4_CONFIG = $@_default)
|
||||
@$(eval CMAKE_ARGS += -DCONFIG=$(PX4_CONFIG))
|
||||
@$(call cmake-build,$(PX4_CONFIG)$(BUILD_DIR_SUFFIX))
|
||||
|
||||
all_config_targets: $(ALL_CONFIG_TARGETS)
|
||||
all_default_targets: $(CONFIG_TARGETS_DEFAULT)
|
||||
|
||||
# DEB package targets: builds _default config, then runs cpack.
|
||||
# Multi-processor boards (e.g. VOXL2) chain companion builds automatically
|
||||
# via existing cmake prerequisites.
|
||||
%_deb:
|
||||
@$(call cmake-build,$(subst _deb,_default,$@)$(BUILD_DIR_SUFFIX))
|
||||
@cd "$(SRC_DIR)/build/$(subst _deb,_default,$@)" && cpack -G DEB
|
||||
|
||||
updateconfig:
|
||||
@./Tools/kconfig/updateconfig.py
|
||||
posix: px4_sitl_default
|
||||
|
||||
# board reorganization deprecation warnings (2018-11-22)
|
||||
define deprecation_warning
|
||||
$(warning $(1) has been deprecated and will be removed, please use $(2)!)
|
||||
endef
|
||||
|
||||
px4fmu-%_default:
|
||||
$(call deprecation_warning, ${@},$(subst px4fmu,px4_fmu,$@))
|
||||
$(MAKE) $(subst px4fmu,px4_fmu, $@)
|
||||
|
||||
posix_sitl_default:
|
||||
$(call deprecation_warning, ${@},px4_sitl_default)
|
||||
$(MAKE) px4_sitl_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
|
||||
.PHONY: all posix px4_sitl_default all_config_targets all_default_targets
|
||||
|
||||
# Multi- config targets.
|
||||
eagle_default: atlflight_eagle_default atlflight_eagle_qurt-default
|
||||
eagle_rtps: atlflight_eagle_rtps atlflight_eagle_qurt-rtps
|
||||
|
||||
excelsior_default: atlflight_excelsior_default atlflight_excelsior_qurt-default
|
||||
excelsior_rtps: atlflight_excelsior_rtps atlflight_excelsior_qurt-rtps
|
||||
|
||||
.PHONY: eagle_default eagle_rtps
|
||||
.PHONY: excelsior_default excelsior_rtps
|
||||
|
||||
# Other targets
|
||||
# --------------------------------------------------------------------
|
||||
|
||||
.PHONY: qgc_firmware px4fmu_firmware misc_qgc_extra_firmware
|
||||
.PHONY: qgc_firmware px4fmu_firmware misc_qgc_extra_firmware alt_firmware check_rtps
|
||||
|
||||
# QGroundControl flashable NuttX firmware
|
||||
qgc_firmware: px4fmu_firmware misc_qgc_extra_firmware
|
||||
@@ -275,26 +248,42 @@ px4fmu_firmware: \
|
||||
check_px4_fmu-v4_default \
|
||||
check_px4_fmu-v4pro_default \
|
||||
check_px4_fmu-v5_default \
|
||||
check_px4_fmu-v5x_default \
|
||||
sizes
|
||||
|
||||
misc_qgc_extra_firmware: \
|
||||
check_nxp_fmuk66-v3_default \
|
||||
check_mro_x21_default \
|
||||
check_intel_aerofc-v1_default \
|
||||
check_auav_x21_default \
|
||||
check_bitcraze_crazyflie_default \
|
||||
check_bitcraze_crazyflie21_default \
|
||||
check_airmind_mindpx-v2_default \
|
||||
check_px4_fmu-v2_lpe \
|
||||
sizes
|
||||
|
||||
.PHONY: sizes check quick_check uorb_graphs
|
||||
# Other NuttX firmware
|
||||
alt_firmware: \
|
||||
check_px4_cannode-v1_default \
|
||||
check_px4_esc-v1_default \
|
||||
check_auav_esc35-v1_default \
|
||||
check_thiemar_s2740vc-v1_default \
|
||||
sizes
|
||||
|
||||
# builds with RTPS
|
||||
check_rtps: \
|
||||
check_px4_fmu-v3_rtps \
|
||||
check_px4_fmu-v4_rtps \
|
||||
check_px4_fmu-v4pro_rtps \
|
||||
check_px4_sitl_rtps \
|
||||
sizes
|
||||
|
||||
.PHONY: sizes check quick_check check_rtps uorb_graphs
|
||||
|
||||
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
|
||||
check: check_px4_sitl_default px4fmu_firmware misc_qgc_extra_firmware alt_firmware tests check_format
|
||||
|
||||
# quick_check builds a single nuttx and SITL target, runs testing, and checks the style
|
||||
# quick_check builds a single nuttx and posix target, runs testing, and checks the style
|
||||
quick_check: check_px4_sitl_test check_px4_fmu-v5_default tests check_format
|
||||
|
||||
check_%:
|
||||
@@ -303,82 +292,13 @@ check_%:
|
||||
@$(MAKE) --no-print-directory $(subst check_,,$@)
|
||||
@echo
|
||||
|
||||
all_variants_%:
|
||||
@echo 'Building all $(subst all_variants_,,$@) variants:' $(filter $(subst all_variants_,,$@)_%, $(ALL_CONFIG_TARGETS))
|
||||
@echo
|
||||
$(foreach a,$(filter $(subst all_variants_,,$@)_%, $(ALL_CONFIG_TARGETS)), $(call cmake-build,$(a)$(BUILD_DIR_SUFFIX)))
|
||||
|
||||
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
|
||||
@./Tools/uorb_graph/create_from_startupscript.sh
|
||||
@./Tools/uorb_graph/create.py --src-path src --exclude-path src/examples --file Tools/uorb_graph/graph_full
|
||||
@$(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_fmu-v5x_default uorb_graph
|
||||
@$(MAKE) --no-print-directory px4_fmu-v6x_default uorb_graph
|
||||
@$(MAKE) --no-print-directory px4_sitl_default uorb_graph
|
||||
|
||||
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
|
||||
|
||||
bootloaders_update: \
|
||||
3dr_ctrl-zero-h7-oem-revg_bootloader \
|
||||
ark_fmu-v6x_bootloader \
|
||||
ark_fpv_bootloader \
|
||||
ark_pi6x_bootloader \
|
||||
auterion_fmu-v6s_bootloader \
|
||||
auterion_fmu-v6x_bootloader \
|
||||
cuav_nora_bootloader \
|
||||
cuav_x7pro_bootloader \
|
||||
cuav_7-nano_bootloader \
|
||||
cuav_fmu-v6x_bootloader \
|
||||
cuav_x25-evo_bootloader \
|
||||
cuav_x25-super_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 \
|
||||
micoair_h743-v2_bootloader \
|
||||
micoair_h743-lite_bootloader \
|
||||
modalai_fc-v2_bootloader \
|
||||
mro_ctrl-zero-classic_bootloader \
|
||||
mro_ctrl-zero-h7_bootloader \
|
||||
mro_ctrl-zero-h7-oem_bootloader \
|
||||
mro_pixracerpro_bootloader \
|
||||
narinfc_h7_bootloader \
|
||||
px4_fmu-v6c_bootloader \
|
||||
px4_fmu-v6u_bootloader \
|
||||
px4_fmu-v6x_bootloader \
|
||||
px4_fmu-v6xrt_bootloader \
|
||||
siyi_n7_bootloader
|
||||
git status
|
||||
|
||||
.PHONY: coverity_scan
|
||||
|
||||
@@ -386,25 +306,28 @@ coverity_scan: px4_sitl_default
|
||||
|
||||
# Documentation
|
||||
# --------------------------------------------------------------------
|
||||
.PHONY: parameters_metadata airframe_metadata module_documentation extract_events px4_metadata
|
||||
.PHONY: parameters_metadata airframe_metadata module_documentation px4_metadata doxygen
|
||||
|
||||
parameters_metadata:
|
||||
@$(MAKE) --no-print-directory px4_sitl_default metadata_parameters ver_gen
|
||||
@$(MAKE) --no-print-directory px4_sitl_default metadata_parameters
|
||||
|
||||
airframe_metadata:
|
||||
@$(MAKE) --no-print-directory px4_sitl_default metadata_airframes ver_gen
|
||||
@$(MAKE) --no-print-directory px4_sitl_default metadata_airframes
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
# Astyle
|
||||
# --------------------------------------------------------------------
|
||||
.PHONY: check_format format check_newlines
|
||||
.PHONY: check_format format
|
||||
|
||||
check_format:
|
||||
$(call colorecho,'Checking formatting with astyle')
|
||||
@@ -415,71 +338,47 @@ 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
|
||||
.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 CMAKE_ARGS += -DCONFIG=px4_sitl_test)
|
||||
$(eval 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)
|
||||
|
||||
# work around lcov bug #316; remove once lcov is fixed (see https://github.com/linux-test-project/lcov/issues/316)
|
||||
LCOBUG = --ignore-errors mismatch,negative
|
||||
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 \
|
||||
$(LCOBUG) \
|
||||
-o coverage/lcov.info
|
||||
|
||||
@$(MAKE) --no-print-directory px4_sitl_default test_coverage_genhtml PX4_CMAKE_BUILD_TYPE=Coverage
|
||||
@echo "Open "$(SRC_DIR)"/build/px4_sitl_default/coverage-html/index.html to see coverage"
|
||||
|
||||
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
|
||||
@$(MAKE) --no-print-directory px4_sitl_default sitl_gazebo
|
||||
|
||||
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
|
||||
@$(MAKE) --no-print-directory px4_sitl_default sitl_gazebo
|
||||
@"$(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
|
||||
@$(MAKE) --no-print-directory px4_sitl_default sitl_gazebo 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
|
||||
|
||||
python_coverage:
|
||||
@mkdir -p "$(SRC_DIR)"/build/python_coverage
|
||||
@@ -494,7 +393,7 @@ python_coverage:
|
||||
|
||||
# static analyzers (scan-build, clang-tidy, cppcheck)
|
||||
# --------------------------------------------------------------------
|
||||
.PHONY: scan-build px4_sitl_default-clang clang-tidy clang-tidy-fix
|
||||
.PHONY: scan-build px4_sitl_default-clang clang-tidy clang-tidy-fix clang-tidy-quiet
|
||||
.PHONY: cppcheck shellcheck_all validate_module_configs
|
||||
|
||||
scan-build:
|
||||
@@ -512,34 +411,22 @@ 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
|
||||
|
||||
# Paths to exclude from clang-tidy (auto-generated from .gitmodules + manual additions):
|
||||
# - All submodules (external code we consume, not edit)
|
||||
# - Test code (allowed looser style)
|
||||
# - Example code (educational, not production)
|
||||
# - Vendored third-party code (e.g., CMSIS_5)
|
||||
# - NuttX-only drivers excluded at CMake level (mcp_common); I2C-dependent libs excluded here (smbus)
|
||||
# - GPIO excluded here (NuttX platform headers)
|
||||
# - Emscripten failsafe web build: source path + Unity build path (failsafe_test.dir)
|
||||
# because CMake Unity Builds merge sources into a generated .cxx under build/
|
||||
#
|
||||
# To add manual exclusions, append to CLANG_TIDY_EXCLUDE_EXTRA below.
|
||||
# Submodules are automatically excluded - no action needed when adding new ones.
|
||||
CLANG_TIDY_SUBMODULES := $(shell git config --file .gitmodules --get-regexp path | awk '{print $$2}' | tr '\n' '|' | sed 's/|$$//')
|
||||
CLANG_TIDY_EXCLUDE_EXTRA := src/systemcmds/tests|src/examples|src/modules/gyro_fft/CMSIS_5|src/lib/drivers/smbus|src/drivers/gpio|src/modules/commander/failsafe/emscripten|failsafe_test\.dir|\.pb\.cc
|
||||
CLANG_TIDY_EXCLUDE := $(CLANG_TIDY_SUBMODULES)|$(CLANG_TIDY_EXCLUDE_EXTRA)
|
||||
|
||||
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) -exclude="$(CLANG_TIDY_EXCLUDE)" -p .
|
||||
@cd "$(SRC_DIR)"/build/px4_sitl_default-clang && "$(SRC_DIR)"/Tools/run-clang-tidy.py -header-filter=".*\.hpp" -j$(j) -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) -exclude="$(CLANG_TIDY_EXCLUDE)" -fix -p .
|
||||
@cd "$(SRC_DIR)"/build/px4_sitl_default-clang && "$(SRC_DIR)"/Tools/run-clang-tidy.py -header-filter=".*\.hpp" -j$(j) -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) -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 -i"$(SRC_DIR)"/src/examples --enable=performance --std=c++11 --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:
|
||||
@@ -547,57 +434,48 @@ shellcheck_all:
|
||||
@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/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/*" \
|
||||
-not -path "$(SRC_DIR)/src/lib/tensorflow_lite_micro/*" -print0 | \
|
||||
xargs -0 "$(SRC_DIR)"/Tools/validate_yaml.py --schema-file "$(SRC_DIR)"/validation/module_schema.yaml
|
||||
@find "$(SRC_DIR)"/src/modules "$(SRC_DIR)"/src/drivers "$(SRC_DIR)"/src/lib -name *.yaml -type f -print0 | xargs -0 "$(SRC_DIR)"/Tools/validate_yaml.py --schema-file "$(SRC_DIR)"/validation/module_schema.yaml
|
||||
|
||||
# Cleanup
|
||||
# --------------------------------------------------------------------
|
||||
.PHONY: clean submodulesclean submodulesupdate distclean
|
||||
.PHONY: clean submodulesclean submodulesupdate gazeboclean distclean
|
||||
|
||||
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 "$(SRC_DIR)"/build
|
||||
|
||||
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 update --init --recursive --force
|
||||
|
||||
submodulesupdate:
|
||||
@git submodule update --quiet --init --recursive --jobs 4 || true
|
||||
@git submodule update --quiet --init --recursive || true
|
||||
@git submodule sync --recursive
|
||||
@git submodule update --init --recursive --jobs 4
|
||||
@git fetch --all --tags --recurse-submodules=yes --jobs=4
|
||||
@git submodule update --init --recursive
|
||||
|
||||
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/"
|
||||
gazeboclean:
|
||||
@rm -rf ~/.gazebo/*
|
||||
|
||||
# Help / Error / Misc
|
||||
distclean: gazeboclean
|
||||
@git submodule deinit -f .
|
||||
@git clean -ff -x -d -e ".project" -e ".cproject" -e ".idea" -e ".settings" -e ".vscode"
|
||||
|
||||
# Help / Error
|
||||
# --------------------------------------------------------------------
|
||||
|
||||
# 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."),@#)
|
||||
$(error "$@ cannot be the first argument. Use '$(MAKE) help|list_config_targets' to get a list of all possible [configuration] targets."),@#)
|
||||
|
||||
# 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)'
|
||||
awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | \
|
||||
egrep -v -e '^[^[:alnum:]]' -e '^($(subst $(space),|,$(ALL_CONFIG_TARGETS)))$$' -e '_default$$' -e '^(posix|eagle|Makefile)'
|
||||
@echo
|
||||
@echo "Or, $(MAKE) <config_target> [<make_target(s)>]"
|
||||
@echo "Use '$(MAKE) list_config_targets' for a list of configuration targets."
|
||||
@@ -605,40 +483,3 @@ help:
|
||||
# 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
|
||||
|
||||
# Generate reference documentation for uORB messages
|
||||
.PHONY: msg_docs
|
||||
msg_docs:
|
||||
$(call colorecho,'Generating uORB message reference docs')
|
||||
@mkdir -p build/msg_docs
|
||||
@./Tools/msg/generate_msg_docs.py -d build/msg_docs
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
Please use [PX4 Discuss](http://discuss.px4.io/) or [Slack](http://slack.px4.io/) to align on pull requests if necessary. You can then open draft pull requests to get early feedback.
|
||||
|
||||
**Describe problem solved by the proposed pull request**
|
||||
A clear and concise description of the problem this proposed change will solve. E.g. For this use case I ran into...
|
||||
|
||||
**Test data / coverage**
|
||||
How was it tested? What cases were covered? Logs uploaded to https://review.px4.io/ and screenshots of the important plot parts.
|
||||
|
||||
**Describe your preferred solution**
|
||||
A clear and concise description of what you have implemented.
|
||||
|
||||
**Describe possible alternatives**
|
||||
A clear and concise description of alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other related context or media.
|
||||
@@ -1,110 +1,108 @@
|
||||
<p align="center">
|
||||
<a href="https://px4.io">
|
||||
<img src="docs/assets/site/px4_logo.svg" alt="PX4 Autopilot" width="240">
|
||||
</a>
|
||||
</p>
|
||||
# PX4 Drone Autopilot
|
||||
|
||||
<p align="center">
|
||||
<em>The autopilot stack the industry builds on.</em>
|
||||
</p>
|
||||
[](https://github.com/PX4/Firmware/releases) [](https://zenodo.org/badge/latestdoi/22634/PX4/Firmware)
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/PX4/PX4-Autopilot/releases"><img src="https://img.shields.io/github/release/PX4/PX4-Autopilot.svg" alt="Releases"></a>
|
||||
<a href="https://www.bestpractices.dev/projects/6520"><img src="https://www.bestpractices.dev/projects/6520/badge" alt="OpenSSF Best Practices"></a>
|
||||
<a href="https://zenodo.org/badge/latestdoi/22634/PX4/PX4-Autopilot"><img src="https://zenodo.org/badge/22634/PX4/PX4-Autopilot.svg" alt="DOI"></a>
|
||||
<a href="https://github.com/PX4/PX4-Autopilot/actions/workflows/build_all_targets.yml"><img src="https://github.com/PX4/PX4-Autopilot/actions/workflows/build_all_targets.yml/badge.svg?branch=main" alt="Build Targets"></a>
|
||||
<a href="https://discord.gg/dronecode"><img src="https://discordapp.com/api/guilds/1022170275984457759/widget.png?style=shield" alt="Discord"></a>
|
||||
</p>
|
||||
[](http://ci.px4.io:8080/blue/organizations/jenkins/PX4%2FFirmware/activity)
|
||||
|
||||
---
|
||||
[](http://slack.px4.io)
|
||||
|
||||
## About
|
||||
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/Firmware/tree/master/src/modules) directory. It also contains the PX4 Drone Middleware Platform, which provides drivers and middleware to run drones.
|
||||
|
||||
PX4 is an open-source autopilot stack for drones and unmanned vehicles. It supports multirotors, fixed-wing, VTOL, rovers, and many more experimental platforms from racing quads to industrial survey aircraft. It runs on [NuttX](https://nuttx.apache.org/), Linux, and macOS. Licensed under [BSD 3-Clause](LICENSE).
|
||||
* Official Website: http://px4.io (License: BSD 3-clause, [LICENSE](https://github.com/PX4/Firmware/blob/master/LICENSE))
|
||||
* [Supported airframes](https://docs.px4.io/en/airframes/airframe_reference.html) ([portfolio](http://px4.io/#airframes)):
|
||||
* [Multicopters](https://docs.px4.io/en/airframes/airframe_reference.html#copter)
|
||||
* [Fixed wing](https://docs.px4.io/en/airframes/airframe_reference.html#plane)
|
||||
* [VTOL](https://docs.px4.io/en/airframes/airframe_reference.html#vtol)
|
||||
* many more experimental types (Rovers, Blimps, Boats, Submarines, etc)
|
||||
* Releases: [Downloads](https://github.com/PX4/Firmware/releases)
|
||||
|
||||
## Why PX4
|
||||
|
||||
**Modular architecture.** PX4 is built around [uORB](https://docs.px4.io/main/en/middleware/uorb.html), a [DDS](https://docs.px4.io/main/en/middleware/uxrce_dds.html)-compatible publish/subscribe middleware. Modules are fully parallelized and thread safe. You can build custom configurations and trim what you don't need.
|
||||
## PX4 Users
|
||||
|
||||
**Wide hardware support.** PX4 runs on a wide range of [autopilot boards](https://docs.px4.io/main/en/flight_controller/) and supports an extensive set of sensors, telemetry radios, and actuators through the [Pixhawk](https://pixhawk.org/) ecosystem.
|
||||
The [PX4 User Guide](https://docs.px4.io/en/) explains how to assemble [supported vehicles](https://docs.px4.io/en/airframes/airframe_reference.html) and fly drones with PX4.
|
||||
See the [forum and chat](https://docs.px4.io/en/#support) if you need help!
|
||||
|
||||
**Developer friendly.** First-class support for [MAVLink](https://mavlink.io/) and [DDS / ROS 2](https://docs.px4.io/main/en/ros2/) integration. Comprehensive [SITL simulation](https://docs.px4.io/main/en/simulation/), hardware-in-the-loop testing, and [log analysis](https://docs.px4.io/main/en/log/flight_log_analysis.html) tools. An active developer community on [Discord](https://discord.gg/dronecode) and the [weekly dev call](https://docs.px4.io/main/en/contribute/).
|
||||
|
||||
**Vendor neutral governance.** PX4 is hosted under the [Dronecode Foundation](https://www.dronecode.org/), part of the Linux Foundation. Business-friendly BSD-3 license. No single vendor controls the roadmap.
|
||||
## PX4 Developers
|
||||
|
||||
## Supported Vehicles
|
||||
This [Developer Guide](https://dev.px4.io/) 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.
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<a href="https://docs.px4.io/main/en/frames_multicopter/">
|
||||
<img src="docs/assets/airframes/types/QuadRotorX.svg" width="50" alt="Multicopter"><br>
|
||||
<sub>Multicopter</sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://docs.px4.io/main/en/frames_plane/">
|
||||
<img src="docs/assets/airframes/types/Plane.svg" width="50" alt="Fixed Wing"><br>
|
||||
<sub>Fixed Wing</sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://docs.px4.io/main/en/frames_vtol/">
|
||||
<img src="docs/assets/airframes/types/VTOLPlane.svg" width="50" alt="VTOL"><br>
|
||||
<sub>VTOL</sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://docs.px4.io/main/en/frames_rover/">
|
||||
<img src="docs/assets/airframes/types/Rover.svg" width="50" alt="Rover"><br>
|
||||
<sub>Rover</sub>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
Developers should read the [Guide for Contributions](https://dev.px4.io/en/contribute/).
|
||||
See the [forum and chat](https://dev.px4.io/en/#support) if you need help!
|
||||
|
||||
<sub>…and many more: helicopters, autogyros, airships, submarines, boats, and other experimental platforms. These frames have basic support but are not part of the regular flight-test program. See the <a href="https://docs.px4.io/main/en/airframes/airframe_reference.html">full airframe reference</a>.</sub>
|
||||
|
||||
## Quick Start
|
||||
### Weekly Dev Call
|
||||
|
||||
```bash
|
||||
git clone https://github.com/PX4/PX4-Autopilot.git --recursive
|
||||
cd PX4-Autopilot
|
||||
make px4_sitl
|
||||
```
|
||||
The PX4 Dev Team syncs up on a [weekly dev call](https://dev.px4.io/en/contribute/#dev_call).
|
||||
|
||||
> [!NOTE]
|
||||
> See the [Development Guide](https://docs.px4.io/main/en/development/development.html) for toolchain setup and build options.
|
||||
> **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/).
|
||||
|
||||
## Documentation & Resources
|
||||
|
||||
| Resource | Description |
|
||||
| --- | --- |
|
||||
| [User Guide](https://docs.px4.io/main/en/) | Build, configure, and fly with PX4 |
|
||||
| [Developer Guide](https://docs.px4.io/main/en/development/development.html) | Modify the flight stack, add peripherals, port to new hardware |
|
||||
| [Airframe Reference](https://docs.px4.io/main/en/airframes/airframe_reference.html) | Full list of supported frames |
|
||||
| [Autopilot Hardware](https://docs.px4.io/main/en/flight_controller/) | Compatible flight controllers |
|
||||
| [Release Notes](https://docs.px4.io/main/en/releases/) | What's new in each release |
|
||||
| [Contribution Guide](https://docs.px4.io/main/en/contribute/) | How to contribute to PX4 |
|
||||
## Maintenance Team
|
||||
|
||||
## Community
|
||||
* Project: Founder - [Lorenz Meier](https://github.com/LorenzMeier), Architecture: [Daniel Agar](https://github.com/dagar)
|
||||
* [Dev Call](https://github.com/PX4/Firmware/labels/devcall) - [Ramon Roche](https://github.com/mrpollo)
|
||||
* Communication Architecture
|
||||
* [Beat Kueng](https://github.com/bkueng)
|
||||
* [Julian Oes](https://github.com/JulianOes)
|
||||
* UI / UX
|
||||
* [Donald Gagne](https://github.com/DonLakeFlyer)
|
||||
* [Gus Grubba](https://github.com/dogmaphobic)
|
||||
* [Multicopter Flight Control](https://github.com/PX4/Firmware/labels/multicopter)
|
||||
* [Dennis Mannhart](https://github.com/Stifael)
|
||||
* [Matthias Grob](https://github.com/MaEtUgR)
|
||||
* [VTOL Flight Control](https://github.com/PX4/Firmware/labels/vtol)
|
||||
* [Daniel Agar](https://github.com/dagar)
|
||||
* [Mathieu Bresciani](https://github.com/bresch)
|
||||
* [Sander Smeets](https://github.com/sanderux)
|
||||
* [Roman Bapst](https://github.com/tumbili)
|
||||
* [Andreas Antener](https://github.com/AndreasAntener)
|
||||
* [Fixed Wing Flight Control](https://github.com/PX4/Firmware/labels/fixedwing)
|
||||
* [Daniel Agar](https://github.com/dagar)
|
||||
* [Paul Riseborough](https://github.com/priseborough)
|
||||
* Racers - [Matthias Grob](https://github.com/MaEtUgR)
|
||||
* OS / drivers - [David Sidrane](https://github.com/davids5)
|
||||
* [UAVCAN](https://github.com/PX4/Firmware/labels/uavcan) / Industrial - [Pavel Kirienko](https://github.com/pavel-kirienko)
|
||||
* [State Estimation](https://github.com/PX4/Firmware/issues?q=is%3Aopen+is%3Aissue+label%3A%22state+estimation%22) - [James Goppert](https://github.com/jgoppert), [Paul Riseborough](https://github.com/priseborough)
|
||||
* Vision based navigation
|
||||
* [Christoph Tobler](https://github.com/ChristophTobler)
|
||||
* [Mohammed Kabir](https://github.com/mhkabir)
|
||||
* Obstacle Avoidance - [Martina Rivizzigno](https://github.com/mrivi)
|
||||
* [Snapdragon](https://github.com/PX4/Firmware/labels/snapdragon)
|
||||
* [Christoph Tobler](https://github.com/ChristophTobler)
|
||||
* [Intel Aero](https://github.com/PX4/Firmware/labels/intel%20aero)
|
||||
* [Sugnan Prabhu](https://github.com/sugnanprabhu)
|
||||
* [José Roberto de Souza](https://github.com/zehortigoza)
|
||||
* [Raspberry Pi / Navio](https://github.com/PX4/Firmware/labels/raspberry_pi) - [Beat Kueng](https://github.com/bkueng)
|
||||
* [Airmind MindPX / MindRacer](https://github.com/PX4/Firmware/labels/mindpx) - [Henry Zhang](https://github.com/iZhangHui)
|
||||
* RTPS/ROS2 Interface - [Nuno Marques](https://github.com/TSC21)
|
||||
|
||||
- **Weekly Dev Call** — open to all developers ([Dronecode calendar](https://www.dronecode.org/calendar/))
|
||||
- **Discord** — [Join the Dronecode server](https://discord.gg/dronecode)
|
||||
- **Discussion Forum** — [PX4 Discuss](https://discuss.px4.io/)
|
||||
- **Maintainers** — see [`MAINTAINERS.md`](MAINTAINERS.md)
|
||||
- **Contributor Stats** — [LFX Insights](https://insights.lfx.linuxfoundation.org/foundation/dronecode)
|
||||
See also [About Us](http://px4.io/about-us/#development_team) (px4.io) and the [contributors list](https://github.com/PX4/Firmware/graphs/contributors) (Github).
|
||||
|
||||
## Contributing
|
||||
## Supported Hardware
|
||||
|
||||
We welcome contributions of all kinds — bug reports, documentation, new features, and code reviews. Please read the [Contribution Guide](https://docs.px4.io/main/en/contribute/) to get started.
|
||||
This repository contains code supporting these boards:
|
||||
* [Snapdragon Flight](https://docs.px4.io/en/flight_controller/snapdragon_flight.html)
|
||||
* [Intel Aero](https://docs.px4.io/en/flight_controller/intel_aero.html)
|
||||
* [Raspberry PI with Navio 2](https://docs.px4.io/en/flight_controller/raspberry_pi_navio2.html)
|
||||
* [Parrot Bebop 2](https://dev.px4.io/en/advanced/parrot_bebop.html)
|
||||
* FMUv2.x
|
||||
* [Pixhawk](https://docs.px4.io/en/flight_controller/pixhawk.html)
|
||||
* [Pixhawk Mini](https://docs.px4.io/en/flight_controller/pixhawk_mini.html)
|
||||
* [Pixfalcon](https://docs.px4.io/en/flight_controller/pixfalcon.html)
|
||||
* FMUv3.x [Pixhawk 2](https://docs.px4.io/en/flight_controller/pixhawk-2.html)
|
||||
* FMUv4.x
|
||||
* [Pixracer](https://docs.px4.io/en/flight_controller/pixracer.html)
|
||||
* [Pixhawk 3 Pro](https://docs.px4.io/en/flight_controller/pixhawk3_pro.html)
|
||||
* FMUv5.x (ARM Cortex M7)
|
||||
* [Pixhawk 4](https://docs.px4.io/en/flight_controller/pixhawk4.html)
|
||||
* [Pixhawk 4 mini](https://docs.px4.io/en/flight_controller/pixhawk4_mini.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)
|
||||
* [Bitcraze Crazyflie 2.0](https://docs.px4.io/en/flight_controller/crazyflie2.html)
|
||||
|
||||
## Governance
|
||||
Additional information about supported hardware can be found in [PX4 user Guide > Autopilot Hardware](https://docs.px4.io/en/flight_controller/).
|
||||
|
||||
The PX4 Autopilot project is hosted by the [Dronecode Foundation](https://www.dronecode.org/), a [Linux Foundation](https://www.linuxfoundation.org/) Collaborative Project. Dronecode holds all PX4 trademarks and serves as the project's legal guardian, ensuring vendor-neutral stewardship — no single company owns the name or controls the roadmap. The source code is licensed under the [BSD 3-Clause](LICENSE) license, so you are free to use, modify, and distribute it in your own projects.
|
||||
## Project Roadmap
|
||||
|
||||
<p align="center">
|
||||
<a href="https://www.dronecode.org/">
|
||||
<img src="docs/assets/site/dronecode_logo.svg" alt="Dronecode Logo" width="180">
|
||||
</a>
|
||||
</p>
|
||||
A high level project roadmap is available [here](https://www.dronecode.org/roadmap/).
|
||||
|
||||
+43
-274
@@ -31,11 +31,10 @@
|
||||
#
|
||||
############################################################################
|
||||
|
||||
set(romfs_src_dir ${PX4_SOURCE_DIR}/ROMFS/${config_romfs_root})
|
||||
set(romfs_gen_root_dir ${PX4_BINARY_DIR}/etc)
|
||||
message(STATUS "ROMFS: ${config_romfs_root}")
|
||||
|
||||
file(RELATIVE_PATH romfs_path_relative ${PX4_SOURCE_DIR} ${romfs_src_dir})
|
||||
message(STATUS "ROMFS: ${romfs_path_relative}")
|
||||
set(romfs_src_dir ${PX4_SOURCE_DIR}/ROMFS/${config_romfs_root})
|
||||
set(romfs_gen_root_dir ${PX4_BINARY_DIR}/genromfs)
|
||||
|
||||
set_property(GLOBAL PROPERTY PX4_ROMFS_FILES)
|
||||
set_property(GLOBAL PROPERTY PX4_ROMFS_CMAKE_FILES)
|
||||
@@ -63,9 +62,6 @@ function(px4_add_romfs_files)
|
||||
set_property(GLOBAL APPEND PROPERTY PX4_ROMFS_CMAKE_FILES ${CMAKE_CURRENT_LIST_FILE})
|
||||
|
||||
foreach(arg IN LISTS ARGN)
|
||||
if(NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/${arg})
|
||||
message(FATAL_ERROR "${CMAKE_CURRENT_LIST_DIR}/${arg} doesn't exist")
|
||||
endif()
|
||||
set_property(GLOBAL APPEND PROPERTY PX4_ROMFS_FILES ${CMAKE_CURRENT_LIST_DIR}/${arg})
|
||||
endforeach()
|
||||
endfunction()
|
||||
@@ -82,70 +78,20 @@ file(GLOB jinja_templates ${PX4_SOURCE_DIR}/Tools/serial/*.jinja)
|
||||
if (px4_constrained_flash_build)
|
||||
set(added_arguments --constrained-flash)
|
||||
endif()
|
||||
if(PX4_ETHERNET)
|
||||
set(added_arguments ${added_arguments} --ethernet)
|
||||
endif()
|
||||
# Check if board has an rc.board_airframes file to filter airframes
|
||||
set(board_airframes_file "${PX4_BOARD_DIR}/init/rc.board_airframes")
|
||||
set(airframes_whitelist "")
|
||||
if(EXISTS "${board_airframes_file}")
|
||||
message(STATUS "ROMFS: Using board-specific airframes list: ${board_airframes_file}")
|
||||
file(STRINGS "${board_airframes_file}" airframes_whitelist)
|
||||
# Remove comments and empty lines
|
||||
list(FILTER airframes_whitelist EXCLUDE REGEX "^[ \t]*#")
|
||||
list(FILTER airframes_whitelist EXCLUDE REGEX "^[ \t]*$")
|
||||
endif()
|
||||
|
||||
# create list of relative romfs file names
|
||||
set(romfs_copy_files_relative)
|
||||
foreach(romfs_file IN LISTS romfs_copy_files)
|
||||
string(REPLACE "${romfs_src_dir}/" "" romfs_file_rel ${romfs_file})
|
||||
|
||||
# If we have an airframes whitelist, filter airframe files
|
||||
if(airframes_whitelist AND romfs_file_rel MATCHES "^init.d/airframes/")
|
||||
# Extract just the filename
|
||||
get_filename_component(airframe_name "${romfs_file_rel}" NAME)
|
||||
# Check if it's in the whitelist
|
||||
if(NOT "${airframe_name}" IN_LIST airframes_whitelist)
|
||||
continue()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
list(APPEND romfs_copy_files_relative ${romfs_file_rel})
|
||||
endforeach()
|
||||
# copy the ROMFS files by creating a tar and extracting it to the build
|
||||
# directory (which preserves the directory structure)
|
||||
file(MAKE_DIRECTORY ${romfs_gen_root_dir})
|
||||
set(romfs_tar_file ${PX4_BINARY_DIR}/romfs_files.tar)
|
||||
add_custom_command(
|
||||
OUTPUT ${romfs_tar_file}
|
||||
COMMAND ${CMAKE_COMMAND} -E tar cf ${romfs_tar_file} ${romfs_copy_files_relative}
|
||||
WORKING_DIRECTORY ${romfs_src_dir}
|
||||
DEPENDS
|
||||
${romfs_copy_files}
|
||||
${jinja_templates}
|
||||
${module_config_files}
|
||||
${romfs_cmake_files}
|
||||
${PX4_SOURCE_DIR}/Tools/px_process_airframes.py
|
||||
${PX4_SOURCE_DIR}/Tools/px4airframes/markdownout.py
|
||||
${PX4_SOURCE_DIR}/Tools/px4airframes/rcout.py
|
||||
${PX4_SOURCE_DIR}/Tools/px4airframes/srcparser.py
|
||||
${PX4_SOURCE_DIR}/Tools/px4airframes/srcscanner.py
|
||||
${PX4_SOURCE_DIR}/Tools/px4airframes/xmlout.py
|
||||
${PX4_SOURCE_DIR}/Tools/serial/generate_config.py
|
||||
)
|
||||
|
||||
|
||||
set(romfs_copy_stamp ${CMAKE_CURRENT_BINARY_DIR}/romfs_copy.stamp)
|
||||
add_custom_command(
|
||||
OUTPUT
|
||||
${romfs_gen_root_dir}/init.d/rcS
|
||||
${romfs_gen_root_dir}/init.d/rc.serial
|
||||
${romfs_gen_root_dir}/init.d/rc.autostart
|
||||
${romfs_gen_root_dir}/init.d/rc.autostart.post
|
||||
${romfs_gen_root_dir}/init.d/rc.filepaths
|
||||
${romfs_copy_stamp}
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory ${romfs_gen_root_dir}/*
|
||||
COMMAND ${CMAKE_COMMAND} -E tar xf ${romfs_tar_file}
|
||||
romfs_copy.stamp
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory ${romfs_gen_root_dir}
|
||||
# TODO: we should only copy the files in ${romfs_copy_files}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${romfs_src_dir} ${romfs_gen_root_dir}
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory ${romfs_gen_root_dir}/init.d-posix
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory ${romfs_gen_root_dir}/mixers-sitl
|
||||
COMMAND ${CMAKE_COMMAND} -E remove ${romfs_gen_root_dir}/mixers/CMakeLists.txt
|
||||
COMMAND ${CMAKE_COMMAND} -E remove ${romfs_gen_root_dir}/init.d/CMakeLists.txt
|
||||
COMMAND ${CMAKE_COMMAND} -E remove ${romfs_gen_root_dir}/init.d/airframes/CMakeLists.txt
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/px_process_airframes.py
|
||||
--airframes-path ${romfs_gen_root_dir}/init.d
|
||||
--start-script ${romfs_gen_root_dir}/init.d/rc.autostart
|
||||
@@ -154,62 +100,55 @@ add_custom_command(
|
||||
--rc-dir ${romfs_gen_root_dir}/init.d
|
||||
--serial-ports ${board_serial_ports} ${added_arguments}
|
||||
--config-files ${module_config_files} #--verbose
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/filepaths/generate_config.py
|
||||
--rc-dir ${romfs_gen_root_dir}/init.d
|
||||
--params-file ${CONFIG_BOARD_PARAM_FILE}
|
||||
COMMAND ${CMAKE_COMMAND} -E touch ${romfs_copy_stamp}
|
||||
WORKING_DIRECTORY ${romfs_gen_root_dir}
|
||||
DEPENDS ${romfs_tar_file}
|
||||
COMMAND ${CMAKE_COMMAND} -E touch romfs_copy.stamp
|
||||
DEPENDS
|
||||
${jinja_templates}
|
||||
${module_config_files}
|
||||
${romfs_cmake_files}
|
||||
${romfs_copy_files}
|
||||
${PX4_SOURCE_DIR}/Tools/px_process_airframes.py
|
||||
${PX4_SOURCE_DIR}/Tools/serial/generate_config.py
|
||||
COMMENT "ROMFS: copying, generating airframes"
|
||||
)
|
||||
|
||||
# copy extras into ROMFS
|
||||
set(extras_dependencies)
|
||||
|
||||
# optional board architecture defaults
|
||||
set(board_arch_rc_file "rc.board_arch_defaults")
|
||||
if(EXISTS "${PX4_SOURCE_DIR}/platforms/${PX4_PLATFORM}/init/${CONFIG_ARCH_CHIP}/${board_arch_rc_file}")
|
||||
file(RELATIVE_PATH rc_file_relative ${PX4_SOURCE_DIR} ${PX4_SOURCE_DIR}/platforms/${PX4_PLATFORM}/init/${CONFIG_ARCH_CHIP}/${board_arch_rc_file})
|
||||
message(STATUS "ROMFS: Adding ${rc_file_relative} -> /etc/init.d/${board_arch_rc_file}")
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT
|
||||
${romfs_gen_root_dir}/init.d/${board_arch_rc_file}
|
||||
${board_arch_rc_file}.stamp
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PX4_SOURCE_DIR}/platforms/${PX4_PLATFORM}/init/${CONFIG_ARCH_CHIP}/${board_arch_rc_file} ${romfs_gen_root_dir}/init.d/${board_arch_rc_file}
|
||||
COMMAND ${CMAKE_COMMAND} -E touch ${board_arch_rc_file}.stamp
|
||||
DEPENDS
|
||||
${PX4_SOURCE_DIR}/platforms/${PX4_PLATFORM}/init/${CONFIG_ARCH_CHIP}/${board_arch_rc_file}
|
||||
romfs_copy.stamp
|
||||
COMMENT "ROMFS: copying ${board_arch_rc_file}"
|
||||
)
|
||||
|
||||
# copy px4io binary if configured
|
||||
if(config_io_board)
|
||||
list(APPEND extras_dependencies
|
||||
${board_arch_rc_file}.stamp
|
||||
)
|
||||
copy_px4io_bin
|
||||
${fw_io_bin}
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
# board custom init files
|
||||
if(config_bl_file)
|
||||
file(MAKE_DIRECTORY ${PX4_BINARY_DIR}/romfs_extras)
|
||||
configure_file(${config_bl_file} ${PX4_BINARY_DIR}/romfs_extras COPYONLY)
|
||||
|
||||
list(APPEND extras_dependencies
|
||||
${config_bl_file}
|
||||
)
|
||||
endif()
|
||||
|
||||
set(OPTIONAL_BOARD_RC)
|
||||
list(APPEND OPTIONAL_BOARD_RC
|
||||
rc.board_defaults
|
||||
rc.board_sensors
|
||||
rc.board_extras
|
||||
rc.board_mavlink
|
||||
)
|
||||
|
||||
foreach(board_rc_file ${OPTIONAL_BOARD_RC})
|
||||
|
||||
if(EXISTS "${PX4_BOARD_DIR}/init/${board_rc_file}")
|
||||
file(RELATIVE_PATH rc_file_relative ${PX4_SOURCE_DIR} ${PX4_BOARD_DIR}/init/${board_rc_file})
|
||||
message(STATUS "ROMFS: Adding ${rc_file_relative} -> /etc/init.d/${board_rc_file}")
|
||||
message(STATUS "ROMFS: Adding ${board_rc_file}")
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT
|
||||
${romfs_gen_root_dir}/init.d/${board_rc_file}
|
||||
${board_rc_file}.stamp
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PX4_BOARD_DIR}/init/${board_rc_file} ${romfs_gen_root_dir}/init.d/${board_rc_file}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${PX4_BOARD_DIR}/init/${board_rc_file} ${romfs_gen_root_dir}/init.d/${board_rc_file}
|
||||
COMMAND ${CMAKE_COMMAND} -E touch ${board_rc_file}.stamp
|
||||
DEPENDS
|
||||
${PX4_BOARD_DIR}/init/${board_rc_file}
|
||||
@@ -224,178 +163,17 @@ foreach(board_rc_file ${OPTIONAL_BOARD_RC})
|
||||
|
||||
endforeach()
|
||||
|
||||
if(config_additional_init)
|
||||
if(EXISTS "${PX4_BOARD_DIR}/init/${config_additional_init}")
|
||||
file(RELATIVE_PATH rc_file_relative ${PX4_SOURCE_DIR} ${PX4_BOARD_DIR}/init/${config_additional_init})
|
||||
message(STATUS "ROMFS: Adding ${rc_file_relative} -> /etc/init.d/rc.additional_init")
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT
|
||||
${romfs_gen_root_dir}/init.d/rc.additional_init
|
||||
${config_additional_init}.stamp
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PX4_BOARD_DIR}/init/${config_additional_init} ${romfs_gen_root_dir}/init.d/rc.additional_init
|
||||
COMMAND ${CMAKE_COMMAND} -E touch ${config_additional_init}.stamp
|
||||
DEPENDS
|
||||
${PX4_BOARD_DIR}/init/${config_additional_init}
|
||||
romfs_copy.stamp
|
||||
COMMENT "ROMFS: copying ${config_additional_init}"
|
||||
)
|
||||
|
||||
list(APPEND extras_dependencies
|
||||
${config_additional_init}.stamp
|
||||
)
|
||||
else()
|
||||
message(FATAL_ERROR "BOARD_ADDITIONAL_INIT file not found at: ${PX4_BOARD_DIR}/init/${config_additional_init}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
# board extras
|
||||
set(OPTIONAL_BOARD_EXTRAS)
|
||||
file(GLOB OPTIONAL_BOARD_EXTRAS ${PX4_BOARD_DIR}/extras/*)
|
||||
|
||||
# bootloader (optional)
|
||||
# - if systemcmds/bl_update included and board bootloader available then generate rc.board_bootloader_upgrade and copy bootloader binary
|
||||
# - otherwise remove bootloader binary from extras in final ROMFS
|
||||
foreach(board_extra_file ${OPTIONAL_BOARD_EXTRAS})
|
||||
file(RELATIVE_PATH extra_file_base_name ${PX4_BOARD_DIR}/extras/ ${board_extra_file})
|
||||
if(${extra_file_base_name} MATCHES "${PX4_BOARD_VENDOR}_${PX4_BOARD_MODEL}_bootloader.bin")
|
||||
if(CONFIG_SYSTEMCMDS_BL_UPDATE)
|
||||
# generate rc.board_bootloader_upgrade
|
||||
set(BOARD_FIRMWARE_BIN "${PX4_BOARD_VENDOR}_${PX4_BOARD_MODEL}_bootloader.bin")
|
||||
message(STATUS "ROMFS: Adding platforms/nuttx/init/rc.board_bootloader_upgrade -> /etc/init.d/rc.board_bootloader_upgrade")
|
||||
|
||||
# Generate the file using configure_file at configure time to a temporary location
|
||||
set(bootloader_upgrade_tmp ${CMAKE_CURRENT_BINARY_DIR}/rc.board_bootloader_upgrade.tmp)
|
||||
configure_file(${PX4_SOURCE_DIR}/platforms/nuttx/init/rc.board_bootloader_upgrade.in ${bootloader_upgrade_tmp} @ONLY)
|
||||
|
||||
# Then copy it at build time with proper dependencies
|
||||
add_custom_command(
|
||||
OUTPUT
|
||||
${romfs_gen_root_dir}/init.d/rc.board_bootloader_upgrade
|
||||
rc.board_bootloader_upgrade.stamp
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${bootloader_upgrade_tmp} ${romfs_gen_root_dir}/init.d/rc.board_bootloader_upgrade
|
||||
COMMAND ${CMAKE_COMMAND} -E touch rc.board_bootloader_upgrade.stamp
|
||||
DEPENDS
|
||||
${bootloader_upgrade_tmp}
|
||||
${PX4_SOURCE_DIR}/platforms/nuttx/init/rc.board_bootloader_upgrade.in
|
||||
romfs_copy.stamp
|
||||
COMMENT "ROMFS: copying rc.board_bootloader_upgrade"
|
||||
)
|
||||
|
||||
list(APPEND extras_dependencies
|
||||
rc.board_bootloader_upgrade.stamp
|
||||
)
|
||||
else()
|
||||
# remove bootloader from extras
|
||||
list(REMOVE_ITEM OPTIONAL_BOARD_EXTRAS ${board_extra_file})
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
foreach(board_extra_file ${OPTIONAL_BOARD_EXTRAS})
|
||||
|
||||
if(EXISTS "${board_extra_file}")
|
||||
file(RELATIVE_PATH extra_file_base_name ${PX4_BOARD_DIR}/extras/ ${board_extra_file})
|
||||
file(RELATIVE_PATH extra_file_relative_source ${PX4_SOURCE_DIR} ${board_extra_file})
|
||||
message(STATUS "ROMFS: Adding ${extra_file_relative_source} -> /etc/extras/${extra_file_base_name}")
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT
|
||||
${romfs_gen_root_dir}/extras/${extra_file_base_name}
|
||||
${extra_file_base_name}.stamp
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PX4_BOARD_DIR}/extras/${extra_file_base_name} ${romfs_gen_root_dir}/extras/${extra_file_base_name}
|
||||
COMMAND ${CMAKE_COMMAND} -E touch ${extra_file_base_name}.stamp
|
||||
DEPENDS
|
||||
${board_extra_file}
|
||||
romfs_copy.stamp
|
||||
COMMENT "ROMFS: copying ${board_extra_file}"
|
||||
)
|
||||
|
||||
list(APPEND extras_dependencies
|
||||
${extra_file_base_name}.stamp
|
||||
)
|
||||
endif()
|
||||
|
||||
endforeach()
|
||||
|
||||
|
||||
|
||||
if(config_uavcan_peripheral_firmware)
|
||||
|
||||
include(ExternalProject)
|
||||
|
||||
foreach(uavcan_peripheral_config ${config_uavcan_peripheral_firmware})
|
||||
# include the UAVCAN peripheral binaries in ROMFS
|
||||
message(STATUS "ROMFS: Adding UAVCAN peripheral ${uavcan_peripheral_config} -> /etc/uavcan/fw/")
|
||||
|
||||
# ExternalProject_Add() with GIT_SUBMODULES "" initializes no submodules.
|
||||
cmake_policy(SET CMP0097 NEW)
|
||||
|
||||
include(ExternalProject)
|
||||
|
||||
ExternalProject_Add(build_${uavcan_peripheral_config}
|
||||
GIT_REPOSITORY ${CMAKE_SOURCE_DIR}
|
||||
GIT_TAG ${PX4_GIT_TAG}
|
||||
GIT_SUBMODULES ""
|
||||
DOWNLOAD_NO_PROGRESS true
|
||||
CMAKE_ARGS -DCONFIG=${uavcan_peripheral_config}
|
||||
INSTALL_COMMAND ""
|
||||
USES_TERMINAL_BUILD true
|
||||
BUILD_ALWAYS 1
|
||||
)
|
||||
|
||||
ExternalProject_Get_Property(build_${uavcan_peripheral_config} BINARY_DIR)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT
|
||||
${romfs_gen_root_dir}/uavcan/fw/_${uavcan_board_id}.bin
|
||||
${uavcan_peripheral_config}.stamp
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${romfs_gen_root_dir}/uavcan/fw/
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${BINARY_DIR}/deploy/*.bin ${romfs_gen_root_dir}/uavcan/fw/
|
||||
COMMAND ls -lsa ${romfs_gen_root_dir}/uavcan/fw/
|
||||
COMMAND ${CMAKE_COMMAND} -E touch ${uavcan_peripheral_config}.stamp
|
||||
DEPENDS
|
||||
build_${uavcan_peripheral_config}
|
||||
COMMENT "ROMFS: copying ${uavcan_peripheral_config}"
|
||||
)
|
||||
|
||||
list(APPEND extras_dependencies
|
||||
${uavcan_peripheral_config}.stamp
|
||||
)
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
list(APPEND extras_dependencies
|
||||
${config_romfs_extra_dependencies}
|
||||
)
|
||||
|
||||
if (config_romfs_extra_files)
|
||||
set(extras_copy_cmd COMMAND ${CMAKE_COMMAND} -E copy_if_different ${config_romfs_extra_files} ${romfs_gen_root_dir}/extras/)
|
||||
else()
|
||||
set(extras_copy_cmd "")
|
||||
endif()
|
||||
add_custom_command(OUTPUT romfs_extras.stamp
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${romfs_gen_root_dir}/extras/
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${PX4_BINARY_DIR}/romfs_extras/
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PX4_BINARY_DIR}/romfs_extras/ ${romfs_gen_root_dir}/extras/
|
||||
${extras_copy_cmd}
|
||||
COMMAND ${CMAKE_COMMAND} -E touch romfs_extras.stamp
|
||||
DEPENDS
|
||||
romfs_copy.stamp
|
||||
${config_romfs_extra_files}
|
||||
${extras_dependencies}
|
||||
COMMENT "ROMFS: copying extras"
|
||||
)
|
||||
|
||||
add_custom_target(romfs_gen_files_target
|
||||
DEPENDS
|
||||
${romfs_copy_stamp}
|
||||
${romfs_gen_root_dir}/init.d/rc.serial
|
||||
${romfs_gen_root_dir}/init.d/rc.filepaths
|
||||
romfs_extras.stamp
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT romfs_pruned.stamp
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/px_romfs_pruner.py --folder ${romfs_gen_root_dir} --board ${PX4_BOARD}
|
||||
@@ -411,7 +189,7 @@ if("${CONFIG_FS_CROMFS}" STREQUAL "y")
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_BINARY_DIR}/gencromfs
|
||||
COMMAND make --no-print-directory --silent -f Makefile.host gencromfs
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different gencromfs ${CMAKE_BINARY_DIR}/gencromfs
|
||||
COMMAND ${CMAKE_COMMAND} -E copy gencromfs ${CMAKE_BINARY_DIR}/gencromfs
|
||||
DEPENDS ${PX4_SOURCE_DIR}/platforms/nuttx/NuttX/nuttx/tools/gencromfs.c
|
||||
WORKING_DIRECTORY ${NUTTX_DIR}/tools
|
||||
)
|
||||
@@ -426,11 +204,7 @@ if("${CONFIG_FS_CROMFS}" STREQUAL "y")
|
||||
COMMENT "ROMFS: generating image"
|
||||
)
|
||||
|
||||
add_library(romfs STATIC nsh_romfsimg.c)
|
||||
add_dependencies(romfs prebuild_targets)
|
||||
set_target_properties(romfs PROPERTIES LINKER_LANGUAGE C)
|
||||
|
||||
elseif("${CONFIG_FS_ROMFS}" STREQUAL "y")
|
||||
else()
|
||||
# create romfs.img
|
||||
find_program(GENROMFS genromfs)
|
||||
if(NOT GENROMFS)
|
||||
@@ -465,13 +239,13 @@ elseif("${CONFIG_FS_ROMFS}" STREQUAL "y")
|
||||
COMMAND ${SED} 's/unsigned/const unsigned/g' nsh_romfsimg.c > nsh_romfsimg.c.tmp && ${CMAKE_COMMAND} -E rename nsh_romfsimg.c.tmp nsh_romfsimg.c
|
||||
DEPENDS romfs.img
|
||||
)
|
||||
|
||||
add_library(romfs STATIC nsh_romfsimg.c)
|
||||
add_dependencies(romfs prebuild_targets)
|
||||
set_target_properties(romfs PROPERTIES LINKER_LANGUAGE C)
|
||||
endif()
|
||||
|
||||
|
||||
add_library(romfs STATIC nsh_romfsimg.c)
|
||||
add_dependencies(romfs prebuild_targets)
|
||||
set_target_properties(romfs PROPERTIES LINKER_LANGUAGE C)
|
||||
|
||||
|
||||
# shellcheck
|
||||
find_program(SHELLCHECK_PATH shellcheck)
|
||||
@@ -481,16 +255,11 @@ if(SHELLCHECK_PATH)
|
||||
# TODO: fix SC2086, SC2166
|
||||
add_custom_target(shellcheck
|
||||
COMMAND ${SHELLCHECK_PATH} --shell=sh
|
||||
--exclude=SC1090 # SC1090: use of source (.) - Can't follow non-constant source. Use a directive to specify location.
|
||||
--exclude=SC1091 # SC1091: use of source (.) - Not following: xxxx openBinaryFile: does not exist (No such file or directory)
|
||||
--exclude=SC2121 # SC2121: To assign a variable, use just 'var=value'
|
||||
--exclude=SC2086 # SC2086: Double quote to prevent globbing and word splitting.
|
||||
--exclude=SC2166 # SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
|
||||
--exclude=SC2154 # SC2154: <var> is referenced but not assigned (NuttX uses different asssignment)
|
||||
--exclude=SC2164 # SC2164: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
|
||||
--exclude=SC2169 # SC2169: In dash, 'source' in place of '.' is not supported. (we alias it)
|
||||
--exclude=SC2039 # SC2039: In POSIX sh, 'source' in place of '.' is undefined. (we alias it)
|
||||
--exclude=SC2181 # SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.
|
||||
`find ${romfs_gen_root_dir}/init.d -type f`
|
||||
DEPENDS ${romfs_gen_root_dir}/init.d/rc.autostart
|
||||
WORKING_DIRECTORY ${romfs_gen_root_dir}
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (c) 2020 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.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
add_subdirectory(init.d)
|
||||
@@ -1,36 +0,0 @@
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (c) 2020 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_add_romfs_files(
|
||||
rcS
|
||||
)
|
||||
@@ -1,118 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Un comment and use set +e to ignore and set -e to enable 'exit on error control'
|
||||
set +e
|
||||
# Un comment the line below to help debug scripts by printing a trace of the script commands
|
||||
#set -x
|
||||
# PX4FMU startup script.
|
||||
#
|
||||
# NOTE: environment variable references:
|
||||
# If the dollar sign ('$') is followed by a left bracket ('{') then the
|
||||
# variable name is terminated with the right bracket character ('}').
|
||||
# Otherwise, the variable name goes to the end of the argument.
|
||||
#
|
||||
#
|
||||
# NOTE: COMMENT LINES ARE REMOVED BEFORE STORED IN ROMFS.
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
set R /
|
||||
|
||||
#
|
||||
# Print full system version.
|
||||
#
|
||||
ver all
|
||||
|
||||
# Load param file location from kconfig
|
||||
. ${R}etc/init.d/rc.filepaths
|
||||
|
||||
#
|
||||
# Load parameters.
|
||||
#
|
||||
param select $PARAM_FILE
|
||||
|
||||
if ! param load
|
||||
then
|
||||
param reset_all
|
||||
fi
|
||||
|
||||
#
|
||||
# Optional board architecture defaults: rc.board_arch_defaults
|
||||
#
|
||||
set BOARD_ARCH_RC_DEFAULTS ${R}etc/init.d/rc.board_arch_defaults
|
||||
if [ -f $BOARD_ARCH_RC_DEFAULTS ]
|
||||
then
|
||||
echo "Board architecture defaults: ${BOARD_ARCH_RC_DEFAULTS}"
|
||||
. $BOARD_ARCH_RC_DEFAULTS
|
||||
fi
|
||||
unset BOARD_ARCH_RC_DEFAULTS
|
||||
|
||||
#
|
||||
# Optional board defaults: rc.board_defaults
|
||||
#
|
||||
set BOARD_RC_DEFAULTS ${R}etc/init.d/rc.board_defaults
|
||||
if [ -f $BOARD_RC_DEFAULTS ]
|
||||
then
|
||||
echo "Board defaults: ${BOARD_RC_DEFAULTS}"
|
||||
. $BOARD_RC_DEFAULTS
|
||||
fi
|
||||
unset BOARD_RC_DEFAULTS
|
||||
|
||||
#
|
||||
# Optional additional init file: rc.additional_init
|
||||
#
|
||||
set BOARD_RC_ADDITIONAL_INIT ${R}etc/init.d/rc.additional_init
|
||||
if [ -f $BOARD_RC_ADDITIONAL_INIT ]
|
||||
then
|
||||
echo "Board additional init: ${BOARD_RC_ADDITIONAL_INIT}"
|
||||
. $BOARD_RC_ADDITIONAL_INIT
|
||||
fi
|
||||
unset BOARD_RC_ADDITIONAL_INIT
|
||||
|
||||
#
|
||||
# Start system state indicator.
|
||||
#
|
||||
rgbled start -X -q
|
||||
rgbled_ncp5623c start -X -q
|
||||
|
||||
#
|
||||
# board sensors: rc.sensors
|
||||
#
|
||||
set BOARD_RC_SENSORS ${R}etc/init.d/rc.board_sensors
|
||||
if [ -f $BOARD_RC_SENSORS ]
|
||||
then
|
||||
echo "Board sensors: ${BOARD_RC_SENSORS}"
|
||||
. $BOARD_RC_SENSORS
|
||||
fi
|
||||
unset BOARD_RC_SENSORS
|
||||
|
||||
#
|
||||
# Start UART/Serial device drivers.
|
||||
# Note: rc.serial is auto-generated from Tools/serial/generate_config.py
|
||||
#
|
||||
. ${R}etc/init.d/rc.serial
|
||||
|
||||
# Check for flow sensor
|
||||
if param compare -s SENS_EN_PX4FLOW 1
|
||||
then
|
||||
px4flow start -X &
|
||||
fi
|
||||
|
||||
if param compare -s IMU_GYRO_CAL_EN 1
|
||||
then
|
||||
gyro_calibration start
|
||||
fi
|
||||
|
||||
|
||||
if param compare -s MBE_ENABLE 1
|
||||
then
|
||||
# conservative mag bias estimation
|
||||
param set-default MBE_LEARN_GAIN 5
|
||||
param set-default IMU_GYRO_CUTOFF 20
|
||||
mag_bias_estimator start
|
||||
fi
|
||||
|
||||
param set-default SENS_MAG_RATE 100
|
||||
|
||||
sensors start
|
||||
|
||||
uavcannode start
|
||||
unset R
|
||||
@@ -1,34 +0,0 @@
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (c) 2025 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.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
add_subdirectory(init.d)
|
||||
@@ -1,36 +0,0 @@
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (c) 2025 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_add_romfs_files(
|
||||
rcS
|
||||
)
|
||||
@@ -1,68 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Un comment and use set +e to ignore and set -e to enable 'exit on error control'
|
||||
set +e
|
||||
# Un comment the line below to help debug scripts by printing a trace of the script commands
|
||||
#set -x
|
||||
# PX4FMU startup script.
|
||||
#
|
||||
# NOTE: environment variable references:
|
||||
# If the dollar sign ('$') is followed by a left bracket ('{') then the
|
||||
# variable name is terminated with the right bracket character ('}').
|
||||
# Otherwise, the variable name goes to the end of the argument.
|
||||
#
|
||||
#
|
||||
# NOTE: COMMENT LINES ARE REMOVED BEFORE STORED IN ROMFS.
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
set R /
|
||||
|
||||
#
|
||||
# Print full system version.
|
||||
#
|
||||
ver all
|
||||
|
||||
#
|
||||
# Set the parameter file the board supports params on
|
||||
# MTD device.
|
||||
#
|
||||
if mft query -q -k MTD -s MTD_PARAMETERS -v /fs/mtd_params
|
||||
then
|
||||
set PARAM_FILE /fs/mtd_params
|
||||
fi
|
||||
|
||||
#
|
||||
# Load parameters.
|
||||
#
|
||||
# if the board has a storage for (factory) calibration data
|
||||
if mft query -q -k MTD -s MTD_CALDATA -v /fs/mtd_caldata
|
||||
then
|
||||
param load /fs/mtd_caldata
|
||||
fi
|
||||
|
||||
#
|
||||
# Load parameters.
|
||||
#
|
||||
param select $PARAM_FILE
|
||||
if ! param load
|
||||
then
|
||||
param reset_all
|
||||
fi
|
||||
|
||||
#
|
||||
# Try to mount the microSD card.
|
||||
#
|
||||
mount -t vfat /dev/mmcsd0 /fs/microsd
|
||||
if [ $? = 0 ]
|
||||
then
|
||||
echo "SD card mounted at /fs/microsd"
|
||||
else
|
||||
echo "No SD card found"
|
||||
fi
|
||||
|
||||
unset R
|
||||
|
||||
echo ""
|
||||
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
|
||||
echo "!!!!!! This is the PERFORMANCE TESTING firmware! WARNs and ERRORs are expected! !!!!!"
|
||||
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
|
||||
echo ""
|
||||
@@ -32,7 +32,4 @@
|
||||
############################################################################
|
||||
|
||||
add_subdirectory(init.d)
|
||||
# TODO: make this configurable from the board config, or better combine
|
||||
if("${PX4_BOARD}" MATCHES "sitl")
|
||||
add_subdirectory(init.d-posix)
|
||||
endif()
|
||||
add_subdirectory(mixers)
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
px4fmuv3_bl.bin: Bootloader binary of the PX4 Bootloader
|
||||
(https://github.com/PX4/Bootloader)
|
||||
based on commit 184b813699a9cfd6f43a5a21556a06b4372baf5f
|
||||
for the target px4fmuv3_bl
|
||||
|
||||
Executable
BIN
Binary file not shown.
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name 3DR Iris Quadrotor SITL
|
||||
#
|
||||
# @type Quadrotor Wide
|
||||
#
|
||||
# @maintainer Julian Oes <julian@oes.ch>
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.mc_defaults
|
||||
|
||||
set MIXER quad_w
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name IF750A SITL
|
||||
# InspiredFlight 750 Auterion edition. Gazebo Only.
|
||||
#
|
||||
# @type Quadrotor
|
||||
#
|
||||
|
||||
sh /etc/init.d/rc.mc_defaults
|
||||
|
||||
set MIXER quad_x
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name 3DR Iris Quadrotor SITL (Optical Flow)
|
||||
#
|
||||
# @type Quadrotor Wide
|
||||
#
|
||||
|
||||
sh /etc/init.d-posix/10016_iris
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
then
|
||||
# EKF2
|
||||
param set EKF2_AID_MASK 2
|
||||
param set EKF2_EVP_NOISE 0.05
|
||||
param set EKF2_EVA_NOISE 0.05
|
||||
|
||||
# INAV
|
||||
param set INAV_LIDAR_EST 1
|
||||
param set INAV_W_XY_FLOW 1
|
||||
param set INAV_W_XY_GPS_P 0
|
||||
param set INAV_W_XY_GPS_V 0
|
||||
param set INAV_W_Z_GPS_P 0
|
||||
|
||||
# LPE: Flow-only mode
|
||||
param set LPE_FUSION 242
|
||||
param set LPE_FAKE_ORIGIN 1
|
||||
|
||||
param set MPC_ALT_MODE 2
|
||||
fi
|
||||
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name 3DR Iris Quadrotor SITL (irlock)
|
||||
#
|
||||
# @type Quadrotor Wide
|
||||
#
|
||||
|
||||
sh /etc/init.d-posix/10016_iris
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
then
|
||||
# enable fusion of landing target velocity
|
||||
param set LTEST_MODE 1
|
||||
param set PLD_HACC_RAD 0.1
|
||||
fi
|
||||
|
||||
# Start up Landing Target Estimator module
|
||||
landing_target_estimator start
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user