Skip to content

Commit

Permalink
boards new split VENDOR_MODEL naming convention
Browse files Browse the repository at this point in the history
  • Loading branch information
dagar authored and David Sidrane committed Nov 26, 2018
1 parent f692ad0 commit abb3817
Show file tree
Hide file tree
Showing 149 changed files with 401 additions and 407 deletions.
26 changes: 13 additions & 13 deletions .ci/Jenkinsfile-SITL_tests
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pipeline {
sh('make distclean')
sh "ccache -z"
sh "git fetch --tags"
sh('make px4sitl_default')
sh('make px4_sitl_default')
sh "ccache -s"
}
}
Expand All @@ -47,25 +47,25 @@ pipeline {
stage('unit tests') {
steps {
sh 'export'
sh 'make px4sitl_default test_results_junit'
junit 'build/px4sitl_default/JUnitTestResults.xml'
sh 'make px4_sitl_default test_results_junit'
junit 'build/px4_sitl_default/JUnitTestResults.xml'
}
}

stage('build sitl_gazebo') {
steps {
sh 'export'
sh "ccache -z"
sh('make px4sitl_default sitl_gazebo')
sh('make px4_sitl_default sitl_gazebo')
sh "ccache -s"
}
}

stage('package') {
steps {
sh 'export'
sh('make px4sitl_default package')
stash(name: "px4_sitl_package", includes: "build/px4sitl_default/*.bz2")
sh('make px4_sitl_default package')
stash(name: "px4_sitl_package", includes: "build/px4_sitl_default/*.bz2")
}
}

Expand Down Expand Up @@ -176,7 +176,7 @@ pipeline {
steps {
sh 'export'
sh 'make distclean'
sh 'make px4sitl_default test_results_junit'
sh 'make px4_sitl_default test_results_junit'
withCredentials([string(credentialsId: 'FIRMWARE_CODECOV_TOKEN', variable: 'CODECOV_TOKEN')]) {
sh 'curl -s https://codecov.io/bash | bash -s - -F unittest'
}
Expand Down Expand Up @@ -221,11 +221,11 @@ def createTestNode(Map test_def) {
}

unstash('px4_sitl_package')
sh('tar -xjpvf build/px4sitl_default/px4-px4sitl_default*.bz2')
sh('tar -xjpvf build/px4_sitl_default/px4-px4_sitl_default*.bz2')

// run test
try {
sh('px4-px4sitl_default*/px4/test/rostest_px4_run.sh ' + test_def.test + ' mission:=' + test_def.mission + ' vehicle:=' + test_def.vehicle)
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
Expand All @@ -240,7 +240,7 @@ def createTestNode(Map test_def) {

// process log data (with python code coverage)
try {
sh('coverage run -p px4-px4sitl_default*/px4/Tools/ecl_ekf/process_logdata_ekf.py .ros/log/*/*.ulg')
sh('coverage run -p 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')
Expand All @@ -249,15 +249,15 @@ def createTestNode(Map test_def) {
}

// upload log to flight review (https://logs.px4.io/) with python code coverage
sh('coverage run -p px4-px4sitl_default*/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/log/*/*.ulg')
sh('coverage run -p 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')

// upload python code coverage to codecov.io
sh 'curl -s https://codecov.io/bash | bash -s - -X gcov -F sitl_python_${STAGE_NAME}'
}
} else { // non code coverage
// process ekf log data
try {
sh('px4-px4sitl_default*/px4/Tools/ecl_ekf/process_logdata_ekf.py .ros/log/*/*.ulg')
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')
Expand All @@ -266,7 +266,7 @@ def createTestNode(Map test_def) {
}

// upload log to flight review (https://logs.px4.io/)
sh('px4-px4sitl_default*/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/log/*/*.ulg')
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) {
Expand Down
34 changes: 17 additions & 17 deletions .ci/Jenkinsfile-compile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ pipeline {
snapdragon: "lorenzmeier/px4-dev-snapdragon:2018-09-12"
]

// MAC OSX px4sitl_default
build_nodes["px4sitl_default (OSX)"] = {
// MAC OSX px4_sitl_default
build_nodes["px4_sitl_default (OSX)"] = {
node("mac") {
withEnv(["CCACHE_BASEDIR=${pwd()}"]) {
stage("sitl (OSX)") {
Expand All @@ -28,7 +28,7 @@ pipeline {
sh('export')
sh('make distclean')
sh('ccache -z')
sh('make px4sitl_default')
sh('make px4_sitl_default')
sh('ccache -s')
sh('make tests')
}
Expand All @@ -43,17 +43,17 @@ pipeline {
}
}

// MAC OSX px4fmu-v4pro_default
build_nodes["px4fmu-v4pro_default (OSX)"] = {
// MAC OSX px4_fmu-v4pro_default
build_nodes["px4_fmu-v4pro_default (OSX)"] = {
node("mac") {
withEnv(["CCACHE_BASEDIR=${pwd()}"]) {
stage("px4fmu-v4pro (OSX)") {
stage("px4_fmu-v4pro (OSX)") {
try {
checkout(scm)
sh('export')
sh('make distclean')
sh('ccache -z')
sh('make px4fmu-v4pro_default')
sh('make px4_fmu-v4pro_default')
sh('ccache -s')
}
catch (exc) {
Expand All @@ -69,46 +69,46 @@ pipeline {

// docker builds:
def arch_builds = [
target: ["px4sitl_default"],
target: ["px4_sitl_default"],
image: docker_images.arch,
archive: false
]

def armhf_builds = [
target: ["aerotennaocpoc_ubuntu"],
target: ["aerotenna_ocpoc_ubuntu"],
image: docker_images.armhf,
archive: false
]

def base_builds = [
target: ["px4sitl_rtps"],
target: ["px4_sitl_rtps"],
image: docker_images.base,
archive: false
]

def nuttx_builds_archive = [
target: ["px4fmu-v2_default", "px4fmu-v3_default", "px4fmu-v4_default", "px4fmu-v4pro_default", "px4fmu-v5_default", "px4fmu-v5_rtps", "px4fmu-v5_stackcheck",
"intelaerofc-v1_default", "gumstixaerocore2_default", "auavx21_default", "avx-v1_default", "bitcrazecrazyflie_default", "airmindmindpx-v2_default",
"nxphlite-v3_default", "omnibusf4sd_default"],
target: ["px4_fmu-v2_default", "px4_fmu-v3_default", "px4_fmu-v4_default", "px4_fmu-v4pro_default", "px4_fmu-v5_default", "px4_fmu-v5_rtps", "px4_fmu-v5_stackcheck",
"intel_aerofc-v1_default", "gumstix_aerocore2_default", "auav_x21_default", "av_x-v1_default", "bitcraze_crazyflie_default", "airmind_mindpx-v2_default",
"nxp_hlite-v3_default", "omnibus_f4sd_default"],
image: docker_images.nuttx,
archive: true
]

def nuttx_builds_other = [
target: ["atmelsame70xplained_default", "stm32f4discovery_default", "px4cannode-v1_default",
"px4esc-v1_default", "stmnucleo-F767ZI_default", "thiemars2740vc-v1_default"],
target: ["atmel_same70xplained_default", "stm_32f4discovery_default", "px4_cannode-v1_default",
"px4_esc-v1_default", "stm_nucleo-F767ZI_default", "thiemar_s2740vc-v1_default"],
image: docker_images.nuttx,
archive: false
]

def rpi_builds = [
target: ["emlidnavio2_cross", "parrotbebop_default"],
target: ["emlid_navio2_cross", "parrot_bebop_default"],
image: docker_images.rpi,
archive: false
]

def snapdragon_builds = [
target: ["atlflighteagle_qurt-default", "atlflighteagle_default"],
target: ["atlflight_eagle_qurt-default", "atlflight_eagle_default"],
image: docker_images.snapdragon,
archive: false
]
Expand Down
32 changes: 16 additions & 16 deletions .ci/Jenkinsfile-hardware
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pipeline {

parallel {

stage('px4fmu-v2') {
stage('px4_fmu-v2') {
agent {
docker {
image 'px4io/px4-dev-nuttx:2018-11-22'
Expand All @@ -18,11 +18,11 @@ pipeline {
sh 'make distclean'
sh 'ccache -z'
sh 'git fetch --tags'
sh 'make px4fmu-v2_test'
sh 'make px4_fmu-v2_test'
sh 'make sizes'
sh 'ccache -s'
stash includes: 'build/px4fmu-v2_test/px4fmu-v2_test.elf', name: 'px4fmu-v2_test'
stash includes: 'Tools/HIL/monitor_firmware_upload.py, Tools/HIL/run_tests.py', name: 'scripts-px4fmu-v2'
stash includes: 'build/px4_fmu-v2_test/px4_fmu-v2_test.elf', name: 'px4_fmu-v2_test'
stash includes: 'Tools/HIL/monitor_firmware_upload.py, Tools/HIL/run_tests.py', name: 'scripts-px4_fmu-v2'
}
post {
always {
Expand All @@ -31,7 +31,7 @@ pipeline {
}
}

stage('px4fmu-v4 (stackcheck)') {
stage('px4_fmu-v4 (stackcheck)') {
agent {
docker {
image 'px4io/px4-dev-nuttx:2018-11-22'
Expand All @@ -43,11 +43,11 @@ pipeline {
sh 'make distclean'
sh 'ccache -z'
sh 'git fetch --tags'
sh 'make px4fmu-v4_stackcheck'
sh 'make px4_fmu-v4_stackcheck'
sh 'make sizes'
sh 'ccache -s'
stash includes: 'build/px4fmu-v4_stackcheck/px4fmu-v4_stackcheck.elf', name: 'px4fmu-v4_stackcheck'
stash includes: 'Tools/HIL/monitor_firmware_upload.py, Tools/HIL/run_tests.py', name: 'scripts-px4fmu-v4'
stash includes: 'build/px4_fmu-v4_stackcheck/px4_fmu-v4_stackcheck.elf', name: 'px4_fmu-v4_stackcheck'
stash includes: 'Tools/HIL/monitor_firmware_upload.py, Tools/HIL/run_tests.py', name: 'scripts-px4_fmu-v4'
}
post {
always {
Expand All @@ -63,7 +63,7 @@ pipeline {

parallel {

stage('px4fmu-v2') {
stage('px4_fmu-v2') {
agent {
label 'px4fmu-v2'
}
Expand All @@ -72,8 +72,8 @@ pipeline {
try {
sh 'export'
sh 'find /dev/serial'
unstash 'scripts-px4fmu-v2'
unstash 'px4fmu-v2_test'
unstash 'scripts-px4_fmu-v2'
unstash 'px4_fmu-v2_test'
sh ''' gdb -nx --batch \
-ex "target extended-remote `find /dev/serial -name *Black_Magic_Probe_*-if00`" \
-ex "monitor version" \
Expand All @@ -82,7 +82,7 @@ pipeline {
-ex "attach 1" \
-ex "load" \
-ex "kill" \
build/px4fmu-v2_test/px4fmu-v2_test.elf
build/px4_fmu-v2_test/px4_fmu-v2_test.elf
'''
sh './Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *Black_Magic_Probe_*-if02` --baudrate 57600'
sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *Black_Magic_Probe_*-if02`'
Expand All @@ -97,7 +97,7 @@ pipeline {
}
}

stage('px4fmu-v4') {
stage('px4_fmu-v4') {
agent {
label 'px4fmu-v4'
}
Expand All @@ -106,8 +106,8 @@ pipeline {
try {
sh 'export'
sh 'find /dev/serial'
unstash 'scripts-px4fmu-v4'
unstash 'px4fmu-v4_stackcheck'
unstash 'scripts-px4_fmu-v4'
unstash 'px4_fmu-v4_stackcheck'
sh ''' gdb -nx --batch \
-ex "target extended-remote `find /dev/serial -name *Black_Magic_Probe_*-if00`" \
-ex "monitor version" \
Expand All @@ -116,7 +116,7 @@ pipeline {
-ex "attach 1" \
-ex "load" \
-ex "kill" \
build/px4fmu-v4_stackcheck/px4fmu-v4_stackcheck.elf
build/px4_fmu-v4_stackcheck/px4_fmu-v4_stackcheck.elf
'''
sh './Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *Black_Magic_Probe_*-if02` --baudrate 57600'
sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *Black_Magic_Probe_*-if02`'
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ addons:
description: "Build submitted via Travis CI"
notification_email: [email protected]
build_command_prepend: "make distclean"
build_command: "make px4sitl_default"
build_command: "make px4_sitl_default"
branch_pattern: coverity_scan
2 changes: 1 addition & 1 deletion .ycm_extra_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
'c++',
'-undef', # get rid of standard definitions to allow us to include arm math header
'-I', os.path.join(os.path.expanduser("~"),'gcc-arm-none-eabi-4_7-2013q3/arm-none-eabi/include'),
'-I', 'Build/px4io-v2_default.build/nuttx-export/include/',
'-I', 'Build/px4_io-v2_default.build/nuttx-export/include/',
'-I', './NuttX/nuttx/arch/arm/include',
'-include', './src/include/visibility.h',
'-I', './src',
Expand Down
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ define_property(GLOBAL PROPERTY PX4_MODULE_PATHS
# configuration
#

set(CONFIG "px4sitl_default" CACHE STRING "desired configuration")
set(CONFIG "px4_sitl_default" CACHE STRING "desired configuration")

set(config_module_list)
set(config_df_driver_list)
Expand Down Expand Up @@ -173,8 +173,8 @@ if(NOT PX4_CONFIG_FILE)
break()
endif()

# <BOARD>_<LABEL> (eg px4fmu-v2_default)
# <BOARD>_default (eg px4fmu-v2) # allow skipping label if "default"
# <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
)
Expand All @@ -184,7 +184,7 @@ if(NOT PX4_CONFIG_FILE)


# LEGACY form
# <OS>_<BOARD>_<LABEL> (eg nuttx_px4fmu-v2_default)
# <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}"))
Expand Down Expand Up @@ -212,7 +212,7 @@ endif()
message(STATUS "PX4 config file: ${PX4_CONFIG_FILE}")
include(px4_add_board)
include(${PX4_CONFIG_FILE})
message(STATUS "PX4 config: ${PX4_BOARD_VENDOR} ${PX4_BOARD_MODEL} ${PX4_BOARD_LABEL}")
message(STATUS "PX4 config: ${PX4_BOARD_VENDOR}_${PX4_BOARD_MODEL}_${PX4_BOARD_LABEL}")
message(STATUS "PX4 platform: ${PX4_PLATFORM}")

# external modules
Expand Down
2 changes: 1 addition & 1 deletion Firmware.sublime-project
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"name": "PX4: make and upload",
"working_dir": "${project_path}",
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"cmd": ["make upload px4fmu-v2_default -j8"],
"cmd": ["make upload px4_fmu-v2_default -j8"],
"shell": true
},
{
Expand Down
Loading

0 comments on commit abb3817

Please sign in to comment.