Compare commits

..

263 Commits

Author SHA1 Message Date
Daniel Agar fdd8afc542 cmake: px4_add_git_submodule add git index and HEAD as dependencies
- this ensures any submodule changes are caught
 - fixes #17651
2021-08-21 14:49:51 -04:00
Christian Llanes c0efbe1f9c change PublicationMulti-> Publication as a temporary fix 2021-08-20 19:56:56 +01:00
David Sidrane 376b1c9987 rgbled_ncp5623c:Add comand line mapping of PWM to color 2021-08-20 10:15:57 -04:00
David Sidrane 8e04985940 rgbled_ncp5623c:Needs 2 retries 2021-08-20 10:15:57 -04:00
David Sidrane 74903cf215 rgbled_ncp5623c:Can change address, return actual 2021-08-20 10:15:57 -04:00
David Sidrane cba78081af rgbled_ncp5623c:Document support for ncp5623[c|b] parts 2021-08-20 10:15:57 -04:00
David Sidrane 78b76cb636 i2c_spi_buses:Support devices that may change address 2021-08-20 10:15:57 -04:00
David Sidrane 075cb39c34 vcm1193l:Bug Fix set default address 2021-08-20 10:15:57 -04:00
David Sidrane 8f4811daa8 px4_fmu-v5x:Newer HW Start BARRO on bus 2 2021-08-20 10:15:57 -04:00
David Sidrane 566d1499bc px4_fmu-v6x:Use HB 10pin GPS rotation 2021-08-20 10:15:57 -04:00
David Sidrane dc5fd25e8c px4_fmu-v5x:Use HB 10pin GPS rotation 2021-08-20 10:15:57 -04:00
David Sidrane 1618933014 rcS:Scope netman to all 5X and 6X 2021-08-20 10:15:57 -04:00
Daniel Agar 69d1a73f85 Update submodule GPSDrivers to latest Fri Aug 20 12:39:20 UTC 2021 (#18111)
- GPSDrivers in PX4/Firmware (1cbb007b95d375ababeae79f753cfafae9a9a4de): https://github.com/PX4/PX4-GPSDrivers/commit/8af5336d3f112278fd321e2c512453f23a350540
    - GPSDrivers current upstream: https://github.com/PX4/PX4-GPSDrivers/commit/6fcf06894973240d45dc49d3b31565917dc8f2f6
    - Changes: https://github.com/PX4/PX4-GPSDrivers/compare/8af5336d3f112278fd321e2c512453f23a350540...6fcf06894973240d45dc49d3b31565917dc8f2f6

6fcf068 2021-08-18 Femtomes - Femto_gps_driver: change UNLOGALL command
c51adac 2021-08-18 Oleg Evseev - nmea: add rtcm parsing and add debug ouput
2021-08-20 10:14:47 -04:00
Daniel Agar df3608d38a Update submodule mavlink v2.0 to latest Fri Aug 20 12:39:17 UTC 2021
- mavlink v2.0 in PX4/Firmware (31545f85fb): https://github.com/mavlink/c_library_v2/commit/5095bcd856537330e66e6fc833a1c7bf689bf5ed
    - mavlink v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/51204fc82bc89b6862ebf03a1f49e80c52feeecc
    - Changes: https://github.com/mavlink/c_library_v2/compare/5095bcd856537330e66e6fc833a1c7bf689bf5ed...51204fc82bc89b6862ebf03a1f49e80c52feeecc
2021-08-20 09:05:23 -04:00
Daniel Agar 31545f85fb gitmodules update NuttX branches to latest v10.1.0 2021-08-19 13:02:31 -04:00
Beat Küng c4b91c8558 calibration params: avoid using NaN as default
- NaN is not supported by JSON, and leads to parsing failure in QGC.
 - fixes https://github.com/PX4/PX4-Autopilot/issues/18095
2021-08-19 11:29:26 -04:00
Daniel Agar 507cce78d5 boards: px4_fmu-v6{u,x} fix test variant flash overflow and sync defaults 2021-08-19 11:25:21 -04:00
Daniel Agar c4499aa7bb uavcan: save parameter after successful set 2021-08-19 02:06:02 -07:00
Daniel Agar 06c2d14903 ekf2: multi-mode allow first instance to save EKF2_MAG_DECL 2021-08-19 10:14:35 +02:00
Daniel Agar 1af2ecaff6 boards: px4_fmu-v5_test disable attitude_estimator_q and local_position_estimator to save flash 2021-08-18 19:31:24 -04:00
Christian Llanes 6423ea50e6 add sensor_combined to urtps_bridge_topics.yaml 2021-08-18 23:52:45 +01:00
Daniel Agar 3423c5e48a boards: nxp_fmurt1062-v1_default disable attitude_estimator_q and local_position_estimator to save flash 2021-08-18 18:06:22 -04:00
Daniel Agar 3fc4ee6c90 boards: px4_fmu-v6x_default disable attitude_estimator_q to save flash 2021-08-18 18:01:14 -04:00
Daniel Agar 4c401b070e boards: cuav_can-gps-v1 delete unused debug variant 2021-08-18 17:40:33 -04:00
Beat Küng 7b9d16d2f8 fix gps: remove Wno-cast-align & fix it 2021-08-18 12:24:17 -04:00
Beat Küng 4b49f9261e gps: add generic nmea driver 2021-08-18 12:24:17 -04:00
Beat Küng 22e2fc9465 gps: add missing case & arguments for femtomes driver 2021-08-18 12:24:17 -04:00
Daniel Agar 49f81a9e0e boards: px4_fmu-v2_default disable load_mon to save flash 2021-08-18 12:20:13 -04:00
Daniel Agar 7b8ef07235 github actions: add all CAN nodes 2021-08-18 12:17:46 -04:00
Claudio Micheli 2607527d63 Commander: improve user notification for yaw emergency
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2021-08-18 10:16:02 -04:00
Hyungsub d089d4a6a4 fix memory bugs in replay and bl_update 2021-08-18 07:45:51 +02:00
alexklimaj 810dbbd25b AFBR mode switching, rate switching, and test 2021-08-17 19:38:33 -04:00
Hamish Willee c1f588806a BAT_ADC_CHANNEL should point to BAT1_I_CHANNEL 2021-08-17 19:35:11 -04:00
Daniel Agar cb610caf1e drivers: minimize additional I2C retries 2021-08-17 09:54:50 -04:00
Daniel Agar 8a8171c7aa platforms/nuttx: px4_init initialize and reset all I2C buses 2021-08-17 09:54:50 -04:00
Daniel Agar 2b581ef407 platforms/nuttx: s32k14x & s32k1xx add i2c_hw_description.h 2021-08-17 09:54:50 -04:00
Daniel Agar 29616ec387 Jenkins: remove modalai_fc-v1 temporarily
- board test harness needs to be repaired
2021-08-16 21:45:37 -04:00
Beat Küng 474b0188f7 mixer_module: set MAX_CUSTOM_OPT_LEVEL 2021-08-16 11:05:39 -04:00
Beat Küng f00f3d1a27 dshot: improve performance by removing extra motor_buffer array
Reduces CPU load by almost 1.5% @ 2khz on F4 and F7.

This changes the motor ordering on boards where the timer ordering does
not match the order of the timer usage in the channels defintion.
Only omnibus f4sd is affected.
2021-08-16 11:05:39 -04:00
Beat Küng afed10618b dshot: inline up_dshot_motor_data_set and up_dshot_motor_command
Slight performance improvement (~0.1% @1khz on F4)
2021-08-16 11:05:39 -04:00
Hamish Willee 8aecc64a73 generate uorb - support multiline descriptions 2021-08-16 08:29:44 +02:00
Hamish Willee 9c081ed24b ekf2_timestamps.msg - make first line a complete sentence
Fixes the docs.
2021-08-16 08:29:44 +02:00
Hamish Willee 51fa834ac6 generate_msg_docs: generate better page title 2021-08-16 08:29:44 +02:00
Daniel Agar ff39e27e2d sensor calibration: save temperature at calibration time for monitoring 2021-08-15 11:19:24 -04:00
Daniel Agar a76bcd3e01 CI fix renamed uorb_to_ros_rtps_ids.py -> uorb_to_ros_urtps_topics.py 2021-08-14 15:53:14 -04:00
Daniel Agar c6931814fa Jenkins: fix msg docs stash and archive 2021-08-14 15:18:57 -04:00
Daniel Agar b98656ccb4 Jenkins: fix msg files stash 2021-08-14 14:58:57 -04:00
Daniel Agar f2bae02f87 msg: purge unused qshell 2021-08-14 12:54:01 -04:00
Daniel Agar 5fb386a1bb magnetometer/bosch/bmm150: free all perf counters 2021-08-14 11:42:53 -04:00
Daniel Agar a83675c622 gyro_fft: improve scheduling
- move to high priority work queue (from low priority)
 - schedule slightly more often to avoid missing messages
 - perf counter include all FFT processing work
 - lazily allocate gyro gap perf counters on initial sensor selection
2021-08-13 15:00:08 -04:00
David Sidrane 8952fa2935 rc.sensors:Fix Shell Check warning 2021-08-13 14:22:00 -04:00
David Sidrane 3c227b6f76 hardfault_log:Remove verbose output when CONSTRAINED_FLASH_NO_HELP is lit 2021-08-13 14:22:00 -04:00
David Sidrane 53c81d986e atl_mantis-edu:Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane c4b810eef9 tap_esc_uploader:Use inttypes 2021-08-13 14:22:00 -04:00
David Sidrane a7123f115c sih:Fix type mismatch 2021-08-13 14:22:00 -04:00
David Sidrane e8c418caaf EKF:Use inttypes 2021-08-13 14:22:00 -04:00
David Sidrane 79f8865e65 px4_fmu-v2:All configs Use NO_HELP option to save flash 2021-08-13 14:22:00 -04:00
David Sidrane 3e9c8e401e freefly_can-rtk-gps_canbootloader: Stub out printf to remove write dependancy 2021-08-13 14:22:00 -04:00
David Sidrane 518700b39b platforms/nuttx/CMakeLists:Resolve fs->libc(strcat) libc->fs 2021-08-13 14:22:00 -04:00
David Sidrane bb913ae11a system_load:Track Dynamic PID hash 2021-08-13 14:22:00 -04:00
David Sidrane e6d9c2b734 px4_fmu-v5_optimized: Fit in flash 2021-08-13 14:22:00 -04:00
David Sidrane cf292bef07 px4_fmu-v6x: Update nsh defconfig NuttX 10.1.0+ CONFIG_NET_SOCKOPTS Automatic 2021-08-13 14:22:00 -04:00
David Sidrane f5d679fae4 px4_fmu-v5x: Update nsh defconfig NuttX 10.1.0+ CONFIG_NET_SOCKOPTS Automatic 2021-08-13 14:22:00 -04:00
David Sidrane cab2ba209e px4_fmu-v5x: Update base_phy_DP83848C defconfig NuttX 10.1.0+ CONFIG_NET_SOCKOPTS Automatic 2021-08-13 14:22:00 -04:00
David Sidrane 53477a1f82 av_x-v1: Update nsh defconfig NuttX 10.1.0+ CONFIG_NET_SOCKOPTS Automatic 2021-08-13 14:22:00 -04:00
David Sidrane a1c90057cb px4_fmu-v5:ARM Stack check (debug) needs headroom 2021-08-13 14:22:00 -04:00
David Sidrane 10d3909087 px4_fmu-v5:ARM Stack check needs headroom 2021-08-13 14:22:00 -04:00
David Sidrane 58fc5b21b8 NuttX at 10.1.0+
With PX4 contrib for building
2021-08-13 14:22:00 -04:00
David Sidrane e2d05157dd afbrs50: Use inttypes 2021-08-13 14:22:00 -04:00
David Sidrane 9455bfd857 px4_fmu-v5: Update uavcanv1 defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane e3104861df cuav_can-gps-v1: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 8cdea33074 modalai_fc-v2: Update bootloader defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 02ef9dc188 modalai_fc-v2: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 5beda51fa4 modalai_fc-v1: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane b600c7cc55 cuav_x7pro: Update bootloader defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane a0c74a8563 cuav_x7pro: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 51b1cf774c cuav_nora: Update bootloader defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane b8aa6ccaa1 cuav_nora: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane a73b688566 holybro_kakutef7: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane b3555ada6b holybro_can-gps-v1: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 7d572c515c holybro_pix32v5: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 55bf2c7610 holybro_durandal-v1: Update bootloader defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane b45e0dd872 holybro_durandal-v1: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 6b27c28787 uvify_core: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 9e3d275f0c omnibus_f4sd: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 3c78d7285a freefly_can-rtk-gps: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 24a263a6bc av_x-v1: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 9676b3fd27 airmind_mindpx-v2: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 2731238ce3 ark_can-gps: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 7268c344e4 ark_can-flow: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane defbb0e17a mro_ctrl-zero-f7-oem: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 47f1b934d3 mro_x21: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 0823bb5584 mro_x21-777: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane f527286200 mro_ctrl-zero-h7-oem: Update bootloader defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 5446d4bde8 mro_ctrl-zero-h7-oem: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane e96c3e5093 mro_pixracerpro: Update bootloader defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 1d789863b4 mro_pixracerpro: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane fe8c902f90 mro_ctrl-zero-f7: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 49c85e7713 mro_ctrl-zero-h7: Update bootloader defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 0d47f1a3cb mro_ctrl-zero-h7: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 181e82dd17 nxp_fmurt1062-v1: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 89c553b161 nxp_fmuk66-v3: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane ea1538a04f nxp_fmuk66-v3: Update socketcan defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 6ad56c537f nxp_fmuk66-e: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 71d5de5715 nxp_fmuk66-e: Update socketcan defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 44b29b6126 nxp_ucans32k146: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane cc6d15b4fd bitcraze_crazyflie: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 655a10ffdd bitcraze_crazyflie21: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 64bf02384f cubepilot_cubeyellow: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 281a238bb0 cubepilot_cubeyellow: Update test defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 9c1752bf4d cubepilot_io-v2: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane d9da05bd02 cubepilot_cubeorange: Update bootloader defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 2a4b4824e5 cubepilot_cubeorange: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane f5b22d8832 cubepilot_cubeorange: Update test defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 9b15d2db10 px4_fmu-v6u: Update bootloader defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane d4d149758d px4_fmu-v6u: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane ffc9ed8a75 px4_fmu-v5: Update debug defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 3e020a33b9 px4_fmu-v5: Update optimized defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 33897727cd px4_fmu-v5: Update stackcheck defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 63198fb6cb px4_fmu-v5: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 0b084461b5 px4_fmu-v4pro: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 6e93251169 px4_fmu-v5x: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 7344c050a8 px4_fmu-v5x: Update base_phy_DP83848C defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane cb150b3ced px4_fmu-v3: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane c3d9504933 px4_io-v2: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane be479654c2 px4_fmu-v2: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 0316010027 px4_fmu-v6x: Update bootloader defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 639486f4ba px4_fmu-v6x: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane d709bafa11 px4_fmu-v4: Update nsh defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 2e4e4018b6 px4_fmu-v5:ARM Stack check needs headroom (237 bytes) 2021-08-13 14:22:00 -04:00
David Sidrane bea495999f spracing_h7extreme:Update defconfig NuttX 10.1.0+ 2021-08-13 14:22:00 -04:00
David Sidrane 173e5c7554 NuttX:Track Stack naming changes 2021-08-13 14:22:00 -04:00
David Sidrane 069130403d LoadMon:Support NuttX Dynamic FDs 2021-08-13 14:22:00 -04:00
David Sidrane 4353d0faf3 print_load:Support NuttX Dynamic FDs 2021-08-13 14:22:00 -04:00
David Sidrane ec61512cdf NuttX inits null console 2021-08-13 14:22:00 -04:00
David Sidrane 01ef9cf3e6 NuttX at 10.1.0+
With PX4 contrib for building
2021-08-13 14:22:00 -04:00
Silvan Fuhrer 40f9b53b90 Remove a couple of unnecessary reboot_required from parameter meta data
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-08-13 10:35:43 -04:00
Jaeyoung-Lim d30760a2ea Remove flap scaling to prevent flaps being deployed in manual mode
This commit restores the flap scaling since it was always getting deployed in manual flight modes
2021-08-13 15:46:23 +02:00
Beat Küng 72bc8647a9 commander: add sensors reset to factory calibration 2021-08-12 10:20:33 -04:00
Daniel Agar 3f172dbfa7 ROMFS: new parameters for starting differential pressure sensors 2021-08-12 10:11:13 -04:00
romain-chiap c8346534f1 sih: using Quatf::expq(), fuselage added 2021-08-12 10:10:03 -04:00
Beat Küng 265c77b02a logger: remove unused topics, move some to debug profile 2021-08-12 10:09:11 -04:00
Beat Küng c0285611ec fix logger: turn off lockstep when starting log streaming
Lockstep created deadlocks between logger and mavlink, due to logger
waiting for mavlink and mavlink waiting for lockstep.
2021-08-12 10:09:11 -04:00
Beat Küng f88f224fe6 logger: avoid data bursts by distributing slow subscription updates over time
There's an increasing amount of slow logged topics at 1-2Hz, which were all
updated in the same logger iteration, leading to data bursts. For log
streaming this started to exceed uart buffer sizes. By distributing updates
more equal over time those bursts are removed, reducing buffer size
requirements.

Tests showed during steady state a reduction of maximum topic updates per
iteration from 40 down to 17.
Also the SD log buffer fill level is more constant.
2021-08-12 10:09:11 -04:00
Beat Küng d3c45c00c7 mavlink_ulog_streaming: when stopping, wait after receiving the ack
So we log additional data send afterwards
2021-08-12 10:09:11 -04:00
Beat Küng e1ac6fe297 logger: send post-flight perf data when stopping mavlink log streaming
- send out VEHICLE_CMD_RESULT_IN_PROGRESS
- delete the ulog object when receiving the ACK from logger, instead of
  the stop command
2021-08-12 10:09:11 -04:00
Beat Küng 0f6bf6bc0e refactor gps: use enum class for gps_driver_mode_t 2021-08-12 10:06:39 -04:00
Beat Küng 09a42e7af2 gps: extend GPS_DUMP_COMM param to enable RTCM output + logging 2021-08-12 10:06:39 -04:00
Martina Rivizzigno 159c87a6fb ll40ls: add support for LidarLite V4
Co-authored-by: Claudio Micheli <claudio@auterion.com>
2021-08-12 10:05:19 -04:00
Daniel Agar 68dcc25709 flight_mode_manager: ManualAcceleration support weathervane yaw handler
- fixes https://github.com/PX4/PX4-Autopilot/issues/17911
2021-08-12 09:58:29 -04:00
TSC21 21953daa3b microRTPS: transport: fix UART configuration 2021-08-12 08:44:53 +02:00
TSC21 4b6646c5f3 microRTPS: transport: normalize configs with mavlink/mavlink-router 2021-08-12 08:44:53 +02:00
TSC21 af8a6117fa microRTPS: agent: add missing 'g' option 2021-08-12 08:44:53 +02:00
TSC21 2a368b4db1 uorb_to_ros_urtps_topics: minor cleanup 2021-08-12 08:44:53 +02:00
TSC21 74557c9071 uorb_to_ros_msgs: minor cleanup 2021-08-12 08:44:53 +02:00
TSC21 00ad0d3b82 microRTPS: add make targets to update the PX4-ROS2/microRTPS bridge
This allows to easily update the px4_ros_com and/or px4_msgs through a make target and by passing the location of their directories
2021-08-12 08:44:53 +02:00
TSC21 8762dce762 microRTPS: transport: small format fix 2021-08-12 08:44:53 +02:00
TSC21 fae1627d92 microRTPS: client: cleanup and make arguments consistent 2021-08-12 08:44:53 +02:00
TSC21 109b031156 microRTPS: agent: cleanup and make arguments consistent 2021-08-12 08:44:53 +02:00
TSC21 e83a3a6cf7 microRTPS: update RTPS message list naming from 'ids' to 'msgs' 2021-08-12 08:44:53 +02:00
TSC21 0b23679f98 msg: templates: update empy contexts, required fields and license header years 2021-08-12 08:44:53 +02:00
TSC21 ffa70ac0fd microRTPS: generate_microRTPS_bridge: run fastrtsgen only once for all files
Reducing the generation time to a 4th of the time (!!)
2021-08-12 08:44:53 +02:00
TSC21 a8a56a03a4 microRTPS: rename uorb_to_ros_rtps_ids to uorb_to_ros_urtps_topics and remove the 'id' references on it 2021-08-12 08:44:53 +02:00
TSC21 4609949bbb microRTPS: generate_microRTPS_bridge: only run the generator for the topics that are actually marked to be used 2021-08-12 08:44:53 +02:00
TSC21 695e1fa574 uorb_to_ros_rtps_ids: add an header with a notice regarding the autogneration of the 'px4_ros_com' urtps_bridge_topics.yaml file
Although it can be modified manually, we are going to recommend the developer to generate it from the PX4-Autopilot side instead
2021-08-12 08:44:53 +02:00
TSC21 c478e2985a microRTPS: simplify the attribution of the RTPS IDs by makiing it automatic
1. The RTPS IDs are now automatically assigned to the topics
2. Only the topics that get defined to be sent or received in the urtps_bridge_topics.yaml (renamed, since now it doesn't contain IDs) receive the IDs
3. Any addition or removal on the urtps_bridge_topics.yaml file might update the topic IDs - this will require that the agent and the client ID list has to be in sync. This will further require a robustification of the way we check the IDs and the message definitions when starting the bridge.
2021-08-12 08:44:53 +02:00
TSC21 f557fbc99f protocol_splitter: add perf counters for the stats so they can be logged 2021-08-12 08:44:53 +02:00
TSC21 5a75277ff1 protocol_splitter: update header length and payload length position
To match the change on the microRTPS message header, which adds the sys ID as the 5th byte of the header
2021-08-12 08:44:53 +02:00
TSC21 ba3dbbd38d microRTPS: send the system ID with the RTPS packet header and remove the need for extra id fields in uORB
This allows that all messages (not only timesync messages) that get received on the same system that sent them do not get parsed. As the microRTPS agent is built currently, this will only happen right now if someone sets the same UDP port to send and receive data, or by manually changing the agent topics (which were always autogenerated).
2021-08-12 08:44:53 +02:00
TSC21 a10dab516c timesync: remove system ID field from the timesync message 2021-08-12 08:44:53 +02:00
TSC21 25dbffe1aa microRTPS: agent: split FMU input from output topics in Pubs/Subs 2021-08-12 08:44:53 +02:00
TSC21 d31b7feb31 microRTPS: agent: publish timesync status 2021-08-12 08:44:53 +02:00
TSC21 a324e5465a timesync: extend timesync_status message with protocol source field and enum 2021-08-12 08:44:53 +02:00
TSC21 a930edf34b init.d-posix: rcS: allow to use a different startup config to the micrortps_client in UDP 2021-08-12 08:44:53 +02:00
TSC21 6d4f65a47a microRTPS: allow timesync using ROS time 2021-08-12 08:44:53 +02:00
TSC21 e762d57222 sitl_run: allow to start required ROS2 plugins with Gazebo when ROS_VERSION is set to 2 2021-08-12 08:44:53 +02:00
Julian Oes cb2b09b80f protocol_splitter: implement with one read buffer
This is an attempt to implement the protocol_splitter with one
read buffer only. The idea is to prevent additional copy
operations from an incoming buffer to the respective protocol buffer.

Right now the benefit is not really there because we are not using a
ringbuffer and have to shift data around quite a bit.

We also try to parse and copy data to the reader immediately without
doing a read from the device which potentially takes 100ms.

We further use a timeout mechanism to prevent starvation if one reader
disconnects and the buffer would fill up from unread data.
2021-08-12 08:44:53 +02:00
Julian Oes 0c9fefce32 urtps: rectify comment 2021-08-12 08:44:53 +02:00
Julian Oes 31b1241de8 uorb_microcdr: collect all messages
Without this we are potentially too slow to collect them all which can
lead to the buffer in protocol_splitter to overflow and be reset.
2021-08-12 08:44:53 +02:00
Daniel Agar 326c4f95ce ROMFS cmake remove directory VERBATIM 2021-08-11 13:29:14 -04:00
Beat Küng 61e3ec53b0 mixer_module: check for motor test after topic update
Otherwise if a module restricts the update rate via setMaxTopicUpdateRate()
and then motor_test is used, the module might run faster than expected.
2021-08-11 12:06:32 -04:00
Claudio Micheli a6d88cad18 mavlink_main: add ESC_INFO & ESC_STATUS to onboard_lowbandwith configuration
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2021-08-11 17:20:08 +02:00
Oleg Evseev a93f8dade4 mavlink: receiver fix geo include 2021-08-10 08:18:28 -04:00
PX4 BuildBot e9a21ee911 Update submodule devices to latest Mon Aug 9 00:39:11 UTC 2021
- devices in PX4/Firmware (48b31124a4cdab9f7f91dba14649206f41c30c97): https://github.com/PX4/PX4-GPSDrivers/commit/f51267815db3331723b880ab20afc5a67a87c22b
    - devices current upstream: https://github.com/PX4/PX4-GPSDrivers/commit/6815e1d3b294cd6ea583294ebadf191321e4beba
    - Changes: https://github.com/PX4/PX4-GPSDrivers/compare/f51267815db3331723b880ab20afc5a67a87c22b...6815e1d3b294cd6ea583294ebadf191321e4beba

    6815e1d 2021-08-04 zhangft - femtomes: add UAVSTATUS and fall back to 10Hz rate if 20Hz not supported
2021-08-08 22:31:14 -04:00
Daniel Agar c8366e736e ROMFS: update ATL Mantis EDU optical flow defaults 2021-08-08 14:21:28 -04:00
Daniel Agar 66cfacaec2 boards: px4_fmu-v6x_test disable attitude_estimator_q to save flash 2021-08-08 14:20:58 -04:00
Daniel Agar 2ad448a4e8 boards: holybro_pix32v5 remove unused test build 2021-08-08 14:20:58 -04:00
alexklimaj a904bb506f Fix afbrs50 high cpu load from switching 2021-08-08 11:42:30 -04:00
bresch 741f9c6d1a Commander: change attitude quaternion check to avoid numerical issues 2021-08-08 11:41:23 -04:00
Daniel Agar fb4ac0f08c ekf2: remove redundant IMU vibration metrics
- consume IMU vibration metrics from vehicle_imu_status
2021-08-08 06:26:03 -07:00
Daniel Agar a397004bf8 adis16448: add additional delay after transfer in case of back to back transcations
- add verified register read method
2021-08-08 06:25:16 -07:00
Julian Oes 0033c0fc51 navigator: fix param description 2021-08-05 15:18:55 +02:00
bresch 01d0b8800e commander: report GNSS yaw fault to user 2021-08-05 11:10:02 +02:00
bresch 44219e9f45 EKF: add GNSS yaw to emergency yaw fallback test 2021-08-05 11:10:02 +02:00
bresch 11cd51c132 EKF: allow emergency reset in GNSS yaw and EV yaw aiding modes 2021-08-05 11:10:02 +02:00
bresch 4ebfbc6eab GNSS yaw: use NIS sequence to detect bias in state
A constant large value in the (signed) normalized innovation test ratio is a sign
of bias in the state estimate. This metric can be used to trigger a
covariance boost or reset
2021-08-05 11:10:02 +02:00
bresch 3fe04a91f6 GNSS yaw: add observation jump on ground
Some receivers are initializing to some heading and then resetting to
the correct one after a couple of seconds. EKF2 should detect that and
reset to the new value
2021-08-05 11:10:02 +02:00
bresch 30c7a596af GNSS yaw: allow unlimited resets on ground 2021-08-05 11:10:02 +02:00
bresch e90e1c7e2a GNSS yaw: use dedicated observation noise 2021-08-05 11:10:02 +02:00
romain-chiap 718e5b5b5d sih: add fixed-wing support 2021-08-05 09:16:14 +02:00
PX4 BuildBot 6060ec8c9a Update submodule matrix to latest Thu Aug 5 00:39:10 UTC 2021
- matrix in PX4/Firmware (6be58a88905d2ef63bc3aaa1a01c82346c181742): https://github.com/PX4/PX4-Matrix/commit/b8568a89db8455d0ab2e2e391e2149ba2e5e10dd
    - matrix current upstream: https://github.com/PX4/PX4-Matrix/commit/3d1c9b988dff1d95f36cdd1df3e84d7a2365501c
    - Changes: https://github.com/PX4/PX4-Matrix/compare/b8568a89db8455d0ab2e2e391e2149ba2e5e10dd...3d1c9b988dff1d95f36cdd1df3e84d7a2365501c

    3d1c9b9 2021-08-05 romain-chiap - quaternion exponential (#164)
2021-08-04 21:59:01 -04:00
Daniel Agar be2f65be35 drives/tap_esc: refactor to use OutputModuleInterface 2021-08-04 17:15:24 -04:00
Daniel Agar 2e02ad7c4e atl_mantis-edu front and rear status LEDS 2021-08-04 17:15:24 -04:00
Daniel Agar 89b920333b boards: px4_fmu-v2_multicopter disable gyro_calibration module to save flash 2021-08-04 17:15:24 -04:00
Daniel Agar fb3b7a4649 mavlink: receiver handle RC_CHANNELS if from MAV_COMP_ID_SYSTEM_CONTROL 2021-08-04 17:15:24 -04:00
Daniel Agar 2b96e330a5 boards: atl_mantis-edu add bootloader 2021-08-04 17:15:24 -04:00
Daniel Agar 5d06ef8256 drivers/barometer/mpc2520: MaierTek MPC2520 barometer support
- used in the Advanced Technolgy Labs (ATL) Mantis EDU
2021-08-04 17:15:24 -04:00
Daniel Agar 6ab8153f32 drivers/tap_esc: Advanced Technology Labs (ATL) Mantis EDU ESC support
Co-authored-by: Julian Oes <julian@oes.ch>
Co-authored-by: Daniel Agar <daniel@agar.ca>
2021-08-04 17:15:24 -04:00
Daniel Agar e900f2ea54 boards: Advanced Technology Labs (ATL) Mantis EDU support and airfarme (SYS_AUTOSTART 4061)
Co-authored-by: Julian Oes <julian@oes.ch>
Co-authored-by: Daniel Agar <daniel@agar.ca>
2021-08-04 17:15:24 -04:00
David Sidrane 8f64f7ce90 uavcan_1:Fixed hardfault on stop 2021-08-04 10:40:34 -04:00
Hamish Willee 6aa4e12b5f Typo in LTEST_MEAS_UNC docs 2021-08-04 08:01:39 +02:00
Hamish Willee f5dd0edc9f LTEST_VEL_UNC_IN typo in docs 2021-08-04 08:01:39 +02:00
Hamish Willee b157bc407e Typo in docs for LPE_VIS_DELAY 2021-08-04 08:01:39 +02:00
Hamish Willee b82464f0ef Parameter typo PLD_MAX_SRCH 2021-08-04 08:01:39 +02:00
Beat Küng ca454c93d1 component_information: add debug instrumentation for FileNotFoundError exception
The following exception occurs in some rare cases (but only with make build: NO_NINJA_BUILD=1 px4_sitl_default):
Traceback (most recent call last):
  File "/__w/PX4-Autopilot/PX4-Autopilot/src/lib/component_information/generate_component_general.py", line 79, in <module>
    save_compressed(filename)
  File "/__w/PX4-Autopilot/PX4-Autopilot/src/lib/component_information/generate_component_general.py", line 33, in save_compressed
    with open(filename, 'r') as content_file:
FileNotFoundError: [Errno 2] No such file or directory: '/__w/PX4-Autopilot/PX4-Autopilot/build/px4_sitl_default/component_general.json'
make[3]: *** [src/lib/component_information/CMakeFiles/component_information_header.dir/build.make:68: component_general.json] Error 1
2021-08-03 10:36:25 +02:00
Beat Küng b9e2d2c0f2 4100_tiltquadrotor: remove LED_RGB_MAXBRT 2021-08-03 10:36:25 +02:00
Beat Küng 95789252d0 airframes: minor param cleanups (remove commented 'param set') 2021-08-03 10:36:25 +02:00
Beat Küng 0e1f3a2d62 px4_add_board: infer VENDOR, MODEL & LABEL from cmake file name 2021-08-03 10:36:25 +02:00
Beat Küng 86dc35022a generate_msg_docs.py: simplify logic a bit 2021-08-03 07:54:41 +02:00
Beat Küng 45ed1c5b5d uorb_graph: improve module dependency search 2021-08-03 07:54:41 +02:00
Beat Küng 91cae70097 uorb_graph: fix module scope logic 2021-08-03 07:54:41 +02:00
Hamish Willee bf59fd84ba Add simple comment parser 2021-08-03 07:54:41 +02:00
Beat Küng fccb56d76b Jenkinsfile: deploy uorb graph 2021-08-03 07:54:41 +02:00
Beat Küng 2320477839 uorb graph: some minor fixes, add full graph w/o mavlink 2021-08-03 07:54:41 +02:00
Beat Küng da6275e43a msg: add script structure to generate docs from .msg files 2021-08-03 07:54:41 +02:00
InspiredBrandon b2def13d6f NCP5623c RGB LED driver I2C address auto detect
* Enables the LED on mRobotics GPS receivers
 * Probes I2C addresses and sets colors accordingly
2021-08-02 20:36:09 -04:00
Daniel Agar 93aa6e3f78 ekf2: baro bias publish minor cleanup
- naming consistency (estimator prefix as "namespace")
 - only publish if baro is available and bias is changing as a small logging optimization
 - avoid unnecessary copying (get const reference to status directly)
 - trivial code style fixes
2021-08-02 13:59:38 -04:00
Daniel Agar d997a8d308 mavlink: receiver fix HIL_STATE_QUATERNION map projection init
- fixes https://github.com/PX4/PX4-Autopilot/issues/17977
2021-08-02 09:59:09 -04:00
David Jablonski 9c36236565 ekf2: increase stack size to 3600 2021-08-02 09:47:38 -04:00
Hamish Willee 219c9cf4b7 More specific airframe css 2021-08-02 08:26:46 +02:00
Hyungsub 1e2877cedf Tune down solo roll rate controller 2021-08-02 07:51:13 +02:00
murata e33d2141ec px4io: Changing the timeout time description (NFC) 2021-08-01 20:27:25 -04:00
PX4 BuildBot e01ae95768 Update submodule jMAVSim to latest Sun Aug 1 16:12:33 UTC 2021
- jMAVSim in PX4/Firmware (8261aa1f0b): https://github.com/PX4/jMAVSim/commit/0a816d8100e9860a031ccfccfb9941bcd6eedc81
    - jMAVSim current upstream: https://github.com/PX4/jMAVSim/commit/0a5375a70689aac53143768de9033034f3636022
    - Changes: https://github.com/PX4/jMAVSim/compare/0a816d8100e9860a031ccfccfb9941bcd6eedc81...0a5375a70689aac53143768de9033034f3636022

    0a5375a 2021-07-24 Romain Chiappinelli - vehilce model selectio
5f51d98 2021-07-19 Romain Chiappinelli - added cessna visual model
2021-08-01 17:03:03 -04:00
Daniel Agar 1c48a81993 Jenkins fix compile job
- this was broken during the Snapdragon purge (#17921) that happened to correspond with the primary Jenkins master (ci.px4.io) being down.
2021-08-01 17:02:47 -04:00
PX4 BuildBot 4ca6e42c47 Update submodule sitl_gazebo to latest Sun Aug 1 16:12:39 UTC 2021
- sitl_gazebo in PX4/Firmware (d6eb3b0cb90d4988409b1aaf3e10662ecc361aac): https://github.com/PX4/PX4-SITL_gazebo/commit/b6be00542be4d77f436c66ee48c22ca911601a2a
    - sitl_gazebo current upstream: https://github.com/PX4/PX4-SITL_gazebo/commit/7fda4d311a9daff4bec4f2fe83e63fde0b8f04b0
    - Changes: https://github.com/PX4/PX4-SITL_gazebo/compare/b6be00542be4d77f436c66ee48c22ca911601a2a...7fda4d311a9daff4bec4f2fe83e63fde0b8f04b0

    7fda4d3 2021-07-27 Jaeyoung-Lim - Reduce yaw authority for tecpod
6b87853 2021-07-27 Jaeyoung-Lim - Reduce yaw authority on plane
7505aee 2021-07-18 Jaeyoung-Lim - Add glider model
32893bc 2021-07-14 Jaeyoung-Lim - Add control allocation module for the typhoon h480
55e479a 2021-06-12 TSC21 - gazebo_mavlink_interface: get latest occurrence of '::' to obtain the sensor name
f650396 2021-07-13 Jaeyoung-Lim - Add Believer fixedwing model
2021-08-01 13:55:15 -04:00
PX4 BuildBot 8963c403c6 Update submodule v2.0 to latest Sun Aug 1 16:12:42 UTC 2021
- v2.0 in PX4/Firmware (c82a4412bd255753bf802b90d2e9bd459ca626aa): https://github.com/mavlink/c_library_v2/commit/94963ac650f39709df20e4fc03c1a9ed8f740b35
    - v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/5095bcd856537330e66e6fc833a1c7bf689bf5ed
    - Changes: https://github.com/mavlink/c_library_v2/compare/94963ac650f39709df20e4fc03c1a9ed8f740b35...5095bcd856537330e66e6fc833a1c7bf689bf5ed

    5095bcd8 2021-07-29 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/b030a760e8c350aa078542036bd9e8f39a494ac1
f57b9ff5 2021-07-29 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/2cc1a22e30e0f8ef4e119424e968a82877636c67
a3b97841 2021-07-29 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/d484de4eb18906a94104ca56026391304be31aa1
f66b31fc 2021-07-15 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/a764308f30903e269090c8cda87d92f46d318b3e
2021-08-01 13:54:18 -04:00
Daniel Agar 54918f650b Update world_magnetic_model to latest Sun Aug 1 16:57:37 UTC 2021 2021-08-01 13:53:53 -04:00
Daniel Agar 8261aa1f0b boards: cuav_nora_test disable local_position_estimator to save flash 2021-07-31 20:59:45 -04:00
Igor Mišić af2247bd94 mavlink: use dynamic camera comp id instead of hardcoded value 2021-07-31 12:41:49 -04:00
David Sidrane 6379f2b032 px4_fmu-v2:Use NO_HELP option to save flash 2021-07-30 22:35:02 -04:00
David Sidrane ced366b74e Add Option NO_HELP for CONSTRAINED_FLASH system 2021-07-30 22:35:02 -04:00
Dima Ponomarev d08d0443bc Add internal combustion engine status uavcan bridge and mavlink EFI_STATUS stream 2021-07-30 22:31:43 -04:00
Sam Chamberlin 7764183f89 Broadcom AFBR-S50LV85D Distance Sensor Driver: Automatic Range Mode Switching 2021-07-30 22:27:27 -04:00
bresch 1016600ded Revert "mc_pos_control: omit initial warning"
This reverts commit 446598d003.

The first warning was due to a race condition that is fixed by the previous commit;
don't omit the first warning anymore
2021-07-30 21:39:18 -04:00
bresch e7a2c1d88e MCPosControl: fix invalid setpoint race condition
Only modify the _setpoint for takeoff when there is a new uORB message
to avoid a race condition where both vel_sp(2) and accel_sp(2) can be
NAN at the same time.
2021-07-30 21:39:18 -04:00
Silvan Fuhrer 44f12acafe mavsdk tests: remove hover missions for VTOL
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-07-30 21:27:53 -04:00
Daniel Agar 713a1d08a3 sensors: add accel/gyro current priority to sensors_status_imu
- later the sensor priorities (user configurable) can be factored into the estimator selection criteria
2021-07-30 21:20:01 -04:00
Daniel Agar b33fdf704b boards: px4 fmu-v2/v3 swap external SPI chip select order
- fixes https://github.com/PX4/PX4-Autopilot/issues/17858
2021-07-30 09:28:04 -04:00
Ramon Roche 607be59fd5 Github: Issue Template update link to Slack invite 2021-07-28 07:39:20 +02:00
Ramon Roche 5918fe6a37 README: update slack invite and badge 2021-07-28 07:39:20 +02:00
leonardosimovic e6166dfc76 AirspeedSelector: Improve wording of sensor failure message 2021-07-28 07:37:38 +02:00
bresch 521b9f5dcc control: do not constantly ask for mag reset if yaw not aligned
This also prevents triggering the `_mag_yaw_reset_req` flag in magless
mode; preventing the GNSS fustion from starting.
2021-07-27 13:34:53 +02:00
bresch 639e0a39cf EKF2: add yaw estimator alignment test 2021-07-27 13:34:53 +02:00
Mathieu Bresciani 17ebcd2456 mag_control: fuse fake heading during leveling fine alignment (#17964)
Co-authored-by: Daniel Agar <daniel@agar.ca>
2021-07-27 11:50:50 +02:00
Daniel Agar f2ae8ae814 sensors/vehicle_imu: vibration metrics use acceleration and angular velocity
- this avoids any jitter in the integration timespan from impacting the vibration metrics
 - vehicle_imu_status vibration metrics are not consumed by anything
(yet), so changing the scaling of the metric shouldn't matter
2021-07-26 13:55:47 -04:00
Daniel Agar e01b631465 ekf2: change indication test limit float precision to minimize false positives 2021-07-26 13:54:36 -04:00
Daniel Agar e84c6664bb ROMFS: update airframes/4901_crazyflie21 legacy battery parameter 2021-07-23 19:58:38 -04:00
Daniel Agar 6f4111e073 ROMFS: update airframes/17003_TF-G2 legacy battery parameter 2021-07-23 19:58:38 -04:00
Daniel Agar e9f84ba708 keep minimal legacy battery parameters for older QGC usability
- BAT_V_EMPTY, BAT_V_CHARGED, BAT_V_LOAD_DROP, BAT_N_CELLS
2021-07-23 15:07:53 -04:00
Daniel Agar fe1eb8cd62 cmake cleanup jlink flashing helpers 2021-07-23 15:07:25 -04:00
Daniel Agar 7846771c68 sensors: populate sensors_status_imu healthy flags even in multi-EKF mode 2021-07-23 11:17:08 -04:00
Julian Oes af50e25647 mavsdk_tests: update to MAVSDK v0.41.0
This required replacing some of the methods which had been deprecated
and now removed.
2021-07-23 09:05:31 +02:00
Julian Oes 11480cdbc7 mavlink: fix offboard velocity input
This reverts the behavior for offboard velocity setpoint.

Back in v1.11, the velocity input in NED_BODY was assumed to be in the
world frame but rotated by yaw to the vehicle frame. With the current
state the frame is completely fixed to the body. While this might be
technically correct, it doesn't seem much intuitive for multicopters
and breaks the MAVSDK offboard velocity API.

So as an example, with a velocity setpoint of 5 m/s forward, the drone
would in
- v1.11: fly forward with 5 m/s
- v1.12: start to fly forward by pitching down but then descend rapidly
  as the forward velocity would translate to a setpoint in Z into the
  ground as it is pitched down.

This commit restores the behavior to what we had previously.
2021-07-22 09:40:29 +02:00
529 changed files with 18305 additions and 9601 deletions
+4 -1
View File
@@ -38,6 +38,7 @@ pipeline {
"airmind_mindpx-v2_default",
"ark_can-flow_canbootloader",
"ark_can-flow_default",
"atl_mantis-edu_default",
"av_x-v1_default",
"bitcraze_crazyflie_default",
"bitcraze_crazyflie21_default",
@@ -71,8 +72,8 @@ pipeline {
"nxp_fmuk66-v3_rtps",
"nxp_fmuk66-v3_socketcan",
"nxp_fmurt1062-v1_default",
"nxp_ucans32k146_default",
"nxp_ucans32k146_canbootloader",
"nxp_ucans32k146_default",
"omnibus_f4sd_default",
"px4_fmu-v2_default",
"px4_fmu-v2_fixedwing",
@@ -158,6 +159,8 @@ pipeline {
def createBuildNode(Boolean archive, String docker_image, String target) {
return {
bypass_entrypoint = ''
node {
docker.withRegistry('https://registry.hub.docker.com', 'docker_hub_dagar') {
docker.image(docker_image).inside('-e CCACHE_BASEDIR=${WORKSPACE} -v ${CCACHE_DIR}:${CCACHE_DIR}:rw' + bypass_entrypoint) {
+66 -65
View File
@@ -639,72 +639,72 @@ pipeline {
}
}
stage("modalai_fc-v1_test") {
stages {
stage("build modalai_fc-v1_test") {
agent {
docker {
image 'px4io/px4-dev-nuttx-focal:2021-05-04'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
steps {
checkout scm
sh 'export'
sh 'make distclean'
sh 'ccache -s'
sh 'git fetch --tags'
sh 'make modalai_fc-v1_test'
sh 'make modalai_fc-v1_test bootloader_elf'
sh 'ccache -s'
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/upload_jlink_gdb.sh, Tools/HIL/*.py', name: 'modalai_fc-v1_test'
}
post {
always {
sh 'make distclean'
}
}
} // stage build
stage("hardware") {
agent {
label 'modalai_fc-v1'
}
stages {
stage("flash") {
steps {
sh 'export'
sh 'find /dev/serial'
unstash 'modalai_fc-v1_test'
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/modalai_fc-v1_test/modalai_fc-v1_bootloader.elf'
// flash board and watch bootup
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/modalai_fc-v1_test/modalai_fc-v1_test.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
}
}
stage("tests") {
steps {
runTests()
}
}
stage("status") {
steps {
// configure
resetParameters()
sh './Tools/HIL/nsh_param_set.py --device `find /dev/serial -name *usb-*` --name "SYS_AUTOSTART" --value "4001"' // generic quadcopter
sh './Tools/HIL/nsh_param_set.py --device `find /dev/serial -name *usb-*` --name "SYS_BL_UPDATE" --value "1"' // update bootloader
checkStatus()
quickCalibrate()
}
}
stage("print topics") {
steps {
printTopics()
}
}
// stage("modalai_fc-v1_test") {
// stages {
// stage("build modalai_fc-v1_test") {
// agent {
// docker {
// image 'px4io/px4-dev-nuttx-focal:2021-05-04'
// args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
// }
// }
// steps {
// checkout scm
// sh 'export'
// sh 'make distclean'
// sh 'ccache -s'
// sh 'git fetch --tags'
// sh 'make modalai_fc-v1_test'
// sh 'make modalai_fc-v1_test bootloader_elf'
// sh 'ccache -s'
// stash includes: 'build/*/*.elf, platforms/nuttx/Debug/upload_jlink_gdb.sh, Tools/HIL/*.py', name: 'modalai_fc-v1_test'
// }
// post {
// always {
// sh 'make distclean'
// }
// }
// } // stage build
// stage("hardware") {
// agent {
// label 'modalai_fc-v1'
// }
// stages {
// stage("flash") {
// steps {
// sh 'export'
// sh 'find /dev/serial'
// unstash 'modalai_fc-v1_test'
// sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/modalai_fc-v1_test/modalai_fc-v1_bootloader.elf'
// // flash board and watch bootup
// sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/modalai_fc-v1_test/modalai_fc-v1_test.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
// }
// }
// stage("tests") {
// steps {
// runTests()
// }
// }
// stage("status") {
// steps {
// // configure
// resetParameters()
// sh './Tools/HIL/nsh_param_set.py --device `find /dev/serial -name *usb-*` --name "SYS_AUTOSTART" --value "4001"' // generic quadcopter
// sh './Tools/HIL/nsh_param_set.py --device `find /dev/serial -name *usb-*` --name "SYS_BL_UPDATE" --value "1"' // update bootloader
// checkStatus()
// quickCalibrate()
// }
// }
// stage("print topics") {
// steps {
// printTopics()
// }
// }
}
} // stage test
}
}
// }
// } // stage test
// }
// }
stage("nxp_fmuk66-v3_test") {
stages {
@@ -902,6 +902,7 @@ void printTopics() {
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener ekf_gps_drift"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener esc_status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_attitude"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_baro_bias"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_event_flags"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_global_position"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_innovation_test_ratios"'
+1 -1
View File
@@ -4,7 +4,7 @@ about: Suggest an idea for this project
---
For general questions please use [PX4 Discuss](http://discuss.px4.io/) or [Slack](http://slack.px4.io/).
For general questions please use [PX4 Discuss](http://discuss.px4.io/) or Slack (you can find an invite link on this project README).
**Describe problem solved by the proposed feature**
A clear and concise description of the problem, if any, this feature will solve. E.g. I'm always frustrated when ...
+24
View File
@@ -0,0 +1,24 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="90" height="20">
<linearGradient id="smooth" x2="0" y2="100%">
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
<stop offset="1" stop-opacity=".1"/>
</linearGradient>
<mask id="round">
<rect width="90" height="20" rx="3" fill="#fff"/>
</mask>
<g mask="url(#round)">
<rect width="42" height="20" fill="#555"/>
<rect x="42" width="48" height="20" fill="#E01563"/>
<rect width="90" height="20" fill="url(#smooth)"/>
</g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
<text x="22" y="15" fill="#010101" fill-opacity=".3">slack</text>
<text x="22" y="14">slack</text>
<text x="65" y="15" fill="#010101" fill-opacity=".3">Join us!</text>
<text x="65" y="14">Join us!</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 894 B

-1
View File
@@ -11,7 +11,6 @@ on:
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
-1
View File
@@ -12,7 +12,6 @@ jobs:
build:
runs-on: ubuntu-latest
container: px4io/px4-dev-clang:2021-05-04
timeout-minutes: 60
steps:
- uses: actions/checkout@v1
with:
-1
View File
@@ -12,7 +12,6 @@ jobs:
build:
runs-on: ubuntu-latest
container: px4io/px4-dev-armhf:2021-05-04
timeout-minutes: 60
strategy:
matrix:
config: [
@@ -12,7 +12,6 @@ jobs:
build:
runs-on: ubuntu-latest
container: px4io/px4-dev-aarch64:2021-05-04
timeout-minutes: 60
strategy:
matrix:
config: [
-1
View File
@@ -11,7 +11,6 @@ on:
jobs:
build:
runs-on: macos-10.15
timeout-minutes: 60
strategy:
matrix:
config: [
+1 -1
View File
@@ -12,13 +12,13 @@ jobs:
build:
runs-on: ubuntu-latest
container: px4io/px4-dev-nuttx-focal:2021-05-04
timeout-minutes: 60
strategy:
matrix:
config: [
airmind_mindpx-v2,
ark_can-flow,
ark_can-gps,
atl_mantis-edu,
av_x-v1,
bitcraze_crazyflie,
bitcraze_crazyflie21,
+2 -2
View File
@@ -12,15 +12,15 @@ jobs:
build:
runs-on: ubuntu-latest
container: px4io/px4-dev-nuttx-focal:2021-05-04
timeout-minutes: 60
strategy:
matrix:
config: [
ark_can-flow_default,
ark_can-gps_default,
cuav_can-gps-v1_default,
freefly_can-rtk-gps_default,
holybro_can-gps-v1_default,
#nxp_ucans32k146_default,
nxp_ucans32k146_default,
px4_fmu-v4_cannode
]
steps:
+1 -1
View File
@@ -154,4 +154,4 @@ jobs:
- name: PX4 ROS2 bridge
run: |
git clone https://github.com/PX4/px4_ros_com.git
./msg/tools/uorb_to_ros_rtps_ids.py -i msg/tools/uorb_rtps_message_ids.yaml -o px4_ros_com/templates/uorb_rtps_message_ids.yaml
./msg/tools/uorb_to_ros_urtps_topics.py -i msg/tools/urtps_bridge_topics.yaml -o px4_ros_com/templates/urtps_bridge_topics.yaml
-1
View File
@@ -11,7 +11,6 @@ on:
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
+3 -3
View File
@@ -29,11 +29,11 @@
[submodule "platforms/nuttx/NuttX/nuttx"]
path = platforms/nuttx/NuttX/nuttx
url = https://github.com/PX4/NuttX.git
branch = px4_firmware_nuttx-10.0.0+
branch = px4_firmware_nuttx-10.1.0+
[submodule "platforms/nuttx/NuttX/apps"]
path = platforms/nuttx/NuttX/apps
url = https://github.com/PX4/NuttX-apps.git
branch = px4_firmware_nuttx-10.0.0+
branch = px4_firmware_nuttx-10.1.0+
[submodule "Tools/flightgear_bridge"]
path = Tools/flightgear_bridge
url = https://github.com/PX4/PX4-FlightGear-Bridge.git
@@ -65,4 +65,4 @@
url = https://github.com/mavlink/libevents.git
[submodule "Tools/simulation-ignition"]
path = Tools/simulation-ignition
url = https://github.com/Auterion/px4-simulation-ignition.git
url = https://github.com/Auterion/px4-simulation-ignition.git
+5
View File
@@ -96,6 +96,11 @@ CONFIG:
buildType: MinSizeRel
settings:
CONFIG: ark_can-gps_canbootloader
atl_mantis-edu_default:
short: atl_mantis-edu
buildType: MinSizeRel
settings:
CONFIG: atl_mantis-edu_default
av_x-v1_default:
short: av_x-v1
buildType: MinSizeRel
+3 -1
View File
@@ -443,8 +443,10 @@ endforeach()
add_custom_command(OUTPUT ${uorb_graph_config}
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/uorb_graph/create.py
${graph_module_list}
${graph_module_list} --src-path src/lib
--merge-depends
--exclude-path src/examples
--exclude-path src/lib/parameters # FIXME: enable & fix
--file ${PX4_SOURCE_DIR}/Tools/uorb_graph/graph_${uorb_graph_config}
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
COMMENT "Generating uORB graph"
Vendored
+25 -3
View File
@@ -143,6 +143,24 @@ pipeline {
}
}
stage('msg file docs') {
agent {
docker { image 'px4io/px4-dev-base-focal:2021-05-04' }
}
steps {
sh 'mkdir -p build/msg_docs; ./msg/tools/generate_msg_docs.py -d build/msg_docs'
dir('build') {
archiveArtifacts(artifacts: 'msg_docs/*.md')
stash includes: 'msg_docs/*.md', name: 'msg_documentation'
}
}
post {
always {
sh 'make distclean'
}
}
}
stage('uORB graphs') {
agent {
docker {
@@ -156,8 +174,8 @@ pipeline {
sh 'git fetch --all --tags'
sh 'make uorb_graphs'
dir('Tools/uorb_graph') {
archiveArtifacts(artifacts: 'graph_px4_sitl.json')
stash includes: 'graph_px4_sitl.json', name: 'uorb_graph'
archiveArtifacts(artifacts: 'graph_*.json')
stash includes: 'graph_*.json', name: 'uorb_graph'
}
}
post {
@@ -183,11 +201,15 @@ pipeline {
unstash 'metadata_airframes'
unstash 'metadata_parameters'
unstash 'metadata_module_documentation'
unstash 'msg_documentation'
unstash 'uorb_graph'
withCredentials([usernamePassword(credentialsId: 'px4buildbot_github_personal_token', passwordVariable: 'GIT_PASS', usernameVariable: 'GIT_USER')]) {
sh('git clone https://${GIT_USER}:${GIT_PASS}@github.com/PX4/px4_user_guide.git')
sh('cp airframes.md px4_user_guide/en/airframes/airframe_reference.md')
sh('cp parameters.md px4_user_guide/en/advanced_config/parameter_reference.md')
sh('cp -R modules/*.md px4_user_guide/en/modules/')
sh('cp -R graph_*.json px4_user_guide/.vuepress/public/en/middleware/')
sh('cp -R msg_docs/*.md px4_user_guide/en/msg_docs/')
sh('cd px4_user_guide; git status; git add .; git commit -a -m "Update PX4 Firmware metadata `date`" || true')
sh('cd px4_user_guide; git push origin master || true')
sh('rm -rf px4_user_guide')
@@ -301,7 +323,7 @@ pipeline {
withCredentials([usernamePassword(credentialsId: 'px4buildbot_github_personal_token', passwordVariable: 'GIT_PASS', usernameVariable: 'GIT_USER')]) {
sh("git clone https://${GIT_USER}:${GIT_PASS}@github.com/PX4/px4_ros_com.git -b ${BRANCH_NAME}")
// deploy uORB RTPS ID map
sh('./msg/tools/uorb_to_ros_rtps_ids.py -i msg/tools/uorb_rtps_message_ids.yaml -o px4_ros_com/templates/uorb_rtps_message_ids.yaml')
sh('./msg/tools/uorb_to_ros_urtps_topics.py -i msg/tools/urtps_bridge_topics.yaml -o px4_ros_com/templates/urtps_bridge_topics.yaml')
sh('cd px4_ros_com; git status; git add .; git commit -a -m "Update uORB RTPS ID map `date`" || true')
sh('cd px4_ros_com; git push origin ${BRANCH_NAME} || true')
// deploy uORB RTPS required tools
+19 -2
View File
@@ -299,9 +299,11 @@ all_variants_%:
$(foreach a,$(filter $(subst all_variants_,,$@)_%, $(ALL_CONFIG_TARGETS)), $(call cmake-build,$(a)$(BUILD_DIR_SUFFIX)))
uorb_graphs:
@./Tools/uorb_graph/create.py --src-path src --exclude-path src/examples --exclude-path src/lib --file Tools/uorb_graph/graph_full
@./Tools/uorb_graph/create.py --src-path src --exclude-path src/examples --exclude-path src/lib/parameters --merge-depends --file Tools/uorb_graph/graph_full
@./Tools/uorb_graph/create.py --src-path src --exclude-path src/examples --exclude-path src/lib/parameters --exclude-path src/modules/mavlink --merge-depends --file Tools/uorb_graph/graph_full_no_mavlink
@$(MAKE) --no-print-directory px4_fmu-v2_default uorb_graph
@$(MAKE) --no-print-directory px4_fmu-v4_default uorb_graph
@$(MAKE) --no-print-directory px4_fmu-v5_default uorb_graph
@$(MAKE) --no-print-directory px4_sitl_default uorb_graph
@@ -488,7 +490,7 @@ distclean: gazeboclean
@rm -rf "$(SRC_DIR)/build"
@git clean --force -X "$(SRC_DIR)/msg/" "$(SRC_DIR)/platforms/" "$(SRC_DIR)/posix-configs/" "$(SRC_DIR)/ROMFS/" "$(SRC_DIR)/src/" "$(SRC_DIR)/test/" "$(SRC_DIR)/Tools/"
# Help / Error
# Help / Error / Misc
# --------------------------------------------------------------------
# All other targets are handled by PX4_MAKE. Add a rule here to avoid printing an error.
@@ -522,3 +524,18 @@ check_px4: $(call make_list,nuttx,"px4") \
check_nxp: $(call make_list,nuttx,"nxp") \
sizes
ifneq ($(ROS2_WS_DIR),)
ROS2_WS_DIR := $(basename ${ROS2_WS_DIR})
else
ROS2_WS_DIR := ~/colcon_ws
endif
update_ros2_bridge:
@Tools/update_px4_ros2_bridge.sh --ws_dir ${ROS2_WS_DIR} --all
update_px4_ros_com:
@Tools/update_px4_ros2_bridge.sh --ws_dir ${ROS2_WS_DIR} --px4_ros_com
update_px4_msgs:
@Tools/update_px4_ros2_bridge.sh --ws_dir ${ROS2_WS_DIR} --px4_msgs
+1 -1
View File
@@ -4,7 +4,7 @@
[![Nuttx Targets](https://github.com/PX4/PX4-Autopilot/workflows/Nuttx%20Targets/badge.svg)](https://github.com/PX4/PX4-Autopilot/actions?query=workflow%3A%22Nuttx+Targets%22?branch=master) [![SITL Tests](https://github.com/PX4/PX4-Autopilot/workflows/SITL%20Tests/badge.svg?branch=master)](https://github.com/PX4/PX4-Autopilot/actions?query=workflow%3A%22SITL+Tests%22)
[![Slack](https://px4-slack.herokuapp.com/badge.svg)](http://slack.px4.io)
[![Slack](/.github/slack.svg)](https://join.slack.com/t/px4/shared_invite/zt-si4xo5qs-R4baYFmMjlrT4rQK5yUnaA)
This repository holds the [PX4](http://px4.io) flight control solution for drones, with the main applications located in the [src/modules](https://github.com/PX4/PX4-Autopilot/tree/master/src/modules) directory. It also contains the PX4 Drone Middleware Platform, which provides drivers and middleware to run drones.
+1
View File
@@ -120,6 +120,7 @@ add_custom_command(
COMMAND ${CMAKE_COMMAND} -E touch ${romfs_extract_stamp}
WORKING_DIRECTORY ${romfs_gen_root_dir}
DEPENDS ${romfs_tar_file}
VERBATIM
)
add_custom_command(
@@ -34,9 +34,10 @@
add_subdirectory(airframes)
px4_add_romfs_files(
px4-rc.params
px4-rc.simulator
px4-rc.mavlink
px4-rc.params
px4-rc.rtps
px4-rc.simulator
rc.replay
rcS
)
@@ -8,6 +8,6 @@
. ${R}etc/init.d/rc.mc_defaults
param set-default MC_PITCHRATE_P 0.1
param set-default MC_ROLLRATE_P 0.1
param set-default MC_ROLLRATE_P 0.05
set MIXER quad_x
@@ -11,8 +11,6 @@ param set-default NAV_DLL_ACT 0
# disable circuit breaker for airspeed sensor
param set-default CBRK_AIRSPD_CHK 162128
#param set CBRK_GPSFAIL 240024
set MAV_TYPE 12
param set MAV_TYPE ${MAV_TYPE}
@@ -11,8 +11,6 @@ param set-default NAV_DLL_ACT 0
# disable circuit breaker for airspeed sensor
param set-default CBRK_AIRSPD_CHK 162128
#param set CBRK_GPSFAIL 240024
set MAV_TYPE 12
param set MAV_TYPE ${MAV_TYPE}
@@ -42,15 +42,9 @@ param set-default NAV_LOITER_RAD 50
param set-default RWTO_TKOFF 1
# fix takeoff failure for JSBsim in autonomous mission mode.
#param set FW_THR_SLEW_MAX 0.3
param set-default RWTO_MAX_PITCH 20
param set-default RWTO_MAX_ROLL 10
# fix takeoff failure for JSBsim in autonomous mission mode.
#param set-default RWTO_MAX_THR 0.6
param set-default RWTO_PSP 8
param set-default RWTO_AIRSPD_SCL 1.8
@@ -42,15 +42,9 @@ param set-default NAV_LOITER_RAD 50
param set-default RWTO_TKOFF 1
# fix takeoff failure for JSBsim in autonomous mission mode.
#param set FW_THR_SLEW_MAX 0.3
param set-default RWTO_MAX_PITCH 20
param set-default RWTO_MAX_ROLL 10
# fix takeoff failure for JSBsim in autonomous mission mode.
#param set RWTO_MAX_THR 0.6
param set-default RWTO_PSP 8
param set-default RWTO_AIRSPD_SCL 1.8
@@ -1,5 +1,5 @@
#!/bin/sh
# shellcheck disable=SC2154
#param set MAV_SYS_ID $((px4_instance+1))
#param set IMU_INTEG_RATE 250
#param set-default MAV_SYS_ID $((px4_instance+1))
#param set-default IMU_INTEG_RATE 250
@@ -0,0 +1,4 @@
#!/bin/sh
# shellcheck disable=SC2154
micrortps_client start -t UDP -r $((2019+2*px4_instance)) -s $((2020+2*px4_instance))
+1 -2
View File
@@ -228,8 +228,7 @@ navigator start
# Try to start the micrortps_client with UDP transport if module exists
if px4-micrortps_client status > /dev/null 2>&1
then
# shellcheck disable=SC2154
micrortps_client start -t UDP -r $((2019+2*px4_instance)) -s $((2020+2*px4_instance))
. px4-rc.rtps
fi
if param greater -s MNT_MODE_IN -1
@@ -26,3 +26,5 @@ param set-default CBRK_SUPPLY_CHK 894281
# - without safety switch
param set-default COM_PREARM_MODE 0
param set-default CBRK_IO_SAFETY 22027
param set SIH_VEHICLE_TYPE 0
@@ -0,0 +1,40 @@
#!/bin/sh
#
# @name SIH plane AERT
#
# @type Simulation
# @class Plane
#
# @maintainer Romain Chiappinelli <romain.chiap@gmail.com>
#
# @board px4_fmu-v2 exclude
#
. ${R}etc/init.d/rc.fw_defaults
set MIXER AERT
set PWM_OUT 1234
# set SYS_HITL to 2 to start the SIH and avoid sensors startup
param set-default SYS_HITL 2
# disable some checks to allow to fly:
# - with usb
param set-default CBRK_USB_CHK 197848
# - without real battery
param set-default CBRK_SUPPLY_CHK 894281
# - without safety switch
param set-default COM_PREARM_MODE 0
param set-default CBRK_IO_SAFETY 22027
param set-default BAT_N_CELLS 3
param set SIH_T_MAX 6.0
param set SIH_MASS 0.3
param set SIH_IXX 0.00402
param set SIH_IYY 0.0144
param set SIH_IZZ 0.0177
param set SIH_IXZ 0.00046
param set SIH_KDV 0.2
param set SIH_VEHICLE_TYPE 1 # sih as fixed wing
@@ -21,8 +21,8 @@
. ${R}etc/init.d/rc.fw_defaults
param set-default BAT_CAPACITY 3300
param set-default BAT_N_CELLS 3
param set-default BAT1_CAPACITY 3300
param set-default BAT1_N_CELLS 3
param set-default PWM_AUX_RATE 50
param set-default PWM_MAIN_RATE 50
@@ -26,7 +26,8 @@ param set-default GPS_UBX_DYNMODEL 8
param set-default SER_TEL2_BAUD 9600
param set-default SENS_BOARD_ROT 0
param set MAV_TYPE 8 # MAV_TYPE_FREE_BALLOON
set MAV_TYPE 8
param set MAV_TYPE ${MAV_TYPE}
set MIXER IO_pass
@@ -0,0 +1,207 @@
#!/bin/sh
#
# @name Advanced Technology Labs (ATL) Mantis EDU
#
# @type Quadrotor x
# @class Copter
#
# @output MAIN1 motor 1
# @output MAIN2 motor 2
# @output MAIN3 motor 3
# @output MAIN4 motor 4
#
# @maintainer
# @board px4_fmu-v2 exclude
#
. ${R}etc/init.d/rc.mc_defaults
set MIXER none
set MIXER_AUX none
# Battery settings
param set-default BAT_CRIT_THR 0.20
param set-default BAT_EMERGEN_THR 0.05
param set-default BAT_LOW_THR 0.25
param set-default BAT1_CAPACITY 2800.0
param set-default BAT1_N_CELLS 3
param set-default BAT1_R_INTERNAL 0.02
param set-default BAT1_V_CHARGED 4.26
param set-default BAT1_V_EMPTY 3.45
param set-default CBRK_SUPPLY_CHK 894281
param set-default COM_DISARM_LAND 0.1
param set-default COM_DISARM_PRFLT 3
param set-default COM_DL_LOSS_T 10
param set-default COM_FLTMODE1 -1
param set-default COM_FLTMODE2 -1
param set-default COM_FLTMODE3 -1
param set-default COM_FLTMODE4 2
param set-default COM_FLTMODE5 -1
param set-default COM_FLTMODE6 6
param set-default COM_RC_LOSS_T 3
param set-default COM_RC_OVERRIDE 1
# ekf2
param set-default EKF2_AID_MASK 35
param set-default EKF2_BARO_DELAY 0
param set-default EKF2_BARO_NOISE 2.0
param set-default EKF2_BCOEF_X 31.5
param set-default EKF2_BCOEF_Y 25.5
param set-default EKF2_GPS_DELAY 100
param set-default EKF2_GPS_POS_X 0.06
param set-default EKF2_GPS_POS_Y 0.0
param set-default EKF2_GPS_POS_Z 0.0
param set-default EKF2_GPS_V_NOISE 0.5
param set-default EKF2_IMU_POS_X 0.06
param set-default EKF2_IMU_POS_Y 0.0
param set-default EKF2_IMU_POS_Z 0.0
param set-default EKF2_MAG_DELAY 0
param set-default EKF2_MAG_NOISE 0.1
param set-default EKF2_MIN_RNG 0.15
param set-default EKF2_OF_DELAY 38
param set-default EKF2_OF_GATE 2.0
param set-default EKF2_OF_POS_X -0.035
param set-default EKF2_OF_POS_Y 0.0
param set-default EKF2_OF_POS_Z 0.033
param set-default EKF2_PCOEF_XN -0.3
param set-default EKF2_PCOEF_XP -0.4
param set-default EKF2_PCOEF_YN -0.4
param set-default EKF2_PCOEF_YP -0.4
param set-default EKF2_PCOEF_Z 0.0
param set-default EKF2_RNG_A_VMAX 1.0
param set-default EKF2_RNG_AID 0
param set-default EKF2_RNG_DELAY 55
param set-default EKF2_RNG_POS_X -0.035
param set-default EKF2_RNG_POS_Y 0.0
param set-default EKF2_RNG_POS_Z 0.033
param set-default EKF2_TERR_NOISE 1.0
# Maximum allowed angle velocity in the landed state
param set-default LNDMC_ROT_MAX 40.0
# Maximum vertical velocity allowed in the landed state
param set-default LNDMC_Z_VEL_MAX 0.7
# filtering
param set-default IMU_DGYRO_CUTOFF 50
param set-default IMU_GYRO_CUTOFF 65
# Pitch angle & rate setting
param set-default MC_PITCHRATE_P 0.075
param set-default MC_PITCHRATE_I 0.1
param set-default MC_PITCHRATE_D 0.0005
param set-default MC_PITCHRATE_MAX 360.0
param set-default MC_PITCH_P 8.0
# Roll angle & rate setting
param set-default MC_ROLLRATE_P 0.055
param set-default MC_ROLLRATE_I 0.1
param set-default MC_ROLLRATE_D 0.0005
param set-default MC_ROLLRATE_MAX 360.0
param set-default MC_ROLL_P 8.0
# Yaw angle & rate setting
param set-default MC_YAWRATE_P 0.1
param set-default MC_YAWRATE_I 0.1
param set-default MC_YAWRATE_MAX 120.0
param set-default MC_YAW_P 2.5
param set-default MPC_ACC_DOWN_MAX 2.0
param set-default MPC_ACC_HOR 3.0
param set-default MPC_ACC_HOR_MAX 10.0
param set-default MPC_ACC_UP_MAX 3.0
param set-default MPC_ALT_MODE 0
param set-default MPC_LAND_SPEED 0.5
param set-default MPC_LAND_VEL_XY 10
param set-default MPC_MAN_TILT_MAX 20
param set-default MPC_YAWRAUTO_MAX 80.0
param set-default MPC_POS_MODE 4
param set-default MPC_THR_HOVER 0.54
param set-default MPC_THR_MAX 0.9
param set-default MPC_THR_MIN 0.06
param set-default MPC_TILTMAX_AIR 30
param set-default MPC_XY_P 1.0
param set-default MPC_XY_VEL_D 0.005
param set-default MPC_XY_VEL_I 0.02
param set-default MPC_XY_VEL_P 0.15
param set-default MPC_Z_P 2.0
param set-default MPC_Z_VEL_D 0.0
param set-default MPC_Z_VEL_I 0.02
param set-default MPC_Z_VEL_MAX_DN 2.0
param set-default MPC_Z_VEL_MAX_UP 3.0
param set-default MPC_Z_VEL_P 0.27
# gimbal configuration
param set-default MNT_MODE_IN 1
param set-default MNT_MODE_OUT 2
param set-default MNT_MAN_PITCH 1
# RC
param set-default RC_CHAN_CNT 12
param set-default RC_MAP_THROTTLE 1
param set-default RC_MAP_ROLL 2
param set-default RC_MAP_PITCH 3
param set-default RC_MAP_YAW 4
param set-default RC_MAP_FLTMODE 5
param set-default RC_MAP_AUX1 7
param set-default RC1_DZ 10
param set-default RC1_MAX 3413
param set-default RC1_MIN 683
param set-default RC1_REV 1
param set-default RC1_TRIM 683
param set-default RC2_DZ 10
param set-default RC2_MAX 3413
param set-default RC2_MIN 683
param set-default RC2_REV -1
param set-default RC2_TRIM 2048
param set-default RC3_DZ 10
param set-default RC3_MAX 3413
param set-default RC3_MIN 683
param set-default RC3_REV 1
param set-default RC3_TRIM 2048
param set-default RC4_DZ 10
param set-default RC4_MAX 3413
param set-default RC4_MIN 683
param set-default RC4_REV -1
param set-default RC4_TRIM 2048
param set-default RC5_DZ 10
param set-default RC5_MAX 3414
param set-default RC5_MIN 2048
param set-default RC5_REV 1
param set-default RC5_TRIM 2048
param set-default RC7_DZ 10
param set-default RC7_MAX 3413
param set-default RC7_MIN 683
param set-default RC7_REV 1
param set-default RC7_TRIM 2048
# optical flow
param set-default SENS_FLOW_MAXR 7.4
param set-default SENS_FLOW_MINHGT 0.15
param set-default SENS_FLOW_MAXHGT 5.0
param set-default SENS_FLOW_ROT 4
mixer load /dev/tap_esc /etc/mixers/quad_x.main.mix
@@ -27,48 +27,29 @@ set PWM_OUT 1234
# Attitude & rate gains
#param set MC_ROLL_P 7
param set-default MC_ROLLRATE_P 0.15
#param set MC_ROLLRATE_I 0.9
param set-default MC_ROLLRATE_D 0.0013
#param set MC_PITCH_P 7
param set-default MC_PITCHRATE_P 0.15
#param set MC_PITCHRATE_I 1.1
param set-default MC_PITCHRATE_D 0.0016
param set-default MC_YAW_P 2.8
param set-default MC_YAWRATE_P 0.2
#param set MC_YAWRATE_I 0.15
param set-default MC_YAWRATE_D 0
param set-default MC_YAW_FF 0.5
#param set MC_ROLL_TC 0.19
#param set MC_PITCH_TC 0.16
# Manual mode settings: Unleash Draco R's power :)
#param set MPC_MAN_TILT_MAX 70
#param set MC_PITCHRATE_MAX 1600
#param set MC_ROLLRATE_MAX 1600
#param set MC_YAWRATE_MAX 700
param set-default MPC_MANTHR_MAX 0.9
param set-default MPC_MANTHR_MIN 0.08
#param set MPC_MAN_TILT_MAX 35
#param set MPC_TILTMAX_AIR 20
# Filter settings
param set-default IMU_DGYRO_CUTOFF 90
param set-default IMU_GYRO_CUTOFF 100
# Thrust curve (avoids the need for TPA)
#param set THR_MDL_FAC 0.25
# System
param set-default PWM_MAIN_MAX 1950
param set-default PWM_MAIN_MIN 1100
param set-default PWM_MAIN_RATE 0
#param set SYS_FMU_TASK 1
param set-default SENS_BOARD_ROT 10
# EKF2
@@ -96,7 +77,6 @@ param set-default BAT1_SOURCE 0
param set-default BAT1_N_CELLS 4
param set-default BAT1_V_DIV 10.14
param set-default BAT1_A_PER_V 18.18
#param set CBRK_IO_SAFETY 22027
param set-default COM_DISARM_LAND 2
# Filter settings
@@ -106,9 +86,6 @@ param set-default IMU_DGYRO_CUTOFF 70
# Don't try to be intelligent on RC loss: just cut the motors
param set-default NAV_RCL_ACT 6
# enable to use high-rate logging for better rate tracking analysis
# param set SDLOG_PROFILE 19
# TELEM1 ttyS1 - Wifi module
param set-default MAV_0_CONFIG 101
param set-default MAV_0_RATE 0
@@ -75,23 +75,11 @@ param set-default SENS_BOARD_ROT 2
param set-default BAT1_SOURCE 0
param set-default CBRK_IO_SAFETY 22027
#param set COM_DISARM_LAND 3
# Filter settings
param set-default IMU_GYRO_CUTOFF 90
param set-default IMU_DGYRO_CUTOFF 100
# Don't try to be intelligent on RC loss: just cut the motors
#param set NAV_RCL_ACT 6
# enable to use high-rate logging for better rate tracking analysis
param set-default SDLOG_PROFILE 27
# TELEM1 ttyS1
#param set MAV_0_CONFIG 101
#param set MAV_0_MODE 2 # onboard
#param set MAV_0_RATE 20000
#param set SER_TEL1_BAUD 921600
# TELEM2 ttyS2
#param set MAV_1_CONFIG 0
@@ -27,44 +27,21 @@ set PWM_OUT 1234
# Attitude & rate gains
#param set MC_ROLL_P 7
param set-default MC_ROLLRATE_P 0.15
#param set MC_ROLLRATE_I 0.9
param set-default MC_ROLLRATE_D 0.0013
#param set MC_PITCH_P 7
param set-default MC_PITCHRATE_P 0.15
#param set MC_PITCHRATE_I 1.1
param set-default MC_PITCHRATE_D 0.0016
param set-default MC_YAW_P 2.8
param set-default MC_YAWRATE_P 0.2
#param set MC_YAWRATE_I 0.15
param set-default MC_YAWRATE_D 0
#param set MC_ROLL_TC 0.19
#param set MC_PITCH_TC 0.16
# Manual mode settings: Unleash Draco R's power :)
#param set MPC_MAN_TILT_MAX 70
#param set MC_PITCHRATE_MAX 1600
#param set MC_ROLLRATE_MAX 1600
#param set MC_YAWRATE_MAX 700
param set-default MPC_MANTHR_MIN 0.08
#param set MPC_MAN_TILT_MAX 35
#param set MPC_TILTMAX_AIR 20
# Filter settings
param set-default IMU_GYRO_CUTOFF 100
# Thrust curve (avoids the need for TPA)
#param set THR_MDL_FAC 0.25
# Obsolete
#param set PWM_MAIN_MAX 1950
#param set PWM_MAIN_MIN 1100
#param set PWM_MAIN_RATE 0
# Sensors
param set-default SENS_BOARD_ROT 10
# Yaw 180
@@ -106,7 +83,6 @@ param set-default BAT1_SOURCE 0
param set-default BAT1_N_CELLS 4
param set-default BAT1_V_DIV 10.14
param set-default BAT1_A_PER_V 18.18
#param set CBRK_IO_SAFETY 22027
param set-default COM_DISARM_LAND 2
# Filter settings
@@ -115,9 +91,6 @@ param set-default IMU_GYRO_CUTOFF 90
# Don't try to be intelligent on RC loss: just cut the motors
param set-default NAV_RCL_ACT 6
# enable to use high-rate logging for better rate tracking analysis
# param set SDLOG_PROFILE 19
# TELEM1 ttyS1 - Wifi module
param set-default MAV_0_CONFIG 101
param set-default MAV_0_RATE 0
@@ -38,8 +38,6 @@ param set-default MC_ACRO_R_MAX 1000
param set-default MC_ACRO_P_MAX 1000
param set-default MC_ACRO_Y_MAX 1000
# param set NAV_RCL_ACT 6 # Lockdown
param set-default PWM_MAIN_MIN 1075
param set-default PWM_MAIN_RATE 400
param set-default PWM_MAIN_DISARM 900
@@ -24,9 +24,6 @@
. ${R}etc/init.d/rc.mc_defaults
#Parameters here:
param set LED_RGB_MAXBRT 8
# Configure this as Quadrotor
# set MAV_TYPE 14
@@ -189,7 +189,7 @@ param set-default CAL_ACC1_PRIO 0
param set-default CAL_GYRO0_PRIO 255
param set-default CAL_GYRO1_PRIO 0
# Logger mode. Default(1) + estimator replay(2) + thermal calibration(4)
param set SDLOG_PROFILE 6
param set-default SDLOG_PROFILE 6
# Do not start frsky_telemetry on port ttyS6 by default, PGA460 lives there. 500 is in arbitrary unused number.
param set TEL_FRSKY_CONFIG 500
@@ -24,7 +24,6 @@ param set-default SYS_HAS_MAG 0
param set-default EKF2_AID_MASK 2
param set-default EKF2_MAG_TYPE 5
param set-default BAT_N_CELLS 1
param set-default BAT1_N_CELLS 1
param set-default BAT1_SOURCE 1
@@ -54,8 +53,6 @@ param set-default MPC_Z_VEL_P_ACC 8
param set-default MPC_Z_VEL_I_ACC 6
param set-default MPC_HOLD_MAX_XY 0.1
param set-default MPC_MAX_FLOW_HGT 3
#param set IMU_GYRO_NF_FREQ 10
#param set IMU_GYRO_NF_BW 20
param set-default NAV_RCL_ACT 3
@@ -72,7 +72,6 @@ param set-default GND_MAX_ANG 3.1415
param set-default RBCLW_BAUD 8
param set-default RBCLW_COUNTS_REV 1200
param set-default RBCLW_ADDRESS 128
# param set SER_TEL4_BAUD 115200
# 104 corresponds to Telem 4
param set-default RBCLW_SER_CFG 104
# Start this driver after setting parameters, because the driver uses some of those parameters.
@@ -20,7 +20,6 @@ param set-default NAV_DLL_ACT 0
# disable circuit breaker for airspeed sensor
param set-default CBRK_AIRSPD_CHK 162128
#param set CBRK_GPSFAIL 240024
set MAV_TYPE 12
param set MAV_TYPE ${MAV_TYPE}
@@ -20,7 +20,6 @@ param set-default NAV_DLL_ACT 0
# disable circuit breaker for airspeed sensor
param set-default CBRK_AIRSPD_CHK 162128
#param set CBRK_GPSFAIL 240024
set MAV_TYPE 12
param set MAV_TYPE ${MAV_TYPE}
@@ -39,6 +39,7 @@ px4_add_romfs_files(
1001_rc_quad_x.hil
1002_standard_vtol.hil
1100_rc_quad_x_sih.hil
1101_rc_plane_sih.hil
# [2000, 2999] Standard planes"
2100_standard_plane
@@ -80,6 +81,7 @@ px4_add_romfs_files(
4052_holybro_qav250
4053_holybro_kopis2
4060_dji_matrice_100
4061_atl_mantis_edu
4071_ifo
4072_draco
4073_ifo-s
+28 -24
View File
@@ -127,6 +127,34 @@ then
fi
fi
# Eagle Tree airspeed sensor external I2C
if param compare -s SENS_EN_ETSASPD 1
then
ets_airspeed start -X
fi
# Sensirion SDP3X differential pressure sensor external I2C
if param compare -s SENS_EN_SDP3X 1
then
if ! sdp3x_airspeed start -X
then
# try another common address
sdp3x_airspeed start -X -a 0x22
fi
fi
# TE MS4525 differential pressure sensor external I2C
if param compare -s SENS_EN_MS4525 1
then
ms4525_airspeed start -X
fi
# TE MS5525 differential pressure sensor external I2C
if param compare -s SENS_EN_MS5525 1
then
ms5525_airspeed start -X
fi
# probe for optional external I2C devices
if param compare SENS_EXT_I2C_PRB 1
then
@@ -143,30 +171,6 @@ then
# start last (wait for possible icm20948 passthrough mode)
ak09916 -X -q start
# differential pressure sensors
if [ ${VEHICLE_TYPE} = fw -o ${VEHICLE_TYPE} = vtol ]
then
# Always try to start the airspeed sensors
# even if their usage might be disabled
sdp3x_airspeed start -X -q
sdp3x_airspeed start -X -a 0x22 -q
# Pixhawk 2.1 has a MS5611 on I2C which gets wrongly
# detected as MS5525 because the chip manufacturer was so
# clever to assign the same I2C address and skip a WHO_AM_I
# register.
if [ $BOARD_FMUV3 = 21 ]
then
ms5525_airspeed start -X -b 2 -q
else
ms5525_airspeed start -X -q
fi
ms4525_airspeed start -X -q
ets_airspeed start -X -q
fi
fi
###############################################################################
+1 -1
View File
@@ -128,7 +128,7 @@ else
then
param reset_all
fi
if ver hwtypecmp V5X00 V5X90 V5Xa0
if ver hwcmp PX4_FMU_V5X PX4_FMU_V6X
then
netman update -i eth0
fi
+8 -1
View File
@@ -86,8 +86,15 @@ sleep 1
source ${src_path}/Tools/setup_gazebo.bash ${src_path} ${src_path}/build/${target}
# To use gazebo_ros ROS2 plugins
if [[ -n "$ROS_VERSION" ]] && [ "$ROS_VERSION" == "2" ]; then
ros_args="-s libgazebo_ros_init.so -s libgazebo_ros_factory.so"
else
ros_args=""
fi
echo "Starting gazebo"
gzserver ${src_path}/Tools/sitl_gazebo/worlds/${world}.world --verbose &
gzserver ${src_path}/Tools/sitl_gazebo/worlds/${world}.world --verbose $ros_args &
sleep 5
n=0
+4 -1
View File
@@ -10,7 +10,7 @@ extra_args=
baudrate=921600
device=
ip="127.0.0.1"
while getopts ":b:d:p:qsr:f:i:lo" opt; do
while getopts ":b:d:p:qsr:f:i:loa" opt; do
case $opt in
b)
baudrate=$OPTARG
@@ -39,6 +39,9 @@ while getopts ":b:d:p:qsr:f:i:lo" opt; do
o)
extra_args="$extra_args -disponly"
;;
a)
extra_args="$extra_args -fw" # aircraft
;;
\?)
echo "Invalid option: -$OPTARG" >&2
exit 1
+23 -8
View File
@@ -13,6 +13,7 @@ import datetime
from timeit import default_timer as timer
os.environ['MAVLINK20'] = '1' # The commands require mavlink 2
from argparse import ArgumentParser
import signal
try:
from pymavlink import mavutil
@@ -24,6 +25,8 @@ except ImportError as e:
print("")
sys.exit(1)
class LoggingCompleted(Exception):
pass
class MavlinkLogStreaming():
'''Streams log data via MAVLink.
@@ -49,6 +52,7 @@ class MavlinkLogStreaming():
self.logging_started = False
self.num_dropouts = 0
self.target_component = 1
self.got_sig_int = False
def debug(self, s, level=1):
'''write some debug text'''
@@ -67,13 +71,24 @@ class MavlinkLogStreaming():
mavutil.mavlink.MAV_CMD_LOGGING_STOP, 0,
0, 0, 0, 0, 0, 0, 0)
def _int_handler(self, sig, frame):
self.got_sig_int = True
def read_messages(self):
''' main loop reading messages '''
measure_time_start = timer()
measured_data = 0
next_heartbeat_time = timer()
old_handler = signal.signal(signal.SIGINT, self._int_handler)
while True:
if self.got_sig_int:
signal.signal(signal.SIGINT, old_handler)
self.got_sig_int = False
print('\nStopping log...')
self.stop_log()
# Continue reading until we get an ACK
# handle heartbeat sending
heartbeat_time = timer()
@@ -120,6 +135,9 @@ class MavlinkLogStreaming():
print('Logging started. Waiting for Header...')
else:
raise Exception('Logging start failed', m.result)
elif m.command == mavutil.mavlink.MAV_CMD_LOGGING_STOP and \
m.result == mavutil.mavlink.MAV_RESULT_ACCEPTED:
raise LoggingCompleted()
return None, 0, 0
# m is either 'LOGGING_DATA_ACKED' or 'LOGGING_DATA':
@@ -137,7 +155,8 @@ class MavlinkLogStreaming():
if m.get_type() == 'LOGGING_DATA':
if not self.got_header_section:
print('Header received in {:0.2f}s'.format(timer()-self.start_time))
print('Header received in {:0.2f}s (size: {:.1f} KB)'.format(
timer()-self.start_time, self.file.tell()/1024))
self.logging_started = True
self.got_header_section = True
self.last_sequence = m.sequence
@@ -256,14 +275,10 @@ def main():
print('Starting log...')
mav_log_streaming.start_log()
mav_log_streaming.read_messages()
print('Stopping log')
mav_log_streaming.stop_log()
except KeyboardInterrupt:
print('Stopping log')
mav_log_streaming.stop_log()
print('Aborting')
except LoggingCompleted:
print('Done')
if __name__ == '__main__':
main()
+25 -19
View File
@@ -18,33 +18,38 @@ The motors in **green** rotate clockwise, the ones in **blue** counterclockwise.
If present, PWM AUX channels are commonly labelled **AUX OUT**.
<style>
table {
div.frame_common table, div.frame_common table {
display: table;
table-layout: fixed;
margin-bottom: 5px;
}
table.common {
div.frame_common table {
float: right;
width: 70%;
}
table.airframes {
width: 100%;
}
table.airframes th:nth-child(1) {
width: 30%;
}
tr > * {
vertical-align : top;
}
td, th {
text-align : left;
}
img {
div.frame_common img {
max-height: 180px;
width: 29%;
padding-top: 10px;
}
div.frame_variant table {
width: 100%;
}
div.frame_variant th:nth-child(1) {
width: 30%;
}
div.frame_variant tr > * {
vertical-align : top;
}
div.frame_variant td, div.frame_variant th {
text-align : left;
}
</style>\n\n"""
type_set = set()
@@ -61,7 +66,7 @@ img {
# Display an image of the frame
image_name = group.GetImageName()
result += '<div>\n'
result += '<div class="frame_common">\n'
image_name = image_path + image_name
result += '<img src="%s.svg"/>\n' % (image_name)
@@ -93,7 +98,7 @@ img {
outputs_prev[i] = ''
if outputs_match[0] or outputs_match[1]:
result += '<table class="common">\n'
result += '<table>\n'
result += ' <thead>\n'
result += ' <tr><th>Common Outputs</th></tr>\n'
result += ' </thead>\n'
@@ -103,7 +108,8 @@ img {
result += '</div>\n\n'
result += '<table class="generic">\n'
result += '<div class="frame_variant">\n'
result += '<table>\n'
result += ' <thead>\n'
result += ' <tr><th>Name</th><th></th></tr>\n'
result += ' </thead>\n'
@@ -156,7 +162,7 @@ img {
#Close the table.
result += '</tbody></table>\n\n'
result += '</tbody>\n</table>\n</div>\n\n'
self.output = result
+8 -1
View File
@@ -56,6 +56,13 @@ else
follow_mode=""
fi
# To use gazebo_ros ROS2 plugins
if [[ -n "$ROS_VERSION" ]] && [ "$ROS_VERSION" == "2" ]; then
ros_args="-s libgazebo_ros_init.so -s libgazebo_ros_factory.so"
else
ros_args=""
fi
if [ "$program" == "jmavsim" ]; then
jmavsim_pid=`ps aux | grep java | grep "\-jar jmavsim_run.jar" | awk '{ print $2 }'`
if [ -n "$jmavsim_pid" ]; then
@@ -133,7 +140,7 @@ elif [ "$program" == "gazebo" ] && [ ! -n "$no_sim" ]; then
world_path="$PX4_SITL_WORLD"
fi
fi
gzserver $verbose $world_path &
gzserver $verbose $world_path $ros_args &
SIM_PID=$!
# Check all paths in ${GAZEBO_MODEL_PATH} for specified model
+14 -7
View File
@@ -23,7 +23,7 @@ parser.add_argument('-e', '--exclude-path', action='append',
help='Excluded path(s), can be specified multiple times',
default=[])
parser.add_argument('--merge-depends', action='store_true',
help='Merge library topics inte the modules that depend on them.')
help='Merge library topics in the modules that depend on them.')
parser.add_argument('-v','--verbosity', action='count',
help='increase output verbosity; primarily for debugging; repeat for more detail',
default=0)
@@ -422,6 +422,7 @@ class Graph(object):
found_module_def = False
found_module_depends = False
found_library_def = False
scope_added = False
for line in datafile:
if 'px4_add_module' in line: # must contain 'px4_add_module'
found_module_def = True
@@ -432,6 +433,7 @@ class Graph(object):
library_name = tokens[1].split()[0].strip().rstrip(')')
library_scope = LibraryScope(library_name)
self._current_scope.append(library_scope)
scope_added = True
self._found_libraries[library_name] = library_scope
if self._in_scope():
log.debug(' >> found library: ' + library_name)
@@ -443,16 +445,18 @@ class Graph(object):
elif found_module_depends:
# two tabs is a *sketchy* heuristic -- spacing isn't guaranteed by cmake;
# ... but the hard-tabs *is* specified by PX4 coding standards, so it's likely to be consistent
if line.startswith('\t\t'):
if line.startswith('\t\t') and not line.strip().startswith('#'):
depends = [dep.strip() for dep in line.split()]
for name in depends:
log.debug(' >> {:}: found module dep: {:}'
.format(self._current_scope[-1].name, name))
self._current_scope[-1].add_dependency(name)
if kwargs['merge_depends']:
if (0 < len(self._scope_whitelist)) and self._current_scope[-1].name in self._scope_whitelist:
# if we whitelist a module with dependencies, whitelist the dependencies, too
self._scope_whitelist.add(name)
else:
elif line.strip() != "":
found_module_depends = False ## done with the 'DEPENDS' section.
words = line.split()
@@ -461,17 +465,21 @@ class Graph(object):
module_name = words[1]
module_scope = ModuleScope(module_name)
self._current_scope.append(module_scope)
scope_added = True
self._found_modules[module_name] = module_scope
if self._in_scope():
log.debug(' >> Found module name: ' + module_scope.name)
return (found_library_def or found_module_def)
return scope_added
def _process_source_file(self, file_name):
""" extract information from a single source file """
log.debug( " >> extracting topics from file: " + file_name )
current_scope = self._get_current_scope()
log.debug( " >> {:}extracting topics from file: {:}"
.format(current_scope.name+": " if current_scope is not None else "",
file_name))
with codecs.open(file_name, 'r', 'utf-8') as f:
try:
@@ -481,7 +489,6 @@ class Graph(object):
return
current_scope = self._get_current_scope()
if current_scope:
if current_scope.name in self._scope_blacklist:
return
@@ -673,7 +680,7 @@ class OutputJSON(object):
node['color'] = topic_colors[topic]
# url is opened when double-clicking on the node
# TODO: does not work for multi-topics
node['url'] = 'https://github.com/PX4/Firmware/blob/master/msg/'+topic+'.msg'
node['url'] = 'https://github.com/PX4/PX4-Autopilot/blob/master/msg/'+topic+'.msg'
nodes.append(node)
data['nodes'] = nodes
+135
View File
@@ -0,0 +1,135 @@
#!/usr/bin/env bash
set -e
agent_template_files_updated=0
code_generator_files_updated=0
# parse help argument
if [[ $1 == "-h" ]] || [[ $1 == "--help" ]]; then
echo -e "Usage: update_px4_ros2_bridge.bash [options...] \t This script allows to update px4_ros_com and px4_msgs in a specified directory." >&2
echo
echo -e "\t--ws_dir \t\t Location of the ament/colcon workspace. Default: $HOME/colcon_ws."
echo -e "\t--px4_ros_com \t\t Updates px4_ros_com microRTPS agent code generation and templates."
echo -e "\t--px4_msgs \t\t Updates px4_msgs messages definition files."
echo -e "\t--all \t\t Updates both px4_ros_com and px4_msgs."
echo
exit 0
fi
# parse the arguments
while [ $# -gt 0 ]; do
if [[ $1 == *"--"* ]]; then
v="${1/--/}"
if [ ! -z $2 ]; then
declare $v="$2"
else
declare $v=1
fi
fi
shift
done
# get script directory
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# get PX4-Autopilot directory
PX4_DIR=$(cd "$(dirname "$SCRIPT_DIR")" && pwd)
function compare_and_update () {
cmp -s "$1" "$2"
if [ $? -eq 1 ]; then
cp "$1" "$2"
return 0
fi
return 1;
}
# update microRTPS agent code generators / helpers
function update_agent_code {
declare -a templates=( \
"microRTPS_agent.cpp.em" \
"microRTPS_timesync.cpp.em" \
"microRTPS_timesync.h.em" \
"microRTPS_transport.cpp" \
"microRTPS_transport.h" \
"Publisher.cpp.em" \
"Publisher.h.em" \
"Subscriber.cpp.em" \
"Subscriber.h.em" \
"RtpsTopics.cpp.em" \
"RtpsTopics.h.em" \
)
for file in ${templates[@]}; do
compare_and_update "$PX4_DIR/msg/templates/urtps/$file" "$ws_dir/src/px4_ros_com/templates/$file" \
&& echo -e "--\t\t- '$ws_dir/src/px4_ros_com/templates/$file' updated" && ((agent_template_files_updated+=1))
done
if [ $agent_template_files_updated -eq 0 ]; then
echo -e "--\t\t- No template files updated"
elif [ $agent_template_files_updated -eq 1 ]; then
echo -e "--\t\t - 1 template file updated"
else
echo -e "--\t\t - $agent_template_files_updated template files updated"
fi
}
# update microRTPS agent code templates
function update_agent_templates {
declare -a code_generators=( \
"uorb_rtps_classifier.py" \
"generate_microRTPS_bridge.py" \
"px_generate_uorb_topic_files.py" \
)
for file in ${code_generators[@]}; do
compare_and_update "$PX4_DIR/msg/tools/$file $ws_dir/src/px4_ros_com/scripts/$file" \
&& echo -e "--\t\t- '$ws_dir/src/px4_ros_com/scripts/$file' updated" && ((code_generator_files_updated+=1))
done
if [ $code_generator_files_updated -eq 0 ]; then
echo -e "--\t\t- No code generators / helpers files updated"
elif [ $code_generator_files_updated -eq 1 ]; then
echo -e "--\t\t - 1 code generator / helper file updated"
else
echo -e "--\t\t - $code_generator_files_updated code generator / helper files updated"
fi
}
# update px4_ros_com files
function update_px4_ros_com {
python3 $PX4_DIR/msg/tools/uorb_to_ros_urtps_topics.py -i $PX4_DIR/msg/tools/urtps_bridge_topics.yaml -o $ws_dir/src/px4_ros_com/templates/urtps_bridge_topics.yaml
echo -e "--------------- \033[1mmicroRTPS agent code generation and templates update\033[0m ----------------"
echo "-------------------------------------------------------------------------------------------------------"
update_agent_code
update_agent_templates
return 0
}
# function to update px4_msgs
function update_px4_msgs {
find "$ws_dir/src/px4_msgs/msg/" -maxdepth 1 -type f -delete
python3 $PX4_DIR/msg/tools/uorb_to_ros_msgs.py $PX4_DIR/msg/ $ws_dir/src/px4_msgs/msg/
}
# decisor
echo "-------------------------------------------------------------------------------------------------------"
if [ -d "${ws_dir}" ]; then
ws_dir=$(cd "$ws_dir" && pwd)
if [ ! -z ${all} ]; then
update_px4_ros_com
echo "-------------------------------------------------------------------------------------------------------"
update_px4_msgs
elif [ ! -z ${px4_ros_com} ]; then
update_px4_ros_com
echo "-------------------------------------------------------------------------------------------------------"
elif [ ! -z ${px4_msgs} ]; then
update_px4_msgs
fi
echo -e "-------------------------------- \033[0;32mUpdate successful!\033[0m ---------------------------------"
echo "-------------------------------------------------------------------------------------------------------"
exit 0
else
echo -e "-- \033[0;31mWorkspace directory doesn't exist...\033[0m"
echo -e "---------------------------------- \033[0;31mUpdate failed!\033[0m -----------------------------------"
echo "-------------------------------------------------------------------------------------------------------"
exit $ERRCODE
fi
-3
View File
@@ -1,9 +1,6 @@
px4_add_board(
PLATFORM nuttx
VENDOR airmind
MODEL mindpx-v2
LABEL default
TOOLCHAIN arm-none-eabi
ARCHITECTURE cortex-m4
CONSTRAINED_MEMORY
@@ -90,7 +90,6 @@ CONFIG_MTD_BYTE_WRITE=y
CONFIG_MTD_PARTITION=y
CONFIG_MTD_RAMTRON=y
CONFIG_NAME_MAX=40
CONFIG_NFILE_DESCRIPTORS=12
CONFIG_NSH_ARCHINIT=y
CONFIG_NSH_ARCHROMFS=y
CONFIG_NSH_ARGCAT=y
@@ -99,9 +98,6 @@ CONFIG_NSH_CMDPARMS=y
CONFIG_NSH_CROMFSETC=y
CONFIG_NSH_DISABLE_IFCONFIG=y
CONFIG_NSH_DISABLE_IFUPDOWN=y
CONFIG_NSH_DISABLE_MB=y
CONFIG_NSH_DISABLE_MH=y
CONFIG_NSH_DISABLE_MW=y
CONFIG_NSH_DISABLE_TELNETD=y
CONFIG_NSH_LINELEN=128
CONFIG_NSH_MAXARGUMENTS=15
-3
View File
@@ -2,9 +2,6 @@ include (${CMAKE_CURRENT_LIST_DIR}/uavcan_board_identity)
px4_add_board(
PLATFORM nuttx
VENDOR ark
MODEL can-flow
LABEL canbootloader
TOOLCHAIN arm-none-eabi
ARCHITECTURE cortex-m4
CONSTRAINED_MEMORY
-3
View File
@@ -2,9 +2,6 @@ include (${CMAKE_CURRENT_LIST_DIR}/uavcan_board_identity)
px4_add_board(
PLATFORM nuttx
VENDOR ark
MODEL can-flow
LABEL debug
TOOLCHAIN arm-none-eabi
ARCHITECTURE cortex-m4
CONSTRAINED_MEMORY
-3
View File
@@ -2,9 +2,6 @@ include (${CMAKE_CURRENT_LIST_DIR}/uavcan_board_identity)
px4_add_board(
PLATFORM nuttx
VENDOR ark
MODEL can-flow
LABEL default
TOOLCHAIN arm-none-eabi
ARCHITECTURE cortex-m4
CONSTRAINED_FLASH
@@ -36,7 +36,7 @@ CONFIG_LIBC_FLOATINGPOINT=y
CONFIG_LIBC_LONG_LONG=y
CONFIG_LIBC_STRERROR=y
CONFIG_LIB_BOARDCTL=y
CONFIG_MAX_TASKS=0
CONFIG_FS_PROCFS_MAX_TASKS=0
CONFIG_MM_REGIONS=2
CONFIG_NAME_MAX=0
CONFIG_NUNGET_CHARS=0
@@ -70,7 +70,6 @@ CONFIG_MTD_BYTE_WRITE=y
CONFIG_MTD_PARTITION=y
CONFIG_MTD_RAMTRON=y
CONFIG_NAME_MAX=40
CONFIG_NFILE_DESCRIPTORS=12
CONFIG_NSH_ARCHINIT=y
CONFIG_NSH_ARCHROMFS=y
CONFIG_NSH_ARGCAT=y
@@ -79,9 +78,6 @@ CONFIG_NSH_CMDPARMS=y
CONFIG_NSH_CROMFSETC=y
CONFIG_NSH_DISABLE_IFCONFIG=y
CONFIG_NSH_DISABLE_IFUPDOWN=y
CONFIG_NSH_DISABLE_MB=y
CONFIG_NSH_DISABLE_MH=y
CONFIG_NSH_DISABLE_MW=y
CONFIG_NSH_DISABLE_TELNETD=y
CONFIG_NSH_LINELEN=128
CONFIG_NSH_MAXARGUMENTS=15
-3
View File
@@ -2,9 +2,6 @@ include (${CMAKE_CURRENT_LIST_DIR}/uavcan_board_identity)
px4_add_board(
PLATFORM nuttx
VENDOR ark
MODEL can-gps
LABEL canbootloader
TOOLCHAIN arm-none-eabi
ARCHITECTURE cortex-m4
CONSTRAINED_MEMORY
-3
View File
@@ -2,9 +2,6 @@ include (${CMAKE_CURRENT_LIST_DIR}/uavcan_board_identity)
px4_add_board(
PLATFORM nuttx
VENDOR ark
MODEL can-gps
LABEL debug
TOOLCHAIN arm-none-eabi
ARCHITECTURE cortex-m4
CONSTRAINED_MEMORY
-3
View File
@@ -2,9 +2,6 @@ include (${CMAKE_CURRENT_LIST_DIR}/uavcan_board_identity)
px4_add_board(
PLATFORM nuttx
VENDOR ark
MODEL can-gps
LABEL default
TOOLCHAIN arm-none-eabi
ARCHITECTURE cortex-m4
#CONSTRAINED_FLASH
@@ -36,7 +36,7 @@ CONFIG_LIBC_FLOATINGPOINT=y
CONFIG_LIBC_LONG_LONG=y
CONFIG_LIBC_STRERROR=y
CONFIG_LIB_BOARDCTL=y
CONFIG_MAX_TASKS=0
CONFIG_FS_PROCFS_MAX_TASKS=0
CONFIG_MM_REGIONS=2
CONFIG_NAME_MAX=0
CONFIG_NUNGET_CHARS=0
@@ -70,7 +70,6 @@ CONFIG_MTD_BYTE_WRITE=y
CONFIG_MTD_PARTITION=y
CONFIG_MTD_RAMTRON=y
CONFIG_NAME_MAX=40
CONFIG_NFILE_DESCRIPTORS=12
CONFIG_NSH_ARCHINIT=y
CONFIG_NSH_ARCHROMFS=y
CONFIG_NSH_ARGCAT=y
@@ -79,9 +78,6 @@ CONFIG_NSH_CMDPARMS=y
CONFIG_NSH_CROMFSETC=y
CONFIG_NSH_DISABLE_IFCONFIG=y
CONFIG_NSH_DISABLE_IFUPDOWN=y
CONFIG_NSH_DISABLE_MB=y
CONFIG_NSH_DISABLE_MH=y
CONFIG_NSH_DISABLE_MW=y
CONFIG_NSH_DISABLE_TELNETD=y
CONFIG_NSH_LINELEN=128
CONFIG_NSH_MAXARGUMENTS=15
Binary file not shown.
+60
View File
@@ -0,0 +1,60 @@
px4_add_board(
PLATFORM nuttx
TOOLCHAIN arm-none-eabi
ARCHITECTURE cortex-m7
ROMFSROOT px4fmu_common
DRIVERS
adc/board_adc
barometer/maiertek/mpc2520
camera_capture
gps
#heater
imu/invensense/icm20602
magnetometer/isentek/ist8310
tap_esc
MODULES
battery_status
camera_feedback
commander
dataman
ekf2
events
flight_mode_manager
gyro_calibration
gyro_fft
land_detector
load_mon
logger
mavlink
mc_att_control
mc_hover_thrust_estimator
mc_pos_control
mc_rate_control
#micrortps_bridge
navigator
rc_update
sensors
sih
vmount
SYSTEMCMDS
bl_update
dmesg
dumpfile
hardfault_log
led_control
mixer
motor_ramp
motor_test
param
perf
reboot
shutdown
system_time
top
topic_listener
tune_control
uorb
ver
work_queue
)
+13
View File
@@ -0,0 +1,13 @@
{
"board_id": 97,
"magic": "PX4FWv1",
"description": "Firmware for the Advanced Technology Labs (ATL) Mantis EDU (V18S) board",
"image": "",
"build_time": 0,
"summary": "atl_mantis-edu",
"version": "0.1",
"image_size": 0,
"image_maxsize": 2064384,
"git_identity": "",
"board_revision": 0
}
@@ -0,0 +1,22 @@
#!/bin/sh
#
# board specific defaults
#------------------------------------------------------------------------------
param set-default SYS_AUTOSTART 4061
param set-default COM_ARM_SDCARD 0
param set-default SENS_EXT_I2C_PRB 0
param set-default EKF2_MULTI_IMU 1
param set-default EKF2_MULTI_MAG 1
param set-default SENS_IMU_MODE 0
param set-default SENS_MAG_MODE 0
param set-default EV_TSK_STAT_DIS 1
set LOGGER_ARGS "-m mavlink"
# Start esc
tap_esc start -d /dev/ttyS4 -n 4
@@ -0,0 +1,19 @@
#!/bin/sh
#
# board specific MAVLink startup script.
#------------------------------------------------------------------------------
set GIMBAL_TTY /dev/ttyS3
set MAV_RATE 40000
set BAUDRATE 500000
mavlink start -r ${MAV_RATE} -d ${GIMBAL_TTY} -b ${BAUDRATE}
mavlink stream -d ${GIMBAL_TTY} -s SYSTEM_TIME -r 0.5
mavlink stream -d ${GIMBAL_TTY} -s AUTOPILOT_STATE_FOR_GIMBAL_DEVICE -r 20
mavlink stream -d ${GIMBAL_TTY} -s GIMBAL_DEVICE_SET_ATTITUDE -r 20
# optical flow
mavlink start -d /dev/ttyS2 -m custom -b 500000
# Start MAVLink on the USB port
mavlink start -d /dev/ttyACM0
@@ -0,0 +1,17 @@
#!/bin/sh
#
# board specific sensors init
#------------------------------------------------------------------------------
board_adc start
# SPI1 icm20602 IMU
icm20602 start -s -b 1 -R 8
# I2C2 ist8310 magnetometer
ist8310 start -I -b 2 -R 14
# I2C4 mpc2520 barometer
mpc2520 start -I -b 4
gps start -d /dev/ttyS0 -p ubx
@@ -0,0 +1,332 @@
/************************************************************************************
* nuttx-configs/px4_fmu-v5/include/board.h
*
* Copyright (C) 2016-2018 Gregory Nutt. All rights reserved.
* Authors: David Sidrane <david_s5@nscdg.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name 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 __NUTTX_CONFIG_PX4_FMU_V5_INCLUDE_BOARD_H
#define __NUTTX_CONFIG_PX4_FMU_V5_INCLUDE_BOARD_H
/************************************************************************************
* Included Files
************************************************************************************/
#include "board_dma_map.h"
#include <nuttx/config.h>
#ifndef __ASSEMBLY__
# include <stdint.h>
#endif
#include "stm32_rcc.h"
#include "stm32_sdmmc.h"
/************************************************************************************
* Pre-processor Definitions
************************************************************************************/
/* Clocking *************************************************************************/
/* The px4_fmu-v5 board provides the following clock sources:
*
* X301: 16 MHz crystal for HSE
*
* So we have these clock source available within the STM32
*
* HSI: 16 MHz RC factory-trimmed
* HSE: 16 MHz crystal for HSE
*/
#define STM32_BOARD_XTAL 16000000ul
#define STM32_HSI_FREQUENCY 16000000ul
#define STM32_LSI_FREQUENCY 32000
#define STM32_HSE_FREQUENCY STM32_BOARD_XTAL
#define STM32_LSE_FREQUENCY 0
/* Main PLL Configuration.
*
* PLL source is HSE = 16,000,000
*
* PLL_VCO = (STM32_HSE_FREQUENCY / PLLM) * PLLN
* Subject to:
*
* 2 <= PLLM <= 63
* 192 <= PLLN <= 432
* 192 MHz <= PLL_VCO <= 432MHz
*
* SYSCLK = PLL_VCO / PLLP
* Subject to
*
* PLLP = {2, 4, 6, 8}
* SYSCLK <= 216 MHz
*
* USB OTG FS, SDMMC and RNG Clock = PLL_VCO / PLLQ
* Subject to
* The USB OTG FS requires a 48 MHz clock to work correctly. The SDMMC
* and the random number generator need a frequency lower than or equal
* to 48 MHz to work correctly.
*
* 2 <= PLLQ <= 15
*/
/* Highest SYSCLK with USB OTG FS clock = 48 MHz
*
* PLL_VCO = (16,000,000 / 8) * 216 = 432 MHz
* SYSCLK = 432 MHz / 2 = 216 MHz
* USB OTG FS, SDMMC and RNG Clock = 432 MHz / 9 = 48 MHz
*/
#define STM32_PLLCFG_PLLM RCC_PLLCFG_PLLM(8)
#define STM32_PLLCFG_PLLN RCC_PLLCFG_PLLN(216)
#define STM32_PLLCFG_PLLP RCC_PLLCFG_PLLP_2
#define STM32_PLLCFG_PLLQ RCC_PLLCFG_PLLQ(9)
#define STM32_VCO_FREQUENCY ((STM32_HSE_FREQUENCY / 8) * 216)
#define STM32_SYSCLK_FREQUENCY (STM32_VCO_FREQUENCY / 2)
#define STM32_OTGFS_FREQUENCY (STM32_VCO_FREQUENCY / 9)
/* Configure factors for PLLSAI clock */
#define CONFIG_STM32F7_PLLSAI 1
#define STM32_RCC_PLLSAICFGR_PLLSAIN RCC_PLLSAICFGR_PLLSAIN(192)
#define STM32_RCC_PLLSAICFGR_PLLSAIP RCC_PLLSAICFGR_PLLSAIP(8)
#define STM32_RCC_PLLSAICFGR_PLLSAIQ RCC_PLLSAICFGR_PLLSAIQ(4)
#define STM32_RCC_PLLSAICFGR_PLLSAIR RCC_PLLSAICFGR_PLLSAIR(2)
/* Configure Dedicated Clock Configuration Register */
#define STM32_RCC_DCKCFGR1_PLLI2SDIVQ RCC_DCKCFGR1_PLLI2SDIVQ(1)
#define STM32_RCC_DCKCFGR1_PLLSAIDIVQ RCC_DCKCFGR1_PLLSAIDIVQ(1)
#define STM32_RCC_DCKCFGR1_PLLSAIDIVR RCC_DCKCFGR1_PLLSAIDIVR(0)
#define STM32_RCC_DCKCFGR1_SAI1SRC RCC_DCKCFGR1_SAI1SEL(0)
#define STM32_RCC_DCKCFGR1_SAI2SRC RCC_DCKCFGR1_SAI2SEL(0)
#define STM32_RCC_DCKCFGR1_TIMPRESRC 0
#define STM32_RCC_DCKCFGR1_DFSDM1SRC 0
#define STM32_RCC_DCKCFGR1_ADFSDM1SRC 0
/* Configure factors for PLLI2S clock */
#define CONFIG_STM32F7_PLLI2S 1
#define STM32_RCC_PLLI2SCFGR_PLLI2SN RCC_PLLI2SCFGR_PLLI2SN(192)
#define STM32_RCC_PLLI2SCFGR_PLLI2SP RCC_PLLI2SCFGR_PLLI2SP(2)
#define STM32_RCC_PLLI2SCFGR_PLLI2SQ RCC_PLLI2SCFGR_PLLI2SQ(2)
#define STM32_RCC_PLLI2SCFGR_PLLI2SR RCC_PLLI2SCFGR_PLLI2SR(2)
/* Configure Dedicated Clock Configuration Register 2 */
#define STM32_RCC_DCKCFGR2_USART1SRC RCC_DCKCFGR2_USART1SEL_APB
#define STM32_RCC_DCKCFGR2_USART2SRC RCC_DCKCFGR2_USART2SEL_APB
#define STM32_RCC_DCKCFGR2_UART4SRC RCC_DCKCFGR2_UART4SEL_APB
#define STM32_RCC_DCKCFGR2_UART5SRC RCC_DCKCFGR2_UART5SEL_APB
#define STM32_RCC_DCKCFGR2_USART6SRC RCC_DCKCFGR2_USART6SEL_APB
#define STM32_RCC_DCKCFGR2_UART7SRC RCC_DCKCFGR2_UART7SEL_APB
#define STM32_RCC_DCKCFGR2_UART8SRC RCC_DCKCFGR2_UART8SEL_APB
#define STM32_RCC_DCKCFGR2_I2C1SRC RCC_DCKCFGR2_I2C1SEL_HSI
#define STM32_RCC_DCKCFGR2_I2C2SRC RCC_DCKCFGR2_I2C2SEL_HSI
#define STM32_RCC_DCKCFGR2_I2C3SRC RCC_DCKCFGR2_I2C3SEL_HSI
#define STM32_RCC_DCKCFGR2_I2C4SRC RCC_DCKCFGR2_I2C4SEL_HSI
#define STM32_RCC_DCKCFGR2_LPTIM1SRC RCC_DCKCFGR2_LPTIM1SEL_APB
#define STM32_RCC_DCKCFGR2_CECSRC RCC_DCKCFGR2_CECSEL_HSI
#define STM32_RCC_DCKCFGR2_CK48MSRC RCC_DCKCFGR2_CK48MSEL_PLL
#define STM32_RCC_DCKCFGR2_SDMMCSRC RCC_DCKCFGR2_SDMMCSEL_48MHZ
#define STM32_RCC_DCKCFGR2_SDMMC2SRC RCC_DCKCFGR2_SDMMC2SEL_48MHZ
#define STM32_RCC_DCKCFGR2_DSISRC RCC_DCKCFGR2_DSISEL_PHY
/* Several prescalers allow the configuration of the two AHB buses, the
* high-speed APB (APB2) and the low-speed APB (APB1) domains. The maximum
* frequency of the two AHB buses is 216 MHz while the maximum frequency of
* the high-speed APB domains is 108 MHz. The maximum allowed frequency of
* the low-speed APB domain is 54 MHz.
*/
/* AHB clock (HCLK) is SYSCLK (216 MHz) */
#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 (54 MHz) */
#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 (108MHz) */
#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)
/* SDMMC dividers. Note that slower clocking is required when DMA is disabled
* in order to avoid RX overrun/TX underrun errors due to delayed responses
* to service FIFOs in interrupt driven mode. These values have not been
* tuned!!!
*
* SDMMCCLK=48MHz, SDMMC_CK=SDMMCCLK/(118+2)=400 KHz
*/
/* Use the Falling edge of the SDIO_CLK clock to change the edge the
* data and commands are change on
*/
#define STM32_SDMMC_CLKCR_EDGE STM32_SDMMC_CLKCR_NEGEDGE
#define STM32_SDMMC_INIT_CLKDIV (118 << STM32_SDMMC_CLKCR_CLKDIV_SHIFT)
/* DMA ON: SDMMCCLK=48MHz, SDMMC_CK=SDMMCCLK/(1+2)=16 MHz
* DMA OFF: SDMMCCLK=48MHz, SDMMC_CK=SDMMCCLK/(2+2)=12 MHz
*/
#ifdef CONFIG_STM32F7_SDMMC_DMA
# define STM32_SDMMC_MMCXFR_CLKDIV (1 << STM32_SDMMC_CLKCR_CLKDIV_SHIFT)
#else
# define STM32_SDMMC_MMCXFR_CLKDIV (2 << STM32_SDMMC_CLKCR_CLKDIV_SHIFT)
#endif
/* DMA ON: SDMMCCLK=48MHz, SDMMC_CK=SDMMCCLK/(1+2)=16 MHz
* DMA OFF: SDMMCCLK=48MHz, SDMMC_CK=SDMMCCLK/(2+2)=12 MHz
*/
//TODO #warning "Check Freq for 24mHz"
#ifdef CONFIG_STM32F7_SDMMC_DMA
# define STM32_SDMMC_SDXFR_CLKDIV (1 << STM32_SDMMC_CLKCR_CLKDIV_SHIFT)
#else
# define STM32_SDMMC_SDXFR_CLKDIV (2 << STM32_SDMMC_CLKCR_CLKDIV_SHIFT)
#endif
/* FLASH wait states
*
* --------- ---------- -----------
* VDD MAX SYSCLK WAIT STATES
* --------- ---------- -----------
* 1.7-2.1 V 180 MHz 8
* 2.1-2.4 V 216 MHz 9
* 2.4-2.7 V 216 MHz 8
* 2.7-3.6 V 216 MHz 7
* --------- ---------- -----------
*/
#define BOARD_FLASH_WAITSTATES 7
/* LED index values for use with board_userled() */
#define BOARD_LED1 0
#define BOARD_LED2 1
#define BOARD_LED3 2
#define BOARD_NLEDS 3
#define BOARD_LED_RED BOARD_LED1
#define BOARD_LED_GREEN BOARD_LED2
#define BOARD_LED_BLUE BOARD_LED3
/* Thus if the Green LED is statically on, NuttX has successfully booted and
* is, apparently, running normally. If the Red LED is flashing at
* approximately 2Hz, then a fatal error has been detected and the system
* has halted.
*/
/* Alternate function pin selections ************************************************/
#define GPIO_USART1_RX GPIO_USART1_RX_2 /* PB7 */
#define GPIO_USART1_TX GPIO_USART1_TX_2 /* PB6 */
#define GPIO_USART2_RX GPIO_USART2_RX_2 /* PD6 */
#define GPIO_USART2_TX GPIO_USART2_TX_2 /* PD5 */
#define GPIO_USART2_RTS GPIO_USART2_RTS_2 /* PD4 */
#define GPIO_USART2_CTS GPIO_USART2_CTS_2 /* PD3 */
#define GPIO_USART3_RX GPIO_USART3_RX_3 /* PD9 */
#define GPIO_USART3_TX GPIO_USART3_TX_3 /* PD8 */
#define GPIO_USART3_RTS GPIO_USART3_RTS_2 /* PD12 */
#define GPIO_USART3_CTS GPIO_USART3_CTS_2 /* PD11 */
#define GPIO_UART4_RX GPIO_UART4_RX_4 /* PD0 */
#define GPIO_UART4_TX GPIO_UART4_TX_4 /* PD1 */
#define GPIO_UART5_RX GPIO_UART5_RX_3 /* PB12 */
#define GPIO_UART5_TX GPIO_UART5_TX_3 /* PB13 */
#define GPIO_USART6_RX GPIO_USART6_RX_2 /* PG9 */
#define GPIO_USART6_TX GPIO_USART6_TX_2 /* PG14 */
#define GPIO_USART6_RTS GPIO_USART6_RTS_2 /* PG8 */
#define GPIO_USART6_CTS GPIO_USART6_CTS_2 /* PG15 */
#define GPIO_UART7_RX GPIO_UART7_RX_2 /* PF6 */
#define GPIO_UART7_TX GPIO_UART7_TX_1 /* PE8 */
/* USART8: has no remap
*
* GPIO_UART8_RX PE0[CN12-64]
* GPIO_UART8_TX PE1[CN11-61]
*/
/* SPI */
#define GPIO_SPI1_MISO GPIO_SPI1_MISO_1 /* PA6 */
#define GPIO_SPI1_MOSI GPIO_SPI1_MOSI_3 /* PD7 */
#define GPIO_SPI1_SCK GPIO_SPI1_SCK_3 /* PG11 */
#define GPIO_SPI4_MISO GPIO_SPI4_MISO_2 /* PE13 */
#define GPIO_SPI4_MOSI GPIO_SPI4_MOSI_1 /* PE6 */
#define GPIO_SPI4_SCK GPIO_SPI4_SCK_1 /* PE2 */
/* I2C */
#define GPIO_I2C2_SCL GPIO_I2C2_SCL_2 /* PF1 */
#define GPIO_I2C2_SDA GPIO_I2C2_SDA_2 /* PF0 */
#define GPIO_I2C4_SCL GPIO_I2C4_SCL_2 /* PF14 */
#define GPIO_I2C4_SDA GPIO_I2C4_SDA_2 /* PF15 */
/* SDMMC1
*
* VDD 3.3
* GND
* SDMMC1_CK PC12
* SDMMC1_CMD PD2
* SDMMC1_D0 PC8
* SDMMC1_D1 PC9
* SDMMC1_D2 PC10
* SDMMC1_D3 PC11
* GPIO_SDMMC1_NCD PG0
*/
#endif /*__NUTTX_CONFIG_PX4_FMU_V5_INCLUDE_BOARD_H */
@@ -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.
*
****************************************************************************/
#pragma once
/*
| DMA1 | Stream 0 | Stream 1 | Stream 2 | Stream 3 | Stream 4 | Stream 5 | Stream 6 | Stream 7 |
|------------|------------------|------------------|------------------|------------------|------------------|------------------|------------------|------------------|
| Channel 0 | SPI3_RX_1 | SPDIFRX_DT | SPI3_RX_2 | SPI2_RX | SPI2_TX | SPI3_TX_1 | SPDIFRX_CS | SPI3_TX_2 |
| Channel 1 | I2C1_RX | I2C3_RX | TIM7_UP_1 | - | TIM7_UP_2 | I2C1_RX_1 | I2C1_TX | I2C1_TX_1 |
| Channel 2 | TIM4_CH1 | - | I2C4_RX | TIM4_CH2 | - | I2C4_TX | TIM4_UP | TIM4_CH3 |
| Channel 3 | - | TIM2_UP_1 | I2C3_RX_1 | - | I2C3_TX | TIM2_CH1 | TIM2_CH2 | TIM2_UP_2 |
| | | TIM2_CH3 | | | | | TIM2_CH4_1 | TIM2_CH4_2 |
| Channel 4 | UART5_RX | USART3_RX | UART4_RX | USART3_TX_1 | UART4_TX | USART2_RX | USART2_TX | UART5_TX |
| Channel 5 | UART8_TX | UART7_TX | TIM3_CH4 | UART7_RX | TIM3_CH1 | TIM3_CH2 | UART8_RX | TIM3_CH3 |
| | | | TIM3_UP | | TIM3_TRIG | | | |
| Channel 6 | TIM5_CH3 | TIM5_CH4_1 | TIM5_CH1 | TIM5_CH4_2 | TIM5_CH2 | - | TIM5_UP_2 | - |
| | TIM5_UP_1 | TIM5_TRIG_1 | | TIM5_TRIG_2 | | | | |
| Channel 7 | - | TIM6_UP | I2C2_RX | I2C2_RX_1 | USART3_TX_2 | DAC1 | DAC2 | I2C2_TX |
| Channel 8 | I2C3_TX_1 | I2C4_RX_1 | - | - | I2C2_TX_1 | - | I2C4_TX_1 | - |
| Channel 9 | - | SPI2_RX | - | - | - | - | SPI2_TX | - |
| | | | | | | | | |
| Usage | UART8_TX | USART3_RX | UART4_RX | USART3_TX_1 | | USART2_RX | UART8_RX | |
| DMA2 | Stream 0 | Stream 1 | Stream 2 | Stream 3 | Stream 4 | Stream 5 | Stream 6 | Stream 7 |
|------------|------------------|------------------|------------------|------------------|------------------|------------------|------------------|------------------|
| Channel 0 | ADC1_1 | SAI1_A | TIM8_CH1_1 | SAI1_A_2 | ADC1_2 | SAI1_B_1 | TIM1_CH1_1 | SAI1_B_2 |
| | | | TIM8_CH2_1 | | | | TIM1_CH2_1 | |
| | | | TIM8_CH3_1 | | | | TIM1_CH3_1 | |
| Channel 1 | - | DCMI_1 | ADC2_1 | ADC2_2 | SAI1_B | SPI6_TX | SPI6_RX | DCMI_2 |
| Channel 2 | ADC3_1 | ADC3_2 | - | SPI5_RX_1 | SPI5_TX_1 | CRYP_OUT | CRYP_IN | HASH_IN |
| Channel 3 | SPI1_RX_1 | - | SPI1_RX_2 | SPI1_TX_1 | SAI2_A | SPI1_TX_2 | SAI2_B | QUADSPI |
| Channel 4 | SPI4_RX_1 | SPI4_TX_1 | USART1_RX_1 | SDMMC1_1 | - | USART1_RX_2 | SDMMC1_2 | USART1_TX |
| Channel 5 | - | USART6_RX_1 | USART6_RX_2 | SPI4_RX_2 | SPI4_TX_2 | - | USART6_TX_1 | USART6_TX_2 |
| Channel 6 | TIM1_TRIG_1 | TIM1_CH1_2 | TIM1_CH2_2 | TIM1_CH1 | TIM1_CH4 | TIM1_UP | TIM1_CH3_2 | - |
| | | | | | TIM1_TRIG_2 | | | |
| | | | | | TIM1_COM | | | |
| Channel 7 | - | TIM8_UP | TIM8_CH1_2 | TIM8_CH2_2 | TIM8_CH3_2 | SPI5_RX_2 | SPI5_TX_2 | TIM8_CH4 |
| | | | | | | | | TIM8_TRIG |
| | | | | | | | | TIM8_COM |
| Channel 8 | DFSDM1_FLT0_1 | DFSDM1_FLT1_1 | DFSDM1_FLT2_1 | DFSDM1_FLT3_1 | DFSDM1_FLT0_2 | DFSDM1_FLT1_2 | DFSDM1_FLT2_2 | DFSDM1_FLT3_2 |
| Channel 9 | JPEG_IN_1 | JPEG_OUT | SPI4_TX_3 | JPEG_IN_2 | JPEG_OUT_2 | SPI5_RX_3 | - | - |
| Channel 10 | SAI1_B_3 | SAI2_B_1 | SAI2_A_1 | - | - | - | SAI1_A_3 | - |
| Channel 11 | SDMMC2_1 | - | QUADSPI_1 | - | - | SDMMC2_2 | - | - |
| | | | | | | | | |
| Usage | SPI1_RX_1 | | USART6_RX_2 | SPI1_TX_1 | | TIM1_UP | SDMMC1_2 | |
*/
// DMA1 Channel/Stream Selections
//--------------------------------------------//---------------------------//----------------
// DMAMAP_UART8_TX // DMA1, Stream 0, Channel 5 (PX4IO TX)
// DMAMAP_USART3_RX // DMA1, Stream 1, Channel 4 (TELEM2 RX)
// DMAMAP_UART4_RX // DMA1, Stream 2, Channel 4 (TELEM4 RX)
#define DMAMAP_USART3_TX DMAMAP_USART3_TX_1 // DMA1, Stream 3, Channel 4 (TELEM2 TX)
// DMAMAP_USART2_RX // DMA1, Stream 5, Channel 4 (TELEM1 RX)
// DMAMAP_UART8_RX // DMA1, Stream 6, Channel 5 (PX4IO RX)
// DMA2 Channel/Stream Selections
//--------------------------------------------//---------------------------//----------------
#define DMAMAP_SPI1_RX DMAMAP_SPI1_RX_1 // DMA2, Stream 0, Channel 3 (SPI sensors RX)
// AVAILABLE // DMA2, Stream 1
#define DMAMAP_USART6_RX DMAMAP_USART6_RX_2 // DMA2, Stream 2, Channel 5
#define DMAMAP_SPI1_TX DMAMAP_SPI1_TX_1 // DMA2, Stream 3, Channel 3 (SPI sensors TX)
// AVAILABLE // DMA2, Stream 4
// DMAMAP_TIM1_UP // DMA2, Stream 5, Channel 6 (DSHOT)
#define DMAMAP_SDMMC1 DMAMAP_SDMMC1_2 // DMA2, Stream 6, Channel 4
// AVAILABLE // DMA2, Stream 7
@@ -0,0 +1,236 @@
#
# 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_FS_PROCFS_EXCLUDE_ENVIRON is not set
# CONFIG_MMCSD_HAVE_CARDDETECT is not set
# CONFIG_MMCSD_HAVE_WRITEPROTECT is not set
# CONFIG_MMCSD_MMCSUPPORT is not set
# CONFIG_MMCSD_SPI is not set
# CONFIG_NSH_DISABLEBG is not set
# CONFIG_NSH_DISABLESCRIPT is not set
# CONFIG_NSH_DISABLE_DF is not set
# CONFIG_NSH_DISABLE_EXEC is not set
# CONFIG_NSH_DISABLE_EXIT is not set
# CONFIG_NSH_DISABLE_GET is not set
# CONFIG_NSH_DISABLE_ITEF is not set
# CONFIG_NSH_DISABLE_LOOPS is not set
# CONFIG_NSH_DISABLE_SEMICOLON is not set
# CONFIG_NSH_DISABLE_TIME is not set
CONFIG_ARCH="arm"
CONFIG_ARCH_BOARD_CUSTOM=y
CONFIG_ARCH_BOARD_CUSTOM_DIR="../nuttx-config"
CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y
CONFIG_ARCH_BOARD_CUSTOM_NAME="px4"
CONFIG_ARCH_CHIP="stm32f7"
CONFIG_ARCH_CHIP_STM32F765II=y
CONFIG_ARCH_CHIP_STM32F7=y
CONFIG_ARCH_INTERRUPTSTACK=512
CONFIG_ARCH_STACKDUMP=y
CONFIG_ARMV7M_BASEPRI_WAR=y
CONFIG_ARMV7M_DCACHE=y
CONFIG_ARMV7M_DTCM=y
CONFIG_ARMV7M_ICACHE=y
CONFIG_ARMV7M_MEMCPY=y
CONFIG_ARMV7M_USEBASEPRI=y
CONFIG_BOARDCTL_RESET=y
CONFIG_BOARD_CRASHDUMP=y
CONFIG_BOARD_LOOPSPERMSEC=22114
CONFIG_BOARD_RESET_ON_ASSERT=2
CONFIG_BUILTIN=y
CONFIG_C99_BOOL8=y
CONFIG_CDCACM=y
CONFIG_CDCACM_PRODUCTID=0x0061
CONFIG_CDCACM_PRODUCTSTR="PX4 ATL Mantis-EDU"
CONFIG_CDCACM_RXBUFSIZE=600
CONFIG_CDCACM_TXBUFSIZE=12000
CONFIG_CDCACM_VENDORID=0x26ac
CONFIG_CDCACM_VENDORSTR="Advanced Technology Labs"
CONFIG_CLOCK_MONOTONIC=y
CONFIG_DEBUG_FULLOPT=y
CONFIG_DEBUG_HARDFAULT_ALERT=y
CONFIG_DEBUG_SYMBOLS=y
CONFIG_DEFAULT_SMALL=y
CONFIG_DEV_FIFO_SIZE=0
CONFIG_DEV_PIPE_MAXSIZE=1024
CONFIG_DEV_PIPE_SIZE=70
CONFIG_DISABLE_MQUEUE=y
CONFIG_FAT_DMAMEMORY=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_FATTIME=y
CONFIG_FS_PROCFS=y
CONFIG_FS_PROCFS_INCLUDE_PROGMEM=y
CONFIG_FS_PROCFS_MAX_TASKS=64
CONFIG_FS_PROCFS_REGISTER=y
CONFIG_FS_ROMFS=y
CONFIG_GRAN=y
CONFIG_GRAN_INTR=y
CONFIG_HAVE_CXX=y
CONFIG_HAVE_CXXINITIALIZE=y
CONFIG_I2C=y
CONFIG_I2C_RESET=y
CONFIG_IDLETHREAD_STACKSIZE=750
CONFIG_LIBC_FLOATINGPOINT=y
CONFIG_LIBC_LONG_LONG=y
CONFIG_LIBC_STRERROR=y
CONFIG_MEMSET_64BIT=y
CONFIG_MEMSET_OPTSPEED=y
CONFIG_MMCSD=y
CONFIG_MMCSD_SDIO=y
CONFIG_MMCSD_SDIOWAIT_WRCOMPLETE=y
CONFIG_MM_REGIONS=3
CONFIG_MTD=y
CONFIG_MTD_BYTE_WRITE=y
CONFIG_MTD_PARTITION=y
CONFIG_MTD_RAMTRON=y
CONFIG_NAME_MAX=40
CONFIG_NSH_ARCHINIT=y
CONFIG_NSH_ARCHROMFS=y
CONFIG_NSH_ARGCAT=y
CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_CMDPARMS=y
CONFIG_NSH_CROMFSETC=y
CONFIG_NSH_DISABLE_IFCONFIG=y
CONFIG_NSH_DISABLE_IFUPDOWN=y
CONFIG_NSH_DISABLE_TELNETD=y
CONFIG_NSH_LINELEN=128
CONFIG_NSH_MAXARGUMENTS=15
CONFIG_NSH_NESTDEPTH=8
CONFIG_NSH_QUOTE=y
CONFIG_NSH_ROMFSETC=y
CONFIG_NSH_ROMFSSECTSIZE=128
CONFIG_NSH_STRERROR=y
CONFIG_NSH_VARS=y
CONFIG_OTG_ID_GPIO_DISABLE=y
CONFIG_PIPES=y
CONFIG_PREALLOC_TIMERS=50
CONFIG_PRIORITY_INHERITANCE=y
CONFIG_PTHREAD_MUTEX_ROBUST=y
CONFIG_PTHREAD_STACK_MIN=512
CONFIG_RAMTRON_SETSPEED=y
CONFIG_RAMTRON_WRITEWAIT=y
CONFIG_RAM_SIZE=245760
CONFIG_RAM_START=0x20010000
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_SDMMC1_SDIO_MODE=y
CONFIG_SDMMC1_SDIO_PULLUP=y
CONFIG_SEM_NNESTPRIO=8
CONFIG_SEM_PREALLOCHOLDERS=0
CONFIG_SERIAL_IFLOWCONTROL_WATERMARKS=y
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=256
CONFIG_STM32F7_ADC1=y
CONFIG_STM32F7_BBSRAM=y
CONFIG_STM32F7_BBSRAM_FILES=5
CONFIG_STM32F7_BKPSRAM=y
CONFIG_STM32F7_DMA1=y
CONFIG_STM32F7_DMA2=y
CONFIG_STM32F7_DMACAPABLE=y
CONFIG_STM32F7_FLOWCONTROL_BROKEN=y
CONFIG_STM32F7_I2C2=y
CONFIG_STM32F7_I2C4=y
CONFIG_STM32F7_I2C_DYNTIMEO=y
CONFIG_STM32F7_I2C_DYNTIMEO_STARTSTOP=10
CONFIG_STM32F7_OTGFS=y
CONFIG_STM32F7_PROGMEM=y
CONFIG_STM32F7_PWR=y
CONFIG_STM32F7_RTC=y
CONFIG_STM32F7_RTC_AUTO_LSECLOCK_START_DRV_CAPABILITY=y
CONFIG_STM32F7_RTC_MAGIC_REG=1
CONFIG_STM32F7_SAVE_CRASHDUMP=y
CONFIG_STM32F7_SDMMC1=y
CONFIG_STM32F7_SDMMC_DMA=y
CONFIG_STM32F7_SERIALBRK_BSDCOMPAT=y
CONFIG_STM32F7_SERIAL_DISABLE_REORDERING=y
CONFIG_STM32F7_SPI1=y
CONFIG_STM32F7_SPI1_DMA=y
CONFIG_STM32F7_SPI1_DMA_BUFFER=1024
CONFIG_STM32F7_SPI4=y
CONFIG_STM32F7_SPI_DMA=y
CONFIG_STM32F7_SPI_DMATHRESHOLD=8
CONFIG_STM32F7_TIM10=y
CONFIG_STM32F7_TIM11=y
CONFIG_STM32F7_TIM3=y
CONFIG_STM32F7_UART4=y
CONFIG_STM32F7_UART5=y
CONFIG_STM32F7_UART7=y
CONFIG_STM32F7_UART8=y
CONFIG_STM32F7_USART1=y
CONFIG_STM32F7_USART2=y
CONFIG_STM32F7_USART3=y
CONFIG_STM32F7_USART6=y
CONFIG_STM32F7_USART_BREAKS=y
CONFIG_STM32F7_USART_INVERT=y
CONFIG_STM32F7_USART_SINGLEWIRE=y
CONFIG_STM32F7_USART_SWAP=y
CONFIG_STM32F7_WWDG=y
CONFIG_SYSTEM_CDCACM=y
CONFIG_SYSTEM_NSH=y
CONFIG_TASK_NAME_SIZE=24
CONFIG_UART4_BAUD=57600
CONFIG_UART4_RXBUFSIZE=600
CONFIG_UART4_RXDMA=y
CONFIG_UART4_TXBUFSIZE=1500
CONFIG_UART7_BAUD=57600
CONFIG_UART7_RXBUFSIZE=600
CONFIG_UART7_TXBUFSIZE=1500
CONFIG_UART8_BAUD=57600
CONFIG_UART8_RXBUFSIZE=600
CONFIG_UART8_SERIAL_CONSOLE=y
CONFIG_UART8_TXBUFSIZE=1500
CONFIG_USART1_BAUD=57600
CONFIG_USART1_RXBUFSIZE=600
CONFIG_USART1_TXBUFSIZE=1500
CONFIG_USART2_BAUD=57600
CONFIG_USART2_IFLOWCONTROL=y
CONFIG_USART2_OFLOWCONTROL=y
CONFIG_USART2_RXBUFSIZE=600
CONFIG_USART2_RXDMA=y
CONFIG_USART2_TXBUFSIZE=1500
CONFIG_USART3_BAUD=57600
CONFIG_USART3_IFLOWCONTROL=y
CONFIG_USART3_OFLOWCONTROL=y
CONFIG_USART3_RXBUFSIZE=600
CONFIG_USART3_RXDMA=y
CONFIG_USART3_TXBUFSIZE=3000
CONFIG_USART6_BAUD=57600
CONFIG_USART6_RXBUFSIZE=600
CONFIG_USART6_RXDMA=y
CONFIG_USART6_TXBUFSIZE=1500
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,191 @@
/****************************************************************************
* scripts/script.ld
*
* Copyright (C) 2016 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 STM32F765IIT6 has 2048 KiB of main FLASH memory. This FLASH memory
* can be accessed from either the AXIM interface at address 0x0800:0000 or
* from the ITCM interface at address 0x0020:0000.
*
* Additional information, including the option bytes, is available at at
* FLASH at address 0x1ff0:0000 (AXIM) or 0x0010:0000 (ITCM).
*
* In the STM32F765IIT6, two different boot spaces can be selected through
* the BOOT pin and the boot base address programmed in the BOOT_ADD0 and
* BOOT_ADD1 option bytes:
*
* 1) BOOT=0: Boot address defined by user option byte BOOT_ADD0[15:0].
* ST programmed value: Flash on ITCM at 0x0020:0000
* 2) BOOT=1: Boot address defined by user option byte BOOT_ADD1[15:0].
* ST programmed value: System bootloader at 0x0010:0000
*
* NuttX does not modify these option byes. On the unmodified NUCLEO-144
* board, the BOOT0 pin is at ground so by default, the STM32F765IIT6 will
* boot from address 0x0020:0000 in ITCM FLASH.
*
* The STM32F765IIT6 also has 512 KiB of data SRAM (in addition to ITCM SRAM).
* SRAM is split up into three blocks:
*
* 1) 128 KiB of DTCM SRM beginning at address 0x2000:0000
* 2) 368 KiB of SRAM1 beginning at address 0x2002:0000
* 3) 16 KiB of SRAM2 beginning at address 0x2007:c000
*
* 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.
*
* Bootloader reserves the first 32K bank (2 Mbytes Flash memory single bank)
* organization (256 bits read width)
* The next 2 32K sectors are reserved for parameters.
*/
MEMORY
{
FLASH_ITCM (rx) : ORIGIN = 0x00218000, LENGTH = 1952K
FLASH_AXIM (rx) : ORIGIN = 0x08018000, LENGTH = 1952K
ITCM_RAM (rwx) : ORIGIN = 0x00000000, LENGTH = 16K
DTCM_RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 128K
SRAM1 (rwx) : ORIGIN = 0x20020000, LENGTH = 368K
SRAM2 (rwx) : ORIGIN = 0x2007c000, LENGTH = 16K
}
OUTPUT_ARCH(arm)
EXTERN(_vectors)
ENTRY(_stext)
/*
* Ensure that abort() is present in the final object. The exception handling
* code pulled in by libgcc.a requires it (and that code cannot be easily avoided).
*/
EXTERN(abort)
EXTERN(_bootdelay_signature)
EXTERN(_main_toc)
SECTIONS
{
.text : {
_stext = ABSOLUTE(.);
*(.vectors)
. = ALIGN(32);
/*
This signature provides the bootloader with a way to delay booting
*/
_bootdelay_signature = ABSOLUTE(.);
FILL(0xffecc2925d7d05c5)
. += 8;
*(.main_toc)
*(.text .text.*)
*(.fixup)
*(.gnu.warning)
*(.rodata .rodata.*)
*(.gnu.linkonce.t.*)
*(.glue_7)
*(.glue_7t)
*(.got)
*(.gcc_except_table)
*(.gnu.linkonce.r.*)
_etext = ABSOLUTE(.);
} > FLASH_AXIM
/*
* Init functions (static constructors and the like)
*/
.init_section : {
_sinit = ABSOLUTE(.);
KEEP(*(.init_array .init_array.*))
_einit = ABSOLUTE(.);
} > FLASH_AXIM
.ARM.extab : {
*(.ARM.extab*)
} > FLASH_AXIM
__exidx_start = ABSOLUTE(.);
.ARM.exidx : {
*(.ARM.exidx*)
} > FLASH_AXIM
__exidx_end = ABSOLUTE(.);
_eronly = ABSOLUTE(.);
.data : {
_sdata = ABSOLUTE(.);
*(.data .data.*)
*(.gnu.linkonce.d.*)
CONSTRUCTORS
_edata = ABSOLUTE(.);
} > SRAM1 AT > FLASH_AXIM
.bss : {
_sbss = ABSOLUTE(.);
*(.bss .bss.*)
*(.gnu.linkonce.b.*)
*(COMMON)
. = ALIGN(4);
_ebss = ABSOLUTE(.);
} > SRAM1
/* 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) }
.ramfunc : {
_sramfuncs = .;
*(.ramfunc .ramfunc.*)
. = ALIGN(4);
_eramfuncs = .;
} > ITCM_RAM AT > FLASH_AXIM
_framfuncs = LOADADDR(.ramfunc);
/* Start of the image signature. This
* has to be in the end of the image
*/
.signature : {
_boot_signature = ALIGN(4);
} > FLASH_AXIM
}
+54
View File
@@ -0,0 +1,54 @@
############################################################################
#
# 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.
#
############################################################################
add_library(drivers_board
i2c.cpp
init.c
led.c
sdio.c
spi.cpp
timer_config.cpp
usb.c
pwr.c
)
add_dependencies(drivers_board arch_board_hw_info)
target_link_libraries(drivers_board
PRIVATE
arch_board_hw_info
arch_spi
drivers__led # drv_led_start
nuttx_arch # sdio
nuttx_drivers # sdio
px4_layer
)
+226
View File
@@ -0,0 +1,226 @@
/****************************************************************************
*
* 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.
*
****************************************************************************/
/**
* @file board_config.h
*
* PX4FMU-v5 internal definitions
*/
#pragma once
/****************************************************************************************************
* Included Files
****************************************************************************************************/
#include <px4_platform_common/px4_config.h>
#include <nuttx/compiler.h>
#include <stdint.h>
#include <stm32_gpio.h>
/* LEDs are driven with push open drain to support Anode to 5V or 3.3V */
#define GPIO_nLED_RED /* PB1 */ (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN1)
#define GPIO_nLED_GREEN /* PC6 */ (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTC|GPIO_PIN6)
#define GPIO_nLED_BLUE /* PC7 */ (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTC|GPIO_PIN7)
#define BOARD_HAS_CONTROL_STATUS_LEDS 1
#define BOARD_OVERLOAD_LED LED_RED
#define BOARD_ARMED_STATE_LED LED_BLUE
#define FLASH_BASED_PARAMS
/*
* 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
*/
/* ADC defines to be used in sensors.cpp to read from a particular channel */
#define ADC1_CH(n) (n)
#define ADC1_GPIO(n) GPIO_ADC1_IN##n
/* Define GPIO pins used as ADC N.B. Channel numbers must match below */
#define PX4_ADC_GPIO \
/* PA0 */ ADC1_GPIO(0), \
/* PC0 */ ADC1_GPIO(10), \
/* PC1 */ ADC1_GPIO(11), \
/* PC2 */ ADC1_GPIO(12), \
/* PC3 */ ADC1_GPIO(13), \
/* PC4 */ ADC1_GPIO(14)
/* Define Channel numbers must match above GPIO pin IN(n)*/
#define ADC_BATTERY_VOLTAGE_CHANNEL /* PA0 */ ADC1_CH(0)
#define ADC_BATTERY_CURRENT_CHANNEL 0
#define ADC_SCALED_V5_CHANNEL /* PC0 */ ADC1_CH(10)
#define ADC_SCALED_VDD_3V3_SENSORS_CHANNEL /* PC1 */ ADC1_CH(11)
#define ADC_HW_VER_SENSE_CHANNEL /* PC2 */ ADC1_CH(12)
#define ADC_HW_REV_SENSE_CHANNEL /* PC3 */ ADC1_CH(13)
#define ADC1_SPARE_1_CHANNEL /* PC4 */ ADC1_CH(14) // POWER_AD
#define ADC_CHANNELS \
((1 << ADC_BATTERY_VOLTAGE_CHANNEL) | \
(1 << ADC_SCALED_V5_CHANNEL) | \
(1 << ADC_SCALED_VDD_3V3_SENSORS_CHANNEL) | \
(1 << ADC_HW_VER_SENSE_CHANNEL) | \
(1 << ADC_HW_REV_SENSE_CHANNEL) | \
(1 << ADC1_SPARE_1_CHANNEL))
/* Define Battery 1 Voltage Divider and A per V */
#define BOARD_BATTERY1_V_DIV (9.0f) /* measured with the provided PM board */
/* HW has to large of R termination on ADC todo:change when HW value is chosen */
#define BOARD_ADC_OPEN_CIRCUIT_V (5.6f)
/* HW Version and Revision drive signals Default to 1 to detect */
#define BOARD_HAS_HW_VERSIONING
#define GPIO_HW_REV_DRIVE /* PH14 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTH|GPIO_PIN14)
#define GPIO_HW_REV_SENSE /* PC3 */ ADC1_GPIO(13)
#define GPIO_HW_VER_DRIVE /* PG0 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTG|GPIO_PIN0)
#define GPIO_HW_VER_SENSE /* PC2 */ ADC1_GPIO(12)
#define HW_INFO_INIT {'V','5','x', 'x',0}
#define HW_INFO_INIT_VER 2
#define HW_INFO_INIT_REV 3
#define BOARD_TAP_ESC_MODE 2 // select closed-loop control mode for the esc
// #define BOARD_USE_ESC_CURRENT_REPORT
// LED mapping
#define BOARD_FRONT_LED_MASK (1 << 0) | (1 << 3)
#define BOARD_REAR_LED_MASK (1 << 1) | (1 << 2)
/* HEATER */
#define GPIO_HEATER_OUTPUT /* PA7 T14CH1 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTA|GPIO_PIN7)
#define BOARD_HAS_LED_PWM 1
#define BOARD_LED_PWM_DRIVE_ACTIVE_LOW 1
#define BOARD_UI_LED_PWM_DRIVE_ACTIVE_LOW 1
#define BOARD_ADC_BRICK_VALID 1
#define BOARD_NUMBER_BRICKS 1
#define GPIO_VDD_3V3_SD_CARD_EN /* PG7 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTG|GPIO_PIN7)
#define VDD_3V3_SD_CARD_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SD_CARD_EN, (on_true))
/* USB OTG FS */
#define GPIO_OTGFS_VBUS /* PA9 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_SPEED_100MHz|GPIO_PORTA|GPIO_PIN9)
/* High-resolution timer */
#define HRT_TIMER 8 /* use timer8 for the HRT */
#define HRT_TIMER_CHANNEL 3 /* use capture/compare channel 3 */
/* RC Serial port */
#define RC_SERIAL_PORT "/dev/ttyS5"
#define RC_SERIAL_SINGLEWIRE
#define BOARD_HAS_POWER_CONTROL 1
/* power on/off */
#define MS_PWR_BUTTON_DOWN 1500
#define KEY_AD_GPIO (GPIO_INPUT|GPIO_PULLUP|GPIO_EXTI|GPIO_PORTC|GPIO_PIN4)
#define POWER_ON_GPIO (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTC|GPIO_PIN5)
#define POWER_OFF_GPIO (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTC|GPIO_PIN5)
#define POWER_CHECK_GPIO (GPIO_INPUT|GPIO_PULLUP|GPIO_PORTF|GPIO_PIN0)
#define SDIO_SLOTNO 0 /* Only one slot */
#define SDIO_MINOR 0
/* By Providing BOARD_ADC_USB_CONNECTED (using the px4_arch abstraction)
* this board support the ADC system_power interface, and therefore
* provides the true logic GPIO BOARD_ADC_xxxx macros.
*/
#define BOARD_ADC_USB_CONNECTED (px4_arch_gpioread(GPIO_OTGFS_VBUS))
#define BOARD_ADC_USB_VALID BOARD_ADC_USB_CONNECTED
/* FMUv5 never powers odd the Servo rail */
#define BOARD_ADC_SERVO_VALID (1)
#define BOARD_ADC_BRICK1_VALID (!px4_arch_gpioread(GPIO_nVDD_BRICK1_VALID))
#define BOARD_ADC_BRICK2_VALID (0)
/* This board provides a DMA pool and APIs */
#define BOARD_DMA_ALLOC_POOL_SIZE 5120
/* This board provides the board_on_reset interface */
#define BOARD_HAS_ON_RESET 1
#define BOARD_HAS_POWER_CONTROL 1
#define GPIO_CAM_PWR_ON_H /* PB0 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN0)
#define GPIO_CAM_PWR_ON_L /* PB0 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN0)
#define PX4_GPIO_INIT_LIST { \
PX4_ADC_GPIO, \
GPIO_HW_REV_DRIVE, \
GPIO_HW_VER_DRIVE, \
GPIO_HEATER_OUTPUT, \
GPIO_VDD_3V3_SD_CARD_EN, \
GPIO_OTGFS_VBUS \
}
#define BOARD_ENABLE_CONSOLE_BUFFER
#define BOARD_NUM_IO_TIMERS 1
__BEGIN_DECLS
#ifndef __ASSEMBLY__
int stm32_sdio_initialize(void);
extern void stm32_spiinitialize(void);
extern void stm32_usbinitialize(void);
extern void board_peripheral_reset(int ms);
/************************************************************************************
* Name: board_pwr_init()
*
* Description:
* Called to configure power control for the tap-v2 board.
*
* Input Parameters:
* stage- 0 for boot, 1 for board init
*
************************************************************************************/
void board_pwr_init(int stage);
#include <px4_platform_common/board_common.h>
#endif /* __ASSEMBLY__ */
__END_DECLS
+39
View File
@@ -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] = {
initI2CBusInternal(2),
initI2CBusInternal(4),
};
+283
View File
@@ -0,0 +1,283 @@
/****************************************************************************
*
* Copyright (c) 2012-2019 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name PX4 nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/**
* @file init.c
*
* PX4FMU-specific early startup code. This file implements the
* board_app_initializ() 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 initialisation.
*/
/****************************************************************************
* Included Files
****************************************************************************/
#include "board_config.h"
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <debug.h>
#include <errno.h>
#include <nuttx/config.h>
#include <nuttx/board.h>
#include <nuttx/spi/spi.h>
#include <nuttx/sdio.h>
#include <nuttx/mmcsd.h>
#include <nuttx/analog/adc.h>
#include <nuttx/mm/gran.h>
#include <chip.h>
#include <stm32_uart.h>
#include <arch/board/board.h>
#include "arm_internal.h"
#include <px4_arch/io_timer.h>
#include <drivers/drv_hrt.h>
#include <drivers/drv_board_led.h>
#include <systemlib/px4_macros.h>
#include <px4_platform_common/init.h>
#include <px4_platform/gpio.h>
#include <px4_platform/board_determine_hw_info.h>
#include <px4_platform/board_dma_alloc.h>
# if defined(FLASH_BASED_PARAMS)
# include <parameters/flashparams/flashfs.h>
#endif
/****************************************************************************
* Pre-Processor Definitions
****************************************************************************/
#define _GPIO_PULL_DOWN_INPUT(def) (((def) & (GPIO_PORT_MASK | GPIO_PIN_MASK)) | (GPIO_INPUT|GPIO_PULLDOWN|GPIO_SPEED_2MHz))
/* Configuration ************************************************************/
/*
* 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
/***************cam_pwr_on_pulse*****************************************************
* Name: cam_pwr_on_pulse()
*
* Description:
* Camera power is controlled by flight control, send a risingedge pulse to enable it
*
*
* Input Parameters:
* Not used
*
************************************************************************************/
static void cam_pwr_on_pulse(void)
{
static bool pwr_on_flag = false;
if (pwr_on_flag == false) {
up_mdelay(700);
stm32_configgpio(GPIO_CAM_PWR_ON_H);
up_mdelay(20);
stm32_configgpio(GPIO_CAM_PWR_ON_L);
pwr_on_flag = true;
}
}
/************************************************************************************
* Name: board_peripheral_reset
*
* Description:
*
************************************************************************************/
__EXPORT void board_peripheral_reset(int ms)
{
}
/************************************************************************************
* Name: board_on_reset
*
* Description:
* Optionally provided function called on entry to board_system_reset
* It should perform any house keeping prior to the rest.
*
* status - 1 if resetting to boot loader
* 0 if just resetting
*
************************************************************************************/
__EXPORT void board_on_reset(int status)
{
}
/************************************************************************************
* Name: stm32_boardinitialize
*
* Description:
* All STM32 architectures must provide the following entry point. This entry point
* is called early in the initialization -- after all memory has been configured
* and mapped but before any devices have been initialized.
*
************************************************************************************/
__EXPORT void stm32_boardinitialize(void)
{
/* Hold power state */
board_pwr_init(0);
/* configure pins */
const uint32_t gpio[] = PX4_GPIO_INIT_LIST;
px4_gpio_init(gpio, arraySize(gpio));
board_control_spi_sensors_power_configgpio();
}
/****************************************************************************
* Name: board_app_initialize
*
* Description:
* Perform application specific initialization. This function is never
* called directly from application code, but only indirectly via the
* (non-standard) boardctl() interface using the command BOARDIOC_INIT.
*
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/
__EXPORT int board_app_initialize(uintptr_t arg)
{
/* Power on Interfaces */
VDD_3V3_SD_CARD_EN(true);
/* Need hrt running before using the ADC */
px4_platform_init();
if (OK == board_determine_hw_info()) {
syslog(LOG_INFO, "[boot] Rev 0x%1x : Ver 0x%1x %s\n", board_get_hw_revision(), board_get_hw_version(),
board_get_hw_type_name());
} else {
syslog(LOG_ERR, "[boot] Failed to read HW revision and version\n");
}
/* configure SPI interfaces (after we determined the HW version) */
stm32_spiinitialize();
/* configure the DMA allocator */
if (board_dma_alloc_init() < 0) {
syslog(LOG_ERR, "[boot] DMA alloc FAILED\n");
}
#if defined(SERIAL_HAVE_RXDMA)
/* set up the serial DMA polling */
static struct hrt_call serial_dma_call;
/*
* Poll at 1ms intervals for received bytes that have not triggered
* a DMA event.
*/
struct timespec ts;
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);
#endif
board_pwr_init(1);
/* initial LED state */
drv_led_start();
led_off(LED_RED);
led_on(LED_GREEN); // Indicate Power.
led_off(LED_BLUE);
if (board_hardfault_init(2, true) != 0) {
led_on(LED_RED);
}
#if defined(CONFIG_MMCSD)
int ret = stm32_sdio_initialize();
if (ret != OK) {
led_on(LED_RED);
return ret;
}
#endif /* CONFIG_MMCSD */
/* Camera power is controlled by flight control, send a risingedge pulse to enable it */
cam_pwr_on_pulse();
#if defined(FLASH_BASED_PARAMS)
static sector_descriptor_t params_sector_map[] = {
{1, 32 * 1024, 0x08008000},
{2, 32 * 1024, 0x08010000},
{0, 0, 0},
};
/* Initialize the flashfs layer to use heap allocated memory */
int result = parameter_flashfs_init(params_sector_map, NULL, 0);
if (result != OK) {
syslog(LOG_ERR, "[boot] FAILED to init params in FLASH %d\n", result);
led_on(LED_AMBER);
return result;
}
#endif /* FLASH_BASED_PARAMS */
return OK;
}
+104
View File
@@ -0,0 +1,104 @@
/****************************************************************************
*
* 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 led.c
*
* PX4FMU LED backend.
*/
#include <px4_platform_common/px4_config.h>
#include <stdbool.h>
#include "chip.h"
#include "stm32_gpio.h"
#include "board_config.h"
#include <nuttx/board.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
#define xlat(p) (p)
static uint32_t g_ledmap[] = {
GPIO_nLED_BLUE, // Indexed by LED_BLUE
GPIO_nLED_RED, // Indexed by LED_RED, LED_AMBER
GPIO_nLED_GREEN, // Indexed by LED_GREEN
};
__EXPORT void led_init(void)
{
for (size_t l = 0; l < (sizeof(g_ledmap) / sizeof(g_ledmap[0])); l++) {
stm32_configgpio(g_ledmap[l]);
}
}
static void phy_set_led(int led, bool state)
{
/* Drive Low to switch on */
stm32_gpiowrite(g_ledmap[led], !state);
}
static bool phy_get_led(int led)
{
/* If Low it is on */
return !stm32_gpioread(g_ledmap[led]);
}
__EXPORT void led_on(int led)
{
phy_set_led(xlat(led), true);
}
__EXPORT void led_off(int led)
{
phy_set_led(xlat(led), false);
}
__EXPORT void led_toggle(int led)
{
phy_set_led(xlat(led), !phy_get_led(xlat(led)));
}
+177
View File
@@ -0,0 +1,177 @@
/****************************************************************************
*
* Copyright (c) 2016 PX4 Development Team. All rights reserved.
* Author: David Sidrane <david_s5@nscdg.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name PX4 nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/**
* @file pwr.c
*
* Board-specific power button functions.
*/
/************************************************************************************
* Included Files
************************************************************************************/
#include <px4_platform_common/px4_config.h>
#include <stdint.h>
#include <stdbool.h>
#include <time.h>
#include <debug.h>
#include <arch/board/board.h>
#include <nuttx/arch.h>
#include <uORB/uORB.h>
#include <uORB/topics/led_control.h>
#include <uORB/topics/tune_control.h>
#include <arm_arch.h>
#include "board_config.h"
#include <stm32_pwr.h>
extern void led_on(int led);
extern void led_off(int led);
static struct timespec time_down;
static int default_power_button_state_notification(board_power_button_state_notification_e request)
{
// syslog(0,"%d\n", request);
return PWR_BUTTON_RESPONSE_SHUT_DOWN_NOW;
}
static power_button_state_notification_t power_state_notification = default_power_button_state_notification;
/****************************************************************************
* Name: board_pwr_button_down
*
* Description:
* Called to Read the logical state of the active low power button.
*
****************************************************************************/
static bool board_pwr_button_down(void)
{
return 0 == stm32_gpioread(KEY_AD_GPIO);
}
int board_register_power_state_notification_cb(power_button_state_notification_t cb)
{
power_state_notification = cb;
if (board_pwr_button_down() && (time_down.tv_nsec != 0 || time_down.tv_sec != 0)) {
// make sure we don't miss the first event
power_state_notification(PWR_BUTTON_DOWN);
}
return OK;
}
int board_power_off(int status)
{
led_on(BOARD_LED_BLUE);
// disable the interrups
px4_enter_critical_section();
stm32_configgpio(POWER_OFF_GPIO);
while (1);
return 0;
}
static int board_button_irq(int irq, FAR void *context, FAR void *args)
{
if (board_pwr_button_down()) {
led_on(BOARD_LED_RED);
clock_gettime(CLOCK_REALTIME, &time_down);
power_state_notification(PWR_BUTTON_DOWN);
} else {
power_state_notification(PWR_BUTTON_UP);
led_off(BOARD_LED_RED);
struct timespec now;
clock_gettime(CLOCK_REALTIME, &now);
uint64_t tdown_ms = time_down.tv_sec * 1000 + time_down.tv_nsec / 1000000;
uint64_t tnow_ms = now.tv_sec * 1000 + now.tv_nsec / 1000000;
if (tdown_ms != 0 && (tnow_ms - tdown_ms) >= MS_PWR_BUTTON_DOWN) {
led_on(BOARD_LED_BLUE);
if (power_state_notification(PWR_BUTTON_REQUEST_SHUT_DOWN) == PWR_BUTTON_RESPONSE_SHUT_DOWN_NOW) {
up_mdelay(200);
board_power_off(0);
}
} else {
power_state_notification(PWR_BUTTON_IDEL);
}
}
return OK;
}
/************************************************************************************
* Name: board_pwr_init()
*
* Description:
* Called to configure power control
*
* Input Parameters:
* stage- 0 for boot, 1 for board init
*
************************************************************************************/
void board_pwr_init(int stage)
{
if (stage == 0) {
stm32_configgpio(POWER_ON_GPIO);
stm32_configgpio(KEY_AD_GPIO);
stm32_configgpio(POWER_CHECK_GPIO);
}
if (stage == 1) {
stm32_gpiosetevent(KEY_AD_GPIO, true, true, true, board_button_irq, NULL);
}
}
+177
View File
@@ -0,0 +1,177 @@
/****************************************************************************
*
* Copyright (C) 2014, 2016 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.
*
****************************************************************************/
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <board_config.h>
#include <stdbool.h>
#include <stdio.h>
#include <debug.h>
#include <errno.h>
#include <nuttx/sdio.h>
#include <nuttx/mmcsd.h>
#include "chip.h"
#include "board_config.h"
#include "stm32_gpio.h"
#include "stm32_sdmmc.h"
#ifdef CONFIG_MMCSD
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* Card detections requires card support and a card detection GPIO */
#define HAVE_NCD 1
#if !defined(GPIO_SDMMC1_NCD)
# undef HAVE_NCD
#endif
/****************************************************************************
* Private Data
****************************************************************************/
static FAR struct sdio_dev_s *sdio_dev;
#ifdef HAVE_NCD
static bool g_sd_inserted = 0xff; /* Impossible value */
#endif
/****************************************************************************
* Private Functions
****************************************************************************/
/****************************************************************************
* Name: stm32_ncd_interrupt
*
* Description:
* Card detect interrupt handler.
*
****************************************************************************/
#ifdef HAVE_NCD
static int stm32_ncd_interrupt(int irq, FAR void *context)
{
bool present;
present = !stm32_gpioread(GPIO_SDMMC1_NCD);
if (sdio_dev && present != g_sd_inserted) {
sdio_mediachange(sdio_dev, present);
g_sd_inserted = present;
}
return OK;
}
#endif
/****************************************************************************
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: stm32_sdio_initialize
*
* Description:
* Initialize SDIO-based MMC/SD card support
*
****************************************************************************/
int stm32_sdio_initialize(void)
{
int ret;
#ifdef HAVE_NCD
/* Card detect */
bool cd_status;
/* Configure the card detect GPIO */
stm32_configgpio(GPIO_SDMMC1_NCD);
/* Register an interrupt handler for the card detect pin */
stm32_gpiosetevent(GPIO_SDMMC1_NCD, true, true, true, stm32_ncd_interrupt);
#endif
/* Mount the SDIO-based MMC/SD block driver */
/* First, get an instance of the SDIO interface */
finfo("Initializing SDIO slot %d\n", SDIO_SLOTNO);
sdio_dev = sdio_initialize(SDIO_SLOTNO);
if (!sdio_dev) {
syslog(LOG_ERR, "[boot] Failed to initialize SDIO slot %d\n", SDIO_SLOTNO);
return -ENODEV;
}
/* Now bind the SDIO interface to the MMC/SD driver */
finfo("Bind SDIO to the MMC/SD driver, minor=%d\n", SDIO_MINOR);
ret = mmcsd_slotinitialize(SDIO_MINOR, sdio_dev);
if (ret != OK) {
syslog(LOG_ERR, "[boot] Failed to bind SDIO to the MMC/SD driver: %d\n", ret);
return ret;
}
finfo("Successfully bound SDIO to the MMC/SD driver\n");
#ifdef HAVE_NCD
/* Use SD card detect pin to check if a card is g_sd_inserted */
cd_status = !stm32_gpioread(GPIO_SDMMC1_NCD);
finfo("Card detect : %d\n", cd_status);
sdio_mediachange(sdio_dev, cd_status);
#else
/* Assume that the SD card is inserted. What choice do we have? */
sdio_mediachange(sdio_dev, true);
#endif
return OK;
}
#endif /* CONFIG_MMCSD */
+47
View File
@@ -0,0 +1,47 @@
/****************************************************************************
*
* 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.
*
****************************************************************************/
#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_IMU_DEVTYPE_ICM20602, SPI::CS{GPIO::PortF, GPIO::Pin3}),
}),
initSPIBus(SPI::Bus::SPI4, {
initSPIDevice(DRV_DEVTYPE_UNUSED, SPI::CS{GPIO::PortF, GPIO::Pin10}),
}),
};
static constexpr bool unused = validateSPIConfig(px4_spi_buses);
@@ -0,0 +1,93 @@
/****************************************************************************
*
* 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.
*
****************************************************************************/
#include <px4_arch/io_timer_hw_description.h>
constexpr io_timers_t led_pwm_timers[MAX_LED_TIMERS] = {
# if defined(BOARD_HAS_LED_PWM) && !defined(BOARD_HAS_CONTROL_STATUS_LEDS)
initIOTimer(Timer::Timer3),
# endif
};
/* Support driving active low (preferred) or active high LED
* on both the onboard status LEDs or the [n]UI_LED_<color>[_EXTERNAL]
*
* Use open drain to drive the LED. This will ensure that
* if the LED has a 5 Volt supply that the LED will be
* off when high.
*/
#define CCER_C1_NUM_BITS 4
#define ACTIVE_LOW(c) (GTIM_CCER_CC1P << (((c)-1) * CCER_C1_NUM_BITS))
#define ACTIVE_HIGH(c) 0
#if defined(BOARD_LED_PWM_DRIVE_ACTIVE_LOW)
# define POLARITY(c) ACTIVE_LOW(c)
# define DRIVE_TYPE(p) ((p)|GPIO_OPENDRAIN)
#else
# define POLARITY(c) ACTIVE_HIGH((c))
# define DRIVE_TYPE(p) (p)
#endif
#if defined(BOARD_UI_LED_PWM_DRIVE_ACTIVE_LOW)
# define UI_POLARITY(c) ACTIVE_LOW(c)
# define UI_DRIVE_TYPE(p) ((p)|GPIO_OPENDRAIN)
#else
# define UI_POLARITY(c) ACTIVE_HIGH((c))
# define UI_DRIVE_TYPE(p) (p)
#endif
static inline constexpr timer_io_channels_t initIOTimerChannelUILED(const io_timers_t io_timers_conf[MAX_LED_TIMERS],
Timer::TimerChannel timer, GPIO::GPIOPin pin, int ui_polarity)
{
timer_io_channels_t ret = initIOTimerChannel(io_timers_conf, timer, pin);
ret.gpio_out = UI_DRIVE_TYPE(ret.gpio_out);
ret.masks = UI_POLARITY(ui_polarity);
return ret;
}
static inline constexpr timer_io_channels_t initIOTimerChannelControlLED(const io_timers_t
io_timers_conf[MAX_LED_TIMERS], Timer::TimerChannel timer, GPIO::GPIOPin pin, int polarity)
{
timer_io_channels_t ret = initIOTimerChannel(io_timers_conf, timer, pin);
ret.gpio_out = DRIVE_TYPE(ret.gpio_out);
ret.masks = POLARITY(polarity);
return ret;
}
constexpr timer_io_channels_t led_pwm_channels[MAX_TIMER_LED_CHANNELS] = {
# if defined(BOARD_HAS_LED_PWM) && !defined(BOARD_HAS_CONTROL_STATUS_LEDS)
initIOTimerChannelControlLED(led_pwm_timers, {Timer::Timer3, Timer::Channel4}, {GPIO::PortB, GPIO::Pin1}, 4),
initIOTimerChannelControlLED(led_pwm_timers, {Timer::Timer3, Timer::Channel1}, {GPIO::PortC, GPIO::Pin6}, 1),
initIOTimerChannelControlLED(led_pwm_timers, {Timer::Timer3, Timer::Channel2}, {GPIO::PortC, GPIO::Pin7}, 2),
# endif
};
+60
View File
@@ -0,0 +1,60 @@
/****************************************************************************
*
* Copyright (C) 2021 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name PX4 nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/**
* @file usb.c
*
* Board-specific USB functions.
*/
#include "board_config.h"
#include <nuttx/usb/usbdev.h>
#include <nuttx/usb/usbdev_trace.h>
#include <stm32_otg.h>
#include <debug.h>
#include <syslog.h>
/************************************************************************************
* 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);
}
-3
View File
@@ -1,9 +1,6 @@
px4_add_board(
PLATFORM nuttx
VENDOR av
MODEL x-v1
LABEL default
TOOLCHAIN arm-none-eabi
ARCHITECTURE cortex-m7
ROMFSROOT px4fmu_common
+1 -7
View File
@@ -91,7 +91,7 @@ CONFIG_IOB_NBUFFERS=24
CONFIG_IOB_THROTTLE=0
CONFIG_LIBC_LONG_LONG=y
CONFIG_LIBC_STRERROR=y
CONFIG_MAX_TASKS=64
CONFIG_FS_PROCFS_MAX_TASKS=64
CONFIG_MEMSET_64BIT=y
CONFIG_MEMSET_OPTSPEED=y
CONFIG_MMCSD=y
@@ -115,7 +115,6 @@ CONFIG_NET_ARP_SEND=y
CONFIG_NET_BROADCAST=y
CONFIG_NET_ICMP=y
CONFIG_NET_ICMP_SOCKET=y
CONFIG_NET_SOCKOPTS=y
CONFIG_NET_SOLINGER=y
CONFIG_NET_TCP=y
CONFIG_NET_TCPBACKLOG=y
@@ -123,16 +122,12 @@ CONFIG_NET_TCP_WRITE_BUFFERS=y
CONFIG_NET_UDP=y
CONFIG_NET_UDP_CHECKSUMS=y
CONFIG_NET_UDP_WRITE_BUFFERS=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_MB=y
CONFIG_NSH_DISABLE_MH=y
CONFIG_NSH_DISABLE_MW=y
CONFIG_NSH_LINELEN=128
CONFIG_NSH_MAXARGUMENTS=15
CONFIG_NSH_NESTDEPTH=8
@@ -143,7 +138,6 @@ CONFIG_NSH_STRERROR=y
CONFIG_NSH_TELNET=y
CONFIG_NSH_TELNET_LOGIN=y
CONFIG_NSH_VARS=y
CONFIG_OTG_ID_GPIO_DISABLE=y
CONFIG_PIPES=y
CONFIG_PREALLOC_TIMERS=50
CONFIG_PRIORITY_INHERITANCE=y
-3
View File
@@ -5,9 +5,6 @@ add_definitions(
)
px4_add_board(
VENDOR beaglebone
MODEL blue
LABEL default
PLATFORM posix
ARCHITECTURE cortex-a8
ROMFSROOT px4fmu_common
-2
View File
@@ -3,8 +3,6 @@ add_compile_options(-Wno-narrowing)
px4_add_board(
PLATFORM nuttx
VENDOR bitcraze
MODEL crazyflie
TOOLCHAIN arm-none-eabi
ARCHITECTURE cortex-m4
CONSTRAINED_MEMORY
@@ -86,7 +86,6 @@ 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
@@ -95,9 +94,6 @@ CONFIG_NSH_CMDPARMS=y
CONFIG_NSH_CROMFSETC=y
CONFIG_NSH_DISABLE_IFCONFIG=y
CONFIG_NSH_DISABLE_IFUPDOWN=y
CONFIG_NSH_DISABLE_MB=y
CONFIG_NSH_DISABLE_MH=y
CONFIG_NSH_DISABLE_MW=y
CONFIG_NSH_DISABLE_TELNETD=y
CONFIG_NSH_FATDEVNO=0
CONFIG_NSH_LINELEN=128
@@ -3,8 +3,6 @@ add_compile_options(-Wno-narrowing)
px4_add_board(
PLATFORM nuttx
VENDOR bitcraze
MODEL crazyflie21
TOOLCHAIN arm-none-eabi
ARCHITECTURE cortex-m4
CONSTRAINED_MEMORY
@@ -84,7 +84,6 @@ 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
@@ -94,9 +93,6 @@ 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_MW=y
CONFIG_NSH_DISABLE_TELNETD=y
CONFIG_NSH_FATDEVNO=0
CONFIG_NSH_LINELEN=128
@@ -2,9 +2,6 @@ include (${CMAKE_CURRENT_LIST_DIR}/uavcan_board_identity)
px4_add_board(
PLATFORM nuttx
VENDOR cuav
MODEL can-gps-v1
LABEL canbootloader
TOOLCHAIN arm-none-eabi
ARCHITECTURE cortex-m4
CONSTRAINED_MEMORY
-38
View File
@@ -1,38 +0,0 @@
include (${CMAKE_CURRENT_LIST_DIR}/uavcan_board_identity)
add_definitions(-DUSE_S_RGB_LED_DMA)
px4_add_board(
PLATFORM nuttx
VENDOR cuav
MODEL can-gps-v1
LABEL debug
TOOLCHAIN arm-none-eabi
ARCHITECTURE cortex-m4
CONSTRAINED_MEMORY
ROMFSROOT cannode
UAVCAN_INTERFACES 1
DRIVERS
barometer/ms5611
bootloaders
gps
lights/neopixel
magnetometer/rm3100
safety_button
tone_alarm
uavcannode
MODULES
load_mon
SYSTEMCMDS
i2cdetect
led_control
param
perf
reboot
top
topic_listener
tune_control
uorb
ver
work_queue
)
-3
View File
@@ -4,9 +4,6 @@ add_definitions(-DUSE_S_RGB_LED_DMA)
px4_add_board(
PLATFORM nuttx
VENDOR cuav
MODEL can-gps-v1
LABEL default
TOOLCHAIN arm-none-eabi
ARCHITECTURE cortex-m4
CONSTRAINED_MEMORY
@@ -36,7 +36,7 @@ CONFIG_LIBC_FLOATINGPOINT=y
CONFIG_LIBC_LONG_LONG=y
CONFIG_LIBC_STRERROR=y
CONFIG_LIB_BOARDCTL=y
CONFIG_MAX_TASKS=0
CONFIG_FS_PROCFS_MAX_TASKS=0
CONFIG_MM_REGIONS=2
CONFIG_NAME_MAX=0
CONFIG_NUNGET_CHARS=0
@@ -70,7 +70,6 @@ CONFIG_MTD_BYTE_WRITE=y
CONFIG_MTD_PARTITION=y
CONFIG_MTD_RAMTRON=y
CONFIG_NAME_MAX=40
CONFIG_NFILE_DESCRIPTORS=12
CONFIG_NSH_ARCHINIT=y
CONFIG_NSH_ARCHROMFS=y
CONFIG_NSH_ARGCAT=y
@@ -79,9 +78,6 @@ CONFIG_NSH_CMDPARMS=y
CONFIG_NSH_CROMFSETC=y
CONFIG_NSH_DISABLE_IFCONFIG=y
CONFIG_NSH_DISABLE_IFUPDOWN=y
CONFIG_NSH_DISABLE_MB=y
CONFIG_NSH_DISABLE_MH=y
CONFIG_NSH_DISABLE_MW=y
CONFIG_NSH_DISABLE_TELNETD=y
CONFIG_NSH_LINELEN=128
CONFIG_NSH_MAXARGUMENTS=15
@@ -140,7 +136,6 @@ CONFIG_STM32_RTC_MAGIC_REG=1
CONFIG_STM32_RTC_MAGIC_TIME_SET=0xfacefeef
CONFIG_STM32_SERIALBRK_BSDCOMPAT=y
CONFIG_STM32_SERIAL_DISABLE_REORDERING=y
CONFIG_STM32_JTAG_SW_ENABLE=y
CONFIG_STM32_SPI1=y
CONFIG_STM32_TIM8=y
CONFIG_STM32_USART1=y

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