mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-06 01:20:04 +08:00
Compare commits
99 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 849f4531a3 | |||
| fa5a6cf712 | |||
| 17ea6f68e2 | |||
| da7f6d06f3 | |||
| 28f9214e56 | |||
| 98d057b8c9 | |||
| 0c2099e788 | |||
| aecc0aa0c3 | |||
| 7132e674d6 | |||
| 083cd6f1c1 | |||
| 37a49dbb6a | |||
| 061fb9ac07 | |||
| cd2c366e22 | |||
| 11dbc7e17f | |||
| 0f1207dd7e | |||
| 1d8808183d | |||
| 18bac6aff5 | |||
| e0b33ba842 | |||
| 7cdb9e9412 | |||
| 4ce4fe05c5 | |||
| 82d32c7f3f | |||
| 4becf74cbc | |||
| 65884960fa | |||
| bd00aec936 | |||
| 9a066959d4 | |||
| 64c857562d | |||
| dd9b0ded0f | |||
| 641665f2e9 | |||
| b3d9efedfa | |||
| e450c5a9d9 | |||
| 40f971c082 | |||
| d7812f83f1 | |||
| b190d98d6d | |||
| 8d8b58efc3 | |||
| 6a32301ed5 | |||
| 59a1148aec | |||
| d2eefbf2fb | |||
| 386b56fbce | |||
| d22eef9396 | |||
| bed77c2988 | |||
| 297a428cc0 | |||
| cea8ad4236 | |||
| ac8f4e3c48 | |||
| 39b0c7b2bf | |||
| d9954ecaf0 | |||
| 36d15ada1c | |||
| 77b21680fb | |||
| 311a2bd3e8 | |||
| 3e5e5ab1d5 | |||
| c36340d29a | |||
| 212ec821b1 | |||
| 3606f86518 | |||
| 3dad79d8f5 | |||
| 164511a7b5 | |||
| 0e66b0876b | |||
| 308f614735 | |||
| 38782029ad | |||
| 0e86ab47f6 | |||
| 066464c4e8 | |||
| 25f3fe8456 | |||
| 343cf5603e | |||
| fc6b61dad1 | |||
| d99d52960e | |||
| d965f1cbc0 | |||
| 5a9fe312b5 | |||
| af8d178ae5 | |||
| b5f0a7ea03 | |||
| 5500a84b6a | |||
| f169247bc2 | |||
| 67082ccb2b | |||
| 100c64c790 | |||
| a736ba2435 | |||
| e847ef1a4d | |||
| 7482413005 | |||
| e817fb83f5 | |||
| 7a8203bf19 | |||
| 02c0f08060 | |||
| 920d6d84b5 | |||
| 54486b995e | |||
| dab90f86a4 | |||
| 78c05275d2 | |||
| e4d223f098 | |||
| 1ec10bfcc6 | |||
| 3abe2e82d1 | |||
| c9a7894230 | |||
| 2ed48f041c | |||
| 031bbb7f3e | |||
| df54f938ef | |||
| 63db61a700 | |||
| 4d7b875ee2 | |||
| b1e442b830 | |||
| eaa2ae9dc9 | |||
| 983234e29d | |||
| 195a900ecf | |||
| 037c821142 | |||
| 8e8497ff77 | |||
| 653fef56de | |||
| af1b4c473e | |||
| 8a7878f65c |
@@ -39,6 +39,7 @@ pipeline {
|
||||
"airmind_mindpx-v2_default",
|
||||
"av_x-v1_default",
|
||||
"bitcraze_crazyflie_default",
|
||||
"bitcraze_crazyflie21_default",
|
||||
"cuav_can-gps-v1_canbootloader",
|
||||
"cuav_can-gps-v1_default",
|
||||
"cuav_nora_default",
|
||||
@@ -57,8 +58,9 @@ pipeline {
|
||||
"mro_x21-777_default",
|
||||
"mro_x21_default",
|
||||
"nxp_fmuk66-v3_default",
|
||||
"nxp_fmuk66-v3_socketcan",
|
||||
"nxp_fmuk66-v3_rtps",
|
||||
"nxp_fmuk66-v3_socketcan",
|
||||
"nxp_fmuk66-e_default",
|
||||
"nxp_fmurt1062-v1_default",
|
||||
"nxp_ucans32k146_default",
|
||||
"omnibus_f4sd_default",
|
||||
@@ -68,13 +70,16 @@ pipeline {
|
||||
"px4_fmu-v2_multicopter",
|
||||
"px4_fmu-v2_rover",
|
||||
"px4_fmu-v2_test",
|
||||
"px4_fmu-v3_ctrlalloc",
|
||||
"px4_fmu-v3_default",
|
||||
"px4_fmu-v4_cannode",
|
||||
"px4_fmu-v4_ctrlalloc",
|
||||
"px4_fmu-v4_default",
|
||||
"px4_fmu-v4_optimized",
|
||||
"px4_fmu-v4pro_default",
|
||||
"px4_fmu-v5_default",
|
||||
"px4_fmu-v5_ctrlalloc",
|
||||
"px4_fmu-v5_debug",
|
||||
"px4_fmu-v5_default",
|
||||
"px4_fmu-v5_fixedwing",
|
||||
"px4_fmu-v5_multicopter",
|
||||
"px4_fmu-v5_optimized",
|
||||
|
||||
@@ -18,6 +18,7 @@ jobs:
|
||||
airmind_mindpx-v2_default,
|
||||
av_x-v1_default,
|
||||
bitcraze_crazyflie_default,
|
||||
bitcraze_crazyflie21_default,
|
||||
cuav_can-gps-v1_canbootloader,
|
||||
cuav_can-gps-v1_default,
|
||||
cuav_nora_default,
|
||||
@@ -35,10 +36,10 @@ jobs:
|
||||
mro_pixracerpro_default,
|
||||
mro_x21-777_default,
|
||||
mro_x21_default,
|
||||
nxp_fmuk66-v3_default,
|
||||
nxp_fmuk66-e_default,
|
||||
nxp_fmuk66-v3_socketcan,
|
||||
nxp_fmuk66-v3_default,
|
||||
nxp_fmuk66-v3_rtps,
|
||||
nxp_fmuk66-v3_socketcan,
|
||||
nxp_fmurt1062-v1_default,
|
||||
nxp_ucans32k146_default,
|
||||
omnibus_f4sd_default,
|
||||
@@ -48,11 +49,14 @@ jobs:
|
||||
px4_fmu-v2_multicopter,
|
||||
px4_fmu-v2_rover,
|
||||
px4_fmu-v2_test,
|
||||
px4_fmu-v3_ctrlalloc,
|
||||
px4_fmu-v3_default,
|
||||
px4_fmu-v4_cannode,
|
||||
px4_fmu-v4_ctrlalloc,
|
||||
px4_fmu-v4_default,
|
||||
px4_fmu-v4_optimized,
|
||||
px4_fmu-v4pro_default,
|
||||
px4_fmu-v5_ctrlalloc,
|
||||
px4_fmu-v5_default,
|
||||
px4_fmu-v5_fixedwing,
|
||||
px4_fmu-v5_multicopter,
|
||||
|
||||
@@ -23,7 +23,7 @@ jobs:
|
||||
make airframe_metadata
|
||||
cd build/px4_sitl_default/docs
|
||||
ls -ls *
|
||||
# TODO: deploy to devguide gitbook and s3
|
||||
# TODO: deploy to userguide gitbook and s3
|
||||
|
||||
module:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -38,7 +38,7 @@ jobs:
|
||||
make module_documentation
|
||||
cd build/px4_sitl_default/docs
|
||||
ls -ls *
|
||||
# TODO: deploy to devguide gitbook and s3
|
||||
# TODO: deploy to userguide gitbook and s3
|
||||
|
||||
parameter:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
@@ -101,8 +101,6 @@ msg/tmp/
|
||||
msg/topics_sources/
|
||||
platforms/posix/apps.cpp
|
||||
platforms/posix/apps.h
|
||||
src/lib/flight_tasks/FlightTasks_generated.cpp
|
||||
src/lib/flight_tasks/FlightTasks_generated.hpp
|
||||
src/lib/parameters/px4_parameters.c
|
||||
src/lib/parameters/px4_parameters.h
|
||||
src/lib/parameters/px4_parameters_public.h
|
||||
|
||||
+5
-5
@@ -4,7 +4,7 @@
|
||||
branch = master
|
||||
[submodule "src/drivers/uavcan/libuavcan"]
|
||||
path = src/drivers/uavcan/libuavcan
|
||||
url = https://github.com/PX4/uavcan.git
|
||||
url = https://github.com/PX4/libuavcan.git
|
||||
branch = px4
|
||||
[submodule "Tools/jMAVSim"]
|
||||
path = Tools/jMAVSim
|
||||
@@ -16,11 +16,11 @@
|
||||
branch = master
|
||||
[submodule "src/lib/matrix"]
|
||||
path = src/lib/matrix
|
||||
url = https://github.com/PX4/PX4-Matrix
|
||||
url = https://github.com/PX4/PX4-Matrix.git
|
||||
branch = master
|
||||
[submodule "src/lib/ecl"]
|
||||
path = src/lib/ecl
|
||||
url = https://github.com/PX4/PX4-ECL
|
||||
url = https://github.com/PX4/PX4-ECL.git
|
||||
branch = master
|
||||
[submodule "boards/atlflight/cmake_hexagon"]
|
||||
path = boards/atlflight/cmake_hexagon
|
||||
@@ -28,11 +28,11 @@
|
||||
branch = px4
|
||||
[submodule "src/drivers/gps/devices"]
|
||||
path = src/drivers/gps/devices
|
||||
url = https://github.com/PX4/PX4-GPSDrivers
|
||||
url = https://github.com/PX4/PX4-GPSDrivers.git
|
||||
branch = master
|
||||
[submodule "src/modules/micrortps_bridge/micro-CDR"]
|
||||
path = src/modules/micrortps_bridge/micro-CDR
|
||||
url = https://github.com/PX4/micro-CDR.git
|
||||
url = https://github.com/PX4/Micro-CDR.git
|
||||
branch = px4
|
||||
[submodule "platforms/nuttx/NuttX/nuttx"]
|
||||
path = platforms/nuttx/NuttX/nuttx
|
||||
|
||||
Vendored
+5
@@ -61,6 +61,11 @@ CONFIG:
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: av_x-v1_default
|
||||
bitcraze_crazyflie_default:
|
||||
short: bitcraze_crazyflie
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: bitcraze_crazyflie_default
|
||||
cuav_can-gps-v1_default:
|
||||
short: cuav_can-gps-v1_default
|
||||
buildType: MinSizeRel
|
||||
|
||||
Vendored
-1
@@ -128,7 +128,6 @@
|
||||
"${workspaceFolder}/build": true
|
||||
},
|
||||
"search.showLineNumbers": true,
|
||||
"search.smartCase": true,
|
||||
"telemetry.enableTelemetry": false,
|
||||
"terminal.integrated.copyOnSelection": true,
|
||||
"terminal.integrated.rightClickBehavior": "paste",
|
||||
|
||||
Vendored
-30
@@ -172,36 +172,6 @@ pipeline {
|
||||
|
||||
parallel {
|
||||
|
||||
stage('Devguide') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2020-11-18' }
|
||||
}
|
||||
steps {
|
||||
sh('export')
|
||||
unstash 'metadata_airframes'
|
||||
unstash 'metadata_parameters'
|
||||
unstash 'metadata_module_documentation'
|
||||
withCredentials([usernamePassword(credentialsId: 'px4buildbot_github_personal_token', passwordVariable: 'GIT_PASS', usernameVariable: 'GIT_USER')]) {
|
||||
sh('git clone https://${GIT_USER}:${GIT_PASS}@github.com/PX4/Devguide.git')
|
||||
sh('cp airframes.md Devguide/en/airframes/airframe_reference.md')
|
||||
sh('cp parameters.md Devguide/en/advanced/parameter_reference.md')
|
||||
sh('cp -R modules/*.md Devguide/en/middleware/')
|
||||
sh('cd Devguide; git status; git add .; git commit -a -m "Update PX4 Firmware metadata `date`" || true')
|
||||
sh('cd Devguide; git push origin master || true')
|
||||
sh('rm -rf Devguide')
|
||||
}
|
||||
}
|
||||
when {
|
||||
anyOf {
|
||||
branch 'master'
|
||||
branch 'pr-jenkins' // for testing
|
||||
}
|
||||
}
|
||||
options {
|
||||
skipDefaultCheckout()
|
||||
}
|
||||
}
|
||||
|
||||
stage('Userguide') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2020-11-18' }
|
||||
|
||||
@@ -271,6 +271,7 @@ misc_qgc_extra_firmware: \
|
||||
check_intel_aerofc-v1_default \
|
||||
check_mro_x21_default \
|
||||
check_bitcraze_crazyflie_default \
|
||||
check_bitcraze_crazyflie21_default \
|
||||
check_airmind_mindpx-v2_default \
|
||||
check_px4_fmu-v2_lpe \
|
||||
sizes
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name 3DR Iris Quadrotor SITL
|
||||
#
|
||||
# @type Quadrotor Wide
|
||||
#
|
||||
# @maintainer Julian Oes <julian@oes.ch>
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.mc_defaults
|
||||
. ${R}etc/init.d/rc.ctrlalloc
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
then
|
||||
param set MPC_USE_HTE 0
|
||||
|
||||
param set VM_MASS 1.5
|
||||
param set VM_INERTIA_XX 0.03
|
||||
param set VM_INERTIA_YY 0.03
|
||||
param set VM_INERTIA_ZZ 0.05
|
||||
|
||||
param set CA_AIRFRAME 0
|
||||
param set CA_METHOD 1
|
||||
param set CA_ACT0_MIN 0.0
|
||||
param set CA_ACT1_MIN 0.0
|
||||
param set CA_ACT2_MIN 0.0
|
||||
param set CA_ACT3_MIN 0.0
|
||||
param set CA_ACT0_MAX 1.0
|
||||
param set CA_ACT1_MAX 1.0
|
||||
param set CA_ACT2_MAX 1.0
|
||||
param set CA_ACT3_MAX 1.0
|
||||
|
||||
param set CA_MC_R0_PX 0.1515
|
||||
param set CA_MC_R0_PY 0.245
|
||||
param set CA_MC_R0_CT 6.5
|
||||
param set CA_MC_R0_KM 0.05
|
||||
param set CA_MC_R1_PX -0.1515
|
||||
param set CA_MC_R1_PY -0.1875
|
||||
param set CA_MC_R1_CT 6.5
|
||||
param set CA_MC_R1_KM 0.05
|
||||
param set CA_MC_R2_PX 0.1515
|
||||
param set CA_MC_R2_PY -0.245
|
||||
param set CA_MC_R2_CT 6.5
|
||||
param set CA_MC_R2_KM -0.05
|
||||
param set CA_MC_R3_PX -0.1515
|
||||
param set CA_MC_R3_PY 0.1875
|
||||
param set CA_MC_R3_CT 6.5
|
||||
param set CA_MC_R3_KM -0.05
|
||||
|
||||
fi
|
||||
|
||||
set MIXER direct
|
||||
@@ -21,7 +21,6 @@ then
|
||||
param set MPC_XY_VEL_P_ACC 3
|
||||
|
||||
param set RTL_DESCEND_ALT 10
|
||||
param set RTL_LAND_DELAY 0
|
||||
|
||||
param set TRIG_INTERFACE 3
|
||||
param set TRIG_MODE 4
|
||||
|
||||
@@ -21,7 +21,6 @@ then
|
||||
param set MPC_XY_VEL_P_ACC 3
|
||||
|
||||
param set RTL_DESCEND_ALT 10
|
||||
param set RTL_LAND_DELAY 0
|
||||
|
||||
param set TRIG_INTERFACE 3
|
||||
param set TRIG_MODE 4
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Typhoon H480 SITL
|
||||
#
|
||||
# @type Hexarotor x
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.mc_defaults
|
||||
. ${R}etc/init.d/rc.ctrlalloc
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
then
|
||||
param set MPC_XY_VEL_I_ACC 4
|
||||
param set MPC_XY_VEL_P_ACC 3
|
||||
|
||||
param set RTL_DESCEND_ALT 10
|
||||
param set RTL_LAND_DELAY 0
|
||||
|
||||
param set TRIG_INTERFACE 3
|
||||
param set TRIG_MODE 4
|
||||
param set MNT_MODE_IN 0
|
||||
param set MAV_PROTO_VER 2
|
||||
|
||||
param set MPC_USE_HTE 0
|
||||
|
||||
param set VM_MASS 2.66
|
||||
param set VM_INERTIA_XX 0.06
|
||||
param set VM_INERTIA_YY 0.06
|
||||
param set VM_INERTIA_ZZ 0.10
|
||||
|
||||
param set CA_AIRFRAME 0
|
||||
param set CA_METHOD 1
|
||||
param set CA_ACT0_MIN 0.0
|
||||
param set CA_ACT1_MIN 0.0
|
||||
param set CA_ACT2_MIN 0.0
|
||||
param set CA_ACT3_MIN 0.0
|
||||
param set CA_ACT4_MIN 0.0
|
||||
param set CA_ACT5_MIN 0.0
|
||||
param set CA_ACT0_MAX 1.0
|
||||
param set CA_ACT1_MAX 1.0
|
||||
param set CA_ACT2_MAX 1.0
|
||||
param set CA_ACT3_MAX 1.0
|
||||
param set CA_ACT4_MAX 1.0
|
||||
param set CA_ACT5_MAX 1.0
|
||||
|
||||
param set CA_MC_R0_PX 0.0
|
||||
param set CA_MC_R0_PY 1.0
|
||||
param set CA_MC_R0_CT 9.5
|
||||
param set CA_MC_R0_KM -0.05
|
||||
param set CA_MC_R1_PX 0.0
|
||||
param set CA_MC_R1_PY -1.0
|
||||
param set CA_MC_R1_CT 9.5
|
||||
param set CA_MC_R1_KM 0.05
|
||||
param set CA_MC_R2_PX 0.866025
|
||||
param set CA_MC_R2_PY -0.5
|
||||
param set CA_MC_R2_CT 9.5
|
||||
param set CA_MC_R2_KM -0.05
|
||||
param set CA_MC_R3_PX -0.866025
|
||||
param set CA_MC_R3_PY 0.5
|
||||
param set CA_MC_R3_CT 9.5
|
||||
param set CA_MC_R3_KM 0.05
|
||||
param set CA_MC_R4_PX 0.866025
|
||||
param set CA_MC_R4_PY 0.5
|
||||
param set CA_MC_R4_CT 9.5
|
||||
param set CA_MC_R4_KM 0.05
|
||||
param set CA_MC_R5_PX -0.866025
|
||||
param set CA_MC_R5_PY -0.5
|
||||
param set CA_MC_R5_CT 9.5
|
||||
param set CA_MC_R5_KM -0.05
|
||||
fi
|
||||
|
||||
set MAV_TYPE 13
|
||||
|
||||
# set MIXER hexa_x
|
||||
set MIXER direct
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
mixer append /dev/pwm_output0 etc/mixers/mount_legs.aux.mix
|
||||
|
||||
mavlink start -x -u 14558 -r 4000 -f -m onboard -o 14530
|
||||
|
||||
# shellcheck disable=SC2154
|
||||
mavlink stream -r 10 -s MOUNT_ORIENTATION -u $udp_gcs_port_local
|
||||
# shellcheck disable=SC2154
|
||||
mavlink stream -r 50 -s ATTITUDE_QUATERNION -u $udp_offboard_port_local
|
||||
mavlink stream -r 10 -s MOUNT_ORIENTATION -u $udp_offboard_port_local
|
||||
@@ -33,6 +33,7 @@
|
||||
|
||||
px4_add_romfs_files(
|
||||
10016_iris
|
||||
10017_iris_ctrlalloc
|
||||
10020_if750a
|
||||
10030_px4vision
|
||||
1010_iris_opt_flow
|
||||
@@ -73,4 +74,6 @@ px4_add_romfs_files(
|
||||
2507_cloudship
|
||||
6011_typhoon_h480
|
||||
6011_typhoon_h480.post
|
||||
6012_typhoon_ctrlalloc
|
||||
6012_typhoon_ctrlalloc.post
|
||||
)
|
||||
|
||||
@@ -27,6 +27,7 @@ set MIXER none
|
||||
set MIXER_AUX none
|
||||
set MIXER_FILE none
|
||||
set OUTPUT_MODE sim
|
||||
set EXTRA_MIXER_MODE none
|
||||
set PWM_OUT none
|
||||
set SDCARD_MIXERS_PATH etc/mixers
|
||||
set USE_IO no
|
||||
@@ -237,24 +238,30 @@ fi
|
||||
#
|
||||
. ${R}etc/init.d/rc.vehicle_setup
|
||||
|
||||
# GCS link
|
||||
mavlink start -x -u $udp_gcs_port_local -r 4000000
|
||||
mavlink stream -r 50 -s POSITION_TARGET_LOCAL_NED -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s LOCAL_POSITION_NED -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s GLOBAL_POSITION_INT -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s ATTITUDE -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s ATTITUDE_QUATERNION -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s ATTITUDE_TARGET -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s SERVO_OUTPUT_RAW_0 -u $udp_gcs_port_local
|
||||
mavlink stream -r 20 -s RC_CHANNELS -u $udp_gcs_port_local
|
||||
mavlink stream -r 10 -s OPTICAL_FLOW_RAD -u $udp_gcs_port_local
|
||||
if [ -e etc/init.d-posix/rc.mavlink_override ]
|
||||
then
|
||||
echo "Running non-default mavlink config rc.mavlink_override"
|
||||
sh etc/init.d-posix/rc.mavlink_override
|
||||
else
|
||||
# GCS link
|
||||
mavlink start -x -u $udp_gcs_port_local -r 4000000
|
||||
mavlink stream -r 50 -s POSITION_TARGET_LOCAL_NED -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s LOCAL_POSITION_NED -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s GLOBAL_POSITION_INT -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s ATTITUDE -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s ATTITUDE_QUATERNION -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s ATTITUDE_TARGET -u $udp_gcs_port_local
|
||||
mavlink stream -r 50 -s SERVO_OUTPUT_RAW_0 -u $udp_gcs_port_local
|
||||
mavlink stream -r 20 -s RC_CHANNELS -u $udp_gcs_port_local
|
||||
mavlink stream -r 10 -s OPTICAL_FLOW_RAD -u $udp_gcs_port_local
|
||||
|
||||
# API/Offboard link
|
||||
mavlink start -x -u $udp_offboard_port_local -r 4000000 -m onboard -o $udp_offboard_port_remote
|
||||
# API/Offboard link
|
||||
mavlink start -x -u $udp_offboard_port_local -r 4000000 -m onboard -o $udp_offboard_port_remote
|
||||
|
||||
# Onboard link to camera
|
||||
mavlink start -x -u $udp_onboard_payload_port_local -r 4000 -f -m onboard -o $udp_onboard_payload_port_remote
|
||||
# Onboard link to camera
|
||||
mavlink start -x -u $udp_onboard_payload_port_local -r 4000 -f -m onboard -o $udp_onboard_payload_port_remote
|
||||
|
||||
fi
|
||||
# execute autostart post script if any
|
||||
[ -e "$autostart_file".post ] && . "$autostart_file".post
|
||||
|
||||
|
||||
@@ -54,4 +54,5 @@ px4_add_romfs_files(
|
||||
rc.vehicle_setup
|
||||
rc.vtol_apps
|
||||
rc.vtol_defaults
|
||||
rc.ctrlalloc
|
||||
)
|
||||
|
||||
@@ -55,7 +55,6 @@ then
|
||||
param set NAV_LOITER_RAD 80
|
||||
|
||||
param set RTL_DESCEND_ALT 10
|
||||
param set RTL_LAND_DELAY 0
|
||||
param set RTL_RETURN_ALT 30
|
||||
|
||||
param set SDLOG_DIRS_MAX 7
|
||||
|
||||
@@ -42,7 +42,6 @@ then
|
||||
param set PWM_RATE 400
|
||||
|
||||
param set RTL_DESCEND_ALT 10
|
||||
param set RTL_LAND_DELAY 0
|
||||
param set RTL_RETURN_ALT 30
|
||||
fi
|
||||
|
||||
|
||||
@@ -112,7 +112,6 @@ then
|
||||
|
||||
# RTL Parameters
|
||||
param set RTL_DESCEND_ALT 5
|
||||
param set RTL_LAND_DELAY 0
|
||||
param set RTL_RETURN_ALT 5
|
||||
param set RTL_CONE_ANG 45
|
||||
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name S500 with control allocation
|
||||
#
|
||||
# @type Quadrotor x
|
||||
# @class Copter
|
||||
#
|
||||
# @maintainer Silvan Fuhrer
|
||||
#
|
||||
|
||||
. ${R}etcinit.d/rc.mc_defaults
|
||||
. ${R}etc/init.d/rc.ctrlalloc
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
then
|
||||
param set MPC_USE_HTE 0
|
||||
|
||||
param set VM_MASS 1.5
|
||||
param set VM_INERTIA_XX 0.03
|
||||
param set VM_INERTIA_YY 0.03
|
||||
param set VM_INERTIA_ZZ 0.05
|
||||
|
||||
param set CA_AIRFRAME 0
|
||||
param set CA_METHOD 1
|
||||
param set CA_ACT0_MIN 0.0
|
||||
param set CA_ACT1_MIN 0.0
|
||||
param set CA_ACT2_MIN 0.0
|
||||
param set CA_ACT3_MIN 0.0
|
||||
param set CA_ACT0_MAX 1.0
|
||||
param set CA_ACT1_MAX 1.0
|
||||
param set CA_ACT2_MAX 1.0
|
||||
param set CA_ACT3_MAX 1.0
|
||||
|
||||
param set CA_MC_R0_PX 0.177
|
||||
param set CA_MC_R0_PY 0.177
|
||||
param set CA_MC_R0_CT 6.5
|
||||
param set CA_MC_R0_KM 0.05
|
||||
param set CA_MC_R1_PX -0.177
|
||||
param set CA_MC_R1_PY -0.177
|
||||
param set CA_MC_R1_CT 6.5
|
||||
param set CA_MC_R1_KM 0.05
|
||||
param set CA_MC_R2_PX 0.177
|
||||
param set CA_MC_R2_PY -0.177
|
||||
param set CA_MC_R2_CT 6.5
|
||||
param set CA_MC_R2_KM -0.05
|
||||
param set CA_MC_R3_PX -0.177
|
||||
param set CA_MC_R3_PY 0.177
|
||||
param set CA_MC_R3_CT 6.5
|
||||
param set CA_MC_R3_KM -0.05
|
||||
|
||||
fi
|
||||
|
||||
set MIXER direct
|
||||
set PWM_OUT 1234
|
||||
|
||||
set MIXER_AUX direct_aux
|
||||
set PWM_AUX_OUT 1234
|
||||
@@ -0,0 +1,81 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Crazyflie 2.1
|
||||
#
|
||||
# @type Quadrotor x
|
||||
# @class Copter
|
||||
#
|
||||
# @maintainer Dennis Shtatov <densht@gmail.com>
|
||||
#
|
||||
# @board px4_fmu-v2 exclude
|
||||
# @board px4_fmu-v3 exclude
|
||||
# @board px4_fmu-v4 exclude
|
||||
# @board px4_fmu-v4pro exclude
|
||||
# @board px4_fmu-v5 exclude
|
||||
# @board px4_fmu-v5x exclude
|
||||
# @board intel_aerofc-v1 exclude
|
||||
#
|
||||
. ${R}etc/init.d/rc.mc_defaults
|
||||
|
||||
set MIXER quad_x_cw
|
||||
set PWM_OUT 1234
|
||||
if [ $AUTOCNF = yes ]
|
||||
then
|
||||
param set SYS_MC_EST_GROUP 3
|
||||
param set SYS_HAS_MAG 0
|
||||
|
||||
param set BAT_N_CELLS 1
|
||||
param set BAT1_N_CELLS 1
|
||||
param set BAT1_SOURCE 1
|
||||
|
||||
param set CBRK_SUPPLY_CHK 894281
|
||||
param set CBRK_USB_CHK 197848
|
||||
param set COM_RC_IN_MODE 1
|
||||
|
||||
param set IMU_GYRO_CUTOFF 100
|
||||
param set IMU_ACCEL_CUTOFF 30
|
||||
|
||||
param set MC_AIRMODE 1
|
||||
param set IMU_DGYRO_CUTOFF 70
|
||||
param set MC_PITCHRATE_D 0.002
|
||||
param set MC_PITCHRATE_I 0.2
|
||||
param set MC_PITCHRATE_P 0.07
|
||||
param set MC_PITCH_P 6.5
|
||||
param set MC_ROLLRATE_D 0.002
|
||||
param set MC_ROLLRATE_I 0.2
|
||||
param set MC_ROLLRATE_P 0.07
|
||||
param set MC_ROLL_P 6.5
|
||||
param set MC_YAW_P 3
|
||||
|
||||
param set MPC_THR_HOVER 0.7
|
||||
param set MPC_THR_MAX 1
|
||||
param set MPC_Z_P 1.5
|
||||
param set MPC_Z_VEL_P_ACC 8
|
||||
param set MPC_Z_VEL_I_ACC 6
|
||||
param set MPC_HOLD_MAX_XY 0.1
|
||||
param set MPC_MAX_FLOW_HGT 3
|
||||
#param set IMU_GYRO_NF_FREQ 10
|
||||
#param set IMU_GYRO_NF_BW 20
|
||||
|
||||
param set NAV_RCL_ACT 3
|
||||
|
||||
param set PWM_DISARMED 0
|
||||
param set PWM_MIN 0
|
||||
param set PWM_MAX 255
|
||||
|
||||
# Run the motors at 328.125 kHz (recommended)
|
||||
param set PWM_RATE 3921
|
||||
|
||||
param set SDLOG_PROFILE 1
|
||||
|
||||
param set SENS_FLOW_MINRNG 0.05
|
||||
|
||||
|
||||
fi
|
||||
|
||||
set PWM_DISARMED none
|
||||
set PWM_MAX none
|
||||
set PWM_MIN none
|
||||
|
||||
syslink start
|
||||
mavlink start -d /dev/bridge0 -b 57600 -m osd -r 40000
|
||||
@@ -0,0 +1,75 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# @name Hex X with control allocation
|
||||
#
|
||||
# @type Hexarotor x
|
||||
# @class Copter
|
||||
#
|
||||
# @maintainer Silvan Fuhrer
|
||||
#
|
||||
|
||||
. ${R}etc/init.d/rc.mc_defaults
|
||||
. ${R}etc/init.d/rc.ctrlalloc
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
then
|
||||
param set MPC_USE_HTE 0
|
||||
|
||||
param set VM_MASS 1.5
|
||||
param set VM_INERTIA_XX 0.03
|
||||
param set VM_INERTIA_YY 0.03
|
||||
param set VM_INERTIA_ZZ 0.05
|
||||
|
||||
param set CA_AIRFRAME 0
|
||||
param set CA_METHOD 1
|
||||
param set CA_ACT0_MIN 0.0
|
||||
param set CA_ACT1_MIN 0.0
|
||||
param set CA_ACT2_MIN 0.0
|
||||
param set CA_ACT3_MIN 0.0
|
||||
param set CA_ACT4_MIN 0.0
|
||||
param set CA_ACT5_MIN 0.0
|
||||
|
||||
param set CA_ACT0_MAX 1.0
|
||||
param set CA_ACT1_MAX 1.0
|
||||
param set CA_ACT2_MAX 1.0
|
||||
param set CA_ACT3_MAX 1.0
|
||||
param set CA_ACT4_MAX 1.0
|
||||
param set CA_ACT5_MAX 1.0
|
||||
|
||||
param set CA_MC_R0_PX 0.0
|
||||
param set CA_MC_R0_PY 0.275
|
||||
param set CA_MC_R0_CT 6.5
|
||||
param set CA_MC_R0_KM -0.05
|
||||
|
||||
param set CA_MC_R1_PX 0.0
|
||||
param set CA_MC_R1_PY -0.275
|
||||
param set CA_MC_R1_CT 6.5
|
||||
param set CA_MC_R1_KM 0.05
|
||||
|
||||
param set CA_MC_R2_PX 0.238
|
||||
param set CA_MC_R2_PY -0.1375
|
||||
param set CA_MC_R2_CT 6.5
|
||||
param set CA_MC_R2_KM -0.05
|
||||
|
||||
param set CA_MC_R3_PX -0.238
|
||||
param set CA_MC_R3_PY 0.1375
|
||||
param set CA_MC_R3_CT 6.5
|
||||
param set CA_MC_R3_KM 0.05
|
||||
|
||||
param set CA_MC_R4_PX 0.238
|
||||
param set CA_MC_R4_PY 0.1375
|
||||
param set CA_MC_R4_CT 6.5
|
||||
param set CA_MC_R4_KM 0.05
|
||||
|
||||
param set CA_MC_R5_PX -0.238
|
||||
param set CA_MC_R5_PY -0.1375
|
||||
param set CA_MC_R5_CT 6.5
|
||||
param set CA_MC_R5_KM -0.05
|
||||
|
||||
fi
|
||||
|
||||
set MIXER direct
|
||||
set PWM_OUT 123456
|
||||
|
||||
set MIXER_AUX direct_aux
|
||||
set PWM_AUX_OUT 123456
|
||||
@@ -70,6 +70,7 @@ px4_add_romfs_files(
|
||||
4015_holybro_s500
|
||||
4016_holybro_px4vision
|
||||
4017_nxp_hovergames
|
||||
4018_s500_ctrlalloc
|
||||
4020_hk_micro_pcb
|
||||
4030_3dr_solo
|
||||
4031_3dr_quad
|
||||
@@ -90,6 +91,7 @@ px4_add_romfs_files(
|
||||
4250_teal
|
||||
4500_clover4
|
||||
4900_crazyflie
|
||||
4901_crazyflie21
|
||||
|
||||
# [5000, 5999] Quadrotor +"
|
||||
5001_quad_+
|
||||
@@ -97,6 +99,7 @@ px4_add_romfs_files(
|
||||
# [6000, 6999] Hexarotor x"
|
||||
6001_hexa_x
|
||||
6002_draco_r
|
||||
6003_hexa_x_ctrlalloc
|
||||
|
||||
# [7000, 7999] Hexarotor +"
|
||||
7001_hexa_+
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Standard apps for new control allocation and controllers
|
||||
#
|
||||
# NOTE: Script variables are declared/initialized/unset in the rcS script.
|
||||
#
|
||||
|
||||
#
|
||||
# Start angular velocity controller
|
||||
#
|
||||
angular_velocity_controller start
|
||||
mc_rate_control stop
|
||||
|
||||
#
|
||||
# Start Control Allocator
|
||||
#
|
||||
control_allocator start
|
||||
|
||||
#
|
||||
# Disable hover thrust estimator and prearming
|
||||
# These features are currently incompatible with control allocation
|
||||
#
|
||||
# TODO: fix
|
||||
#
|
||||
param set MPC_USE_HTE 0
|
||||
param set COM_PREARM_MODE 0
|
||||
@@ -41,6 +41,7 @@ then
|
||||
#
|
||||
param set NAV_ACC_RAD 10
|
||||
|
||||
param set MIS_DIST_WPS 5000
|
||||
param set MIS_LTRMIN_ALT 25
|
||||
param set MIS_TAKEOFF_ALT 25
|
||||
|
||||
|
||||
@@ -11,8 +11,11 @@
|
||||
|
||||
set OUTPUT_CMD pwm_out
|
||||
set MIXER_AUX_FILE none
|
||||
set OUTPUT_AUX_DEV /dev/pwm_output1
|
||||
set MIXER_EXTRA_FILE none
|
||||
|
||||
set OUTPUT_DEV none
|
||||
set OUTPUT_AUX_DEV /dev/pwm_output1
|
||||
set OUTPUT_EXTRA_DEV /dev/pwm_output0
|
||||
|
||||
#
|
||||
# If mount (gimbal) control is enabled and output mode is AUX, set the aux
|
||||
@@ -394,7 +397,115 @@ then
|
||||
pwm failsafe -c 8 -p p:PWM_MAIN_FAIL8
|
||||
fi
|
||||
|
||||
if [ $EXTRA_MIXER_MODE != none ]
|
||||
then
|
||||
|
||||
if [ -f ${SDCARD_MIXERS_PATH}/${MIXER_EXTRA}.aux.mix ]
|
||||
then
|
||||
# Use the mixer file from the SD-card if it exists.
|
||||
set MIXER_EXTRA_FILE ${SDCARD_MIXERS_PATH}/${MIXER_EXTRA}.aux.mix
|
||||
else
|
||||
# Try out the old convention, for backward compatibility.
|
||||
if [ -f ${SDCARD_MIXERS_PATH}/${MIXER_EXTRA}.mix ]
|
||||
then
|
||||
set MIXER_EXTRA_FILE ${SDCARD_MIXERS_PATH}/${MIXER_EXTRA}.mix
|
||||
else
|
||||
set MIXER_EXTRA_FILE /etc/mixers/${MIXER_EXTRA}.aux.mix
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if mixer load ${OUTPUT_EXTRA_DEV} ${MIXER_EXTRA_FILE}
|
||||
then
|
||||
echo "INFO [init] Mixer: ${MIXER_EXTRA_FILE} on ${OUTPUT_EXTRA_DEV}"
|
||||
else
|
||||
echo "ERROR [init] Failed loading mixer: ${MIXER_EXTRA_FILE}"
|
||||
echo "ERROR [init] Failed loading mixer: ${MIXER_EXTRA_FILE}" >> $LOG_FILE
|
||||
tune_control play -t 20
|
||||
fi
|
||||
|
||||
if [ $PWM_EXTRA_OUT != none ]
|
||||
then
|
||||
# Set PWM output frequency.
|
||||
if [ $PWM_EXTRA_RATE != none ]
|
||||
then
|
||||
pwm rate -c ${PWM_EXTRA_OUT} -r ${PWM_EXTRA_RATE}
|
||||
fi
|
||||
|
||||
# Set disarmed, min and max PWM values.
|
||||
if [ $PWM_EXTRA_DISARM != none ]
|
||||
then
|
||||
pwm disarmed -c ${PWM_EXTRA_OUT} -p ${PWM_EXTRA_DISARM}
|
||||
fi
|
||||
if [ $PWM_EXTRA_MIN != none ]
|
||||
then
|
||||
pwm min -c ${PWM_EXTRA_OUT} -p ${PWM_EXTRA_MIN}
|
||||
fi
|
||||
if [ $PWM_EXTRA_MAX != none ]
|
||||
then
|
||||
pwm max -c ${PWM_EXTRA_OUT} -p ${PWM_EXTRA_MAX}
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
# Per channel disarmed settings.
|
||||
#
|
||||
pwm disarmed -c 1 -p p:PWM_EXTRA_DIS1 -d ${OUTPUT_EXTRA_DEV}
|
||||
pwm disarmed -c 2 -p p:PWM_EXTRA_DIS2 -d ${OUTPUT_EXTRA_DEV}
|
||||
pwm disarmed -c 3 -p p:PWM_EXTRA_DIS3 -d ${OUTPUT_EXTRA_DEV}
|
||||
pwm disarmed -c 4 -p p:PWM_EXTRA_DIS3 -d ${OUTPUT_EXTRA_DEV}
|
||||
pwm disarmed -c 5 -p p:PWM_EXTRA_DIS5 -d ${OUTPUT_EXTRA_DEV}
|
||||
pwm disarmed -c 6 -p p:PWM_EXTRA_DIS3 -d ${OUTPUT_EXTRA_DEV}
|
||||
pwm disarmed -c 7 -p p:PWM_EXTRA_DIS7 -d ${OUTPUT_EXTRA_DEV}
|
||||
pwm disarmed -c 8 -p p:PWM_EXTRA_DIS8 -d ${OUTPUT_EXTRA_DEV}
|
||||
|
||||
#
|
||||
# Per channel min settings.
|
||||
#
|
||||
pwm min -c 1 -p p:PWM_EXTRA_MIN1 -d ${OUTPUT_EXTRA_DEV}
|
||||
pwm min -c 2 -p p:PWM_EXTRA_MIN2 -d ${OUTPUT_EXTRA_DEV}
|
||||
pwm min -c 3 -p p:PWM_EXTRA_MIN3 -d ${OUTPUT_EXTRA_DEV}
|
||||
pwm min -c 4 -p p:PWM_EXTRA_MIN4 -d ${OUTPUT_EXTRA_DEV}
|
||||
pwm min -c 5 -p p:PWM_EXTRA_MIN5 -d ${OUTPUT_EXTRA_DEV}
|
||||
pwm min -c 6 -p p:PWM_EXTRA_MIN6 -d ${OUTPUT_EXTRA_DEV}
|
||||
pwm min -c 7 -p p:PWM_EXTRA_MIN7 -d ${OUTPUT_EXTRA_DEV}
|
||||
pwm min -c 8 -p p:PWM_EXTRA_MIN8 -d ${OUTPUT_EXTRA_DEV}
|
||||
|
||||
#
|
||||
# Per channel max settings.
|
||||
#
|
||||
pwm max -c 1 -p p:PWM_EXTRA_MAX1 -d ${OUTPUT_EXTRA_DEV}
|
||||
pwm max -c 2 -p p:PWM_EXTRA_MAX2 -d ${OUTPUT_EXTRA_DEV}
|
||||
pwm max -c 3 -p p:PWM_EXTRA_MAX3 -d ${OUTPUT_EXTRA_DEV}
|
||||
pwm max -c 4 -p p:PWM_EXTRA_MAX4 -d ${OUTPUT_EXTRA_DEV}
|
||||
pwm max -c 5 -p p:PWM_EXTRA_MAX5 -d ${OUTPUT_EXTRA_DEV}
|
||||
pwm max -c 6 -p p:PWM_EXTRA_MAX6 -d ${OUTPUT_EXTRA_DEV}
|
||||
pwm max -c 7 -p p:PWM_EXTRA_MAX7 -d ${OUTPUT_EXTRA_DEV}
|
||||
pwm max -c 8 -p p:PWM_EXTRA_MAX8 -d ${OUTPUT_EXTRA_DEV}
|
||||
|
||||
if [ $FAILSAFE_EXTRA != none ]
|
||||
then
|
||||
pwm failsafe -c ${PWM_EXTRA_OUT} -p ${FAILSAFE} -d ${OUTPUT_EXTRA_DEV}
|
||||
fi
|
||||
|
||||
#
|
||||
# Per channel failsafe settings.
|
||||
#
|
||||
pwm failsafe -c 1 -p p:PWM_EXTRA_FAIL1 -d ${OUTPUT_EXTRA_DEV}
|
||||
pwm failsafe -c 2 -p p:PWM_EXTRA_FAIL2 -d ${OUTPUT_EXTRA_DEV}
|
||||
pwm failsafe -c 3 -p p:PWM_EXTRA_FAIL3 -d ${OUTPUT_EXTRA_DEV}
|
||||
pwm failsafe -c 4 -p p:PWM_EXTRA_FAIL4 -d ${OUTPUT_EXTRA_DEV}
|
||||
pwm failsafe -c 5 -p p:PWM_EXTRA_FAIL5 -d ${OUTPUT_EXTRA_DEV}
|
||||
pwm failsafe -c 6 -p p:PWM_EXTRA_FAIL6 -d ${OUTPUT_EXTRA_DEV}
|
||||
pwm failsafe -c 7 -p p:PWM_EXTRA_FAIL7 -d ${OUTPUT_EXTRA_DEV}
|
||||
pwm failsafe -c 8 -p p:PWM_EXTRA_FAIL8 -d ${OUTPUT_EXTRA_DEV}
|
||||
|
||||
fi
|
||||
|
||||
unset OUTPUT_CMD
|
||||
unset MIXER_AUX_FILE
|
||||
unset OUTPUT_AUX_DEV
|
||||
unset MIXER_EXTRA_FILE
|
||||
|
||||
unset OUTPUT_DEV
|
||||
unset OUTPUT_AUX_DEV
|
||||
unset OUTPUT_EXTRA_DEV
|
||||
|
||||
@@ -13,7 +13,6 @@ then
|
||||
|
||||
param set RTL_RETURN_ALT 30
|
||||
param set RTL_DESCEND_ALT 10
|
||||
param set RTL_LAND_DELAY 0
|
||||
|
||||
param set PWM_MAX 1950
|
||||
param set PWM_MIN 1075
|
||||
|
||||
@@ -21,7 +21,7 @@ vtol_att_control start
|
||||
|
||||
mc_rate_control start vtol
|
||||
mc_att_control start vtol
|
||||
flight_mode_manager start vtol
|
||||
flight_mode_manager start
|
||||
mc_pos_control start vtol
|
||||
mc_hover_thrust_estimator start
|
||||
|
||||
|
||||
@@ -18,6 +18,8 @@ then
|
||||
param set EKF2_ARSP_THR 10
|
||||
param set EKF2_FUSE_BETA 1
|
||||
|
||||
param set MIS_DIST_WPS 5000
|
||||
|
||||
param set MPC_ACC_HOR_MAX 2
|
||||
param set MPC_TKO_SPEED 1
|
||||
param set MPC_VEL_MANUAL 3
|
||||
@@ -31,7 +33,6 @@ then
|
||||
param set PWM_AUX_RATE 50
|
||||
param set PWM_RATE 400
|
||||
|
||||
param set RTL_LAND_DELAY 0
|
||||
param set RTL_TYPE 1
|
||||
|
||||
param set WV_EN 1
|
||||
|
||||
@@ -26,6 +26,7 @@ set AUX_MODE pwm
|
||||
set DATAMAN_OPT ""
|
||||
set FAILSAFE none
|
||||
set FAILSAFE_AUX none
|
||||
set FAILSAFE_EXTRA none
|
||||
set FCONFIG /fs/microsd/etc/config.txt
|
||||
set FEXTRAS /fs/microsd/etc/extras.txt
|
||||
set FMU_MODE pwm
|
||||
@@ -38,20 +39,27 @@ set MAV_TYPE none
|
||||
set MIXER none
|
||||
set MIXER_AUX none
|
||||
set MIXER_FILE none
|
||||
set MIXER_EXTRA none
|
||||
set MK_MODE none
|
||||
set MKBLCTRL_ARG ""
|
||||
set OUTPUT_MODE none
|
||||
set PARAM_FILE /fs/microsd/params
|
||||
set PWM_AUX_DISARMED p:PWM_AUX_DISARMED
|
||||
set PWM_AUX_MAX p:PWM_AUX_MAX
|
||||
set PWM_AUX_MIN p:PWM_AUX_MIN
|
||||
set PWM_AUX_OUT none
|
||||
set PWM_AUX_RATE p:PWM_AUX_RATE
|
||||
set PWM_DISARMED p:PWM_DISARMED
|
||||
set PWM_MAX p:PWM_MAX
|
||||
set PWM_MIN p:PWM_MIN
|
||||
set PWM_OUT none
|
||||
set PWM_RATE p:PWM_RATE
|
||||
set PWM_AUX_DISARMED p:PWM_AUX_DISARMED
|
||||
set PWM_AUX_MAX p:PWM_AUX_MAX
|
||||
set PWM_AUX_MIN p:PWM_AUX_MIN
|
||||
set PWM_AUX_OUT none
|
||||
set PWM_AUX_RATE p:PWM_AUX_RATE
|
||||
set PWM_EXTRA_DISARMED p:PWM_EXTRA_DISARMED
|
||||
set PWM_EXTRA_MAX p:PWM_EXTRA_MAX
|
||||
set PWM_EXTRA_MIN p:PWM_EXTRA_MIN
|
||||
set PWM_EXTRA_OUT none
|
||||
set PWM_EXTRA_RATE p:PWM_EXTRA_RATE
|
||||
set EXTRA_MIXER_MODE none
|
||||
set RC_INPUT_ARGS ""
|
||||
set SDCARD_MIXERS_PATH /fs/microsd/etc/mixers
|
||||
set STARTUP_TUNE 1
|
||||
|
||||
@@ -43,4 +43,5 @@ px4_add_romfs_files(
|
||||
tiltrotor_sitl.main.mix
|
||||
uuv_x_sitl.main.mix
|
||||
vectored6dof_sitl.main.mix
|
||||
tiltrotor_sitl_direct.main.mix
|
||||
)
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
Mixer for quad tiltrotor (x motor configuration)
|
||||
================================================
|
||||
|
||||
A: 0
|
||||
A: 1
|
||||
A: 2
|
||||
A: 3
|
||||
A: 4
|
||||
A: 5
|
||||
A: 6
|
||||
A: 7
|
||||
A: 8
|
||||
A: 9
|
||||
A: 10
|
||||
@@ -47,6 +47,7 @@ px4_add_romfs_files(
|
||||
coax.main.mix
|
||||
delta.main.mix
|
||||
deltaquad.main.mix
|
||||
direct.main.mix
|
||||
dodeca_bottom_cox.aux.mix
|
||||
dodeca_top_cox.main.mix
|
||||
firefly6.aux.mix
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# Direct mixer
|
||||
|
||||
A: 0
|
||||
A: 1
|
||||
A: 2
|
||||
A: 3
|
||||
A: 4
|
||||
A: 5
|
||||
A: 6
|
||||
A: 7
|
||||
@@ -1,6 +1,7 @@
|
||||
from xml.sax.saxutils import escape
|
||||
import codecs
|
||||
import os
|
||||
import html
|
||||
|
||||
class MarkdownTablesOutput():
|
||||
def __init__(self, groups, board, image_path):
|
||||
@@ -89,7 +90,7 @@ class MarkdownTablesOutput():
|
||||
maintainer = param.GetMaintainer()
|
||||
maintainer_entry = ''
|
||||
if maintainer != '':
|
||||
maintainer_entry = '<p>Maintainer: %s</p>' % (maintainer)
|
||||
maintainer_entry = '<p>Maintainer: %s</p>' % (html.escape(maintainer))
|
||||
url = param.GetFieldValue('url')
|
||||
name_anchor='id="%s_%s_%s"' % (group.GetClass(),group.GetName(),name)
|
||||
name_anchor=name_anchor.replace(' ','_').lower()
|
||||
|
||||
@@ -97,7 +97,7 @@ def main():
|
||||
# handle mixer files differently than startup files
|
||||
if file_path.endswith(".mix"):
|
||||
if line.startswith(("Z:", "M:", "R: ", "O:", "S:",
|
||||
"H:", "T:", "P:")):
|
||||
"H:", "T:", "P:", "A:")):
|
||||
# reduce multiple consecutive spaces into a
|
||||
# single space
|
||||
line_reduced = re.sub(' +', ' ', line)
|
||||
|
||||
+26
-20
@@ -1,7 +1,7 @@
|
||||
#! /usr/bin/env bash
|
||||
|
||||
## Bash script to setup PX4 development environment on Arch Linux.
|
||||
## Tested on Manjaro 18.0.1.
|
||||
## Tested on Manjaro 20.2.1.
|
||||
##
|
||||
## Installs:
|
||||
## - Common dependencies and tools for nuttx, jMAVSim
|
||||
@@ -33,7 +33,7 @@ do
|
||||
done
|
||||
|
||||
# script directory
|
||||
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||
DIR=$(dirname $0)
|
||||
|
||||
# check requirements.txt exists (script not run in source tree)
|
||||
REQUIREMENTS_FILE="requirements.txt"
|
||||
@@ -90,22 +90,27 @@ if [[ $INSTALL_NUTTX == "true" ]]; then
|
||||
sudo pacman -R modemmanager --noconfirm
|
||||
|
||||
# arm-none-eabi-gcc
|
||||
NUTTX_GCC_VERSION="7-2017-q4-major"
|
||||
GCC_VER_STR=$(arm-none-eabi-gcc --version)
|
||||
STATUSRETVAL=$(echo $GCC_VER_STR | grep -c "${NUTTX_GCC_VERSION}")
|
||||
NUTTX_GCC_VERSION="10-2020-q4-major"
|
||||
NUTTX_GCC_VERSION_SHORT="10-2020q4"
|
||||
|
||||
if [ $STATUSRETVAL -eq "1" ]; then
|
||||
source $HOME/.profile # load changed path for the case the script is reran before relogin
|
||||
if [ $(which arm-none-eabi-gcc) ]; then
|
||||
GCC_VER_STR=$(arm-none-eabi-gcc --version)
|
||||
GCC_FOUND_VER=$(echo $GCC_VER_STR | grep -c "${NUTTX_GCC_VERSION}")
|
||||
fi
|
||||
|
||||
if [[ "$GCC_FOUND_VER" == "1" ]]; then
|
||||
echo "arm-none-eabi-gcc-${NUTTX_GCC_VERSION} found, skipping installation"
|
||||
|
||||
else
|
||||
echo "Installing arm-none-eabi-gcc-${NUTTX_GCC_VERSION}";
|
||||
wget -O /tmp/gcc-arm-none-eabi-${NUTTX_GCC_VERSION}-linux.tar.bz2 https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/7-2017q4/gcc-arm-none-eabi-${NUTTX_GCC_VERSION}-linux.tar.bz2 && \
|
||||
wget -O /tmp/gcc-arm-none-eabi-${NUTTX_GCC_VERSION}-linux.tar.bz2 https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/${NUTTX_GCC_VERSION_SHORT}/gcc-arm-none-eabi-${NUTTX_GCC_VERSION}-x86_64-linux.tar.bz2 && \
|
||||
sudo tar -jxf /tmp/gcc-arm-none-eabi-${NUTTX_GCC_VERSION}-linux.tar.bz2 -C /opt/;
|
||||
|
||||
# add arm-none-eabi-gcc to user's PATH
|
||||
exportline="export PATH=/opt/gcc-arm-none-eabi-${NUTTX_GCC_VERSION}/bin:\$PATH"
|
||||
|
||||
if grep -Fxq "$exportline" $HOME/.profile;
|
||||
then
|
||||
if grep -Fxq "$exportline" $HOME/.profile; then
|
||||
echo "${NUTTX_GCC_VERSION} path already set.";
|
||||
else
|
||||
echo $exportline >> $HOME/.profile;
|
||||
@@ -132,27 +137,28 @@ if [[ $INSTALL_SIM == "true" ]]; then
|
||||
# PX4 gazebo simulation dependencies
|
||||
sudo pacman -S --noconfirm --needed \
|
||||
dmidecode \
|
||||
eigen3 \
|
||||
eigen \
|
||||
hdf5 \
|
||||
opencv \
|
||||
protobuf \
|
||||
vtk \
|
||||
yay \
|
||||
;
|
||||
|
||||
# add community binary repository for gazebo and ROS
|
||||
# https://wiki.archlinux.org/index.php/Unofficial_user_repositories#oscloud
|
||||
if ! grep -q oscloud /etc/pacman.conf; then
|
||||
echo "# ROS gazebo repository for PX4
|
||||
[oscloud]
|
||||
SigLevel = Never
|
||||
Server = http://repo.oscloud.info/" | sudo tee -a /etc/pacman.conf > /dev/null
|
||||
fi
|
||||
# enable multicore gazebo compilation
|
||||
sudo sed -i '/MAKEFLAGS=/c\MAKEFLAGS="-j4"' /etc/makepkg.conf
|
||||
|
||||
sudo pacman -Sy --noconfirm --needed gazebo
|
||||
# install gazebo from AUR
|
||||
yay -S gazebo --noconfirm
|
||||
|
||||
if sudo dmidecode -t system | grep -q "Manufacturer: VMware, Inc." ; then
|
||||
# fix VMWare 3D graphics acceleration for gazebo
|
||||
echo "export SVGA_VGPU10=0" >> ~/.profile
|
||||
exportline="export SVGA_VGPU10=0"
|
||||
|
||||
if grep -Fxq "$exportline" $HOME/.profile; then
|
||||
else
|
||||
echo $exportline >> $HOME/.profile;
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
+1
-1
Submodule Tools/sitl_gazebo updated: e2ff39298f...4048ae60ae
+3
-4
@@ -84,6 +84,8 @@ for file in "$@"; do
|
||||
cp "$file" $rootfs/
|
||||
done
|
||||
|
||||
export PX4_SIM_MODEL=${model}
|
||||
|
||||
SIM_PID=0
|
||||
|
||||
if [ "$program" == "jmavsim" ] && [ ! -n "$no_sim" ]; then
|
||||
@@ -161,7 +163,7 @@ elif [ "$program" == "gazebo" ] && [ ! -n "$no_sim" ]; then
|
||||
# gzserver needs to be running to avoid a race. Since the launch
|
||||
# is putting it into the background we need to avoid it by backing off
|
||||
sleep 3
|
||||
nice -n 20 gzclient --verbose &
|
||||
nice -n 20 gzclient --verbose --gui-client-plugin libgazebo_user_camera_plugin.so &
|
||||
GUI_PID=$!
|
||||
fi
|
||||
else
|
||||
@@ -204,9 +206,6 @@ fi
|
||||
|
||||
echo SITL COMMAND: $sitl_command
|
||||
|
||||
export PX4_SIM_MODEL=${model}
|
||||
|
||||
|
||||
if [ "$debugger" == "lldb" ]; then
|
||||
eval lldb -- $sitl_command
|
||||
elif [ "$debugger" == "gdb" ]; then
|
||||
|
||||
@@ -32,7 +32,6 @@ CONFIG_ARCH_CHIP_STM32=y
|
||||
CONFIG_ARCH_CHIP_STM32F427V=y
|
||||
CONFIG_ARCH_INTERRUPTSTACK=512
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_ARMV7M_LAZYFPU=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
|
||||
@@ -52,7 +52,6 @@ CONFIG_ARMV7M_BASEPRI_WAR=y
|
||||
CONFIG_ARMV7M_DCACHE=y
|
||||
CONFIG_ARMV7M_DTCM=y
|
||||
CONFIG_ARMV7M_ICACHE=y
|
||||
CONFIG_ARMV7M_LAZYFPU=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
|
||||
@@ -24,7 +24,7 @@ px4_add_board(
|
||||
distance_sensor # all available distance sensor drivers
|
||||
gps
|
||||
#imu # all available imu drivers
|
||||
imu/mpu9250
|
||||
imu/invensense/mpu9250
|
||||
linux_pwm_out
|
||||
#magnetometer # all available magnetometer drivers
|
||||
magnetometer/hmc5883
|
||||
|
||||
@@ -11,7 +11,8 @@ px4_add_board(
|
||||
barometer/lps25h
|
||||
distance_sensor/vl53l0x
|
||||
gps
|
||||
imu/mpu9250
|
||||
magnetometer/akm/ak8963
|
||||
imu/invensense/mpu9250
|
||||
optical_flow/pmw3901
|
||||
pwm_out
|
||||
MODULES
|
||||
@@ -23,9 +24,9 @@ px4_add_board(
|
||||
events
|
||||
flight_mode_manager
|
||||
land_detector
|
||||
landing_target_estimator
|
||||
#landing_target_estimator
|
||||
load_mon
|
||||
local_position_estimator
|
||||
#local_position_estimator
|
||||
logger
|
||||
mavlink
|
||||
mc_att_control
|
||||
@@ -37,7 +38,7 @@ px4_add_board(
|
||||
sensors
|
||||
#temperature_compensation
|
||||
SYSTEMCMDS
|
||||
bl_update
|
||||
#bl_update
|
||||
dmesg
|
||||
dumpfile
|
||||
esc_calib
|
||||
|
||||
@@ -6,10 +6,11 @@
|
||||
board_adc start
|
||||
|
||||
# Onboard I2C
|
||||
mpu9250 -I -R 12 start
|
||||
|
||||
# I2C bypass of mpu
|
||||
lps25h -I start
|
||||
if mpu9250_i2c -I -b 3 -a 0x69 -R 6 start; then
|
||||
sleep 1 # wait for mpu9250 to be configured with bypass enabled
|
||||
ak8963 -I -b 3 -R 4 start
|
||||
lps25h -I -b 3 start
|
||||
fi
|
||||
|
||||
# Optical flow deck
|
||||
vl53l0x start -X
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
# CONFIG_MMCSD_MMCSUPPORT 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
|
||||
@@ -31,7 +32,6 @@ CONFIG_ARCH_CHIP_STM32=y
|
||||
CONFIG_ARCH_CHIP_STM32F405RG=y
|
||||
CONFIG_ARCH_INTERRUPTSTACK=512
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_ARMV7M_LAZYFPU=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
@@ -43,10 +43,11 @@ CONFIG_C99_BOOL8=y
|
||||
CONFIG_CDCACM=y
|
||||
CONFIG_CDCACM_PRODUCTID=0x0016
|
||||
CONFIG_CDCACM_PRODUCTSTR="PX4 Crazyflie v2.0"
|
||||
CONFIG_CDCACM_RXBUFSIZE=300
|
||||
CONFIG_CDCACM_TXBUFSIZE=1000
|
||||
CONFIG_CDCACM_RXBUFSIZE=600
|
||||
CONFIG_CDCACM_TXBUFSIZE=2000
|
||||
CONFIG_CDCACM_VENDORID=0x26ac
|
||||
CONFIG_CDCACM_VENDORSTR="Bitcraze AB"
|
||||
CONFIG_CLOCK_MONOTONIC=y
|
||||
CONFIG_DEBUG_FULLOPT=y
|
||||
CONFIG_DEBUG_HARDFAULT_ALERT=y
|
||||
CONFIG_DEBUG_SYMBOLS=y
|
||||
@@ -54,6 +55,7 @@ CONFIG_DEFAULT_SMALL=y
|
||||
CONFIG_DEV_FIFO_SIZE=0
|
||||
CONFIG_DEV_PIPE_MAXSIZE=1024
|
||||
CONFIG_DEV_PIPE_SIZE=70
|
||||
CONFIG_DISABLE_MQUEUE=y
|
||||
CONFIG_FAT_DIRECT_RETRY=y
|
||||
CONFIG_FAT_LCNAMES=y
|
||||
CONFIG_FAT_LFN=y
|
||||
@@ -62,11 +64,10 @@ 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_EXCLUDE_BLOCKS=y
|
||||
CONFIG_FS_PROCFS_EXCLUDE_MEMINFO=y
|
||||
CONFIG_FS_PROCFS_EXCLUDE_MOUNT=y
|
||||
CONFIG_FS_PROCFS_EXCLUDE_USAGE=y
|
||||
CONFIG_FS_PROCFS_INCLUDE_PROGMEM=y
|
||||
CONFIG_FS_PROCFS_REGISTER=y
|
||||
CONFIG_FS_ROMFS=y
|
||||
CONFIG_GRAN=y
|
||||
CONFIG_GRAN_INTR=y
|
||||
@@ -92,7 +93,6 @@ CONFIG_NSH_ARGCAT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_CMDPARMS=y
|
||||
CONFIG_NSH_CROMFSETC=y
|
||||
CONFIG_NSH_DISABLE_EXPORT=y
|
||||
CONFIG_NSH_DISABLE_IFCONFIG=y
|
||||
CONFIG_NSH_DISABLE_IFUPDOWN=y
|
||||
CONFIG_NSH_DISABLE_MB=y
|
||||
@@ -177,7 +177,8 @@ CONFIG_USART2_BAUD=57600
|
||||
CONFIG_USART2_RXBUFSIZE=300
|
||||
CONFIG_USART2_RXDMA=y
|
||||
CONFIG_USART2_TXBUFSIZE=300
|
||||
CONFIG_USART3_RXDMA=y
|
||||
CONFIG_USART3_BAUD=57600
|
||||
CONFIG_USART3_SERIAL_CONSOLE=y
|
||||
CONFIG_USART6_BAUD=57600
|
||||
CONFIG_USART6_RXBUFSIZE=128
|
||||
CONFIG_USART6_RXDMA=y
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (c) 2018 PX4 Development Team. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name PX4 nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
add_subdirectory(../crazyflie syslink)
|
||||
@@ -0,0 +1,64 @@
|
||||
|
||||
px4_add_board(
|
||||
PLATFORM nuttx
|
||||
VENDOR bitcraze
|
||||
MODEL crazyflie21
|
||||
TOOLCHAIN arm-none-eabi
|
||||
ARCHITECTURE cortex-m4
|
||||
ROMFSROOT px4fmu_common
|
||||
CONSTRAINED_FLASH
|
||||
DRIVERS
|
||||
distance_sensor/vl53l1x
|
||||
gps
|
||||
optical_flow/pmw3901
|
||||
pwm_out
|
||||
imu/bosch/bmi088/bmi088_i2c
|
||||
barometer/bmp388
|
||||
MODULES
|
||||
attitude_estimator_q
|
||||
#camera_feedback
|
||||
commander
|
||||
dataman
|
||||
ekf2
|
||||
events
|
||||
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
|
||||
navigator
|
||||
rc_update
|
||||
sensors
|
||||
#temperature_compensation
|
||||
SYSTEMCMDS
|
||||
bl_update
|
||||
dmesg
|
||||
dumpfile
|
||||
esc_calib
|
||||
hardfault_log
|
||||
i2cdetect
|
||||
led_control
|
||||
mixer
|
||||
motor_ramp
|
||||
motor_test
|
||||
mtd
|
||||
nshterm
|
||||
param
|
||||
perf
|
||||
pwm
|
||||
reboot
|
||||
reflect
|
||||
sd_bench
|
||||
system_time
|
||||
top
|
||||
topic_listener
|
||||
tune_control
|
||||
usb_connected
|
||||
ver
|
||||
work_queue
|
||||
)
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"board_id": 14,
|
||||
"magic": "Crazyflie21",
|
||||
"description": "Firmware for the Crazyflie 2.1",
|
||||
"image": "",
|
||||
"build_time": 0,
|
||||
"summary": "CRAZYFLIE 2.1",
|
||||
"version": "0.1",
|
||||
"image_size": 0,
|
||||
"image_maxsize": 1032192,
|
||||
"git_identity": "",
|
||||
"board_revision": 0
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Bitcraze Crazyflie specific board sensors init
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# system_power unavailable
|
||||
param set CBRK_SUPPLY_CHK 894281
|
||||
|
||||
if param compare SYS_AUTOSTART 0
|
||||
then
|
||||
param set SYS_AUTOSTART 4901
|
||||
set AUTOCNF yes
|
||||
fi
|
||||
|
||||
if [ $AUTOCNF = yes ]
|
||||
then
|
||||
# don't probe external I2C
|
||||
param set SENS_EXT_I2C_PRB 0
|
||||
fi
|
||||
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Bitcraze Crazyflie specific board MAVLink startup script.
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# Start MAVLink on the USB port
|
||||
mavlink start -d /dev/ttyACM0
|
||||
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Bitcraze Crazyflie specific board sensors init
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
board_adc start
|
||||
|
||||
# Internal I2C bus
|
||||
bmp388 -I -a 0x77 -f 400 start
|
||||
bmi088_i2c -A -R 0 -I -a 0x18 start
|
||||
bmi088_i2c -G -R 0 -I -a 0x69 start
|
||||
|
||||
# Optical flow deck
|
||||
vl53l1x start -X
|
||||
@@ -0,0 +1,223 @@
|
||||
/************************************************************************************
|
||||
* configs/crazyflie/include/board.h
|
||||
* include/arch/board/board.h
|
||||
*
|
||||
* Copyright (C) 2012 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 __CONFIG_CRAZYFLIE_INCLUDE_BOARD_H
|
||||
#define __CONFIG_CRAZYFLIE_INCLUDE_BOARD_H
|
||||
|
||||
/************************************************************************************
|
||||
* Included Files
|
||||
************************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
# include <stdint.h>
|
||||
#endif
|
||||
|
||||
#include "stm32.h"
|
||||
|
||||
/************************************************************************************
|
||||
* Definitions
|
||||
************************************************************************************/
|
||||
|
||||
/* Clocking *************************************************************************/
|
||||
/* The Crazyflie 2.0 uses a 8MHz crystal connected to the HSE.
|
||||
*
|
||||
* This is the canonical configuration:
|
||||
* System Clock source : PLL (HSE)
|
||||
* SYSCLK(Hz) : 168000000 Determined by PLL configuration
|
||||
* HCLK(Hz) : 168000000 (STM32_RCC_CFGR_HPRE)
|
||||
* AHB Prescaler : 1 (STM32_RCC_CFGR_HPRE)
|
||||
* APB1 Prescaler : 4 (STM32_RCC_CFGR_PPRE1)
|
||||
* APB2 Prescaler : 2 (STM32_RCC_CFGR_PPRE2)
|
||||
* HSE Frequency(Hz) : 8000000 (STM32_BOARD_XTAL)
|
||||
* PLLM : 8 (STM32_PLLCFG_PLLM)
|
||||
* PLLN : 336 (STM32_PLLCFG_PLLN)
|
||||
* PLLP : 2 (STM32_PLLCFG_PLLP)
|
||||
* PLLQ : 7 (STM32_PLLCFG_PLLQ)
|
||||
* Main regulator output voltage : Scale1 mode Needed for high speed SYSCLK
|
||||
* Flash Latency(WS) : 5
|
||||
* Prefetch Buffer : OFF
|
||||
* Instruction cache : ON
|
||||
* Data cache : ON
|
||||
* Require 48MHz for USB OTG FS, : Enabled
|
||||
* SDIO and RNG clock
|
||||
*/
|
||||
|
||||
/* HSI - 16 MHz RC factory-trimmed
|
||||
* LSI - 32 KHz RC
|
||||
* HSE - On-board crystal frequency is 8MHz
|
||||
* LSE - not installed
|
||||
*/
|
||||
|
||||
#define STM32_BOARD_XTAL 8000000ul
|
||||
|
||||
#define STM32_HSI_FREQUENCY 16000000ul
|
||||
#define STM32_LSI_FREQUENCY 32000
|
||||
#define STM32_HSE_FREQUENCY STM32_BOARD_XTAL
|
||||
//#define STM32_LSE_FREQUENCY 32768
|
||||
|
||||
/* Main PLL Configuration.
|
||||
*
|
||||
* PLL source is HSE
|
||||
* PLL_VCO = (STM32_HSE_FREQUENCY / PLLM) * PLLN
|
||||
* = (8,000,000 / 8) * 336
|
||||
* = 336,000,000
|
||||
* SYSCLK = PLL_VCO / PLLP
|
||||
* = 336,000,000 / 2 = 168,000,000
|
||||
* USB OTG FS, SDIO and RNG Clock
|
||||
* = PLL_VCO / PLLQ
|
||||
* = 48,000,000
|
||||
*/
|
||||
|
||||
#define STM32_PLLCFG_PLLM RCC_PLLCFG_PLLM(8)
|
||||
#define STM32_PLLCFG_PLLN RCC_PLLCFG_PLLN(336)
|
||||
#define STM32_PLLCFG_PLLP RCC_PLLCFG_PLLP_2
|
||||
#define STM32_PLLCFG_PLLQ RCC_PLLCFG_PLLQ(7)
|
||||
|
||||
#define STM32_SYSCLK_FREQUENCY 168000000ul
|
||||
|
||||
/* AHB clock (HCLK) is SYSCLK (168MHz) */
|
||||
|
||||
#define STM32_RCC_CFGR_HPRE RCC_CFGR_HPRE_SYSCLK /* HCLK = SYSCLK / 1 */
|
||||
#define STM32_HCLK_FREQUENCY STM32_SYSCLK_FREQUENCY
|
||||
#define STM32_BOARD_HCLK STM32_HCLK_FREQUENCY /* same as above, to satisfy compiler */
|
||||
|
||||
/* APB1 clock (PCLK1) is HCLK/4 (42MHz) */
|
||||
|
||||
#define STM32_RCC_CFGR_PPRE1 RCC_CFGR_PPRE1_HCLKd4 /* PCLK1 = HCLK / 4 */
|
||||
#define STM32_PCLK1_FREQUENCY (STM32_HCLK_FREQUENCY/4)
|
||||
|
||||
/* Timers driven from APB1 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_TIM5_CLKIN (2*STM32_PCLK1_FREQUENCY)
|
||||
#define STM32_APB1_TIM6_CLKIN (2*STM32_PCLK1_FREQUENCY)
|
||||
#define STM32_APB1_TIM7_CLKIN (2*STM32_PCLK1_FREQUENCY)
|
||||
#define STM32_APB1_TIM12_CLKIN (2*STM32_PCLK1_FREQUENCY)
|
||||
#define STM32_APB1_TIM13_CLKIN (2*STM32_PCLK1_FREQUENCY)
|
||||
#define STM32_APB1_TIM14_CLKIN (2*STM32_PCLK1_FREQUENCY)
|
||||
|
||||
/* APB2 clock (PCLK2) is HCLK/2 (84MHz) */
|
||||
|
||||
#define STM32_RCC_CFGR_PPRE2 RCC_CFGR_PPRE2_HCLKd2 /* PCLK2 = HCLK / 2 */
|
||||
#define STM32_PCLK2_FREQUENCY (STM32_HCLK_FREQUENCY/2)
|
||||
|
||||
/* Timers driven from APB2 will be twice PCLK2 */
|
||||
|
||||
#define STM32_APB2_TIM1_CLKIN (2*STM32_PCLK2_FREQUENCY)
|
||||
#define STM32_APB2_TIM8_CLKIN (2*STM32_PCLK2_FREQUENCY)
|
||||
#define STM32_APB2_TIM9_CLKIN (2*STM32_PCLK2_FREQUENCY)
|
||||
#define STM32_APB2_TIM10_CLKIN (2*STM32_PCLK2_FREQUENCY)
|
||||
#define STM32_APB2_TIM11_CLKIN (2*STM32_PCLK2_FREQUENCY)
|
||||
|
||||
/* Timer Frequencies, if APBx is set to 1, frequency is same to APBx
|
||||
* otherwise frequency is 2xAPBx.
|
||||
* Note: TIM1,8-11 are on APB2, others on APB1
|
||||
*/
|
||||
|
||||
#define BOARD_TIM1_FREQUENCY STM32_APB2_TIM1_CLKIN
|
||||
#define BOARD_TIM2_FREQUENCY STM32_APB1_TIM2_CLKIN
|
||||
#define BOARD_TIM3_FREQUENCY STM32_APB1_TIM3_CLKIN
|
||||
#define BOARD_TIM4_FREQUENCY STM32_APB1_TIM4_CLKIN
|
||||
#define BOARD_TIM5_FREQUENCY STM32_APB1_TIM5_CLKIN
|
||||
#define BOARD_TIM6_FREQUENCY STM32_APB1_TIM6_CLKIN
|
||||
#define BOARD_TIM7_FREQUENCY STM32_APB1_TIM7_CLKIN
|
||||
#define BOARD_TIM8_FREQUENCY STM32_APB2_TIM8_CLKIN
|
||||
#define BOARD_TIM9_FREQUENCY STM32_APB2_TIM9_CLKIN
|
||||
#define BOARD_TIM10_FREQUENCY STM32_APB2_TIM10_CLKIN
|
||||
#define BOARD_TIM11_FREQUENCY STM32_APB2_TIM11_CLKIN
|
||||
#define BOARD_TIM12_FREQUENCY STM32_APB1_TIM12_CLKIN
|
||||
#define BOARD_TIM13_FREQUENCY STM32_APB1_TIM13_CLKIN
|
||||
#define BOARD_TIM14_FREQUENCY STM32_APB1_TIM14_CLKIN
|
||||
|
||||
/* Alternate function pin selections ************************************************/
|
||||
|
||||
/*
|
||||
* UARTs.
|
||||
*
|
||||
*/
|
||||
/* E_TX2 / E_RX2 */
|
||||
#define GPIO_USART2_RX GPIO_USART2_RX_1
|
||||
#define GPIO_USART2_TX GPIO_USART2_TX_1
|
||||
|
||||
/* E_TX1 / E_RX1 */
|
||||
#define GPIO_USART3_RX GPIO_USART3_RX_2
|
||||
#define GPIO_USART3_TX GPIO_USART3_TX_2
|
||||
|
||||
/* NRF51 via syslink */
|
||||
#define GPIO_USART6_RX GPIO_USART6_RX_1
|
||||
#define GPIO_USART6_TX GPIO_USART6_TX_1
|
||||
|
||||
/* UART DMA configuration for USART6 */
|
||||
#define DMAMAP_USART6_RX DMAMAP_USART6_RX_2
|
||||
|
||||
/*
|
||||
* I2C
|
||||
*
|
||||
* The optional _GPIO configurations allow the I2C driver to manually
|
||||
* reset the bus to clear stuck slaves. They match the pin configuration,
|
||||
* but are normally-high GPIOs.
|
||||
*/
|
||||
#define GPIO_I2C1_SCL GPIO_I2C1_SCL_1
|
||||
#define GPIO_I2C1_SDA GPIO_I2C1_SDA_1
|
||||
#define GPIO_I2C1_SCL_GPIO (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN6)
|
||||
#define GPIO_I2C1_SDA_GPIO (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN7)
|
||||
|
||||
#define GPIO_I2C3_SCL GPIO_I2C3_SCL_1
|
||||
#define GPIO_I2C3_SDA GPIO_I2C3_SDA_1
|
||||
#define GPIO_I2C3_SCL_GPIO (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTA|GPIO_PIN8)
|
||||
#define GPIO_I2C3_SDA_GPIO (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTC|GPIO_PIN9)
|
||||
|
||||
/*
|
||||
* SPI
|
||||
*
|
||||
* E_MISO, E_MOSI, E_SCK exposed on headers
|
||||
*/
|
||||
#define GPIO_SPI1_MISO (GPIO_SPI1_MISO_1|GPIO_SPEED_50MHz)
|
||||
#define GPIO_SPI1_MOSI (GPIO_SPI1_MOSI_1|GPIO_SPEED_50MHz)
|
||||
#define GPIO_SPI1_SCK (GPIO_SPI1_SCK_1|GPIO_SPEED_50MHz)
|
||||
|
||||
/* XXX since we allocate the HP work stack from CCM RAM on normal system startup,
|
||||
SPI1 will never run in DMA mode - so we can just give it a random config here.
|
||||
What we really need to do is to make DMA configurable per channel, and always
|
||||
disable it for SPI1. */
|
||||
#define DMACHAN_SPI1_RX DMAMAP_SPI1_RX_1
|
||||
#define DMACHAN_SPI1_TX DMAMAP_SPI1_TX_2
|
||||
|
||||
#endif /* __CONFIG_CRAZYFLIE_INCLUDE_BOARD_H */
|
||||
@@ -0,0 +1,190 @@
|
||||
#
|
||||
# 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_ENVIRON is not set
|
||||
# CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set
|
||||
# CONFIG_MMCSD_HAVE_CARDDETECT is not set
|
||||
# CONFIG_MMCSD_HAVE_WRITEPROTECT is not set
|
||||
# CONFIG_MMCSD_MMCSUPPORT is not set
|
||||
# CONFIG_NSH_DISABLEBG is not set
|
||||
# CONFIG_NSH_DISABLESCRIPT 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_SPI_CALLBACK is not set
|
||||
# CONFIG_STM32_CCMEXCLUDE 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_STM32F405RG=y
|
||||
CONFIG_ARCH_INTERRUPTSTACK=512
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_CRASHDUMP=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=16717
|
||||
CONFIG_BOARD_RESET_ON_ASSERT=2
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_C99_BOOL8=y
|
||||
CONFIG_CDCACM=y
|
||||
CONFIG_CDCACM_PRODUCTID=0x0016
|
||||
CONFIG_CDCACM_PRODUCTSTR="PX4 Crazyflie v2.0"
|
||||
CONFIG_CDCACM_RXBUFSIZE=300
|
||||
CONFIG_CDCACM_TXBUFSIZE=1000
|
||||
CONFIG_CDCACM_VENDORID=0x26ac
|
||||
CONFIG_CDCACM_VENDORSTR="Bitcraze AB"
|
||||
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_FAT_DIRECT_RETRY=y
|
||||
CONFIG_FAT_LCNAMES=y
|
||||
CONFIG_FAT_LFN=y
|
||||
CONFIG_FAT_LFN_ALIAS_HASH=y
|
||||
CONFIG_FDCLONE_STDIO=y
|
||||
CONFIG_FS_BINFS=y
|
||||
CONFIG_FS_CROMFS=y
|
||||
CONFIG_FS_FAT=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_PROCFS_EXCLUDE_BLOCKS=y
|
||||
CONFIG_FS_PROCFS_EXCLUDE_MEMINFO=y
|
||||
CONFIG_FS_PROCFS_EXCLUDE_MOUNT=y
|
||||
CONFIG_FS_PROCFS_EXCLUDE_USAGE=y
|
||||
CONFIG_FS_ROMFS=y
|
||||
CONFIG_GRAN=y
|
||||
CONFIG_GRAN_INTR=y
|
||||
CONFIG_HAVE_CXX=y
|
||||
CONFIG_HAVE_CXXINITIALIZE=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_MMCSD=y
|
||||
CONFIG_MM_REGIONS=2
|
||||
CONFIG_MTD=y
|
||||
CONFIG_MTD_AT24XX=y
|
||||
CONFIG_MTD_BYTE_WRITE=y
|
||||
CONFIG_MTD_PARTITION=y
|
||||
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_EXPORT=y
|
||||
CONFIG_NSH_DISABLE_IFCONFIG=y
|
||||
CONFIG_NSH_DISABLE_IFUPDOWN=y
|
||||
CONFIG_NSH_DISABLE_MB=y
|
||||
CONFIG_NSH_DISABLE_MH=y
|
||||
CONFIG_NSH_DISABLE_TELNETD=y
|
||||
CONFIG_NSH_FATDEVNO=0
|
||||
CONFIG_NSH_LINELEN=128
|
||||
CONFIG_NSH_MAXARGUMENTS=15
|
||||
CONFIG_NSH_MMCSDSPIPORTNO=1
|
||||
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=196608
|
||||
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_SDCLONE_DISABLE=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_BBSRAM=y
|
||||
CONFIG_STM32_BBSRAM_FILES=5
|
||||
CONFIG_STM32_BKPSRAM=y
|
||||
CONFIG_STM32_CCMDATARAM=y
|
||||
CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y
|
||||
CONFIG_STM32_DMA1=y
|
||||
CONFIG_STM32_DMA2=y
|
||||
CONFIG_STM32_FLASH_PREFETCH=y
|
||||
CONFIG_STM32_FLOWCONTROL_BROKEN=y
|
||||
CONFIG_STM32_I2C1=y
|
||||
CONFIG_STM32_I2C3=y
|
||||
CONFIG_STM32_I2CTIMEOMS=10
|
||||
CONFIG_STM32_I2CTIMEOTICKS=10
|
||||
CONFIG_STM32_JTAG_SW_ENABLE=y
|
||||
CONFIG_STM32_OTGFS=y
|
||||
CONFIG_STM32_PWR=y
|
||||
CONFIG_STM32_RTC=y
|
||||
CONFIG_STM32_RTC_HSECLOCK=y
|
||||
CONFIG_STM32_RTC_MAGIC_REG=1
|
||||
CONFIG_STM32_SAVE_CRASHDUMP=y
|
||||
CONFIG_STM32_SERIALBRK_BSDCOMPAT=y
|
||||
CONFIG_STM32_SERIAL_DISABLE_REORDERING=y
|
||||
CONFIG_STM32_SPI1=y
|
||||
CONFIG_STM32_USART2=y
|
||||
CONFIG_STM32_USART3=y
|
||||
CONFIG_STM32_USART6=y
|
||||
CONFIG_STM32_USART_BREAKS=y
|
||||
CONFIG_STM32_USART_SINGLEWIRE=y
|
||||
CONFIG_STM32_WWDG=y
|
||||
CONFIG_SYSTEM_CDCACM=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TASK_NAME_SIZE=24
|
||||
CONFIG_USART2_BAUD=57600
|
||||
CONFIG_USART2_RXBUFSIZE=300
|
||||
CONFIG_USART2_RXDMA=y
|
||||
CONFIG_USART2_TXBUFSIZE=300
|
||||
CONFIG_USART3_RXDMA=y
|
||||
CONFIG_USART3_SERIAL_CONSOLE=y
|
||||
CONFIG_USART6_BAUD=57600
|
||||
CONFIG_USART6_RXBUFSIZE=128
|
||||
CONFIG_USART6_RXDMA=y
|
||||
CONFIG_USART6_TXBUFSIZE=64
|
||||
CONFIG_USBDEV=y
|
||||
CONFIG_USBDEV_BUSPOWERED=y
|
||||
CONFIG_USBDEV_MAXPOWER=500
|
||||
CONFIG_USEC_PER_TICK=1000
|
||||
CONFIG_USERMAIN_STACKSIZE=2944
|
||||
CONFIG_USER_ENTRYPOINT="nsh_main"
|
||||
@@ -0,0 +1,152 @@
|
||||
/****************************************************************************
|
||||
* configs/crazyflie/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 STM32F405RG has 1024Kb of FLASH beginning at address 0x0800:0000 and
|
||||
* 192Kb 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 CCM 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 0x4000 of flash is reserved for the bootloader.
|
||||
*/
|
||||
|
||||
MEMORY
|
||||
{
|
||||
flash (rx) : ORIGIN = 0x08004000, LENGTH = 1008K
|
||||
sram (rwx) : ORIGIN = 0x20000000, LENGTH = 128K
|
||||
ccsram (rwx) : ORIGIN = 0x10000000, 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)
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.text : {
|
||||
_stext = ABSOLUTE(.);
|
||||
*(.vectors)
|
||||
. = ALIGN(32);
|
||||
/*
|
||||
This signature provides the bootloader with a way to delay booting
|
||||
*/
|
||||
_bootdelay_signature = ABSOLUTE(.);
|
||||
FILL(0xffecc2925d7d05c5)
|
||||
. += 8;
|
||||
*(.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
|
||||
|
||||
/*
|
||||
* Construction data for parameters.
|
||||
*/
|
||||
__param ALIGN(4): {
|
||||
__param_start = ABSOLUTE(.);
|
||||
KEEP(*(__param*))
|
||||
__param_end = 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,47 @@
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (c) 2015 PX4 Development Team. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name PX4 nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
add_library(drivers_board
|
||||
i2c.cpp
|
||||
init.c
|
||||
led.c
|
||||
spi.cpp
|
||||
timer_config.cpp
|
||||
usb.c
|
||||
)
|
||||
target_link_libraries(drivers_board
|
||||
PRIVATE
|
||||
arch_spi
|
||||
drivers__led # drv_led_start
|
||||
px4_layer
|
||||
)
|
||||
@@ -0,0 +1,233 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2012-2016 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* 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 board_config.h
|
||||
*
|
||||
* PX4-CRAZYFLIE internal definitions
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
/****************************************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************************************/
|
||||
|
||||
#include <px4_platform_common/px4_config.h>
|
||||
#include <nuttx/compiler.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/****************************************************************************************************
|
||||
* Definitions
|
||||
****************************************************************************************************/
|
||||
/* Configuration ************************************************************************************/
|
||||
|
||||
/* Crazyflie GPIOs **********************************************************************************/
|
||||
/* LEDs */
|
||||
|
||||
|
||||
/* Radio TX indicator */
|
||||
#define GPIO_LED_RED_L (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\
|
||||
GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN0)
|
||||
/* Radio RX indicator */
|
||||
#define GPIO_LED_GREEN_L (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\
|
||||
GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN1)
|
||||
#define GPIO_LED_GREEN_R (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\
|
||||
GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN2)
|
||||
#define GPIO_LED_RED_R (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\
|
||||
GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN3)
|
||||
|
||||
/* PX4: armed state indicator ; Stock FW: Blinking while charging */
|
||||
#define GPIO_LED_BLUE_L (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTD|GPIO_PIN2)
|
||||
|
||||
#define BOARD_HAS_CONTROL_STATUS_LEDS 1
|
||||
#define BOARD_OVERLOAD_LED LED_RED
|
||||
#define BOARD_ARMED_LED LED_BLUE
|
||||
#define BOARD_ARMED_STATE_LED LED_GREEN
|
||||
|
||||
#define LED_TX 4
|
||||
#define LED_RX 5
|
||||
|
||||
#define GPIO_FSYNC_MPU9250 (GPIO_OUTPUT|GPIO_PORTC|GPIO_PIN14) // Needs to be set low
|
||||
#define GPIO_DRDY_MPU9250 (GPIO_INPUT|GPIO_FLOAT|GPIO_EXTI|GPIO_PORTC|GPIO_PIN13)
|
||||
|
||||
|
||||
#define GPIO_NRF_TXEN (GPIO_INPUT|GPIO_PULLUP|GPIO_EXTI|GPIO_PORTA|GPIO_PIN4)
|
||||
|
||||
#define GPIO_I2C4_DRDY1_BMP388 (GPIO_INPUT|GPIO_FLOAT|GPIO_EXTI|GPIO_PORTG|GPIO_PIN5)
|
||||
|
||||
/*
|
||||
* I2C busses
|
||||
*/
|
||||
#define PX4_I2C_BUS_ONBOARD_HZ 400000
|
||||
#define PX4_I2C_BUS_EXPANSION_HZ 400000
|
||||
|
||||
#define PX4_I2C_BUS_MTD 1
|
||||
|
||||
#define BOARD_NUMBER_I2C_BUSES 3
|
||||
#define BOARD_I2C_BUS_CLOCK_INIT {PX4_I2C_BUS_ONBOARD_HZ, 400000, PX4_I2C_BUS_EXPANSION_HZ}
|
||||
|
||||
|
||||
/* Devices on the onboard bus.
|
||||
*
|
||||
* Note that these are unshifted addresses.
|
||||
*/
|
||||
#define PX4_I2C_OBDEV_MPU9250 0x69
|
||||
|
||||
/* USB OTG FS
|
||||
*
|
||||
* PA9 OTG_FS_VBUS VBUS sensing
|
||||
*/
|
||||
#define GPIO_OTGFS_VBUS (GPIO_INPUT|GPIO_FLOAT|GPIO_SPEED_100MHz|GPIO_OPENDRAIN|GPIO_PORTA|GPIO_PIN9)
|
||||
|
||||
/*
|
||||
* ADC channels
|
||||
*
|
||||
* These are the channel numbers of the ADCs of the microcontroller that can be used by the Px4 Firmware in the adc driver
|
||||
*/
|
||||
#define ADC_CHANNELS 0
|
||||
|
||||
/* Tone alarm output : These are only applicable when the buzzer deck is attached */
|
||||
#define TONE_ALARM_TIMER 5 /* timer 5 */
|
||||
#define TONE_ALARM_CHANNEL 3 /* channel 3 */
|
||||
#define GPIO_TONE_ALARM_IDLE (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTA|GPIO_PIN2)
|
||||
#define GPIO_TONE_ALARM (GPIO_ALT|GPIO_AF2|GPIO_SPEED_2MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN2)
|
||||
#define GPIO_TONE_ALARM_NEG (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_OUTPUT_CLEAR|GPIO_PORTA|GPIO_PIN3)
|
||||
|
||||
/* PWM
|
||||
*/
|
||||
|
||||
#define DIRECT_PWM_OUTPUT_CHANNELS 4
|
||||
|
||||
/* This board overrides the defaults by providing
|
||||
* PX4_PWM_ALTERNATE_RANGES and a replacement set of
|
||||
* constants
|
||||
*/
|
||||
|
||||
|
||||
/* PWM directly wired to transistor. Duty cycle directly corresponds to power
|
||||
* So we need to override the defaults
|
||||
*/
|
||||
|
||||
#define PX4_PWM_ALTERNATE_RANGES
|
||||
#define PWM_LOWEST_MIN 0
|
||||
#define PWM_MOTOR_OFF 0
|
||||
#define PWM_DEFAULT_MIN 20
|
||||
#define PWM_HIGHEST_MIN 0
|
||||
#define PWM_HIGHEST_MAX 255
|
||||
#define PWM_DEFAULT_MAX 255
|
||||
#define PWM_LOWEST_MAX 255
|
||||
#define PWM_DEFAULT_TRIM 1500
|
||||
|
||||
|
||||
/* High-resolution timer */
|
||||
#define HRT_TIMER 8 /* use timer8 for the HRT */
|
||||
#define HRT_TIMER_CHANNEL 1 /* use capture/compare channel */
|
||||
|
||||
#define BOARD_HAS_PWM DIRECT_PWM_OUTPUT_CHANNELS
|
||||
|
||||
#define BOARD_ENABLE_CONSOLE_BUFFER
|
||||
#define BOARD_CONSOLE_BUFFER_SIZE (1024*3)
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/****************************************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************************************/
|
||||
|
||||
/****************************************************************************************************
|
||||
* Public data
|
||||
****************************************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
/****************************************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************************************/
|
||||
|
||||
/****************************************************************************************************
|
||||
* Name: board_peripheral_reset
|
||||
*
|
||||
* Description:
|
||||
* Called to reset the periferal bus
|
||||
*
|
||||
****************************************************************************************************/
|
||||
|
||||
#define board_peripheral_reset(ms)
|
||||
|
||||
/****************************************************************************************************
|
||||
* Name: stm32_usbinitialize
|
||||
*
|
||||
* Description:
|
||||
* Called to configure USB IO.
|
||||
*
|
||||
****************************************************************************************************/
|
||||
|
||||
extern void stm32_usbinitialize(void);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_i2c_initialize
|
||||
*
|
||||
* Description:
|
||||
* Called to set I2C bus frequencies.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int board_i2c_initialize(void);
|
||||
|
||||
/****************************************************************************************************
|
||||
* Name: stm32_spiinitialize
|
||||
*
|
||||
* Description:
|
||||
* Called to configure SPI chip select GPIO pins for the PX4FMU board.
|
||||
*
|
||||
****************************************************************************************************/
|
||||
|
||||
extern void stm32_spiinitialize(void);
|
||||
|
||||
/************************************************************************************
|
||||
* Name: stm32_spi_bus_initialize
|
||||
*
|
||||
* Description:
|
||||
* Called to configure SPI Buses.
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
extern int stm32_spi_bus_initialize(void);
|
||||
|
||||
|
||||
#include <px4_platform_common/board_common.h>
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
__END_DECLS
|
||||
@@ -0,0 +1,39 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include <px4_arch/i2c_hw_description.h>
|
||||
|
||||
constexpr px4_i2c_bus_t px4_i2c_buses[I2C_BUS_MAX_BUS_ITEMS] = {
|
||||
initI2CBusExternal(1),
|
||||
initI2CBusInternal(3),
|
||||
};
|
||||
@@ -0,0 +1,173 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2012 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 crazyflie_init.c
|
||||
*
|
||||
* Crazyflie 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.
|
||||
*/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#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 <nuttx/analog/adc.h>
|
||||
#include <nuttx/spi/spi.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>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-Processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/*
|
||||
* Ideally we'd be able to get these from arm_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);
|
||||
__END_DECLS
|
||||
|
||||
/****************************************************************************
|
||||
* Protected Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
* Name: stm32_boardinitialize
|
||||
*
|
||||
* Description:
|
||||
* All STM32 architectures must provide the following entry point. This entry point
|
||||
* is called early in the intitialization -- after all memory has been configured
|
||||
* and mapped but before any devices have been initialized.
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
__EXPORT void
|
||||
stm32_boardinitialize(void)
|
||||
{
|
||||
/* configure LEDs */
|
||||
|
||||
board_autoled_initialize();
|
||||
|
||||
/* configure SPI interfaces */
|
||||
|
||||
stm32_spiinitialize();
|
||||
|
||||
stm32_usbinitialize();
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_app_initialize
|
||||
*
|
||||
* Description:
|
||||
* Perform architecture specific initialization
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
__EXPORT int board_app_initialize(uintptr_t arg)
|
||||
{
|
||||
px4_platform_init();
|
||||
|
||||
/* set up the serial DMA polling */
|
||||
static struct hrt_call serial_dma_call;
|
||||
struct timespec ts;
|
||||
|
||||
/*
|
||||
* Poll at 1ms intervals for received bytes that have not triggered
|
||||
* a DMA event.
|
||||
*/
|
||||
ts.tv_sec = 0;
|
||||
ts.tv_nsec = 1000000;
|
||||
|
||||
hrt_call_every(&serial_dma_call,
|
||||
ts_to_abstime(&ts),
|
||||
ts_to_abstime(&ts),
|
||||
(hrt_callout)stm32_serial_dma_poll,
|
||||
NULL);
|
||||
|
||||
|
||||
/* initial LED state */
|
||||
drv_led_start();
|
||||
led_off(LED_RED);
|
||||
led_off(LED_GREEN);
|
||||
led_off(LED_BLUE);
|
||||
led_off(LED_TX);
|
||||
led_off(LED_RX);
|
||||
|
||||
if (board_hardfault_init(2, true) != 0) {
|
||||
led_on(LED_RED);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SPI
|
||||
int ret = stm32_spi_bus_initialize();
|
||||
|
||||
if (ret != OK) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
return OK;
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2013 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 crazyflie_led.c
|
||||
*
|
||||
* Crazyflie LED backend.
|
||||
*/
|
||||
|
||||
#include <px4_platform_common/px4_config.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "stm32.h"
|
||||
#include "board_config.h"
|
||||
|
||||
#include <arch/board/board.h>
|
||||
|
||||
/*
|
||||
* Ideally we'd be able to get these from arm_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_BLUE_L, // Indexed by LED_BLUE
|
||||
GPIO_LED_RED_R, // Indexed by LED_RED, LED_AMBER
|
||||
0, // Indexed by LED_SAFETY
|
||||
GPIO_LED_GREEN_R, // Indexed by LED_GREEN
|
||||
GPIO_LED_RED_L, // Indexed by LED_TX
|
||||
GPIO_LED_GREEN_L // Indexed by LED_RX
|
||||
};
|
||||
|
||||
|
||||
__EXPORT void led_init()
|
||||
{
|
||||
/* Configure LED1 GPIO for output */
|
||||
for (size_t l = 0; l < (sizeof(g_ledmap) / sizeof(g_ledmap[0])); l++) {
|
||||
if (g_ledmap[l]) {
|
||||
px4_arch_configgpio(g_ledmap[l]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
__EXPORT void led_on(int led)
|
||||
{
|
||||
/* Pull down to switch on */
|
||||
px4_arch_gpiowrite(g_ledmap[led], g_ledmap[led] & GPIO_OUTPUT_SET ? true : false);
|
||||
}
|
||||
|
||||
__EXPORT void led_off(int led)
|
||||
{
|
||||
/* Pull up to switch off */
|
||||
px4_arch_gpiowrite(g_ledmap[led], g_ledmap[led] & GPIO_OUTPUT_SET ? false : true);
|
||||
}
|
||||
|
||||
__EXPORT void led_toggle(int led)
|
||||
{
|
||||
if (px4_arch_gpioread(g_ledmap[led])) {
|
||||
px4_arch_gpiowrite(g_ledmap[led], false);
|
||||
|
||||
} else {
|
||||
px4_arch_gpiowrite(g_ledmap[led], true);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include <px4_platform_common/px4_config.h>
|
||||
#include <px4_platform/gpio.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <debug.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <nuttx/spi/spi.h>
|
||||
#include <arch/board/board.h>
|
||||
#include <systemlib/px4_macros.h>
|
||||
#include <nuttx/mmcsd.h>
|
||||
|
||||
#include <arm_arch.h>
|
||||
#include <chip.h>
|
||||
#include <stm32_gpio.h>
|
||||
#include "board_config.h"
|
||||
|
||||
|
||||
#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_FLOW_DEVTYPE_PMW3901, SPI::CS{GPIO::PortB, GPIO::Pin4}),
|
||||
initSPIDevice(SPIDEV_MMCSD(0), SPI::CS{GPIO::PortC, GPIO::Pin12}),
|
||||
initSPIDevice(DRV_DEVTYPE_UNUSED, SPI::CS{GPIO::PortB, GPIO::Pin5}),
|
||||
}),
|
||||
};
|
||||
|
||||
static constexpr bool unused = validateSPIConfig(px4_spi_buses);
|
||||
|
||||
/************************************************************************************
|
||||
* Name: stm32_spi_bus_initialize
|
||||
*
|
||||
* Description:
|
||||
* Called to configure SPI buses on PX4FMU board.
|
||||
*
|
||||
************************************************************************************/
|
||||
static struct spi_dev_s *spi_expansion;
|
||||
|
||||
__EXPORT int stm32_spi_bus_initialize(void)
|
||||
{
|
||||
/* Configure SPI-based devices */
|
||||
|
||||
/* Get the external SPI port */
|
||||
spi_expansion = stm32_spibus_initialize(1);
|
||||
|
||||
if (!spi_expansion) {
|
||||
syslog(LOG_ERR, "[boot] FAILED to initialize SPI port %d\n", 1);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MMCSD
|
||||
int ret = mmcsd_spislotinitialize(CONFIG_NSH_MMCSDMINOR, CONFIG_NSH_MMCSDSLOTNO, spi_expansion);
|
||||
|
||||
if (ret != OK) {
|
||||
syslog(LOG_ERR, "[boot] FAILED to bind SPI port 1 to the MMCSD driver\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
return OK;
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2016 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* 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/io_timer_hw_description.h>
|
||||
|
||||
/* IO Timers normally free-run at 1MHz
|
||||
* Here we make adjustments to the Frequency that sets the timer's prescale
|
||||
* so that the prescale is set to 0
|
||||
*/
|
||||
#define TIMx_CLKIN 1000000
|
||||
|
||||
static inline constexpr io_timers_t initIOTimerOverrideClockFreq(Timer::Timer timer)
|
||||
{
|
||||
io_timers_t ret = initIOTimer(timer);
|
||||
ret.clock_freq = TIMx_CLKIN;
|
||||
return ret;
|
||||
}
|
||||
|
||||
constexpr io_timers_t io_timers[MAX_IO_TIMERS] = {
|
||||
initIOTimerOverrideClockFreq(Timer::Timer2),
|
||||
initIOTimerOverrideClockFreq(Timer::Timer4),
|
||||
};
|
||||
|
||||
constexpr timer_io_channels_t timer_io_channels[MAX_TIMER_IO_CHANNELS] = {
|
||||
initIOTimerChannel(io_timers, {Timer::Timer2, Timer::Channel2}, {GPIO::PortA, GPIO::Pin1}),
|
||||
initIOTimerChannel(io_timers, {Timer::Timer2, Timer::Channel4}, {GPIO::PortB, GPIO::Pin11}),
|
||||
initIOTimerChannel(io_timers, {Timer::Timer2, Timer::Channel1}, {GPIO::PortA, GPIO::Pin15}),
|
||||
initIOTimerChannel(io_timers, {Timer::Timer4, Timer::Channel4}, {GPIO::PortB, GPIO::Pin9}),
|
||||
};
|
||||
|
||||
constexpr io_timers_channel_mapping_t io_timers_channel_mapping =
|
||||
initIOTimerChannelMapping(io_timers, timer_io_channels);
|
||||
@@ -0,0 +1,108 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2012 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 crazyflie_usb.c
|
||||
*
|
||||
* Board-specific USB functions.
|
||||
*/
|
||||
|
||||
/************************************************************************************
|
||||
* Included Files
|
||||
************************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/usb/usbdev.h>
|
||||
#include <nuttx/usb/usbdev_trace.h>
|
||||
|
||||
#include <arm_arch.h>
|
||||
#include <stm32.h>
|
||||
#include "board_config.h"
|
||||
|
||||
/************************************************************************************
|
||||
* Definitions
|
||||
************************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
* Private Functions
|
||||
************************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
* Public Functions
|
||||
************************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
* Name: stm32_usbinitialize
|
||||
*
|
||||
* Description:
|
||||
* Called to setup USB-related GPIO pins for the PX4-STM32F4Discovery board.
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
__EXPORT void stm32_usbinitialize(void)
|
||||
{
|
||||
/* The OTG FS has an internal soft pull-up */
|
||||
|
||||
/* Configure the OTG FS VBUS sensing GPIO, Power On, and Overcurrent GPIOs */
|
||||
|
||||
#ifdef CONFIG_STM32_OTGFS
|
||||
stm32_configgpio(GPIO_OTGFS_VBUS);
|
||||
/* XXX We only support device mode
|
||||
stm32_configgpio(GPIO_OTGFS_PWRON);
|
||||
stm32_configgpio(GPIO_OTGFS_OVER);
|
||||
*/
|
||||
#endif
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
* Name: stm32_usbsuspend
|
||||
*
|
||||
* Description:
|
||||
* Board logic must provide the stm32_usbsuspend logic if the USBDEV driver is
|
||||
* used. This function is called whenever the USB enters or leaves suspend mode.
|
||||
* This is an opportunity for the board logic to shutdown clocks, power, etc.
|
||||
* while the USB is suspended.
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
__EXPORT void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume)
|
||||
{
|
||||
uinfo("resume: %d\n", resume);
|
||||
}
|
||||
|
||||
@@ -28,7 +28,6 @@ CONFIG_ARCH_CHIP_STM32=y
|
||||
CONFIG_ARCH_CHIP_STM32F412CE=y
|
||||
CONFIG_ARCH_INTERRUPTSTACK=512
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_ARMV7M_LAZYFPU=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
|
||||
@@ -4,16 +4,18 @@
|
||||
#------------------------------------------------------------------------------
|
||||
board_adc start
|
||||
|
||||
# SPI1 (internal)
|
||||
rm3100 -s start
|
||||
icm20689 -s -R 2 start
|
||||
# SPI1
|
||||
icm20689 -s -b 1 -R 2 start
|
||||
|
||||
# SPI4 (internal)
|
||||
bmi088 -A -s -R 10 start
|
||||
bmi088 -G -s -R 10 start
|
||||
# SPI2
|
||||
rm3100 -s -b 2 start
|
||||
|
||||
# SPI4
|
||||
bmi088 -s -b 4 -A -R 2 start
|
||||
bmi088 -s -b 4 -G -R 2 start
|
||||
ms5611 -s -b 4 start
|
||||
|
||||
# SPI6 (internal)
|
||||
# SPI6
|
||||
icm20649 -s -b 6 -R 2 start
|
||||
ms5611 -s -b 6 start
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@ CONFIG_ARCH_CHIP_STM32H7=y
|
||||
CONFIG_ARCH_INTERRUPTSTACK=512
|
||||
CONFIG_ARMV7M_BASEPRI_WAR=y
|
||||
CONFIG_ARMV7M_ICACHE=y
|
||||
CONFIG_ARMV7M_LAZYFPU=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
|
||||
@@ -35,7 +35,6 @@ CONFIG_ARMV7M_BASEPRI_WAR=y
|
||||
CONFIG_ARMV7M_DCACHE=y
|
||||
CONFIG_ARMV7M_DTCM=y
|
||||
CONFIG_ARMV7M_ICACHE=y
|
||||
CONFIG_ARMV7M_LAZYFPU=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
|
||||
constexpr px4_spi_bus_t px4_spi_buses[SPI_BUS_MAX_BUS_ITEMS] = {
|
||||
initSPIBus(SPI::Bus::SPI1, {
|
||||
initSPIDevice(DRV_DEVTYPE_UNUSED, SPI::CS{GPIO::PortF, GPIO::Pin10}, SPI::DRDY{GPIO::PortE, GPIO::Pin7}), // ADIS16470
|
||||
initSPIDevice(DRV_IMU_DEVTYPE_ICM20689, SPI::CS{GPIO::PortG, GPIO::Pin6}, SPI::DRDY{GPIO::PortJ, GPIO::Pin0}),
|
||||
}, {GPIO::PortE, GPIO::Pin3}),
|
||||
initSPIBus(SPI::Bus::SPI2, {
|
||||
|
||||
@@ -20,7 +20,6 @@ CONFIG_ARCH_CHIP_STM32H7=y
|
||||
CONFIG_ARCH_INTERRUPTSTACK=512
|
||||
CONFIG_ARMV7M_BASEPRI_WAR=y
|
||||
CONFIG_ARMV7M_ICACHE=y
|
||||
CONFIG_ARMV7M_LAZYFPU=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
|
||||
@@ -35,7 +35,6 @@ CONFIG_ARMV7M_BASEPRI_WAR=y
|
||||
CONFIG_ARMV7M_DCACHE=y
|
||||
CONFIG_ARMV7M_DTCM=y
|
||||
CONFIG_ARMV7M_ICACHE=y
|
||||
CONFIG_ARMV7M_LAZYFPU=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
|
||||
@@ -20,7 +20,6 @@ CONFIG_ARCH_CHIP_STM32H7=y
|
||||
CONFIG_ARCH_INTERRUPTSTACK=512
|
||||
CONFIG_ARMV7M_BASEPRI_WAR=y
|
||||
CONFIG_ARMV7M_ICACHE=y
|
||||
CONFIG_ARMV7M_LAZYFPU=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
|
||||
@@ -35,7 +35,6 @@ CONFIG_ARMV7M_BASEPRI_WAR=y
|
||||
CONFIG_ARMV7M_DCACHE=y
|
||||
CONFIG_ARMV7M_DTCM=y
|
||||
CONFIG_ARMV7M_ICACHE=y
|
||||
CONFIG_ARMV7M_LAZYFPU=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
|
||||
@@ -36,7 +36,6 @@ CONFIG_ARMV7M_BASEPRI_WAR=y
|
||||
CONFIG_ARMV7M_DCACHE=y
|
||||
CONFIG_ARMV7M_DTCM=y
|
||||
CONFIG_ARMV7M_ICACHE=y
|
||||
CONFIG_ARMV7M_LAZYFPU=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
|
||||
@@ -36,7 +36,6 @@ CONFIG_ARMV7M_BASEPRI_WAR=y
|
||||
CONFIG_ARMV7M_DCACHE=y
|
||||
CONFIG_ARMV7M_DTCM=y
|
||||
CONFIG_ARMV7M_ICACHE=y
|
||||
CONFIG_ARMV7M_LAZYFPU=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
|
||||
@@ -37,7 +37,6 @@ CONFIG_ARMV7M_BASEPRI_WAR=y
|
||||
CONFIG_ARMV7M_DCACHE=y
|
||||
CONFIG_ARMV7M_DTCM=y
|
||||
CONFIG_ARMV7M_ICACHE=y
|
||||
CONFIG_ARMV7M_LAZYFPU=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
|
||||
@@ -20,7 +20,6 @@ CONFIG_ARCH_CHIP_STM32H7=y
|
||||
CONFIG_ARCH_INTERRUPTSTACK=512
|
||||
CONFIG_ARMV7M_BASEPRI_WAR=y
|
||||
CONFIG_ARMV7M_ICACHE=y
|
||||
CONFIG_ARMV7M_LAZYFPU=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
|
||||
@@ -35,7 +35,6 @@ CONFIG_ARMV7M_BASEPRI_WAR=y
|
||||
CONFIG_ARMV7M_DCACHE=y
|
||||
CONFIG_ARMV7M_DTCM=y
|
||||
CONFIG_ARMV7M_ICACHE=y
|
||||
CONFIG_ARMV7M_LAZYFPU=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
|
||||
@@ -35,7 +35,6 @@ CONFIG_ARMV7M_BASEPRI_WAR=y
|
||||
CONFIG_ARMV7M_DCACHE=y
|
||||
CONFIG_ARMV7M_DTCM=y
|
||||
CONFIG_ARMV7M_ICACHE=y
|
||||
CONFIG_ARMV7M_LAZYFPU=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_STACKCHECK=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
|
||||
@@ -35,7 +35,6 @@ CONFIG_ARMV7M_BASEPRI_WAR=y
|
||||
CONFIG_ARMV7M_DCACHE=y
|
||||
CONFIG_ARMV7M_DTCM=y
|
||||
CONFIG_ARMV7M_ICACHE=y
|
||||
CONFIG_ARMV7M_LAZYFPU=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
|
||||
@@ -36,7 +36,6 @@ CONFIG_ARMV7M_BASEPRI_WAR=y
|
||||
CONFIG_ARMV7M_DCACHE=y
|
||||
CONFIG_ARMV7M_DTCM=y
|
||||
CONFIG_ARMV7M_ICACHE=y
|
||||
CONFIG_ARMV7M_LAZYFPU=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
|
||||
@@ -29,7 +29,6 @@ CONFIG_ARCH_CHIP_STM32=y
|
||||
CONFIG_ARCH_CHIP_STM32F429V=y
|
||||
CONFIG_ARCH_INTERRUPTSTACK=512
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_ARMV7M_LAZYFPU=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
|
||||
@@ -35,7 +35,6 @@ CONFIG_ARMV7M_BASEPRI_WAR=y
|
||||
CONFIG_ARMV7M_DCACHE=y
|
||||
CONFIG_ARMV7M_DTCM=y
|
||||
CONFIG_ARMV7M_ICACHE=y
|
||||
CONFIG_ARMV7M_LAZYFPU=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
|
||||
@@ -35,7 +35,6 @@ CONFIG_ARMV7M_BASEPRI_WAR=y
|
||||
CONFIG_ARMV7M_DCACHE=y
|
||||
CONFIG_ARMV7M_DTCM=y
|
||||
CONFIG_ARMV7M_ICACHE=y
|
||||
CONFIG_ARMV7M_LAZYFPU=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
|
||||
@@ -87,13 +87,13 @@
|
||||
#define ADC_BATTERY_VOLTAGE_CHANNEL /* PA2 */ ADC1_CH(2)
|
||||
#define ADC_BATTERY_CURRENT_CHANNEL /* PA3 */ ADC1_CH(3)
|
||||
#define ADC_SCALED_V5_CHANNEL /* PA4 */ ADC1_CH(4)
|
||||
#define ADC_RSSI_IN_CHANNEL /* PC1 */ ADC1_CH(11)
|
||||
#define ADC_RC_RSSI_CHANNEL /* PC1 */ ADC1_CH(11)
|
||||
|
||||
#define ADC_CHANNELS \
|
||||
((1 << ADC_BATTERY_VOLTAGE_CHANNEL) | \
|
||||
(1 << ADC_BATTERY_CURRENT_CHANNEL) | \
|
||||
(1 << ADC_SCALED_V5_CHANNEL) | \
|
||||
(1 << ADC_RSSI_IN_CHANNEL))
|
||||
(1 << ADC_RC_RSSI_CHANNEL))
|
||||
|
||||
/* Define Battery 1 Voltage Divider and A per V */
|
||||
#define BOARD_BATTERY1_V_DIV (18.1f) /* measured with the provided PM board */
|
||||
@@ -112,7 +112,7 @@
|
||||
/* Power supply control and monitoring GPIOs */
|
||||
#define GPIO_nPOWER_IN_A /* PB5 */ (GPIO_INPUT|GPIO_PULLUP|GPIO_PORTB|GPIO_PIN5)
|
||||
|
||||
#define GPIO_nVDD_BRICK1_VALID GPIO_nPOWER_IN_A /* Brick 1 Is Chosen */
|
||||
#define GPIO_VDD_BRICK1_VALID GPIO_nPOWER_IN_A /* Brick 1 Is Chosen */
|
||||
#define BOARD_NUMBER_BRICKS 1
|
||||
|
||||
#define GPIO_VDD_3V3_SPEKTRUM_POWER_EN /* PE4 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTE|GPIO_PIN4)
|
||||
@@ -175,7 +175,7 @@
|
||||
#define BOARD_ADC_USB_CONNECTED (px4_arch_gpioread(GPIO_OTGFS_VBUS))
|
||||
#define BOARD_ADC_USB_VALID BOARD_ADC_USB_CONNECTED
|
||||
#define BOARD_ADC_SERVO_VALID (1) /* never powers off the Servo rail */
|
||||
#define BOARD_ADC_BRICK_VALID (!px4_arch_gpioread(GPIO_nVDD_BRICK1_VALID))
|
||||
#define BOARD_ADC_BRICK_VALID (px4_arch_gpioread(GPIO_VDD_BRICK1_VALID))
|
||||
|
||||
#define BOARD_HAS_PWM DIRECT_PWM_OUTPUT_CHANNELS
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@ CONFIG_ARCH_CHIP_STM32H7=y
|
||||
CONFIG_ARCH_INTERRUPTSTACK=512
|
||||
CONFIG_ARMV7M_BASEPRI_WAR=y
|
||||
CONFIG_ARMV7M_ICACHE=y
|
||||
CONFIG_ARMV7M_LAZYFPU=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
|
||||
@@ -35,7 +35,6 @@ CONFIG_ARMV7M_BASEPRI_WAR=y
|
||||
CONFIG_ARMV7M_DCACHE=y
|
||||
CONFIG_ARMV7M_DTCM=y
|
||||
CONFIG_ARMV7M_ICACHE=y
|
||||
CONFIG_ARMV7M_LAZYFPU=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
|
||||
@@ -35,7 +35,6 @@ CONFIG_ARMV7M_BASEPRI_WAR=y
|
||||
CONFIG_ARMV7M_DCACHE=y
|
||||
CONFIG_ARMV7M_DTCM=y
|
||||
CONFIG_ARMV7M_ICACHE=y
|
||||
CONFIG_ARMV7M_LAZYFPU=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
|
||||
@@ -32,7 +32,6 @@ CONFIG_ARCH_CHIP_STM32=y
|
||||
CONFIG_ARCH_CHIP_STM32F427V=y
|
||||
CONFIG_ARCH_INTERRUPTSTACK=512
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_ARMV7M_LAZYFPU=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
|
||||
@@ -19,7 +19,6 @@ CONFIG_ARCH_CHIP_KINETIS=y
|
||||
CONFIG_ARCH_CHIP_MK66FN2M0VMD18=y
|
||||
CONFIG_ARCH_INTERRUPTSTACK=512
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_ARMV7M_LAZYFPU=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
|
||||
@@ -19,7 +19,6 @@ CONFIG_ARCH_CHIP_KINETIS=y
|
||||
CONFIG_ARCH_CHIP_MK66FN2M0VMD18=y
|
||||
CONFIG_ARCH_INTERRUPTSTACK=512
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_ARMV7M_LAZYFPU=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
|
||||
@@ -18,7 +18,6 @@ CONFIG_ARCH_CHIP_KINETIS=y
|
||||
CONFIG_ARCH_CHIP_MK66FN2M0VMD18=y
|
||||
CONFIG_ARCH_INTERRUPTSTACK=512
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_ARMV7M_LAZYFPU=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
|
||||
@@ -18,7 +18,6 @@ CONFIG_ARCH_CHIP_KINETIS=y
|
||||
CONFIG_ARCH_CHIP_MK66FN2M0VMD18=y
|
||||
CONFIG_ARCH_INTERRUPTSTACK=512
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_ARMV7M_LAZYFPU=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
|
||||
@@ -24,7 +24,6 @@ CONFIG_ARMV7M_DCACHE_WRITETHROUGH=y
|
||||
CONFIG_ARMV7M_DTCM=y
|
||||
CONFIG_ARMV7M_ICACHE=y
|
||||
CONFIG_ARMV7M_ITCM=y
|
||||
CONFIG_ARMV7M_LAZYFPU=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_ARM_MPU=y
|
||||
|
||||
@@ -19,7 +19,6 @@ CONFIG_ARCH_CHIP_S32K146=y
|
||||
CONFIG_ARCH_CHIP_S32K14X=y
|
||||
CONFIG_ARCH_CHIP_S32K1XX=y
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_ARMV7M_LAZYFPU=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
|
||||
@@ -20,7 +20,6 @@ CONFIG_ARCH_CHIP="stm32"
|
||||
CONFIG_ARCH_CHIP_STM32=y
|
||||
CONFIG_ARCH_CHIP_STM32F405RG=y
|
||||
CONFIG_ARCH_INTERRUPTSTACK=512
|
||||
CONFIG_ARMV7M_LAZYFPU=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
|
||||
@@ -32,7 +32,6 @@ CONFIG_ARCH_CHIP_STM32=y
|
||||
CONFIG_ARCH_CHIP_STM32F427V=y
|
||||
CONFIG_ARCH_INTERRUPTSTACK=512
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_ARMV7M_LAZYFPU=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
|
||||
@@ -0,0 +1,138 @@
|
||||
|
||||
# FMUv3 is FMUv2 with access to the full 2MB flash
|
||||
|
||||
px4_add_board(
|
||||
PLATFORM nuttx
|
||||
VENDOR px4
|
||||
MODEL fmu-v3
|
||||
LABEL ctrlalloc
|
||||
TOOLCHAIN arm-none-eabi
|
||||
ARCHITECTURE cortex-m4
|
||||
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/board_adc
|
||||
adc/ads1115
|
||||
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/adis16448
|
||||
imu/adis16477
|
||||
imu/adis16497
|
||||
imu/l3gd20
|
||||
imu/lsm303d
|
||||
imu/invensense/icm20608g
|
||||
imu/invensense/icm20948
|
||||
imu/invensense/mpu6000
|
||||
imu/invensense/mpu9250
|
||||
irlock
|
||||
lights/blinkm
|
||||
lights/rgbled
|
||||
lights/rgbled_ncp5623c
|
||||
magnetometer # all available magnetometer drivers
|
||||
mkblctrl
|
||||
#optical_flow # all available optical flow drivers
|
||||
optical_flow/px4flow
|
||||
#osd
|
||||
pca9685
|
||||
pca9685_pwm_out
|
||||
#power_monitor/ina226
|
||||
#protocol_splitter
|
||||
pwm_input
|
||||
pwm_out_sim
|
||||
pwm_out
|
||||
px4io
|
||||
roboclaw
|
||||
tap_esc
|
||||
telemetry # all available telemetry drivers
|
||||
test_ppm
|
||||
tone_alarm
|
||||
uavcan
|
||||
MODULES
|
||||
airspeed_selector
|
||||
angular_velocity_controller
|
||||
attitude_estimator_q
|
||||
battery_status
|
||||
camera_feedback
|
||||
commander
|
||||
control_allocator
|
||||
dataman
|
||||
ekf2
|
||||
esc_battery
|
||||
events
|
||||
flight_mode_manager
|
||||
fw_att_control
|
||||
fw_pos_control_l1
|
||||
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
|
||||
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
|
||||
usb_connected
|
||||
ver
|
||||
work_queue
|
||||
EXAMPLES
|
||||
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
|
||||
)
|
||||
@@ -32,7 +32,6 @@ CONFIG_ARCH_CHIP_STM32=y
|
||||
CONFIG_ARCH_CHIP_STM32F427V=y
|
||||
CONFIG_ARCH_INTERRUPTSTACK=512
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_ARMV7M_LAZYFPU=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
|
||||
@@ -32,7 +32,6 @@ CONFIG_ARCH_CHIP_STM32=y
|
||||
CONFIG_ARCH_CHIP_STM32F427V=y
|
||||
CONFIG_ARCH_INTERRUPTSTACK=512
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_ARMV7M_LAZYFPU=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_STACKCHECK=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
|
||||
@@ -168,6 +168,12 @@
|
||||
|
||||
#define BOARD_DSHOT_MOTOR_ASSIGNMENT {3, 2, 1, 0, 4, 5};
|
||||
|
||||
/* Internal IMU Heater
|
||||
*
|
||||
* Connected to the IO MCU; tell compiler to enable support
|
||||
*/
|
||||
#define PX4IO_HEATER_ENABLED
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/****************************************************************************************************
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user