Compare commits

..

1 Commits

Author SHA1 Message Date
Daniel Agar 6d6b72d4bf WIP: mRO CANnode m10025 2021-04-11 12:49:13 -04:00
150 changed files with 3211 additions and 3544 deletions
+9
View File
@@ -45,16 +45,23 @@ pipeline {
"cuav_can-gps-v1_canbootloader",
"cuav_can-gps-v1_default",
"cuav_nora_default",
"cuav_nora_test",
"cuav_x7pro_default",
"cuav_x7pro_test",
"cubepilot_cubeorange_console",
"cubepilot_cubeorange_default",
"cubepilot_cubeyellow_console",
"cubepilot_cubeyellow_default",
"holybro_can-gps-v1_canbootloader",
"holybro_can-gps-v1_default",
"holybro_durandal-v1_default",
"holybro_durandal-v1_test",
"holybro_kakutef7_default",
"holybro_pix32v5_default",
"modalai_fc-v1_default",
"modalai_fc-v1_rtps",
"mro_cannode_canbootloader",
"mro_cannode_default",
"mro_ctrl-zero-f7_default",
"mro_ctrl-zero-f7-oem_default",
"mro_ctrl-zero-h7_default",
@@ -76,6 +83,7 @@ pipeline {
"px4_fmu-v2_fixedwing",
"px4_fmu-v2_multicopter",
"px4_fmu-v2_rover",
"px4_fmu-v2_test",
"px4_fmu-v3_default",
"px4_fmu-v4_cannode",
"px4_fmu-v4_default",
@@ -94,6 +102,7 @@ pipeline {
"px4_fmu-v5x_base_phy_DP83848C",
"px4_fmu-v5x_default",
"px4_fmu-v6u_default",
"px4_fmu-v6u_test",
"px4_fmu-v6x_default",
"px4_io-v2_default",
"spracing_h7extreme_default",
+94 -42
View File
@@ -7,9 +7,9 @@ pipeline {
parallel {
stage("cubepilot_cubeorange_test") {
stage("cubepilot_cubeorange_console") {
stages {
stage("build cubepilot_cubeorange_test") {
stage("build cubepilot_cubeorange_console") {
agent {
docker {
image 'px4io/px4-dev-nuttx-focal:2020-09-14'
@@ -22,10 +22,10 @@ pipeline {
sh 'make distclean'
sh 'ccache -s'
sh 'git fetch --tags'
sh 'make cubepilot_cubeorange_test'
sh 'make cubepilot_cubeorange_console'
sh 'make sizes'
sh 'ccache -s'
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/upload_jlink_gdb.sh, Tools/HIL/*.py', name: 'cubepilot_cubeorange_test'
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/upload_jlink_gdb.sh, Tools/HIL/*.py', name: 'cubepilot_cubeorange_console'
}
post {
always {
@@ -42,9 +42,9 @@ pipeline {
steps {
sh 'export'
sh 'find /dev/serial'
unstash 'cubepilot_cubeorange_test'
unstash 'cubepilot_cubeorange_console'
// flash board and watch bootup
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/cubepilot_cubeorange_test/cubepilot_cubeorange_test.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/cubepilot_cubeorange_console/cubepilot_cubeorange_console.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
}
}
stage("configure") {
@@ -160,9 +160,61 @@ pipeline {
}
}
stage("px4_fmu-v3_test") {
// stage("px4_fmu-v2_test") {
// stages {
// stage("build px4_fmu-v2_test") {
// agent {
// docker {
// image 'px4io/px4-dev-nuttx-focal:2020-09-14'
// args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
// }
// }
// steps {
// sh 'export'
// sh 'make distclean'
// sh 'ccache -s'
// sh 'git fetch --tags'
// sh 'make px4_fmu-v2_test'
// sh 'make sizes'
// sh 'ccache -s'
// stash includes: 'build/px4_fmu-v2_test/px4_fmu-v2_test.elf', name: 'px4_fmu-v2_test'
// }
// post {
// always {
// sh 'make distclean'
// }
// }
// } // stage build
// stage("test") {
// agent {
// label 'px4_fmu-v2'
// }
// stages {
// stage("flash") {
// steps {
// sh 'export'
// sh 'find /dev/serial'
// unstash 'px4_fmu-v2_test'
// // flash board and watch bootup
// sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/px4_fmu-v2_test/px4_fmu-v2_test.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
// }
// }
// stage("reset") {
// steps {
// cleanupFTDI();
// }
// }
// }
// options {
// timeout(time: 90, unit: 'MINUTES')
// }
// }
// }
// }
stage("px4_fmu-v3_default") {
stages {
stage("build px4_fmu-v3_test") {
stage("build px4_fmu-v3_default") {
agent {
docker {
image 'px4io/px4-dev-nuttx-focal:2020-09-14'
@@ -175,10 +227,10 @@ pipeline {
sh 'make distclean'
sh 'ccache -s'
sh 'git fetch --tags'
sh 'make px4_fmu-v3_test'
sh 'make px4_fmu-v3_default'
sh 'make sizes'
sh 'ccache -s'
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/upload_jlink_gdb.sh, Tools/HIL/*.py', name: 'px4_fmu-v3_test'
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/upload_jlink_gdb.sh, Tools/HIL/*.py', name: 'px4_fmu-v3_default'
}
post {
always {
@@ -195,9 +247,9 @@ pipeline {
steps {
sh 'export'
sh 'find /dev/serial'
unstash 'px4_fmu-v3_test'
unstash 'px4_fmu-v3_default'
// flash board and watch bootup
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/px4_fmu-v3_test/px4_fmu-v3_test.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/px4_fmu-v3_default/px4_fmu-v3_default.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
}
}
stage("configure") {
@@ -236,9 +288,9 @@ pipeline {
}
}
stage("px4_fmu-v4_test") {
stage("px4_fmu-v4_default") {
stages {
stage("build px4_fmu-v4_test") {
stage("build px4_fmu-v4_default") {
agent {
docker {
image 'px4io/px4-dev-nuttx-focal:2020-09-14'
@@ -251,10 +303,10 @@ pipeline {
sh 'make distclean'
sh 'ccache -s'
sh 'git fetch --tags'
sh 'make px4_fmu-v4_test'
sh 'make px4_fmu-v4_default'
sh 'make sizes'
sh 'ccache -s'
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/upload_jlink_gdb.sh, Tools/HIL/*.py', name: 'px4_fmu-v4_test'
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/upload_jlink_gdb.sh, Tools/HIL/*.py', name: 'px4_fmu-v4_default'
}
post {
always {
@@ -271,9 +323,9 @@ pipeline {
steps {
sh 'export'
sh 'find /dev/serial'
unstash 'px4_fmu-v4_test'
unstash 'px4_fmu-v4_default'
// flash board and watch bootup
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/px4_fmu-v4_test/px4_fmu-v4_test.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/px4_fmu-v4_default/px4_fmu-v4_default.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
}
}
stage("configure") {
@@ -312,9 +364,9 @@ pipeline {
}
}
stage("px4_fmu-v4pro_test") {
stage("px4_fmu-v4pro_default") {
stages {
stage("build px4_fmu-v4pro_test") {
stage("build px4_fmu-v4pro_default") {
agent {
docker {
image 'px4io/px4-dev-nuttx-focal:2020-09-14'
@@ -327,10 +379,10 @@ pipeline {
sh 'make distclean'
sh 'ccache -s'
sh 'git fetch --tags'
sh 'make px4_fmu-v4pro_test'
sh 'make px4_fmu-v4pro_default'
sh 'make sizes'
sh 'ccache -s'
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/upload_jlink_gdb.sh, Tools/HIL/*.py', name: 'px4_fmu-v4pro_test'
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/upload_jlink_gdb.sh, Tools/HIL/*.py', name: 'px4_fmu-v4pro_default'
}
post {
always {
@@ -347,9 +399,9 @@ pipeline {
steps {
sh 'export'
sh 'find /dev/serial'
unstash 'px4_fmu-v4pro_test'
unstash 'px4_fmu-v4pro_default'
// flash board and watch bootup
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/px4_fmu-v4pro_test/px4_fmu-v4pro_test.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/px4_fmu-v4pro_default/px4_fmu-v4pro_default.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
}
}
stage("configure") {
@@ -388,9 +440,9 @@ pipeline {
}
}
stage("px4_fmu-v5_test") {
stage("px4_fmu-v5_default") {
stages {
stage("build px4_fmu-v5_test") {
stage("build px4_fmu-v5_default") {
agent {
docker {
image 'px4io/px4-dev-nuttx-focal:2020-09-14'
@@ -403,10 +455,10 @@ pipeline {
sh 'make distclean'
sh 'ccache -s'
sh 'git fetch --tags'
sh 'make px4_fmu-v5_test'
sh 'make px4_fmu-v5_default'
sh 'make sizes'
sh 'ccache -s'
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/upload_jlink_gdb.sh, Tools/HIL/*.py', name: 'px4_fmu-v5_test'
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/upload_jlink_gdb.sh, Tools/HIL/*.py', name: 'px4_fmu-v5_default'
}
post {
always {
@@ -423,9 +475,9 @@ pipeline {
steps {
sh 'export'
sh 'find /dev/serial'
unstash 'px4_fmu-v5_test'
unstash 'px4_fmu-v5_default'
// flash board and watch bootup
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/px4_fmu-v5_test/px4_fmu-v5_test.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/px4_fmu-v5_default/px4_fmu-v5_default.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
}
}
stage("configure") {
@@ -700,9 +752,9 @@ pipeline {
}
}
stage("modalai_fc-v1_test") {
stage("modalai_fc-v1_default") {
stages {
stage("build modalai_fc-v1_test") {
stage("build modalai_fc-v1_default") {
agent {
docker {
image 'px4io/px4-dev-nuttx-focal:2020-09-14'
@@ -715,10 +767,10 @@ pipeline {
sh 'make distclean'
sh 'ccache -s'
sh 'git fetch --tags'
sh 'make modalai_fc-v1_test'
sh 'make modalai_fc-v1_default'
sh 'make sizes'
sh 'ccache -s'
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/upload_jlink_gdb.sh, Tools/HIL/*.py', name: 'modalai_fc-v1_test'
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/upload_jlink_gdb.sh, Tools/HIL/*.py', name: 'modalai_fc-v1_default'
}
post {
always {
@@ -735,9 +787,9 @@ pipeline {
steps {
sh 'export'
sh 'find /dev/serial'
unstash 'modalai_fc-v1_test'
unstash 'modalai_fc-v1_default'
// flash board and watch bootup
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/modalai_fc-v1_test/modalai_fc-v1_test.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/modalai_fc-v1_default/modalai_fc-v1_default.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
}
}
stage("configure") {
@@ -853,9 +905,9 @@ pipeline {
}
}
stage("nxp_fmuk66-v3_test") {
stage("nxp_fmuk66-v3_default") {
stages {
stage("build nxp_fmuk66-v3_test") {
stage("build nxp_fmuk66-v3_default") {
agent {
docker {
image 'px4io/px4-dev-nuttx-focal:2020-09-14'
@@ -868,10 +920,10 @@ pipeline {
sh 'make distclean'
sh 'ccache -s'
sh 'git fetch --tags'
sh 'make nxp_fmuk66-v3_test'
sh 'make nxp_fmuk66-v3_default'
sh 'make sizes'
sh 'ccache -s'
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/upload_jlink_gdb.sh, Tools/HIL/*.py', name: 'nxp_fmuk66-v3_test'
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/upload_jlink_gdb.sh, Tools/HIL/*.py', name: 'nxp_fmuk66-v3_default'
}
post {
always {
@@ -888,9 +940,9 @@ pipeline {
steps {
sh 'export'
sh 'find /dev/serial'
unstash 'nxp_fmuk66-v3_test'
unstash 'nxp_fmuk66-v3_default'
// flash board and watch bootup
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/nxp_fmuk66-v3_test/nxp_fmuk66-v3_test.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/nxp_fmuk66-v3_default/nxp_fmuk66-v3_default.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
}
}
stage("configure") {
+9 -2
View File
@@ -26,20 +26,25 @@ jobs:
cuav_can-gps-v1_debug,
cuav_can-gps-v1_default,
cuav_nora_default,
cuav_nora_test,
cuav_x7pro_default,
cuav_x7pro_test,
cubepilot_cubeorange_console,
cubepilot_cubeorange_default,
cubepilot_cubeorange_test,
cubepilot_cubeyellow_console,
cubepilot_cubeyellow_default,
cubepilot_cubeyellow_test,
cubepilot_io-v2_default,
holybro_can-gps-v1_canbootloader,
holybro_can-gps-v1_debug,
holybro_can-gps-v1_default,
holybro_durandal-v1_default,
holybro_durandal-v1_test,
holybro_kakutef7_default,
holybro_pix32v5_default,
modalai_fc-v1_default,
modalai_fc-v1_rtps,
mro_cannode_canbootloader,
mro_cannode_default,
mro_ctrl-zero-f7-oem_default,
mro_ctrl-zero-f7_default,
mro_ctrl-zero-h7-oem_default,
@@ -61,6 +66,7 @@ jobs:
px4_fmu-v2_fixedwing,
px4_fmu-v2_multicopter,
px4_fmu-v2_rover,
px4_fmu-v2_test,
px4_fmu-v3_default,
px4_fmu-v4_cannode,
px4_fmu-v4_default,
@@ -79,6 +85,7 @@ jobs:
px4_fmu-v5x_base_phy_DP83848C,
px4_fmu-v5x_default,
px4_fmu-v6u_default,
px4_fmu-v6u_test,
px4_fmu-v6x_default,
px4_io-v2_default,
spracing_h7extreme_default,
+2 -2
View File
@@ -59,7 +59,7 @@
url = https://github.com/UAVCAN/public_regulated_data_types.git
[submodule "src/drivers/uavcannode_gps_demo/public_regulated_data_types"]
path = src/drivers/uavcannode_gps_demo/public_regulated_data_types
url = https://github.com/UAVCAN/public_regulated_data_types.git
url = https://github.com/UAVCAN/public_regulated_data_types
[submodule "src/drivers/uavcannode_gps_demo/libcanard"]
path = src/drivers/uavcannode_gps_demo/libcanard
url = https://github.com/UAVCAN/libcanard.git
url = https://github.com/UAVCAN/libcanard
+7 -2
View File
@@ -96,11 +96,11 @@ CONFIG:
buildType: MinSizeRel
settings:
CONFIG: cuav_x7pro_default
cubepilot_cubeorange_test:
cubepilot_cubeorange_console:
short: cubepilot_cubeorange
buildType: MinSizeRel
settings:
CONFIG: cubepilot_orange_test
CONFIG: cubepilot_orange_console
emlid_navio2_default:
short: emlid_navio2
buildType: MinSizeRel
@@ -126,6 +126,11 @@ CONFIG:
buildType: MinSizeRel
settings:
CONFIG: modalai_fc-v1_default
mro_cannode_default:
short: mro_cannode_default
buildType: MinSizeRel
settings:
CONFIG: mro_cannode_default
mro_ctrl-zero-f7_default:
short: mro_ctrl-zero-f7
buildType: MinSizeRel
@@ -111,6 +111,5 @@ set MAV_TYPE 22
set MIXER babyshark
set MIXER_AUX pass
# Mark outputs for the alternate rate
# or D-Shot
set PWM_OUT 5678
set PWM_AUX_OUT 1234
-5
View File
@@ -144,11 +144,6 @@ then
set OUTPUT_DEV /dev/uavcan/esc
fi
if [ $OUTPUT_MODE = vesc ]
then
set OUTPUT_DEV /dev/vesc
fi
if mixer load ${OUTPUT_DEV} ${MIXER_FILE}
then
echo "INFO [init] Mixer: ${MIXER_FILE} on ${OUTPUT_DEV}"
-5
View File
@@ -282,11 +282,6 @@ else
fi
fi
if param greater -s VESC_PORT 0
then
set OUTPUT_MODE vesc
fi
#
# Check if PX4IO present and update firmware if needed.
# Assumption IOFW set to firmware file and IO_PRESENT = no
+13 -10
View File
@@ -8,6 +8,7 @@ px4_add_board(
ARCHITECTURE cortex-m4
CONSTRAINED_MEMORY
ROMFSROOT px4fmu_common
TESTING
UAVCAN_INTERFACES 1
SERIAL_PORTS
GPS1:/dev/ttyS3
@@ -47,6 +48,7 @@ px4_add_board(
roboclaw
rpm
telemetry # all available telemetry drivers
test_ppm
tone_alarm
uavcan
MODULES
@@ -108,6 +110,7 @@ px4_add_board(
sd_bench
serial_test
system_time
tests # tests and test runner
top
topic_listener
tune_control
@@ -117,15 +120,15 @@ px4_add_board(
work_queue
EXAMPLES
fake_gps
#fake_gyro
#fake_magnetometer
#fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
#hello
#hwtest # Hardware test
fake_gyro
fake_magnetometer
fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
hello
hwtest # Hardware test
#matlab_csv_serial
#px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
#px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
#rover_steering_control # Rover example app
#uuv_example_app
#work_item
px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
rover_steering_control # Rover example app
uuv_example_app
work_item
)
+2
View File
@@ -39,6 +39,7 @@ px4_add_board(
VENDOR atlflight
MODEL eagle
LABEL default
#TESTING
TOOLCHAIN arm-linux-gnueabihf
ROMFSROOT px4fmu_common
DRIVERS
@@ -107,6 +108,7 @@ px4_add_board(
sd_bench
shutdown
system_time
#tests # tests and test runner
#top
topic_listener
tune_control
+2
View File
@@ -39,6 +39,7 @@ px4_add_board(
VENDOR atlflight
MODEL excelsior
LABEL default
#TESTING
TOOLCHAIN arm-oemllib32-linux-gnueabi
DRIVERS
#barometer # all available barometer drivers
@@ -105,6 +106,7 @@ px4_add_board(
sd_bench
shutdown
system_time
#tests # tests and test runner
#top
topic_listener
tune_control
+13 -10
View File
@@ -7,6 +7,7 @@ px4_add_board(
TOOLCHAIN arm-none-eabi
ARCHITECTURE cortex-m7
ROMFSROOT px4fmu_common
TESTING
UAVCAN_INTERFACES 2
ETHERNET
SERIAL_PORTS
@@ -46,6 +47,7 @@ px4_add_board(
roboclaw
rpm
telemetry # all available telemetry drivers
test_ppm
#tone_alarm
uavcan
MODULES
@@ -106,6 +108,7 @@ px4_add_board(
sd_bench
serial_test
system_time
tests # tests and test runner
top
topic_listener
tune_control
@@ -114,15 +117,15 @@ px4_add_board(
work_queue
EXAMPLES
fake_gps
#fake_gyro
#fake_magnetometer
#fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
#hello
#hwtest # Hardware test
fake_gyro
fake_magnetometer
fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
hello
hwtest # Hardware test
#matlab_csv_serial
#px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
#px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
#rover_steering_control # Rover example app
#uuv_example_app
#work_item
px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
rover_steering_control # Rover example app
uuv_example_app
work_item
)
+1
View File
@@ -113,6 +113,7 @@ px4_add_board(
sd_bench
serial_test
system_time
#tests # tests and test runner
top
topic_listener
tune_control
+1
View File
@@ -114,6 +114,7 @@ px4_add_board(
sd_bench
serial_test
system_time
#tests # tests and test runner
top
topic_listener
tune_control
@@ -3,7 +3,7 @@ px4_add_board(
PLATFORM nuttx
VENDOR cubepilot
MODEL cubeorange
LABEL test
LABEL console
TOOLCHAIN arm-none-eabi
ARCHITECTURE cortex-m7
ROMFSROOT px4fmu_common
@@ -9,6 +9,7 @@ px4_add_board(
ROMFSROOT px4fmu_common
BUILD_BOOTLOADER
IO cubepilot_io-v2_default
TESTING
UAVCAN_INTERFACES 2
SERIAL_PORTS
TEL1:/dev/ttyS0
@@ -50,6 +51,7 @@ px4_add_board(
roboclaw
rpm
telemetry # all available telemetry drivers
#test_ppm
tone_alarm
uavcan
MODULES
@@ -111,6 +113,7 @@ px4_add_board(
sd_bench
#serial_test
system_time
#tests # tests and test runner
top
topic_listener
tune_control
@@ -3,7 +3,7 @@ px4_add_board(
PLATFORM nuttx
VENDOR cubepilot
MODEL cubeyellow
LABEL test
LABEL console
TOOLCHAIN arm-none-eabi
ARCHITECTURE cortex-m7
ROMFSROOT px4fmu_common
@@ -8,6 +8,7 @@ px4_add_board(
ARCHITECTURE cortex-m7
ROMFSROOT px4fmu_common
IO cubepilot_io-v2_default
TESTING
UAVCAN_INTERFACES 2
SERIAL_PORTS
TEL1:/dev/ttyS0
@@ -48,6 +49,7 @@ px4_add_board(
roboclaw
rpm
telemetry # all available telemetry drivers
#test_ppm
tone_alarm
uavcan
MODULES
@@ -109,6 +111,7 @@ px4_add_board(
sd_bench
#serial_test
system_time
#tests # tests and test runner
top
topic_listener
tune_control
+1
View File
@@ -109,6 +109,7 @@ px4_add_board(
sd_bench
serial_test
system_time
#tests # tests and test runner
top
topic_listener
tune_control
-1
View File
@@ -6,7 +6,6 @@ px4_add_board(
LABEL default
TOOLCHAIN arm-none-eabi
ARCHITECTURE cortex-m7
EXTERNAL_METADATA
ROMFSROOT px4fmu_common
SERIAL_PORTS
TEL1:/dev/ttyS0 # UART1
+13 -10
View File
@@ -8,6 +8,7 @@ px4_add_board(
ARCHITECTURE cortex-m7
ROMFSROOT px4fmu_common
IO px4_io-v2_default
TESTING
UAVCAN_INTERFACES 2
SERIAL_PORTS
GPS1:/dev/ttyS0
@@ -52,6 +53,7 @@ px4_add_board(
rpm
safety_button
telemetry # all available telemetry drivers
test_ppm
tone_alarm
uavcan
MODULES
@@ -113,6 +115,7 @@ px4_add_board(
sd_bench
serial_test
system_time
tests # tests and test runner
top
topic_listener
tune_control
@@ -122,15 +125,15 @@ px4_add_board(
work_queue
EXAMPLES
fake_gps
#fake_gyro
#fake_magnetometer
#fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
#hello
#hwtest # Hardware test
fake_gyro
fake_magnetometer
fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
hello
hwtest # Hardware test
#matlab_csv_serial
#px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
#px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
#rover_steering_control # Rover example app
#uuv_example_app
#work_item
px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
rover_steering_control # Rover example app
uuv_example_app
work_item
)
-139
View File
@@ -1,139 +0,0 @@
px4_add_board(
PLATFORM nuttx
VENDOR holybro
MODEL pix32v5
LABEL test
TOOLCHAIN arm-none-eabi
ARCHITECTURE cortex-m7
ROMFSROOT px4fmu_common
IO px4_io-v2_default
TESTING
UAVCAN_INTERFACES 2
SERIAL_PORTS
GPS1:/dev/ttyS0
TEL1:/dev/ttyS1
TEL2:/dev/ttyS2
TEL3:/dev/ttyS4
TEL4:/dev/ttyS3
DRIVERS
adc/ads1115
adc/board_adc
barometer # all available barometer drivers
batt_smbus
camera_capture
camera_trigger
differential_pressure # all available differential pressure drivers
distance_sensor # all available distance sensor drivers
dshot
gps
#heater
#imu # all available imu drivers
imu/analog_devices/adis16448
imu/bosch/bmi055
imu/invensense/icm20602
imu/invensense/icm20689
imu/invensense/icm20948 # required for ak09916 mag
irlock
lights # all available light drivers
lights/rgbled_pwm
magnetometer # all available magnetometer drivers
optical_flow # all available optical flow drivers
osd
pca9685
pca9685_pwm_out
power_monitor/ina226
#protocol_splitter
pwm_input
pwm_out_sim
pwm_out
px4io
rc_input
roboclaw
rpm
safety_button
telemetry # all available telemetry drivers
test_ppm
tone_alarm
uavcan
MODULES
airspeed_selector
attitude_estimator_q
battery_status
camera_feedback
commander
dataman
ekf2
esc_battery
events
flight_mode_manager
fw_att_control
fw_pos_control_l1
gyro_calibration
gyro_fft
land_detector
landing_target_estimator
load_mon
local_position_estimator
logger
mavlink
mc_att_control
mc_hover_thrust_estimator
mc_pos_control
mc_rate_control
#micrortps_bridge
navigator
rc_update
rover_pos_control
sensors
sih
temperature_compensation
uuv_att_control
uuv_pos_control
vmount
vtol_att_control
SYSTEMCMDS
bl_update
dmesg
dumpfile
esc_calib
gpio
hardfault_log
i2cdetect
led_control
mft
mixer
motor_ramp
motor_test
mtd
nshterm
param
perf
pwm
reboot
reflect
sd_bench
serial_test
system_time
tests # tests and test runner
top
topic_listener
tune_control
uorb
usb_connected
ver
work_queue
EXAMPLES
fake_gps
fake_gyro
fake_magnetometer
fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
hello
hwtest # Hardware test
#matlab_csv_serial
px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
rover_steering_control # Rover example app
uuv_example_app
work_item
)
+13 -10
View File
@@ -7,6 +7,7 @@ px4_add_board(
TOOLCHAIN arm-none-eabi
ARCHITECTURE cortex-m7
ROMFSROOT px4fmu_common
TESTING
UAVCAN_INTERFACES 1
SERIAL_PORTS
GPS1:/dev/ttyS0 # UART1 / J10
@@ -46,6 +47,7 @@ px4_add_board(
rpm
safety_button
telemetry # all available telemetry drivers
test_ppm
#tone_alarm
uavcan
MODULES
@@ -106,6 +108,7 @@ px4_add_board(
sd_bench
serial_test
system_time
tests # tests and test runner
top
topic_listener
tune_control
@@ -115,15 +118,15 @@ px4_add_board(
work_queue
EXAMPLES
fake_gps
#fake_gyro
#fake_magnetometer
#fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
#hello
#hwtest # Hardware test
fake_gyro
fake_magnetometer
fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
hello
hwtest # Hardware test
#matlab_csv_serial
#px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
#px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
#rover_steering_control # Rover example app
#uuv_example_app
#work_item
px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
rover_steering_control # Rover example app
uuv_example_app
work_item
)
+82 -4
View File
@@ -18,10 +18,88 @@
# Common settings across Flight Core configurations
#
# Disable safety switch by default (pull high to 3.3V to enable)
# V106 - J13 pin 5
# V110 - J1011 pin 5
param set-default CBRK_IO_SAFETY 22027
#
# Stand Alone configuration
#
if ver hwtypecmp V106
then
echo "Configuring Flight Core - V106"
#
# In Flight Core, J1 can be setup to be used as a serial port for TELEM2
# and connected to VOXL via cables. We'll configure this out of the box.
# The user can later change this if they want, as these are configurable
# and not necessarily required to be used with VOXL.
#
if [ $AUTOCNF = no ]
then
if param compare MAV_1_CONFIG 0
then
echo "V106 - Defualt configuration TELEM2 on /dev/ttyS4 at 921600 in Normal Mode"
# TELEM2
param set-default MAV_1_CONFIG 102
# Onboard
param set-default MAV_1_MODE 2
# VIO data
param set-default SER_TEL2_BAUD 921600
fi
fi
# User is setting defaults, so let's do it!
if [ $AUTOCNF = yes ]
then
echo "V106 - Auto Configuring TELEM2 on /dev/ttyS4 at 921600 in Normal Mode"
# TELEM2
param set-default MAV_1_CONFIG 102
# Onboard
param set-default MAV_1_MODE 2
# VIO data
param set-default SER_TEL2_BAUD 921600
fi
fi
#
# VOXL-Flight configuration
#
if ver hwtypecmp V110
then
echo "Configuring VOXL-Flight - V110"
#
# TELEM2 port is physically routed in the PCB, thus not configurable.
# The following will detect a fresh install, or if the user has changed the setting and
# revert to the VOXL-Flight defaults. This does allow the user to change the mode and
# baud rates and mode if they choose to do so, although VOXL is expecting what is set below
#
if [ $AUTOCNF = no ]
then
if ! param compare MAV_1_CONFIG 102
then
echo "V110 - Default configuration TELEM2 on /dev/ttyS4 at 921600 in Normal Mode"
# TELEM2
param set-default MAV_1_CONFIG 102
# Onboard
param set-default MAV_1_MODE 2
param set-default SER_TEL2_BAUD 921600
fi
fi
# User is setting defaults, so let's do it!
if [ $AUTOCNF = yes ]
then
echo "V110 - Auto Configuring TELEM2 on /dev/ttyS4 at 921600 in Normal Mode"
# TELEM2
param set-default MAV_1_CONFIG 102
# Onboard
param set-default MAV_1_MODE 2
param set-default SER_TEL2_BAUD 921600
fi
fi
# TELEM2
param set-default MAV_1_CONFIG 102
param set-default MAV_1_MODE 2
param set-default SER_TEL2_BAUD 921600
safety_button start
+13 -10
View File
@@ -7,6 +7,7 @@ px4_add_board(
TOOLCHAIN arm-none-eabi
ARCHITECTURE cortex-m7
ROMFSROOT px4fmu_common
TESTING
UAVCAN_INTERFACES 1
SERIAL_PORTS
GPS1:/dev/ttyS0 # UART1 / J10
@@ -46,6 +47,7 @@ px4_add_board(
rpm
safety_button
telemetry # all available telemetry drivers
test_ppm
#tone_alarm
uavcan
MODULES
@@ -106,6 +108,7 @@ px4_add_board(
sd_bench
serial_test
system_time
tests # tests and test runner
top
topic_listener
tune_control
@@ -115,15 +118,15 @@ px4_add_board(
work_queue
EXAMPLES
fake_gps
#fake_gyro
#fake_magnetometer
#fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
#hello
#hwtest # Hardware test
fake_gyro
fake_magnetometer
fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
hello
hwtest # Hardware test
#matlab_csv_serial
#px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
#px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
#rover_steering_control # Rover example app
#uuv_example_app
#work_item
px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
rover_steering_control # Rover example app
uuv_example_app
work_item
)
-132
View File
@@ -1,132 +0,0 @@
px4_add_board(
PLATFORM nuttx
VENDOR modalai
MODEL fc-v1
LABEL test
TOOLCHAIN arm-none-eabi
ARCHITECTURE cortex-m7
ROMFSROOT px4fmu_common
TESTING
UAVCAN_INTERFACES 1
SERIAL_PORTS
GPS1:/dev/ttyS0 # UART1 / J10
TEL1:/dev/ttyS6 # UART7 / J5
TEL2:/dev/ttyS4 # UART5 / J1
TEL3:/dev/ttyS1 # USART2 / J4
DRIVERS
adc/ads1115
adc/board_adc
barometer # all available barometer drivers
batt_smbus
camera_capture
camera_trigger
differential_pressure # all available differential pressure drivers
distance_sensor # all available distance sensor drivers
dshot
gps
imu/bosch/bmi088
imu/invensense/icm20602
imu/invensense/icm20948 # required for ak09916 mag
imu/invensense/icm42688p
irlock
lights # all available light drivers
magnetometer # all available magnetometer drivers
optical_flow # all available optical flow drivers
osd
pca9685
pca9685_pwm_out
power_monitor/ina226
power_monitor/voxlpm
#protocol_splitter
#pwm_input
pwm_out_sim
pwm_out
rc_input
roboclaw
rpm
safety_button
telemetry # all available telemetry drivers
test_ppm
#tone_alarm
uavcan
MODULES
airspeed_selector
attitude_estimator_q
camera_feedback
commander
dataman
ekf2
esc_battery
events
flight_mode_manager
fw_att_control
fw_pos_control_l1
gyro_calibration
gyro_fft
land_detector
landing_target_estimator
load_mon
local_position_estimator
logger
mavlink
mc_att_control
mc_hover_thrust_estimator
mc_pos_control
mc_rate_control
#micrortps_bridge
navigator
rc_update
rover_pos_control
sensors
sih
temperature_compensation
uuv_att_control
uuv_pos_control
vmount
vtol_att_control
SYSTEMCMDS
bl_update
dmesg
dumpfile
esc_calib
gpio
hardfault_log
i2cdetect
led_control
mft
mixer
motor_ramp
motor_test
mtd
nshterm
param
perf
pwm
reboot
reflect
sd_bench
serial_test
system_time
tests # tests and test runner
top
topic_listener
tune_control
uorb
usb_connected
ver
work_queue
EXAMPLES
fake_gps
fake_gyro
fake_magnetometer
fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
hello
hwtest # Hardware test
#matlab_csv_serial
px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
rover_steering_control # Rover example app
uuv_example_app
work_item
)
+13
View File
@@ -0,0 +1,13 @@
include (${CMAKE_CURRENT_LIST_DIR}/uavcan_board_identity)
px4_add_board(
PLATFORM nuttx
VENDOR ark
MODEL can-flow
LABEL canbootloader
TOOLCHAIN arm-none-eabi
ARCHITECTURE cortex-m4
CONSTRAINED_MEMORY
DRIVERS
bootloaders
)
+25
View File
@@ -0,0 +1,25 @@
include (${CMAKE_CURRENT_LIST_DIR}/uavcan_board_identity)
px4_add_board(
PLATFORM nuttx
VENDOR mro
MODEL cannode
LABEL default
TOOLCHAIN arm-none-eabi
ARCHITECTURE cortex-m4
CONSTRAINED_FLASH
CONSTRAINED_MEMORY
ROMFSROOT cannode
UAVCAN_INTERFACES 1
UAVCAN_TIMER_OVERRIDE 3
DRIVERS
barometer/dps310
bootloaders
#gps
lights/rgbled_ncp5623c
magnetometer/rm3100
uavcannode
MODULES
SYSTEMCMDS
param
)
+13
View File
@@ -0,0 +1,13 @@
{
"board_id": 1004,
"magic": "PX4FWv1",
"description": "Firmware for the mRO CANnode board",
"image": "",
"build_time": 0,
"summary": "mROCANNode",
"version": "0.1",
"image_size": 0,
"image_maxsize": 2080768,
"git_identity": "",
"board_revision": 0
}
@@ -0,0 +1,9 @@
#!/bin/sh
#
# board specific defaults
#------------------------------------------------------------------------------
if [ $AUTOCNF = yes ]
then
fi
+8
View File
@@ -0,0 +1,8 @@
#!/bin/sh
#
# board sensors init
#------------------------------------------------------------------------------
rm3100 -s start
dps310 -I start
@@ -0,0 +1,61 @@
#
# This file is autogenerated: PLEASE DO NOT EDIT IT.
#
# You can use "make menuconfig" to make any modifications to the installed .config file.
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
# modifications.
#
CONFIG_ARCH="arm"
CONFIG_ARCH_BOARD_CUSTOM=y
CONFIG_ARCH_BOARD_CUSTOM_DIR="../nuttx-config"
CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y
CONFIG_ARCH_BOARD_CUSTOM_NAME="px4"
CONFIG_ARCH_CHIP="stm32"
CONFIG_ARCH_CHIP_STM32=y
CONFIG_ARCH_CHIP_STM32F303CC=y
CONFIG_ARCH_INTERRUPTSTACK=4096
CONFIG_ARMV7M_MEMCPY=y
CONFIG_ARMV7M_USEBASEPRI=y
CONFIG_BINFMT_DISABLE=y
CONFIG_BOARD_LOOPSPERMSEC=16717
CONFIG_C99_BOOL8=y
CONFIG_CLOCK_MONOTONIC=y
CONFIG_DEBUG_FULLOPT=y
CONFIG_DEBUG_SYMBOLS=y
CONFIG_DEFAULT_SMALL=y
CONFIG_DISABLE_MOUNTPOINT=y
CONFIG_DISABLE_MQUEUE=y
CONFIG_DISABLE_PTHREAD=y
CONFIG_EXPERIMENTAL=y
CONFIG_FDCLONE_DISABLE=y
CONFIG_FDCLONE_STDIO=y
CONFIG_HAVE_CXX=y
CONFIG_HAVE_CXXINITIALIZE=y
CONFIG_IDLETHREAD_STACKSIZE=4096
CONFIG_LIBC_FLOATINGPOINT=y
CONFIG_LIBC_LONG_LONG=y
CONFIG_LIBC_STRERROR=y
CONFIG_LIB_BOARDCTL=y
CONFIG_MAX_TASKS=0
CONFIG_MM_REGIONS=2
CONFIG_NAME_MAX=0
CONFIG_NUNGET_CHARS=0
CONFIG_PREALLOC_TIMERS=0
CONFIG_PTHREAD_STACK_MIN=512
CONFIG_RAM_SIZE=262144
CONFIG_RAM_START=0x20010000
CONFIG_RAW_BINARY=y
CONFIG_SDCLONE_DISABLE=y
CONFIG_SIG_DEFAULT=y
CONFIG_SIG_SIGALRM_ACTION=y
CONFIG_SIG_SIGUSR1_ACTION=y
CONFIG_SIG_SIGUSR2_ACTION=y
CONFIG_STACK_COLORATION=y
CONFIG_START_DAY=30
CONFIG_START_MONTH=11
CONFIG_STDIO_DISABLE_BUFFERING=y
CONFIG_STM32_NOEXT_VECTORS=y
CONFIG_STM32_TIM8=y
CONFIG_TASK_NAME_SIZE=0
CONFIG_USEC_PER_TICK=1000
CONFIG_USERMAIN_STACKSIZE=4096
@@ -0,0 +1,144 @@
/************************************************************************************
* configs/px4fmu/include/board.h
* include/arch/board/board.h
*
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* 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 NuttX 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.
*
************************************************************************************/
#ifndef __ARCH_BOARD_BOARD_H
#define __ARCH_BOARD_BOARD_H
#include <nuttx/config.h>
#ifndef __ASSEMBLY__
# include <stdint.h>
#endif
#include <stm32.h>
/* Clocking *****************************************************************/
/* HSI - Internal 8 MHz RC Oscillator
* LSI - 32 KHz RC
* HSE - 8 MHz from MCO output of ST-LINK
* LSE - 32.768 kHz
*/
#define STM32_BOARD_XTAL 8000000ul /* X1 on board */
#define STM32_HSEBYP_ENABLE
#define STM32_HSI_FREQUENCY 8000000ul
#define STM32_LSI_FREQUENCY 40000 /* Between 30kHz and 60kHz */
#define STM32_HSE_FREQUENCY STM32_BOARD_XTAL
#define STM32_LSE_FREQUENCY 0
/* PLL source is HSE/1, PLL multipler is 9: PLL frequency is 8MHz (XTAL) x 9 = 72MHz */
#define STM32_CFGR_PLLSRC RCC_CFGR_PLLSRC
#define STM32_CFGR_PLLXTPRE 0
#define STM32_CFGR_PLLMUL RCC_CFGR_PLLMUL_CLKx9
#define STM32_PLL_FREQUENCY (9*STM32_BOARD_XTAL)
/* Use the PLL and set the SYSCLK source to be the PLL */
#define STM32_SYSCLK_SW RCC_CFGR_SW_PLL
#define STM32_SYSCLK_SWS RCC_CFGR_SWS_PLL
#define STM32_SYSCLK_FREQUENCY STM32_PLL_FREQUENCY
/* AHB clock (HCLK) is SYSCLK (72MHz) */
#define STM32_RCC_CFGR_HPRE RCC_CFGR_HPRE_SYSCLK
#define STM32_HCLK_FREQUENCY STM32_SYSCLK_FREQUENCY
#define STM32_BOARD_HCLK STM32_HCLK_FREQUENCY /* same as above, to satisfy compiler */
/* APB2 clock (PCLK2) is HCLK (72MHz) */
#define STM32_RCC_CFGR_PPRE2 RCC_CFGR_PPRE2_HCLK
#define STM32_PCLK2_FREQUENCY STM32_HCLK_FREQUENCY
#define STM32_APB2_CLKIN (STM32_PCLK2_FREQUENCY) /* Timers 1 and 8, 15-17 */
/* APB2 timers 1 and 8, 15-17 will receive PCLK2. */
/* Timers driven from APB2 will be PCLK2 */
#define STM32_APB2_TIM1_CLKIN (STM32_PCLK2_FREQUENCY)
#define STM32_APB2_TIM8_CLKIN (STM32_PCLK2_FREQUENCY)
#define STM32_APB1_TIM15_CLKIN (STM32_PCLK2_FREQUENCY)
#define STM32_APB1_TIM16_CLKIN (STM32_PCLK2_FREQUENCY)
#define STM32_APB1_TIM17_CLKIN (STM32_PCLK2_FREQUENCY)
/* APB1 clock (PCLK1) is HCLK/2 (36MHz) */
#define STM32_RCC_CFGR_PPRE1 RCC_CFGR_PPRE1_HCLKd2
#define STM32_PCLK1_FREQUENCY (STM32_HCLK_FREQUENCY/2)
/* APB1 timers 2-7 will be twice PCLK1 */
#define STM32_APB1_TIM2_CLKIN (2*STM32_PCLK1_FREQUENCY)
#define STM32_APB1_TIM3_CLKIN (2*STM32_PCLK1_FREQUENCY)
#define STM32_APB1_TIM4_CLKIN (2*STM32_PCLK1_FREQUENCY)
#define STM32_APB1_TIM6_CLKIN (2*STM32_PCLK1_FREQUENCY)
#define STM32_APB1_TIM7_CLKIN (2*STM32_PCLK1_FREQUENCY)
/* USB divider -- Divide PLL clock by 1.5 */
#define STM32_CFGR_USBPRE 0
/* Timer Frequencies, if APBx is set to 1, frequency is same to APBx
* otherwise frequency is 2xAPBx.
* Note: TIM1,8 are on APB2, others on APB1
*/
#define BOARD_TIM1_FREQUENCY STM32_HCLK_FREQUENCY
#define BOARD_TIM2_FREQUENCY (STM32_HCLK_FREQUENCY / 2)
#define BOARD_TIM3_FREQUENCY (STM32_HCLK_FREQUENCY / 2)
#define BOARD_TIM4_FREQUENCY (STM32_HCLK_FREQUENCY / 2)
#define BOARD_TIM5_FREQUENCY (STM32_HCLK_FREQUENCY / 2)
#define BOARD_TIM6_FREQUENCY (STM32_HCLK_FREQUENCY / 2)
#define BOARD_TIM7_FREQUENCY (STM32_HCLK_FREQUENCY / 2)
#define BOARD_TIM8_FREQUENCY STM32_HCLK_FREQUENCY
/* Alternate function pin selections ************************************************/
/* UARTs */
#define GPIO_USART1_TX GPIO_USART1_TX_1 /* PA9 */
#define GPIO_USART1_RX GPIO_USART1_RX_1 /* PA10 */
#define GPIO_USART2_TX GPIO_USART2_TX_2 /* PA2 */
#define GPIO_USART2_RX GPIO_USART2_RX_2 /* PA3 */
/* CAN */
#define GPIO_CAN1_RX GPIO_CAN_RX_2 /* PA11 */
#define GPIO_CAN1_TX GPIO_CAN_TX_2 /* PA12 */
/* I2C */
#define GPIO_I2C1_SCL GPIO_I2C1_SCL_2 /* PB6 */
#define GPIO_I2C1_SDA GPIO_I2C1_SDA_2 /* PB7 */
/* SPI */
#define GPIO_SPI1_SCK GPIO_SPI1_SCK_1 /* PA5 */
#define GPIO_SPI1_MISO GPIO_SPI1_MISO_1 /* PA6 */
#define GPIO_SPI1_MOSI GPIO_SPI1_MOSI_1 /* PA7 */
#endif /* __ARCH_BOARD_BOARD_H */
@@ -0,0 +1,45 @@
/****************************************************************************
*
* Copyright (c) 2021 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.
*
****************************************************************************/
#pragma once
// DMA1 Channel/Stream Selections
//--------------------------------------------//---------------------------//----------------
// DMA2 Channel/Stream Selections
//--------------------------------------------//---------------------------//----------------
#define DMACHAN_SPI1_RX DMAMAP_SPI1_RX_2 // DMA2, Stream 2, Channel 3
#define DMACHAN_SPI2_RX DMAMAP_SPI2_RX // DMA2, Stream 3, Channel 0
#define DMACHAN_SPI2_TX DMAMAP_SPI2_TX // DMA2, Stream 4, Channel 0
#define DMACHAN_SPI1_TX DMAMAP_SPI1_TX_1 // DMA2, Stream 5, Channel 3
@@ -0,0 +1,148 @@
#
# This file is autogenerated: PLEASE DO NOT EDIT IT.
#
# You can use "make menuconfig" to make any modifications to the installed .config file.
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
# modifications.
#
# CONFIG_DISABLE_OS_API is not set
# CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set
# CONFIG_NSH_DISABLEBG is not set
# CONFIG_NSH_DISABLESCRIPT is not set
# CONFIG_NSH_DISABLE_DF is not set
# CONFIG_NSH_DISABLE_EXEC is not set
# CONFIG_NSH_DISABLE_EXIT is not set
# CONFIG_NSH_DISABLE_GET is not set
# CONFIG_NSH_DISABLE_ITEF is not set
# CONFIG_NSH_DISABLE_LOOPS is not set
# CONFIG_NSH_DISABLE_SEMICOLON is not set
# CONFIG_NSH_DISABLE_TIME is not set
CONFIG_ARCH="arm"
CONFIG_ARCH_BOARD_CUSTOM=y
CONFIG_ARCH_BOARD_CUSTOM_DIR="../nuttx-config"
CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y
CONFIG_ARCH_BOARD_CUSTOM_NAME="px4"
CONFIG_ARCH_CHIP="stm32"
CONFIG_ARCH_CHIP_STM32=y
CONFIG_ARCH_CHIP_STM32F303CC=y
CONFIG_ARCH_INTERRUPTSTACK=512
CONFIG_ARCH_STACKDUMP=y
CONFIG_BOARDCTL_RESET=y
CONFIG_BOARD_LOOPSPERMSEC=6522
CONFIG_BOARD_RESET_ON_ASSERT=2
CONFIG_BUILTIN=y
CONFIG_C99_BOOL8=y
CONFIG_CLOCK_MONOTONIC=y
CONFIG_DEBUG_FULLOPT=y
CONFIG_DEBUG_HARDFAULT_ALERT=y
CONFIG_DEBUG_SYMBOLS=y
CONFIG_DEFAULT_SMALL=y
CONFIG_DEV_FIFO_SIZE=0
CONFIG_DEV_PIPE_MAXSIZE=1024
CONFIG_DEV_PIPE_SIZE=70
CONFIG_FDCLONE_STDIO=y
CONFIG_FS_BINFS=y
CONFIG_FS_CROMFS=y
CONFIG_FS_FAT=y
CONFIG_FS_FATTIME=y
CONFIG_FS_PROCFS=y
CONFIG_FS_PROCFS_INCLUDE_PROGMEM=y
CONFIG_FS_PROCFS_REGISTER=y
CONFIG_FS_ROMFS=y
CONFIG_GRAN=y
CONFIG_GRAN_INTR=y
CONFIG_HAVE_CXX=y
CONFIG_HAVE_CXXINITIALIZE=y
CONFIG_I2C=y
CONFIG_I2C_RESET=y
CONFIG_IDLETHREAD_STACKSIZE=750
CONFIG_LIBC_FLOATINGPOINT=y
CONFIG_LIBC_LONG_LONG=y
CONFIG_LIBC_STRERROR=y
CONFIG_MEMSET_64BIT=y
CONFIG_MEMSET_OPTSPEED=y
CONFIG_MTD=y
CONFIG_MTD_BYTE_WRITE=y
CONFIG_MTD_PARTITION=y
CONFIG_MTD_RAMTRON=y
CONFIG_NAME_MAX=40
CONFIG_NFILE_DESCRIPTORS=12
CONFIG_NSH_ARCHINIT=y
CONFIG_NSH_ARCHROMFS=y
CONFIG_NSH_ARGCAT=y
CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_CMDPARMS=y
CONFIG_NSH_CROMFSETC=y
CONFIG_NSH_DISABLE_IFCONFIG=y
CONFIG_NSH_DISABLE_IFUPDOWN=y
CONFIG_NSH_DISABLE_MB=y
CONFIG_NSH_DISABLE_MH=y
CONFIG_NSH_DISABLE_MW=y
CONFIG_NSH_DISABLE_TELNETD=y
CONFIG_NSH_LINELEN=128
CONFIG_NSH_MAXARGUMENTS=15
CONFIG_NSH_NESTDEPTH=8
CONFIG_NSH_QUOTE=y
CONFIG_NSH_ROMFSETC=y
CONFIG_NSH_ROMFSSECTSIZE=128
CONFIG_NSH_STRERROR=y
CONFIG_NSH_VARS=y
CONFIG_PIPES=y
CONFIG_PREALLOC_TIMERS=50
CONFIG_PRIORITY_INHERITANCE=y
CONFIG_PTHREAD_MUTEX_ROBUST=y
CONFIG_PTHREAD_STACK_MIN=512
CONFIG_RAM_SIZE=65536
CONFIG_RAM_START=0x20000000
CONFIG_RAW_BINARY=y
CONFIG_RTC_DATETIME=y
CONFIG_SCHED_ATEXIT=y
CONFIG_SCHED_HPWORK=y
CONFIG_SCHED_HPWORKPRIORITY=249
CONFIG_SCHED_HPWORKSTACKSIZE=1280
CONFIG_SCHED_INSTRUMENTATION=y
CONFIG_SCHED_INSTRUMENTATION_EXTERNAL=y
CONFIG_SCHED_LPWORK=y
CONFIG_SCHED_LPWORKPRIORITY=50
CONFIG_SCHED_LPWORKSTACKSIZE=1632
CONFIG_SCHED_WAITPID=y
CONFIG_SEM_NNESTPRIO=8
CONFIG_SEM_PREALLOCHOLDERS=0
CONFIG_SERIAL_TERMIOS=y
CONFIG_SIG_DEFAULT=y
CONFIG_SIG_SIGALRM_ACTION=y
CONFIG_SIG_SIGUSR1_ACTION=y
CONFIG_SIG_SIGUSR2_ACTION=y
CONFIG_SIG_SIGWORK=4
CONFIG_STACK_COLORATION=y
CONFIG_START_DAY=30
CONFIG_START_MONTH=11
CONFIG_STDIO_BUFFER_SIZE=32
CONFIG_STM32_ADC1=y
CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y
CONFIG_STM32_DMA1=y
CONFIG_STM32_DMA2=y
CONFIG_STM32_FLOWCONTROL_BROKEN=y
CONFIG_STM32_I2C1=y
CONFIG_STM32_JTAG_SW_ENABLE=y
CONFIG_STM32_PWR=y
CONFIG_STM32_RTC=y
CONFIG_STM32_RTC_HSECLOCK=y
CONFIG_STM32_RTC_MAGIC=0xfacefeee
CONFIG_STM32_RTC_MAGIC_REG=1
CONFIG_STM32_RTC_MAGIC_TIME_SET=0xfacefeef
CONFIG_STM32_SERIALBRK_BSDCOMPAT=y
CONFIG_STM32_SERIAL_DISABLE_REORDERING=y
CONFIG_STM32_SPI1=y
CONFIG_STM32_TIM8=y
CONFIG_STM32_USART1=y
CONFIG_STM32_USART2=y
CONFIG_STM32_USART_BREAKS=y
CONFIG_STM32_WWDG=y
CONFIG_SYSTEM_NSH=y
CONFIG_TASK_NAME_SIZE=24
CONFIG_USART2_BAUD=57600
CONFIG_USART2_SERIAL_CONSOLE=y
CONFIG_USEC_PER_TICK=1000
CONFIG_USERMAIN_STACKSIZE=2624
CONFIG_USER_ENTRYPOINT="nsh_main"
@@ -0,0 +1,134 @@
/****************************************************************************
* nuttx-config/scripts/canbootloader_script.ld
*
* Copyright (C) 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* 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 NuttX 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.
*
****************************************************************************/
/* The STM32F412 has 512Kb of FLASH beginning at address 0x0800:0000 and
* 256Kb of SRAM. SRAM is split up into three blocks:
*
* 1) 112Kb of SRAM beginning at address 0x2000:0000
* 2) 16Kb of SRAM beginning at address 0x2001:c000
* 3) 64Kb of SRAM beginning at address 0x2002:0000
* 4) 64Kb of TCM SRAM beginning at address 0x1000:0000
*
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
* where the code expects to begin execution by jumping to the entry point in
* the 0x0800:0000 address range.
*
* The first 0x10000 of flash is reserved for the bootloader.
*/
MEMORY
{
flash (rx) : ORIGIN = 0x08000000, LENGTH = 32K
sram (rwx) : ORIGIN = 0x20000000, LENGTH = 192K
}
OUTPUT_ARCH(arm)
ENTRY(__start) /* treat __start as the anchor for dead code stripping */
EXTERN(_vectors) /* force the vectors to be included in the output */
/*
* Ensure that abort() is present in the final object. The exception handling
* code pulled in by libgcc.a requires it (and that code cannot be easily avoided).
*/
EXTERN(abort)
SECTIONS
{
.text : {
_stext = ABSOLUTE(.);
*(.vectors)
*(.text .text.*)
*(.fixup)
*(.gnu.warning)
*(.rodata .rodata.*)
*(.gnu.linkonce.t.*)
*(.got)
*(.gcc_except_table)
*(.gnu.linkonce.r.*)
_etext = ABSOLUTE(.);
} > flash
/*
* Init functions (static constructors and the like)
*/
.init_section : {
_sinit = ABSOLUTE(.);
KEEP(*(.init_array .init_array.*))
_einit = ABSOLUTE(.);
} > flash
.ARM.extab : {
*(.ARM.extab*)
} > flash
__exidx_start = ABSOLUTE(.);
.ARM.exidx : {
*(.ARM.exidx*)
} > flash
__exidx_end = ABSOLUTE(.);
_eronly = ABSOLUTE(.);
.data : {
_sdata = ABSOLUTE(.);
*(.data .data.*)
*(.gnu.linkonce.d.*)
CONSTRUCTORS
_edata = ABSOLUTE(.);
} > sram AT > flash
.bss : {
_sbss = ABSOLUTE(.);
*(.bss .bss.*)
*(.gnu.linkonce.b.*)
*(COMMON)
. = ALIGN(4);
_ebss = ABSOLUTE(.);
} > sram
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { *(.comment) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_info 0 : { *(.debug_info) }
.debug_line 0 : { *(.debug_line) }
.debug_pubnames 0 : { *(.debug_pubnames) }
.debug_aranges 0 : { *(.debug_aranges) }
}
@@ -0,0 +1,146 @@
/****************************************************************************
* scripts/ld.script
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* 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 NuttX 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.
*
****************************************************************************/
/* The STM32F412 has 512Kb of FLASH beginning at address 0x0800:0000 and
* 256Kb of SRAM. SRAM is split up into three blocks:
*
* 1) 112Kb of SRAM beginning at address 0x2000:0000
* 2) 16Kb of SRAM beginning at address 0x2001:c000
* 3) 64Kb of SRAM beginning at address 0x2002:0000
* 4) 64Kb of TCM SRAM beginning at address 0x1000:0000
*
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
* where the code expects to begin execution by jumping to the entry point in
* the 0x0800:0000 address range.
*
* The first 0x10000 of flash is reserved for the bootloader.
*/
MEMORY
{
flash (rx) : ORIGIN = 0x08010000, LENGTH = 256K
sram (rwx) : ORIGIN = 0x20000000, LENGTH = 64K
}
OUTPUT_ARCH(arm)
ENTRY(__start) /* treat __start as the anchor for dead code stripping */
EXTERN(_vectors) /* force the vectors to be included in the output */
/*
* Ensure that abort() is present in the final object. The exception handling
* code pulled in by libgcc.a requires it (and that code cannot be easily avoided).
*/
EXTERN(abort)
EXTERN(_bootdelay_signature)
SECTIONS
{
.text : {
_stext = ABSOLUTE(.);
*(.vectors)
. = ALIGN(8);
/*
* This section positions the app_descriptor_t used
* by the make_can_boot_descriptor.py tool to set
* the application image's descriptor so that the
* uavcan bootloader has the ability to validate the
* image crc, size etc
*/
KEEP(*(.app_descriptor))
*(.text .text.*)
*(.fixup)
*(.gnu.warning)
*(.rodata .rodata.*)
*(.gnu.linkonce.t.*)
*(.got)
*(.gcc_except_table)
*(.gnu.linkonce.r.*)
_etext = ABSOLUTE(.);
} > flash
/*
* Init functions (static constructors and the like)
*/
.init_section : {
_sinit = ABSOLUTE(.);
KEEP(*(.init_array .init_array.*))
_einit = ABSOLUTE(.);
} > flash
.ARM.extab : {
*(.ARM.extab*)
} > flash
__exidx_start = ABSOLUTE(.);
.ARM.exidx : {
*(.ARM.exidx*)
} > flash
__exidx_end = ABSOLUTE(.);
_eronly = ABSOLUTE(.);
.data : {
_sdata = ABSOLUTE(.);
*(.data .data.*)
*(.gnu.linkonce.d.*)
CONSTRUCTORS
_edata = ABSOLUTE(.);
} > sram AT > flash
.bss : {
_sbss = ABSOLUTE(.);
*(.bss .bss.*)
*(.gnu.linkonce.b.*)
*(COMMON)
. = ALIGN(4);
_ebss = ABSOLUTE(.);
} > sram
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { *(.comment) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_info 0 : { *(.debug_info) }
.debug_line 0 : { *(.debug_line) }
.debug_pubnames 0 : { *(.debug_pubnames) }
.debug_aranges 0 : { *(.debug_aranges) }
}
+63
View File
@@ -0,0 +1,63 @@
############################################################################
#
# 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.
#
############################################################################
if("${PX4_BOARD_LABEL}" STREQUAL "canbootloader")
add_library(drivers_board
boot_config.h
boot.c
led.c
)
target_link_libraries(drivers_board
PRIVATE
nuttx_arch
nuttx_drivers
canbootloader
)
target_include_directories(drivers_board PRIVATE ${PX4_SOURCE_DIR}/platforms/nuttx/src/canbootloader)
else()
add_library(drivers_board
i2c.cpp
init.c
spi.cpp
)
target_link_libraries(drivers_board
PRIVATE
nuttx_arch
nuttx_drivers
px4_layer
arch_spi
)
endif()
@@ -30,49 +30,41 @@
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/**
* @author Mengxiao Li <mengxiao@cuav.net>
*/
/**
* @file board_config.h
*
* board internal definitions
*/
#pragma once
#include "sensor_bridge.hpp"
#include <uORB/topics/battery_status.h>
#include <cuav/equipment/power/CBAT.hpp>
#include <drivers/drv_hrt.h>
#include <px4_platform_common/module_params.h>
#include <mathlib/mathlib.h>
#include <px4_platform_common/px4_config.h>
#include <nuttx/compiler.h>
#include <stdint.h>
class UavcanCBATBridge : public UavcanSensorBridgeBase, public ModuleParams
{
public:
static const char *const NAME;
/* Boot config */
#define GPIO_BOOT_CONFIG /* PC15 */ (GPIO_INPUT|GPIO_PULLUP|GPIO_PORTC|GPIO_PIN15|GPIO_EXTI)
UavcanCBATBridge(uavcan::INode &node);
/* LEDs are driven with push open drain to support Anode to 5V or 3.3V */
#define GPIO_LED_BLUE /* PA4 */ (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTA|GPIO_PIN8)
const char *get_name() const override { return NAME; }
#define GPIO_BTN_SAFETY (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTC|GPIO_PIN13)
int init() override;
//#define FLASH_BASED_PARAMS
private:
/* High-resolution timer */
#define HRT_TIMER 3 /* use timer 3 for the HRT */
#define HRT_TIMER_CHANNEL 4 /* use capture/compare channel 4 */
void battery_sub_cb(const uavcan::ReceivedDataStructure<cuav::equipment::power::CBAT> &msg);
void determineWarning(float remaining);
__BEGIN_DECLS
typedef uavcan::MethodBinder < UavcanCBATBridge *,
void (UavcanCBATBridge::*)
(const uavcan::ReceivedDataStructure<cuav::equipment::power::CBAT> &) >
CBATCbBinder;
#ifndef __ASSEMBLY__
uavcan::Subscriber<cuav::equipment::power::CBAT, CBATCbBinder> _sub_battery;
extern void stm32_spiinitialize(void);
DEFINE_PARAMETERS(
(ParamFloat<px4::params::BAT_LOW_THR>) _param_bat_low_thr,
(ParamFloat<px4::params::BAT_CRIT_THR>) _param_bat_crit_thr,
(ParamFloat<px4::params::BAT_EMERGEN_THR>) _param_bat_emergen_thr
)
#include <px4_platform_common/board_common.h>
uint8_t _warning;
float _max_cell_voltage_delta = 0.f;
};
#endif /* __ASSEMBLY__ */
__END_DECLS
+197
View File
@@ -0,0 +1,197 @@
/****************************************************************************
*
* Copyright (c) 2021 PX4 Development Team. All rights reserved.
* Author: Ben Dyer <ben_dyer@mac.com>
* Pavel Kirienko <pavel.kirienko@zubax.com>
* David Sidrane <david_s5@nscdg.com>
*
* 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.
*
****************************************************************************/
/****************************************************************************
* Included Files
****************************************************************************/
#include <px4_config.h>
#include <stdint.h>
#include "boot_config.h"
#include "board.h"
#include <debug.h>
#include <string.h>
#include <arch/board/board.h>
#include <nuttx/board.h>
/************************************************************************************
* Name: stm32_boardinitialize
*
* Description:
* All STM32 architectures must provide the following entry point. This entry point
* is called early in the initialization -- after all memory has been configured
* and mapped but before any devices have been initialized.
*
************************************************************************************/
__EXPORT void stm32_boardinitialize(void)
{
putreg32(getreg32(STM32_RCC_APB1ENR) | RCC_APB1ENR_CAN1EN, STM32_RCC_APB1ENR);
stm32_configgpio(GPIO_CAN1_RX);
stm32_configgpio(GPIO_CAN1_TX);
putreg32(getreg32(STM32_RCC_APB1RSTR) | RCC_APB1RSTR_CAN1RST, STM32_RCC_APB1RSTR);
putreg32(getreg32(STM32_RCC_APB1RSTR) & ~RCC_APB1RSTR_CAN1RST, STM32_RCC_APB1RSTR);
#if defined(OPT_WAIT_FOR_GETNODEINFO_JUMPER_GPIO)
stm32_configgpio(GPIO_GETNODEINFO_JUMPER);
#endif
}
/************************************************************************************
* Name: board_deinitialize
*
* Description:
* This function is called by the bootloader code prior to booting
* the application. Is should place the HW into an benign initialized state.
*
************************************************************************************/
void board_deinitialize(void)
{
putreg32(getreg32(STM32_RCC_APB1RSTR) | RCC_APB1RSTR_CAN1RST, STM32_RCC_APB1RSTR);
}
/****************************************************************************
* Name: board_get_product_name
*
* Description:
* Called to retrieve the product name. The returned value is a assumed
* to be written to a pascal style string that will be length prefixed
* and not null terminated
*
* Input Parameters:
* product_name - A pointer to a buffer to write the name.
* maxlen - The maximum number of charter that can be written
*
* Returned Value:
* The length of characters written to the buffer.
*
****************************************************************************/
uint8_t board_get_product_name(uint8_t *product_name, size_t maxlen)
{
DEBUGASSERT(maxlen > UAVCAN_STRLEN(HW_UAVCAN_NAME));
memcpy(product_name, HW_UAVCAN_NAME, UAVCAN_STRLEN(HW_UAVCAN_NAME));
return UAVCAN_STRLEN(HW_UAVCAN_NAME);
}
/****************************************************************************
* Name: board_get_hardware_version
*
* Description:
* Called to retrieve the hardware version information. The function
* will first initialize the the callers struct to all zeros.
*
* Input Parameters:
* hw_version - A pointer to a uavcan_hardwareversion_t.
*
* Returned Value:
* Length of the unique_id
*
****************************************************************************/
size_t board_get_hardware_version(uavcan_HardwareVersion_t *hw_version)
{
memset(hw_version, 0, sizeof(uavcan_HardwareVersion_t));
hw_version->major = HW_VERSION_MAJOR;
hw_version->minor = HW_VERSION_MINOR;
return board_get_mfguid(*(mfguid_t *) hw_version->unique_id);
}
/****************************************************************************
* Name: board_indicate
*
* Description:
* Provides User feedback to indicate the state of the bootloader
* on board specific hardware.
*
* Input Parameters:
* indication - A member of the uiindication_t
*
* Returned Value:
* None
*
****************************************************************************/
// #define led(n, code, r , g , b, h) {.red = (r),.green = (g), .blue = (b),.hz = (h)}
// typedef begin_packed_struct struct led_t {
// uint8_t red;
// uint8_t green;
// uint8_t blue;
// uint8_t hz;
// } end_packed_struct led_t;
// static const led_t i2l[] = {
// led(0, off, 0, 0, 0, 0),
// led(1, reset, 128, 128, 128, 30),
// led(2, autobaud_start, 0, 128, 0, 1),
// led(3, autobaud_end, 0, 128, 0, 2),
// led(4, allocation_start, 0, 0, 64, 2),
// led(5, allocation_end, 0, 128, 64, 3),
// led(6, fw_update_start, 32, 128, 64, 3),
// led(7, fw_update_erase_fail, 32, 128, 32, 3),
// led(8, fw_update_invalid_response, 64, 0, 0, 1),
// led(9, fw_update_timeout, 64, 0, 0, 2),
// led(a, fw_update_invalid_crc, 64, 0, 0, 4),
// led(b, jump_to_app, 0, 128, 0, 10),
// };
void board_indicate(uiindication_t indication)
{
// switch(indication) {
// case off:
// led_off(GPIO_nLED_RED);
// led_off(GPIO_nLED_BLUE);
// break;
// case reset:
// led_on(GPIO_nLED_RED);
// led_on(GPIO_nLED_BLUE);
// break;
// case jump_to_app:
// led_on(GPIO_nLED_RED);
// led_off(GPIO_nLED_BLUE);
// break;
// default:
// break;
// }
}
+130
View File
@@ -0,0 +1,130 @@
/****************************************************************************
*
* Copyright (c) 2021 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.
*
****************************************************************************/
/*
* @file boot_config.h
*
* bootloader definitions that configures the behavior and options
* of the Boot loader
* This file is relies on the parent folder's boot_config.h file and defines
* different usages of the hardware for bootloading
*/
#pragma once
/************************************************************************************
* Included Files
************************************************************************************/
/* Bring in the board_config.h definitions
* todo:make this be pulled in from a targed's build
* files in nuttx*/
#include "board_config.h"
#include "uavcan.h"
#include <nuttx/compiler.h>
#include <stdint.h>
#include <stm32_flash.h>
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
#define OPT_PREFERRED_NODE_ID ANY_NODE_ID
//todo:wrap OPT_x in in ifdefs for command line definitions
#define OPT_TBOOT_MS 5000
#define OPT_NODE_STATUS_RATE_MS 800
#define OPT_NODE_INFO_RATE_MS 50
#define OPT_BL_NUMBER_TIMERS 7
/*
* This Option set is set to 1 ensure a provider of firmware has an
* opportunity update the node's firmware.
* This Option is the default policy and can be overridden by
* a jumper
* When this Policy is set, the node will ignore tboot and
* wait indefinitely for a GetNodeInfo request before booting.
*
* OPT_WAIT_FOR_GETNODEINFO_JUMPER_GPIO_INVERT is used to allow
* the polarity of the jumper to be True Active
*
* wait OPT_WAIT_FOR_GETNODEINFO OPT_WAIT_FOR_GETNODEINFO_JUMPER_GPIO
* Jumper
* yes 1 0 x
* yes 1 1 Active
* no 1 1 Not Active
* no 0 0 X
* yes 0 1 Active
* no 0 1 Not Active
*
*/
#define OPT_WAIT_FOR_GETNODEINFO 0
#define OPT_WAIT_FOR_GETNODEINFO_JUMPER_GPIO 1
#define OPT_WAIT_FOR_GETNODEINFO_JUMPER_GPIO_INVERT 0
#define OPT_ENABLE_WD 1
#define OPT_RESTART_TIMEOUT_MS 20000
/* Reserved for the Booloader */
#define OPT_BOOTLOADER_SIZE_IN_K (1024*64)
/* Reserved for the application out of the total
* system flash minus the BOOTLOADER_SIZE_IN_K
*/
#define OPT_APPLICATION_RESERVER_IN_K 0
#define OPT_APPLICATION_IMAGE_OFFSET OPT_BOOTLOADER_SIZE_IN_K
#define OPT_APPLICATION_IMAGE_LENGTH (FLASH_SIZE-(OPT_BOOTLOADER_SIZE_IN_K+OPT_APPLICATION_RESERVER_IN_K))
#define FLASH_BASE STM32_FLASH_BASE
#define FLASH_SIZE STM32_FLASH_SIZE
#define APPLICATION_LOAD_ADDRESS (FLASH_BASE + OPT_APPLICATION_IMAGE_OFFSET)
#define APPLICATION_SIZE (FLASH_SIZE-OPT_APPLICATION_IMAGE_OFFSET)
#define APPLICATION_LAST_8BIT_ADDRRESS ((uint8_t *)((APPLICATION_LOAD_ADDRESS+APPLICATION_SIZE)-sizeof(uint8_t)))
#define APPLICATION_LAST_32BIT_ADDRRESS ((uint32_t *)((APPLICATION_LOAD_ADDRESS+APPLICATION_SIZE)-sizeof(uint32_t)))
#define APPLICATION_LAST_64BIT_ADDRRESS ((uint64_t *)((APPLICATION_LOAD_ADDRESS+APPLICATION_SIZE)-sizeof(uint64_t)))
/* If this board uses big flash that have large sectors */
#define OPT_USE_YIELD
/* Bootloader Option*****************************************************************
*
*/
#define GPIO_GETNODEINFO_JUMPER (GPIO_BOOT_CONFIG & ~GPIO_EXTI)
+38
View File
@@ -0,0 +1,38 @@
/****************************************************************************
*
* Copyright (C) 2021 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.
*
****************************************************************************/
#include <px4_arch/i2c_hw_description.h>
constexpr px4_i2c_bus_t px4_i2c_buses[I2C_BUS_MAX_BUS_ITEMS] = {
initI2CBusExternal(1),
};
+141
View File
@@ -0,0 +1,141 @@
/****************************************************************************
*
* Copyright (c) 2021 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.
*
****************************************************************************/
/**
* @file init.c
*
* board specific early startup code. This file implements the
* board_app_initialize() function that is called early by nsh during startup.
*
* Code here is run before the rcS script is invoked; it should start required
* subsystems and perform board-specific initialization.
*/
#include <px4_platform_common/px4_config.h>
#include <px4_platform_common/tasks.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <debug.h>
#include <errno.h>
#include <nuttx/board.h>
#include <stm32.h>
#include "board_config.h"
#include <stm32_uart.h>
#include <arch/board/board.h>
#include <drivers/drv_hrt.h>
#include <drivers/drv_board_led.h>
#include <systemlib/px4_macros.h>
#include <px4_platform_common/init.h>
# if defined(FLASH_BASED_PARAMS)
# include <parameters/flashparams/flashfs.h>
#endif
/************************************************************************************
* Name: stm32_boardinitialize
*
* Description:
* All STM32 architectures must provide the following entry point. This entry point
* is called early in the initialization -- after all memory has been configured
* and mapped but before any devices have been initialized.
*
************************************************************************************/
__EXPORT void stm32_boardinitialize(void)
{
// Configure CAN interface
stm32_configgpio(GPIO_CAN1_RX);
stm32_configgpio(GPIO_CAN1_TX);
// Configure SPI all interfaces GPIO & enable power.
stm32_spiinitialize();
}
/****************************************************************************
* Name: board_app_initialize
*
* Description:
* Perform application specific initialization. This function is never
* called directly from application code, but only indirectly via the
* (non-standard) boardctl() interface using the command BOARDIOC_INIT.
*
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/
__EXPORT int board_app_initialize(uintptr_t arg)
{
px4_platform_init();
#if defined(FLASH_BASED_PARAMS)
static sector_descriptor_t params_sector_map[] = {
{2, 16 * 1024, 0x08008000},
{3, 16 * 1024, 0x0800C000},
{0, 0, 0},
};
/* Initialize the flashfs layer to use heap allocated memory */
int result = parameter_flashfs_init(params_sector_map, NULL, 0);
if (result != OK) {
syslog(LOG_ERR, "[boot] FAILED to init params in FLASH %d\n", result);
return -ENODEV;
}
#endif // FLASH_BASED_PARAMS
//px4_platform_configure();
return OK;
}
@@ -32,42 +32,71 @@
****************************************************************************/
/**
* @file VescSerialDevice.hpp
* @brief PX4 serial motor output device using VescDriver for core protocol
* @author Matthias Grob <maetugr@gmail.com>
* @file led.c
*
* board LED backend.
*/
#include "VescDriver/VescDriver.hpp"
#include <drivers/device/device.h>
#include <drivers/drv_mixer.h>
#include <lib/cdev/CDev.hpp>
#include <lib/mixer_module/mixer_module.hpp>
#include <px4_platform_common/px4_work_queue/ScheduledWorkItem.hpp>
#include <px4_platform_common/px4_config.h>
class VescDevice : public VescWritableInterface, public cdev::CDev, public OutputModuleInterface
{
public:
VescDevice(const char *port);
~VescDevice();
int init();
void printStatus();
int ioctl(device::file_t *filp, int cmd, unsigned long arg);
#include <stdbool.h>
private:
void Run();
size_t writeCallback(const uint8_t *buffer, const uint16_t length) override;
int setBaudrate(const unsigned baudrate);
bool updateOutputs(bool stop_motors, uint16_t outputs[MAX_ACTUATORS], unsigned num_outputs,
unsigned num_control_groups_updated) override;
#include "stm32.h"
#include "board_config.h"
static constexpr size_t READ_BUFFER_SIZE{256};
static constexpr int DISARM_VALUE = 0;
static constexpr int MIN_THROTTLE = 100;
static constexpr int MAX_THROTTLE = 1000;
#include <arch/board/board.h>
char _port[20] {};
int _serial_fd{-1};
VescDriver _vesc_driver;
MixingOutput _mixing_output{4, *this, MixingOutput::SchedulingPolicy::Auto, false, false};
perf_counter_t _cycle_perf{perf_alloc(PC_ELAPSED, MODULE_NAME": cycle")};
/*
* Ideally we'd be able to get these from up_internal.h,
* but since we want to be able to disable the NuttX use
* of leds for system indication at will and there is no
* separate switch, we need to build independent of the
* CONFIG_ARCH_LEDS configuration switch.
*/
__BEGIN_DECLS
extern void led_init(void);
extern void led_on(int led);
extern void led_off(int led);
extern void led_toggle(int led);
__END_DECLS
static uint32_t g_ledmap[] = {
//GPIO_LED_RED,
GPIO_LED_BLUE,
};
__EXPORT void led_init(void)
{
/* Configure LED GPIOs for output */
for (size_t l = 0; l < (sizeof(g_ledmap) / sizeof(g_ledmap[0])); l++) {
stm32_configgpio(g_ledmap[l]);
stm32_gpiowrite(g_ledmap[l], true);
}
}
static void phy_set_led(int led, bool state)
{
/* Pull Down to switch on */
stm32_gpiowrite(g_ledmap[led], !state);
}
static bool phy_get_led(int led)
{
return !stm32_gpioread(g_ledmap[led]);
}
__EXPORT void led_on(int led)
{
phy_set_led(led, true);
}
__EXPORT void led_off(int led)
{
phy_set_led(led, false);
}
__EXPORT void led_toggle(int led)
{
phy_set_led(led, !phy_get_led(led));
}
+44
View File
@@ -0,0 +1,44 @@
/****************************************************************************
*
* Copyright (C) 2021 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.
*
****************************************************************************/
#include <px4_arch/spi_hw_description.h>
#include <drivers/drv_sensor.h>
#include <nuttx/spi/spi.h>
constexpr px4_spi_bus_t px4_spi_buses[SPI_BUS_MAX_BUS_ITEMS] = {
initSPIBus(SPI::Bus::SPI1, {
initSPIDevice(DRV_DEVTYPE_UNUSED, SPI::CS{GPIO::PortB, GPIO::Pin0}),
}),
};
static constexpr bool unused = validateSPIConfig(px4_spi_buses);
+17
View File
@@ -0,0 +1,17 @@
# UAVCAN boot loadable Module ID
set(uavcanblid_sw_version_major 0)
set(uavcanblid_sw_version_minor 1)
add_definitions(
-DAPP_VERSION_MAJOR=${uavcanblid_sw_version_major}
-DAPP_VERSION_MINOR=${uavcanblid_sw_version_minor}
)
set(uavcanblid_hw_version_major 0x3)
set(uavcanblid_hw_version_minor 0xEC)
set(uavcanblid_name "\"org.ardupilot.mro_m10025\"")
add_definitions(
-DHW_UAVCAN_NAME=${uavcanblid_name}
-DHW_VERSION_MAJOR=${uavcanblid_hw_version_major}
-DHW_VERSION_MINOR=${uavcanblid_hw_version_minor}
)
+13 -10
View File
@@ -7,6 +7,7 @@ px4_add_board(
TOOLCHAIN arm-none-eabi
ARCHITECTURE cortex-m7
ROMFSROOT px4fmu_common
TESTING
UAVCAN_INTERFACES 2
SERIAL_PORTS
TEL1:/dev/ttyS0
@@ -49,6 +50,7 @@ px4_add_board(
rpm
safety_button
telemetry # all available telemetry drivers
test_ppm
tone_alarm
uavcan
MODULES
@@ -110,6 +112,7 @@ px4_add_board(
sd_bench
serial_test
system_time
tests # tests and test runner
top
topic_listener
tune_control
@@ -119,15 +122,15 @@ px4_add_board(
work_queue
EXAMPLES
fake_gps
#fake_gyro
#fake_magnetometer
#fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
#hello
#hwtest # Hardware test
fake_gyro
fake_magnetometer
fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
hello
hwtest # Hardware test
#matlab_csv_serial
#px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
#px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
#rover_steering_control # Rover example app
#uuv_example_app
#work_item
px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
rover_steering_control # Rover example app
uuv_example_app
work_item
)
+13 -10
View File
@@ -7,6 +7,7 @@ px4_add_board(
TOOLCHAIN arm-none-eabi
ARCHITECTURE cortex-m7
ROMFSROOT px4fmu_common
TESTING
UAVCAN_INTERFACES 1
SERIAL_PORTS
TEL1:/dev/ttyS0
@@ -49,6 +50,7 @@ px4_add_board(
rpm
safety_button
telemetry # all available telemetry drivers
test_ppm
tone_alarm
uavcan
MODULES
@@ -110,6 +112,7 @@ px4_add_board(
sd_bench
serial_test
system_time
tests # tests and test runner
top
topic_listener
tune_control
@@ -119,15 +122,15 @@ px4_add_board(
work_queue
EXAMPLES
fake_gps
#fake_gyro
#fake_magnetometer
#fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
#hello
#hwtest # Hardware test
fake_gyro
fake_magnetometer
fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
hello
hwtest # Hardware test
#matlab_csv_serial
#px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
#px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
#rover_steering_control # Rover example app
#uuv_example_app
#work_item
px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
rover_steering_control # Rover example app
uuv_example_app
work_item
)
@@ -108,6 +108,7 @@ px4_add_board(
sd_bench
serial_test
system_time
#tests # tests and test runner
top
topic_listener
tune_control
+1
View File
@@ -108,6 +108,7 @@ px4_add_board(
sd_bench
serial_test
system_time
#tests # tests and test runner
top
topic_listener
tune_control
+1
View File
@@ -109,6 +109,7 @@ px4_add_board(
sd_bench
serial_test
system_time
#tests # tests and test runner
top
topic_listener
tune_control
+3
View File
@@ -8,6 +8,7 @@ px4_add_board(
ARCHITECTURE cortex-m7
ROMFSROOT px4fmu_common
IO px4_io-v2_default
TESTING
UAVCAN_INTERFACES 1
SERIAL_PORTS
# IO DEBUG:/dev/ttyS0
@@ -49,6 +50,7 @@ px4_add_board(
roboclaw
rpm
telemetry # all available telemetry drivers
test_ppm
tone_alarm
uavcan
MODULES
@@ -110,6 +112,7 @@ px4_add_board(
sd_bench
serial_test
system_time
tests # tests and test runner
top
topic_listener
tune_control
+3
View File
@@ -9,6 +9,7 @@ px4_add_board(
CONSTRAINED_MEMORY
ROMFSROOT px4fmu_common
IO px4_io-v2_default
TESTING
UAVCAN_INTERFACES 1
SERIAL_PORTS
# IO DEBUG:/dev/ttyS0
@@ -50,6 +51,7 @@ px4_add_board(
roboclaw
rpm
telemetry # all available telemetry drivers
test_ppm
tone_alarm
uavcan
MODULES
@@ -111,6 +113,7 @@ px4_add_board(
sd_bench
serial_test
system_time
tests # tests and test runner
top
topic_listener
tune_control
+13 -10
View File
@@ -8,6 +8,7 @@ px4_add_board(
ARCHITECTURE cortex-m4
CONSTRAINED_MEMORY
ROMFSROOT px4fmu_common
TESTING
UAVCAN_INTERFACES 2
SERIAL_PORTS
GPS1:/dev/ttyS3
@@ -46,6 +47,7 @@ px4_add_board(
rpm
safety_button
telemetry # all available telemetry drivers
#test_ppm # NOT Portable YET
tone_alarm
uavcan
MODULES
@@ -106,6 +108,7 @@ px4_add_board(
sd_bench
serial_test
system_time
tests # tests and test runner
top
topic_listener
tune_control
@@ -115,15 +118,15 @@ px4_add_board(
work_queue
EXAMPLES
fake_gps
#fake_gyro
#fake_magnetometer
#fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
#hello
#hwtest # Hardware test
fake_gyro
fake_magnetometer
fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
hello
hwtest # Hardware test
#matlab_csv_serial
#px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
#px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
#rover_steering_control # Rover example app
#uuv_example_app
#work_item
px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
rover_steering_control # Rover example app
uuv_example_app
work_item
)
+12 -10
View File
@@ -8,6 +8,7 @@ px4_add_board(
ARCHITECTURE cortex-m4
CONSTRAINED_MEMORY
ROMFSROOT px4fmu_common
TESTING
UAVCAN_INTERFACES 2
SERIAL_PORTS
GPS1:/dev/ttyS3
@@ -46,6 +47,7 @@ px4_add_board(
rpm
safety_button
telemetry # all available telemetry drivers
#test_ppm # NOT Portable YET
tone_alarm
uavcan
MODULES
@@ -116,15 +118,15 @@ px4_add_board(
work_queue
EXAMPLES
fake_gps
#fake_gyro
#fake_magnetometer
#fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
#hello
#hwtest # Hardware test
fake_gyro
fake_magnetometer
fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
hello
hwtest # Hardware test
#matlab_csv_serial
#px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
#px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
#rover_steering_control # Rover example app
#uuv_example_app
#work_item
px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
rover_steering_control # Rover example app
uuv_example_app
work_item
)
+12 -10
View File
@@ -8,6 +8,7 @@ px4_add_board(
ARCHITECTURE cortex-m4
CONSTRAINED_MEMORY
ROMFSROOT px4fmu_common
TESTING
UAVCAN_INTERFACES 2
SERIAL_PORTS
GPS1:/dev/ttyS3
@@ -46,6 +47,7 @@ px4_add_board(
rpm
safety_button
telemetry # all available telemetry drivers
#test_ppm # NOT Portable YET
tone_alarm
#uavcannode_v1
MODULES
@@ -116,15 +118,15 @@ px4_add_board(
work_queue
EXAMPLES
fake_gps
#fake_gyro
#fake_magnetometer
#fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
#hello
#hwtest # Hardware test
fake_gyro
fake_magnetometer
fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
hello
hwtest # Hardware test
#matlab_csv_serial
#px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
#px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
#rover_steering_control # Rover example app
#uuv_example_app
#work_item
px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
rover_steering_control # Rover example app
uuv_example_app
work_item
)
+12 -10
View File
@@ -8,6 +8,7 @@ px4_add_board(
ARCHITECTURE cortex-m4
CONSTRAINED_MEMORY
ROMFSROOT px4fmu_common
TESTING
UAVCAN_INTERFACES 2
SERIAL_PORTS
GPS1:/dev/ttyS3
@@ -106,6 +107,7 @@ px4_add_board(
sd_bench
serial_test
system_time
tests # tests and test runner
top
topic_listener
tune_control
@@ -115,15 +117,15 @@ px4_add_board(
work_queue
EXAMPLES
fake_gps
#fake_gyro
#fake_magnetometer
#fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
#hello
#hwtest # Hardware test
fake_gyro
fake_magnetometer
fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
hello
hwtest # Hardware test
#matlab_csv_serial
#px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
#px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
#rover_steering_control # Rover example app
#uuv_example_app
#work_item
px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
rover_steering_control # Rover example app
uuv_example_app
work_item
)
+11 -10
View File
@@ -8,6 +8,7 @@ px4_add_board(
ARCHITECTURE cortex-m4
CONSTRAINED_MEMORY
ROMFSROOT px4fmu_common
TESTING
UAVCAN_INTERFACES 2
SERIAL_PORTS
GPS1:/dev/ttyS3
@@ -116,15 +117,15 @@ px4_add_board(
work_queue
EXAMPLES
fake_gps
#fake_gyro
#fake_magnetometer
#fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
#hello
#hwtest # Hardware test
fake_gyro
fake_magnetometer
fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
hello
hwtest # Hardware test
#matlab_csv_serial
#px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
#px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
#rover_steering_control # Rover example app
#uuv_example_app
#work_item
px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
rover_steering_control # Rover example app
uuv_example_app
work_item
)
+11 -10
View File
@@ -8,6 +8,7 @@ px4_add_board(
ARCHITECTURE cortex-m4
CONSTRAINED_MEMORY
ROMFSROOT px4fmu_common
TESTING
UAVCAN_INTERFACES 2
SERIAL_PORTS
GPS1:/dev/ttyS3
@@ -116,15 +117,15 @@ px4_add_board(
work_queue
EXAMPLES
fake_gps
#fake_gyro
#fake_magnetometer
#fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
#hello
#hwtest # Hardware test
fake_gyro
fake_magnetometer
fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
hello
hwtest # Hardware test
#matlab_csv_serial
#px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
#px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
#rover_steering_control # Rover example app
#uuv_example_app
#work_item
px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
rover_steering_control # Rover example app
uuv_example_app
work_item
)
-131
View File
@@ -1,131 +0,0 @@
px4_add_board(
PLATFORM nuttx
VENDOR nxp
MODEL fmuk66-v3
LABEL test
TOOLCHAIN arm-none-eabi
ARCHITECTURE cortex-m4
CONSTRAINED_MEMORY
ROMFSROOT px4fmu_common
TESTING
UAVCAN_INTERFACES 2
SERIAL_PORTS
GPS1:/dev/ttyS3
TEL1:/dev/ttyS4
TEL2:/dev/ttyS1
DRIVERS
adc/ads1115
adc/board_adc
barometer # all available barometer drivers
barometer/mpl3115a2
batt_smbus
camera_capture
camera_trigger
differential_pressure # all available differential pressure drivers
distance_sensor # all available distance sensor drivers
distance_sensor/srf05 # Specific driver
gps
#imu # all available imu drivers
imu/fxas21002c
imu/fxos8701cq
imu/invensense/icm20948 # required for ak09916 mag
irlock
lights # all available light drivers
lights/rgbled_pwm
magnetometer # all available magnetometer drivers
optical_flow # all available optical flow drivers
osd
pca9685
pca9685_pwm_out
power_monitor/ina226
#protocol_splitter
pwm_out_sim
pwm_out
rc_input
roboclaw
rpm
safety_button
telemetry # all available telemetry drivers
tone_alarm
uavcan
MODULES
airspeed_selector
attitude_estimator_q
battery_status
camera_feedback
commander
dataman
ekf2
esc_battery
events
flight_mode_manager
fw_att_control
fw_pos_control_l1
gyro_calibration
gyro_fft
land_detector
landing_target_estimator
load_mon
local_position_estimator
logger
mavlink
mc_att_control
mc_hover_thrust_estimator
mc_pos_control
mc_rate_control
#micrortps_bridge
navigator
rc_update
rover_pos_control
sensors
sih
temperature_compensation
#uuv_att_control
#uuv_pos_control
vmount
vtol_att_control
SYSTEMCMDS
#bl_update
#dmesg
dumpfile
esc_calib
#gpio
i2cdetect
led_control
mft
mixer
motor_ramp
motor_test
mtd
nshterm
param
perf
pwm
reboot
reflect
sd_bench
serial_test
system_time
tests # tests and test runner
top
topic_listener
tune_control
uorb
usb_connected
ver
work_queue
EXAMPLES
fake_gps
fake_gyro
fake_magnetometer
fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
hello
hwtest # Hardware test
#matlab_csv_serial
px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
rover_steering_control # Rover example app
uuv_example_app
work_item
)
+15
View File
@@ -37,6 +37,7 @@ px4_add_board(
rc_input
#telemetry # all available telemetry drivers
telemetry/frsky_telemetry
#test_ppm
MODULES
#airspeed_selector
attitude_estimator_q
@@ -96,6 +97,7 @@ px4_add_board(
sd_bench
#serial_test
#system_time
#tests # tests and test runner
top
#topic_listener
tune_control
@@ -103,4 +105,17 @@ px4_add_board(
usb_connected
ver
work_queue
EXAMPLES
#fake_gps
#fake_gyro
#fake_magnetometer
#fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
#hello
#hwtest # Hardware test
#matlab_csv_serial
#px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
#px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
#rover_steering_control # Rover example app
#uuv_example_app
#work_item
)
+3
View File
@@ -9,6 +9,7 @@ px4_add_board(
CONSTRAINED_MEMORY
ROMFSROOT px4fmu_common
IO px4_io-v2_default
#TESTING
#UAVCAN_INTERFACES 2
CONSTRAINED_FLASH
SERIAL_PORTS
@@ -57,6 +58,7 @@ px4_add_board(
#roboclaw
#rpm
#telemetry # all available telemetry drivers
#test_ppm
tone_alarm
#uavcan
MODULES
@@ -118,6 +120,7 @@ px4_add_board(
#sd_bench
#serial_test
#system_time
#tests # tests and test runner
top
#topic_listener
tune_control
+1
View File
@@ -9,6 +9,7 @@ px4_add_board(
CONSTRAINED_MEMORY
ROMFSROOT px4fmu_common
IO px4_io-v2_default
#TESTING
#UAVCAN_INTERFACES 2
CONSTRAINED_FLASH
SERIAL_PORTS
+13 -10
View File
@@ -9,6 +9,7 @@ px4_add_board(
CONSTRAINED_MEMORY
ROMFSROOT px4fmu_common
IO px4_io-v2_default
TESTING
UAVCAN_INTERFACES 2
SERIAL_PORTS
GPS1:/dev/ttyS3
@@ -51,6 +52,7 @@ px4_add_board(
roboclaw
rpm
telemetry # all available telemetry drivers
test_ppm
tone_alarm
uavcan
MODULES
@@ -112,6 +114,7 @@ px4_add_board(
sd_bench
serial_test
system_time
tests # tests and test runner
top
topic_listener
tune_control
@@ -121,15 +124,15 @@ px4_add_board(
work_queue
EXAMPLES
fake_gps
#fake_gyro
#fake_magnetometer
#fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
#hello
#hwtest # Hardware test
fake_gyro
fake_magnetometer
fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
hello
hwtest # Hardware test
#matlab_csv_serial
#px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
#px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
#rover_steering_control # Rover example app
#uuv_example_app
#work_item
px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
rover_steering_control # Rover example app
uuv_example_app
work_item
)
-138
View File
@@ -1,138 +0,0 @@
px4_add_board(
PLATFORM nuttx
VENDOR px4
MODEL fmu-v3
LABEL test
TOOLCHAIN arm-none-eabi
ARCHITECTURE cortex-m4
CONSTRAINED_MEMORY
ROMFSROOT px4fmu_common
IO px4_io-v2_default
TESTING
UAVCAN_INTERFACES 2
SERIAL_PORTS
GPS1:/dev/ttyS3
TEL1:/dev/ttyS1
TEL2:/dev/ttyS2
TEL4:/dev/ttyS6
DRIVERS
adc/ads1115
adc/board_adc
barometer # all available barometer drivers
batt_smbus
camera_capture
camera_trigger
differential_pressure # all available differential pressure drivers
distance_sensor # all available distance sensor drivers
dshot
gps
heater
#imu # all available imu drivers
imu/analog_devices/adis16448
imu/l3gd20
imu/lsm303d
imu/invensense/icm20608g
imu/invensense/icm20948 # required for ak09916 mag
imu/invensense/mpu6000
imu/invensense/mpu9250
irlock
lights # all available light drivers
magnetometer # all available magnetometer drivers
optical_flow # all available optical flow drivers
osd
pca9685
pca9685_pwm_out
#power_monitor/ina226
#protocol_splitter
pwm_input
pwm_out_sim
pwm_out
px4io
roboclaw
rpm
telemetry # all available telemetry drivers
test_ppm
tone_alarm
uavcan
MODULES
airspeed_selector
attitude_estimator_q
battery_status
camera_feedback
commander
dataman
ekf2
esc_battery
events
flight_mode_manager
fw_att_control
fw_pos_control_l1
gyro_calibration
gyro_fft
land_detector
landing_target_estimator
load_mon
local_position_estimator
logger
mavlink
mc_att_control
mc_hover_thrust_estimator
mc_pos_control
mc_rate_control
#micrortps_bridge
navigator
rc_update
rover_pos_control
sensors
sih
temperature_compensation
uuv_att_control
uuv_pos_control
vmount
vtol_att_control
SYSTEMCMDS
bl_update
#dmesg
dumpfile
esc_calib
gpio
hardfault_log
i2cdetect
led_control
mft
mixer
motor_ramp
motor_test
mtd
nshterm
param
perf
pwm
reboot
reflect
sd_bench
serial_test
system_time
tests # tests and test runner
top
topic_listener
tune_control
uorb
usb_connected
ver
work_queue
EXAMPLES
fake_gps
fake_gyro
fake_magnetometer
fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
hello
hwtest # Hardware test
#matlab_csv_serial
px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
rover_steering_control # Rover example app
uuv_example_app
work_item
)
+14 -12
View File
@@ -8,6 +8,7 @@ px4_add_board(
ARCHITECTURE cortex-m4
CONSTRAINED_MEMORY
ROMFSROOT px4fmu_common
TESTING
UAVCAN_INTERFACES 1
SERIAL_PORTS
GPS1:/dev/ttyS3
@@ -49,9 +50,9 @@ px4_add_board(
rpm
safety_button
telemetry # all available telemetry drivers
test_ppm
tone_alarm
uavcan
vesc
MODULES
airspeed_selector
attitude_estimator_q
@@ -90,7 +91,7 @@ px4_add_board(
vtol_att_control
SYSTEMCMDS
bl_update
dmesg
#dmesg
dumpfile
esc_calib
gpio
@@ -111,6 +112,7 @@ px4_add_board(
sd_bench
serial_test
system_time
tests # tests and test runner
top
topic_listener
tune_control
@@ -120,15 +122,15 @@ px4_add_board(
work_queue
EXAMPLES
fake_gps
#fake_gyro
#fake_magnetometer
#fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
#hello
#hwtest # Hardware test
fake_gyro
fake_magnetometer
fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
hello
hwtest # Hardware test
#matlab_csv_serial
#px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
#px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
#rover_steering_control # Rover example app
#uuv_example_app
#work_item
px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
rover_steering_control # Rover example app
uuv_example_app
work_item
)
-2
View File
@@ -98,8 +98,6 @@
#define GPIO_TONE_ALARM_IDLE (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTA|GPIO_PIN15)
#define GPIO_TONE_ALARM (GPIO_ALT|GPIO_AF1|GPIO_SPEED_2MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN15)
#define BOARD_ENABLE_CONSOLE_BUFFER
/**
* PWM:
*
-136
View File
@@ -1,136 +0,0 @@
px4_add_board(
PLATFORM nuttx
VENDOR px4
MODEL fmu-v4
LABEL test
TOOLCHAIN arm-none-eabi
ARCHITECTURE cortex-m4
CONSTRAINED_MEMORY
ROMFSROOT px4fmu_common
TESTING
UAVCAN_INTERFACES 1
SERIAL_PORTS
GPS1:/dev/ttyS3
TEL1:/dev/ttyS1
TEL2:/dev/ttyS2
WIFI:/dev/ttyS0
DRIVERS
adc/ads1115
adc/board_adc
barometer # all available barometer drivers
batt_smbus
camera_capture
camera_trigger
differential_pressure # all available differential pressure drivers
distance_sensor # all available distance sensor drivers
dshot
gps
heater
#imu # all available imu drivers
imu/analog_devices/adis16448
imu/invensense/icm20602
imu/invensense/icm20608g
imu/invensense/icm20948 # required for ak09916 mag
imu/invensense/mpu9250
irlock
lights # all available light drivers
magnetometer # all available magnetometer drivers
optical_flow # all available optical flow drivers
osd
pca9685
pca9685_pwm_out
power_monitor/ina226
#protocol_splitter
pwm_input
pwm_out_sim
pwm_out
rc_input
roboclaw
rpm
safety_button
telemetry # all available telemetry drivers
test_ppm
tone_alarm
uavcan
MODULES
airspeed_selector
attitude_estimator_q
battery_status
camera_feedback
commander
dataman
ekf2
esc_battery
events
flight_mode_manager
fw_att_control
fw_pos_control_l1
gyro_calibration
gyro_fft
land_detector
landing_target_estimator
load_mon
local_position_estimator
logger
mavlink
mc_att_control
mc_hover_thrust_estimator
mc_pos_control
mc_rate_control
#micrortps_bridge
navigator
rc_update
rover_pos_control
sensors
sih
temperature_compensation
uuv_att_control
uuv_pos_control
vmount
vtol_att_control
SYSTEMCMDS
bl_update
#dmesg
dumpfile
esc_calib
gpio
hardfault_log
i2cdetect
led_control
mft
mixer
motor_ramp
motor_test
mtd
nshterm
param
perf
pwm
reboot
reflect
sd_bench
serial_test
system_time
tests # tests and test runner
top
topic_listener
tune_control
uorb
usb_connected
ver
work_queue
EXAMPLES
fake_gps
fake_gyro
fake_magnetometer
fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
hello
hwtest # Hardware test
#matlab_csv_serial
px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
rover_steering_control # Rover example app
uuv_example_app
work_item
)
+13 -10
View File
@@ -9,6 +9,7 @@ px4_add_board(
CONSTRAINED_MEMORY
ROMFSROOT px4fmu_common
IO px4_io-v2_default
TESTING
UAVCAN_INTERFACES 2
SERIAL_PORTS
GPS1:/dev/ttyS3
@@ -50,6 +51,7 @@ px4_add_board(
roboclaw
rpm
telemetry # all available telemetry drivers
test_ppm
tone_alarm
uavcan
MODULES
@@ -110,6 +112,7 @@ px4_add_board(
reflect
sd_bench
system_time
tests # tests and test runner
top
topic_listener
tune_control
@@ -119,15 +122,15 @@ px4_add_board(
work_queue
EXAMPLES
fake_gps
#fake_gyro
#fake_magnetometer
#fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
#hello
#hwtest # Hardware test
fake_gyro
fake_magnetometer
fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
hello
hwtest # Hardware test
#matlab_csv_serial
#px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
#px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
#rover_steering_control # Rover example app
#uuv_example_app
#work_item
px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
rover_steering_control # Rover example app
uuv_example_app
work_item
)
-136
View File
@@ -1,136 +0,0 @@
px4_add_board(
PLATFORM nuttx
VENDOR px4
MODEL fmu-v4pro
LABEL test
TOOLCHAIN arm-none-eabi
ARCHITECTURE cortex-m4
CONSTRAINED_MEMORY
ROMFSROOT px4fmu_common
IO px4_io-v2_default
TESTING
UAVCAN_INTERFACES 2
SERIAL_PORTS
GPS1:/dev/ttyS3
TEL1:/dev/ttyS1
TEL2:/dev/ttyS2
TEL3:/dev/ttyS0
TEL4:/dev/ttyS6
DRIVERS
adc/ads1115
adc/board_adc
barometer # all available barometer drivers
batt_smbus
camera_capture
camera_trigger
differential_pressure # all available differential pressure drivers
distance_sensor # all available distance sensor drivers
dshot
gps
#heater
#imu # all available imu drivers
imu/analog_devices/adis16448
imu/invensense/icm20602
imu/invensense/icm20608g
imu/invensense/icm20948 # required for ak09916 mag
imu/invensense/mpu9250
irlock
lights # all available light drivers
magnetometer # all available magnetometer drivers
optical_flow # all available optical flow drivers
osd
pca9685
pca9685_pwm_out
#power_monitor/ina226
#protocol_splitter
pwm_input
pwm_out_sim
pwm_out
px4io
roboclaw
rpm
telemetry # all available telemetry drivers
test_ppm
tone_alarm
uavcan
MODULES
airspeed_selector
attitude_estimator_q
battery_status
camera_feedback
commander
dataman
ekf2
esc_battery
events
flight_mode_manager
fw_att_control
fw_pos_control_l1
gyro_calibration
gyro_fft
land_detector
landing_target_estimator
load_mon
local_position_estimator
logger
mavlink
mc_att_control
mc_hover_thrust_estimator
mc_pos_control
mc_rate_control
#micrortps_bridge
navigator
rc_update
rover_pos_control
sensors
sih
temperature_compensation
uuv_att_control
uuv_pos_control
vmount
vtol_att_control
SYSTEMCMDS
bl_update
#dmesg
dumpfile
esc_calib
gpio
hardfault_log
i2cdetect
led_control
mft
mixer
motor_ramp
motor_test
mtd
nshterm
param
perf
pwm
reboot
reflect
sd_bench
system_time
tests # tests and test runner
top
topic_listener
tune_control
uorb
usb_connected
ver
work_queue
EXAMPLES
fake_gps
fake_gyro
fake_magnetometer
fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
hello
hwtest # Hardware test
#matlab_csv_serial
px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
rover_steering_control # Rover example app
uuv_example_app
work_item
)
+13 -10
View File
@@ -8,6 +8,7 @@ px4_add_board(
ARCHITECTURE cortex-m7
ROMFSROOT px4fmu_common
IO px4_io-v2_default
TESTING
UAVCAN_INTERFACES 2
SERIAL_PORTS
GPS1:/dev/ttyS0
@@ -51,6 +52,7 @@ px4_add_board(
rpm
safety_button
telemetry # all available telemetry drivers
test_ppm
tone_alarm
uavcan
MODULES
@@ -114,6 +116,7 @@ px4_add_board(
sd_bench
serial_test
system_time
tests # tests and test runner
top
topic_listener
tune_control
@@ -123,15 +126,15 @@ px4_add_board(
work_queue
EXAMPLES
fake_gps
#fake_gyro
#fake_magnetometer
#fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
#hello
#hwtest # Hardware test
fake_gyro
fake_magnetometer
fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
hello
hwtest # Hardware test
#matlab_csv_serial
#px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
#px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
#rover_steering_control # Rover example app
#uuv_example_app
#work_item
px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
rover_steering_control # Rover example app
uuv_example_app
work_item
)
+1 -1
View File
@@ -124,7 +124,7 @@ px4_add_board(
ver
work_queue
EXAMPLES
fake_gps
#fake_gps
#fake_gyro
#fake_magnetometer
#fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
+13 -10
View File
@@ -8,6 +8,7 @@ px4_add_board(
ARCHITECTURE cortex-m7
ROMFSROOT px4fmu_common
IO px4_io-v2_default
TESTING
UAVCAN_INTERFACES 2
SERIAL_PORTS
GPS1:/dev/ttyS0
@@ -51,6 +52,7 @@ px4_add_board(
rpm
safety_button
telemetry # all available telemetry drivers
test_ppm
tone_alarm
uavcan
MODULES
@@ -112,6 +114,7 @@ px4_add_board(
sd_bench
serial_test
system_time
tests # tests and test runner
top
topic_listener
tune_control
@@ -121,15 +124,15 @@ px4_add_board(
work_queue
EXAMPLES
fake_gps
#fake_gyro
#fake_magnetometer
#fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
#hello
#hwtest # Hardware test
fake_gyro
fake_magnetometer
fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
hello
hwtest # Hardware test
#matlab_csv_serial
#px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
#px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
#rover_steering_control # Rover example app
#uuv_example_app
#work_item
px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
rover_steering_control # Rover example app
uuv_example_app
work_item
)
+1
View File
@@ -8,6 +8,7 @@ px4_add_board(
ARCHITECTURE cortex-m7
ROMFSROOT px4fmu_common
IO px4_io-v2_default
TESTING
UAVCAN_INTERFACES 2
SERIAL_PORTS
GPS1:/dev/ttyS0
-14
View File
@@ -12,7 +12,6 @@ px4_add_board(
ARCHITECTURE cortex-m7
ROMFSROOT px4fmu_common
IO px4_io-v2_default
EXTERNAL_METADATA
TESTING
#UAVCAN_INTERFACES 2
SERIAL_PORTS
@@ -127,17 +126,4 @@ px4_add_board(
usb_connected
ver
work_queue
EXAMPLES
fake_gps
#fake_gyro
#fake_magnetometer
#fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
#hello
#hwtest # Hardware test
#matlab_csv_serial
#px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
#px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
#rover_steering_control # Rover example app
#uuv_example_app
#work_item
)
+11 -10
View File
@@ -8,6 +8,7 @@ px4_add_board(
ARCHITECTURE cortex-m7
ROMFSROOT px4fmu_common
IO px4_io-v2_default
TESTING
UAVCAN_INTERFACES 2
SERIAL_PORTS
GPS1:/dev/ttyS0
@@ -49,6 +50,7 @@ px4_add_board(
rpm
safety_button
telemetry # all available telemetry drivers
test_ppm
tone_alarm
uavcan
MODULES
@@ -105,6 +107,7 @@ px4_add_board(
reflect
sd_bench
system_time
tests # tests and test runner
top
topic_listener
tune_control
@@ -114,15 +117,13 @@ px4_add_board(
work_queue
EXAMPLES
fake_gps
#fake_gyro
#fake_magnetometer
#fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
#hello
#hwtest # Hardware test
fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
hello
hwtest # Hardware test
#matlab_csv_serial
#px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
#px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
#rover_steering_control # Rover example app
#uuv_example_app
#work_item
px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
rover_steering_control # Rover example app
uuv_example_app
work_item
)
+1 -2
View File
@@ -122,8 +122,7 @@ px4_add_board(
ver
work_queue
EXAMPLES
fake_gps
#fake_gyro
#fake_gps
#fake_magnetometer
#fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
#hello
-138
View File
@@ -1,138 +0,0 @@
px4_add_board(
PLATFORM nuttx
VENDOR px4
MODEL fmu-v5
LABEL test
TOOLCHAIN arm-none-eabi
ARCHITECTURE cortex-m7
ROMFSROOT px4fmu_common
IO px4_io-v2_default
TESTING
UAVCAN_INTERFACES 2
SERIAL_PORTS
GPS1:/dev/ttyS0
TEL1:/dev/ttyS1
TEL2:/dev/ttyS2
TEL4:/dev/ttyS3
DRIVERS
adc/ads1115
adc/board_adc
barometer # all available barometer drivers
batt_smbus
camera_capture
camera_trigger
differential_pressure # all available differential pressure drivers
distance_sensor # all available distance sensor drivers
dshot
gps
#heater
#imu # all available imu drivers
imu/analog_devices/adis16448
imu/bosch/bmi055
imu/invensense/icm20602
imu/invensense/icm20689
imu/invensense/icm20948 # required for ak09916 mag
irlock
lights # all available light drivers
lights/rgbled_pwm
magnetometer # all available magnetometer drivers
optical_flow # all available optical flow drivers
osd
pca9685
pca9685_pwm_out
power_monitor/ina226
#protocol_splitter
pwm_input
pwm_out_sim
pwm_out
px4io
rc_input
roboclaw
rpm
safety_button
telemetry # all available telemetry drivers
test_ppm
tone_alarm
uavcan
MODULES
airspeed_selector
attitude_estimator_q
battery_status
camera_feedback
commander
dataman
ekf2
esc_battery
events
flight_mode_manager
fw_att_control
fw_pos_control_l1
gyro_calibration
gyro_fft
land_detector
landing_target_estimator
load_mon
local_position_estimator
logger
mavlink
mc_att_control
mc_hover_thrust_estimator
mc_pos_control
mc_rate_control
#micrortps_bridge
navigator
rc_update
rover_pos_control
sensors
sih
temperature_compensation
uuv_att_control
uuv_pos_control
vmount
vtol_att_control
SYSTEMCMDS
bl_update
dmesg
dumpfile
esc_calib
gpio
hardfault_log
i2cdetect
led_control
mft
mixer
motor_ramp
motor_test
mtd
nshterm
param
perf
pwm
reboot
reflect
sd_bench
serial_test
system_time
tests # tests and test runner
top
topic_listener
tune_control
uorb
usb_connected
ver
work_queue
EXAMPLES
fake_gps
fake_gyro
fake_magnetometer
fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
hello
hwtest # Hardware test
#matlab_csv_serial
px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
rover_steering_control # Rover example app
uuv_example_app
work_item
)
+3 -1
View File
@@ -8,6 +8,7 @@ px4_add_board(
ARCHITECTURE cortex-m7
ROMFSROOT px4fmu_common
IO px4_io-v2_default
#TESTING
UAVCAN_INTERFACES 2
UAVCAN_PERIPHERALS
cuav_can-gps-v1_default
@@ -55,6 +56,7 @@ px4_add_board(
#rpm
safety_button
telemetry # all available telemetry drivers
#test_ppm
tone_alarm
uavcan
MODULES
@@ -115,6 +117,7 @@ px4_add_board(
reflect
sd_bench
system_time
#tests # tests and test runner
top
topic_listener
tune_control
@@ -123,7 +126,6 @@ px4_add_board(
ver
work_queue
EXAMPLES
fake_gps
#fake_gyro
#fake_magnetometer
#fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
+4 -1
View File
@@ -8,6 +8,7 @@ px4_add_board(
ARCHITECTURE cortex-m7
ROMFSROOT px4fmu_common
IO px4_io-v2_default
#TESTING
UAVCAN_INTERFACES 2
SERIAL_PORTS
GPS1:/dev/ttyS0
@@ -51,6 +52,7 @@ px4_add_board(
rpm
safety_button
telemetry # all available telemetry drivers
#test_ppm
tone_alarm
#uavcan # legacy v0
uavcan_v1
@@ -113,6 +115,7 @@ px4_add_board(
sd_bench
serial_test
system_time
#tests # tests and test runner
top
topic_listener
tune_control
@@ -121,7 +124,7 @@ px4_add_board(
ver
work_queue
EXAMPLES
fake_gps
#fake_gps
#fake_gyro
#fake_magnetometer
#fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
@@ -8,6 +8,7 @@ px4_add_board(
ARCHITECTURE cortex-m7
ROMFSROOT px4fmu_common
IO px4_io-v2_default
TESTING
UAVCAN_INTERFACES 2
ETHERNET
SERIAL_PORTS
@@ -52,6 +53,7 @@ px4_add_board(
rpm
safety_button
telemetry # all available telemetry drivers
test_ppm
tone_alarm
uavcan
MODULES
@@ -113,6 +115,7 @@ px4_add_board(
sd_bench
serial_test
system_time
tests # tests and test runner
top
topic_listener
tune_control
+3
View File
@@ -8,6 +8,7 @@ px4_add_board(
ARCHITECTURE cortex-m7
ROMFSROOT px4fmu_common
IO px4_io-v2_default
TESTING
UAVCAN_INTERFACES 2
ETHERNET
SERIAL_PORTS
@@ -52,6 +53,7 @@ px4_add_board(
rpm
safety_button
telemetry # all available telemetry drivers
test_ppm
tone_alarm
uavcan
MODULES
@@ -113,6 +115,7 @@ px4_add_board(
sd_bench
serial_test
system_time
tests # tests and test runner
top
topic_listener
tune_control
-139
View File
@@ -1,139 +0,0 @@
px4_add_board(
PLATFORM nuttx
VENDOR px4
MODEL fmu-v5x
LABEL test
TOOLCHAIN arm-none-eabi
ARCHITECTURE cortex-m7
ROMFSROOT px4fmu_common
IO px4_io-v2_default
TESTING
UAVCAN_INTERFACES 2
ETHERNET
SERIAL_PORTS
GPS1:/dev/ttyS0
TEL1:/dev/ttyS6
TEL2:/dev/ttyS4
TEL3:/dev/ttyS1
GPS2:/dev/ttyS7
DRIVERS
adc/ads1115
adc/board_adc
barometer # all available barometer drivers
batt_smbus
camera_capture
camera_trigger
differential_pressure # all available differential pressure drivers
distance_sensor # all available distance sensor drivers
dshot
gps
heater
#imu # all available imu drivers
imu/analog_devices/adis16448
imu/bosch/bmi088
imu/invensense/icm20602
imu/invensense/icm20948 # required for ak09916 mag
imu/invensense/icm42688p
irlock
lights # all available light drivers
magnetometer # all available magnetometer drivers
optical_flow # all available optical flow drivers
osd
pca9685
pca9685_pwm_out
power_monitor/ina226
#protocol_splitter
pwm_input
pwm_out_sim
pwm_out
px4io
rc_input
roboclaw
rpm
safety_button
telemetry # all available telemetry drivers
test_ppm
tone_alarm
uavcan
MODULES
airspeed_selector
attitude_estimator_q
camera_feedback
commander
dataman
ekf2
esc_battery
events
flight_mode_manager
fw_att_control
fw_pos_control_l1
gyro_calibration
gyro_fft
land_detector
landing_target_estimator
load_mon
local_position_estimator
logger
mavlink
mc_att_control
mc_hover_thrust_estimator
mc_pos_control
mc_rate_control
#micrortps_bridge
navigator
rc_update
rover_pos_control
sensors
sih
temperature_compensation
#uuv_att_control
#uuv_pos_control
vmount
vtol_att_control
SYSTEMCMDS
bl_update
dmesg
dumpfile
esc_calib
gpio
hardfault_log
i2cdetect
led_control
mft
mixer
motor_ramp
motor_test
mtd
nshterm
netman
param
perf
pwm
reboot
reflect
sd_bench
serial_test
system_time
tests # tests and test runner
top
topic_listener
tune_control
uorb
usb_connected
ver
work_queue
EXAMPLES
fake_gps
#fake_gyro
#fake_magnetometer
#fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
#hello
#hwtest # Hardware test
#matlab_csv_serial
#px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
#px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
#rover_steering_control # Rover example app
#uuv_example_app
#work_item
)
+1
View File
@@ -109,6 +109,7 @@ px4_add_board(
sd_bench
serial_test
system_time
#tests # tests and test runner
top
topic_listener
tune_control
+4 -1
View File
@@ -9,6 +9,7 @@ px4_add_board(
ROMFSROOT px4fmu_common
BUILD_BOOTLOADER
IO px4_io-v2_default
TESTING
UAVCAN_INTERFACES 2
UAVCAN_TIMER_OVERRIDE 2
ETHERNET
@@ -53,6 +54,7 @@ px4_add_board(
rpm
safety_button
telemetry # all available telemetry drivers
test_ppm
tone_alarm
uavcan
MODULES
@@ -114,7 +116,8 @@ px4_add_board(
sd_bench
serial_test
system_time
# top
# tests # tests and test runner
top
topic_listener
tune_control
uorb
-140
View File
@@ -1,140 +0,0 @@
px4_add_board(
PLATFORM nuttx
VENDOR px4
MODEL fmu-v6x
LABEL test
TOOLCHAIN arm-none-eabi
ARCHITECTURE cortex-m7
ROMFSROOT px4fmu_common
BUILD_BOOTLOADER
IO px4_io-v2_default
TESTING
UAVCAN_INTERFACES 2
UAVCAN_TIMER_OVERRIDE 2
ETHERNET
SERIAL_PORTS
GPS1:/dev/ttyS0
TEL1:/dev/ttyS6
TEL2:/dev/ttyS4
TEL3:/dev/ttyS1
GPS2:/dev/ttyS7
DRIVERS
adc/ads1115
adc/board_adc
barometer # all available barometer drivers
batt_smbus
camera_capture
camera_trigger
differential_pressure # all available differential pressure drivers
distance_sensor # all available distance sensor drivers
dshot
gps
heater
#imu # all available imu drivers
imu/bosch/bmi088
imu/invensense/icm20602
imu/invensense/icm20649
imu/invensense/icm20948 # required for ak09916 mag
imu/invensense/icm42688p
irlock
lights # all available light drivers
magnetometer # all available magnetometer drivers
optical_flow # all available optical flow drivers
osd
pca9685
pca9685_pwm_out
power_monitor/ina226
#protocol_splitter
pwm_out_sim
pwm_out
px4io
rc_input
roboclaw
rpm
safety_button
telemetry # all available telemetry drivers
test_ppm
tone_alarm
uavcan
MODULES
airspeed_selector
attitude_estimator_q
camera_feedback
commander
dataman
ekf2
esc_battery
events
flight_mode_manager
fw_att_control
fw_pos_control_l1
gyro_calibration
gyro_fft
land_detector
landing_target_estimator
load_mon
local_position_estimator
logger
mavlink
mc_att_control
mc_hover_thrust_estimator
mc_pos_control
mc_rate_control
#micrortps_bridge
navigator
rc_update
rover_pos_control
sensors
sih
temperature_compensation
#uuv_att_control
#uuv_pos_control
vmount
vtol_att_control
SYSTEMCMDS
bl_update
dmesg
dumpfile
esc_calib
gpio
hardfault_log
i2cdetect
led_control
mft
mixer
motor_ramp
motor_test
mtd
nshterm
netman
param
perf
pwm
reboot
reflect
sd_bench
serial_test
system_time
# tests # tests and test runner
top
topic_listener
tune_control
uorb
usb_connected
ver
work_queue
EXAMPLES
fake_gps
#fake_gyro
#fake_magnetometer
#fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
#hello
#hwtest # Hardware test
#matlab_csv_serial
#px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
#px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
#rover_steering_control # Rover example app
#uuv_example_app
#work_item
)
+1 -1
View File
@@ -5,6 +5,7 @@ px4_add_board(
MODEL sitl
ROMFSROOT px4fmu_common
LABEL ctrlalloc
EMBEDDED_METADATA parameters
TESTING
DRIVERS
#barometer # all available barometer drivers
@@ -89,7 +90,6 @@ px4_add_board(
EXAMPLES
dyn_hello # dynamically loading modules example
fake_gps
fake_gyro
fake_magnetometer
fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
hello
+1
View File
@@ -5,6 +5,7 @@ px4_add_board(
MODEL sitl
ROMFSROOT px4fmu_common
LABEL default
EMBEDDED_METADATA parameters
TESTING
ETHERNET
DRIVERS
+1 -1
View File
@@ -5,6 +5,7 @@ px4_add_board(
MODEL sitl
ROMFSROOT px4fmu_common
LABEL nolockstep
EMBEDDED_METADATA parameters
TESTING
DRIVERS
#barometer # all available barometer drivers
@@ -87,7 +88,6 @@ px4_add_board(
EXAMPLES
dyn_hello # dynamically loading modules example
fake_gps
fake_gyro
fake_magnetometer
fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
hello
+1 -1
View File
@@ -5,6 +5,7 @@ px4_add_board(
MODEL sitl
ROMFSROOT px4fmu_common
LABEL rtps
EMBEDDED_METADATA parameters
TESTING
DRIVERS
#barometer # all available barometer drivers
@@ -86,7 +87,6 @@ px4_add_board(
EXAMPLES
dyn_hello # dynamically loading modules example
fake_gps
fake_gyro
fake_magnetometer
fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
hello
+1 -1
View File
@@ -5,6 +5,7 @@ px4_add_board(
MODEL sitl
ROMFSROOT px4fmu_common
LABEL test
EMBEDDED_METADATA parameters
TESTING
DRIVERS
#barometer # all available barometer drivers
@@ -86,7 +87,6 @@ px4_add_board(
EXAMPLES
dyn_hello # dynamically loading modules example
fake_gps
fake_gyro
fake_magnetometer
fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
hello
-2
View File
@@ -87,8 +87,6 @@ px4_add_board(
EXAMPLES
dyn_hello # dynamically loading modules example
fake_gps
fake_gyro
fake_magnetometer
fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
hello
#hwtest # Hardware test
+6 -4
View File
@@ -39,12 +39,16 @@ px4_add_board(
#pca9685
#power_monitor/ina226
#protocol_splitter
# pwm_input - Need to create arch/stm32 arch/stm32h7 arch/kinetis and reloacate
# all arch dependant code there
pwm_out_sim
pwm_out
#roboclaw
rc_input
telemetry # all available telemetry drivers
#test_ppm
tone_alarm
# uavcan - No H7 or FD can support in UAVCAN yet
MODULES
#airspeed_selector
attitude_estimator_q
@@ -96,6 +100,7 @@ px4_add_board(
reflect
sd_bench
#shutdown
#tests # tests and test runner
top
topic_listener
tune_control
@@ -104,9 +109,7 @@ px4_add_board(
ver
work_queue
EXAMPLES
fake_gps
#fake_gyro
#fake_magnetometer
#bottle_drop # OBC challenge
#fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
#hello
#hwtest # Hardware test
@@ -115,5 +118,4 @@ px4_add_board(
#px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
#rover_steering_control # Rover example app
#uuv_example_app
#work_item
)
+11 -8
View File
@@ -57,9 +57,9 @@
# [ SERIAL_PORTS <list> ]
# [ CONSTRAINED_FLASH ]
# [ CONSTRAINED_MEMORY ]
# [ EXTERNAL_METADATA ]
# [ TESTING ]
# [ LINKER_PREFIX <string> ]
# [ EMBEDDED_METADATA <string> ]
# [ ETHERNET ]
# )
#
@@ -80,9 +80,9 @@
# SYSTEMCMDS : list of system commands to build for this board (relative to src/systemcmds)
# EXAMPLES : list of example modules to build for this board (relative to src/examples)
# SERIAL_PORTS : mapping of user configurable serial ports and param facing name
# EMBEDDED_METADATA : list of metadata to embed to ROMFS
# CONSTRAINED_FLASH : flag to enable constrained flash options (eg limit init script status text)
# CONSTRAINED_MEMORY : flag to enable constrained memory options (eg limit maximum number of uORB publications)
# EXTERNAL_METADATA : flag to exclude metadata to reduce flash
# TESTING : flag to enable automatic inclusion of PX4 testing modules
# LINKER_PREFIX : optional to prefix on the Linker script.
# ETHERNET : flag to indicate that ethernet is enabled
@@ -156,11 +156,11 @@ function(px4_add_board)
EXAMPLES
SERIAL_PORTS
UAVCAN_PERIPHERALS
EMBEDDED_METADATA
OPTIONS
BUILD_BOOTLOADER
CONSTRAINED_FLASH
CONSTRAINED_MEMORY
EXTERNAL_METADATA
TESTING
ETHERNET
REQUIRED
@@ -207,11 +207,14 @@ function(px4_add_board)
set(romfs_extra_files)
set(config_romfs_extra_dependencies)
# additional embedded metadata
if (NOT CONSTRAINED_FLASH AND NOT EXTERNAL_METADATA AND NOT ${PX4_BOARD_LABEL} STREQUAL "test")
list(APPEND romfs_extra_files ${PX4_BINARY_DIR}/parameters.json.xz)
list(APPEND romfs_extra_dependencies parameters_xml)
endif()
foreach(metadata ${EMBEDDED_METADATA})
if(${metadata} STREQUAL "parameters")
list(APPEND romfs_extra_files ${PX4_BINARY_DIR}/parameters.json.xz)
list(APPEND romfs_extra_dependencies parameters_xml)
else()
message(FATAL_ERROR "invalid value for EMBEDDED_METADATA: ${metadata}")
endif()
endforeach()
list(APPEND romfs_extra_files ${PX4_BINARY_DIR}/component_general.json.xz)
list(APPEND romfs_extra_dependencies component_general_json)
set(config_romfs_extra_files ${romfs_extra_files} CACHE INTERNAL "extra ROMFS files" FORCE)
+13 -9
View File
@@ -95,17 +95,21 @@ function(px4_add_common_flags)
# compiler specific flags
if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") OR ("${CMAKE_CXX_COMPILER_ID}" MATCHES "AppleClang"))
add_compile_options(
-fcolor-diagnostics # force color for clang (needed for clang + ccache)
-fdiagnostics-absolute-paths # force absolute paths
# force color for clang (needed for clang + ccache)
add_compile_options(-fcolor-diagnostics)
# force absolute paths
add_compile_options(-fdiagnostics-absolute-paths)
-Qunused-arguments
# QuRT 6.4.X compiler identifies as Clang but does not support this option
if (NOT "${PX4_PLATFORM}" STREQUAL "qurt")
add_compile_options(
-Qunused-arguments
-Wno-c99-designator
-Wno-unknown-warning-option
-Wno-unused-const-variable
-Wno-varargs
)
-Wno-unknown-warning-option
-Wno-unused-const-variable
-Wno-varargs
)
endif()
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+2 -10
View File
@@ -25,9 +25,9 @@ uint16 manufacture_date # manufacture date, part of serial number of the batter
uint16 state_of_health # state of health. FullChargeCapacity/DesignCapacity.
uint16 max_error # max error, expected margin of error in % in the state-of-charge calculation with a range of 1 to 100%
uint8 id # ID number of a battery. Should be unique and consistent for the lifetime of a vehicle. 1-indexed.
uint16 interface_error # interface error counter
uint16 interface_error # SMBUS interface error counter
float32[14] voltage_cell_v # Battery individual cell voltages
float32[10] voltage_cell_v # Battery individual cell voltages
float32 max_cell_voltage_delta # Max difference between individual cell voltages
bool is_powering_off # Power off event imminent indication, false if unknown
@@ -43,11 +43,3 @@ uint8 warning # current battery warning
uint8 MAX_INSTANCES = 4
float32 average_power # The average power of the current discharge
float32 available_energy # The predicted charge or energy remaining in the battery
float32 remaining_capacity # The compensated battery capacity remaining
float32 design_capacity # The design capacity of the battery
uint16 average_time_to_full # The predicted remaining time until the battery reaches full charge, in minutes
uint16 over_discharge_count # Number of battery overdischarge
float32 nominal_voltage # Nominal voltage of the battery pack
+2 -2
View File
@@ -120,8 +120,8 @@ static void usage(const char *name)
" -i <ip_address> Target IP for UDP. Default 127.0.0.1\n"
" -n <namespace> ROS 2 topics namespace. Identifies the vehicle in a multi-agent network\n"
" -p <poll_ms> Time in ms to poll over UART. Default 1ms\n"
" -r <reception port> UDP port for receiving. Default 2020\n"
" -s <sending port> UDP port for sending. Default 2019\n"
" -r <reception port> UDP port for receiving. Default 2019\n"
" -s <sending port> UDP port for sending. Default 2020\n"
" -t <transport> [UART|UDP] Default UART\n"
" -v <debug verbosity> Add more verbosity\n"
" -w <sleep_time_us> Time in us for which each iteration sleep. Default 1ms\n",

Some files were not shown because too many files have changed in this diff Show More