Compare commits

...

69 Commits

Author SHA1 Message Date
Jacob Dahl 6a1e609e3c kill of sensor_range_finder abstraction completely 2025-09-24 21:59:34 -08:00
Jacob Dahl 32c1364c27 simplify rotation logic, fix timeout check 2025-09-22 19:52:32 -08:00
Jacob Dahl 771d2ecf52 ecl_info to printf 2025-09-22 19:17:07 -08:00
Jacob Dahl 9833a2d864 add baro to high rate sensors 2025-09-22 19:03:29 -08:00
Jacob Dahl d72685120c move init 2025-09-22 18:57:54 -08:00
Jacob Dahl 349bd6175c remove useless parameter EKF2_RNG_PITCH, remove sensor namespace, continue cleanup 2025-09-22 18:54:03 -08:00
Jacob Dahl 2dd864a87a update comment 2025-09-22 18:22:14 -08:00
Jacob Dahl 613a784ce2 change quality check to time based, refactor and clean up 2025-09-22 18:18:42 -08:00
Jacob Dahl 75f3768be6 add TODO 2025-09-22 17:29:20 -08:00
Jacob Dahl b59e81fbf2 fix comment, use noise as uncertainty 2025-09-22 17:27:47 -08:00
Jacob Dahl e2c40ee4bb revert sim changes 2025-09-22 17:26:42 -08:00
Jacob Dahl 17413fb5c0 remove notes 2025-09-22 17:24:50 -08:00
Jacob Dahl ca3ad3d63d clean up 2025-09-22 17:23:43 -08:00
Jacob Dahl 1e12fe13d4 rename file 2025-09-22 17:06:41 -08:00
Jacob Dahl 9cfb42ec03 add back optical flow terrain fusion 2025-09-22 17:05:23 -08:00
Jacob Dahl 50d3b7e1ff fake measurement while on ground if signal quality is 0 2025-09-22 17:01:25 -08:00
Jacob Dahl 5598581c4e add meeting with ben notes 2025-09-22 16:36:38 -08:00
Jacob Dahl ae39d6831f update gz models submodule 2025-09-22 16:36:37 -08:00
Jacob Dahl ed4d93b9e6 reduce tilt to 10deg, fix tilt check 2025-09-22 16:36:15 -08:00
Jacob Dahl ac0b769feb decouple optical flow tilt from range tilt, always publish baro bias 2025-09-22 16:36:14 -08:00
Jacob Dahl fbb5f220bd update comments 2025-09-22 16:35:02 -08:00
Jacob Dahl 34a643fcda update notes 2025-09-22 16:35:02 -08:00
Jacob Dahl 02eb031ab7 update variable name, fix covariances 2025-09-22 16:35:02 -08:00
Jacob Dahl 5fb3846b50 it builds 2025-09-22 16:35:02 -08:00
Jacob Dahl 878c049215 port over relevant code from other branch 2025-09-22 16:35:01 -08:00
Beat Küng 9670eb69b3 commander: use double literals to avoid implicit conversion
Fixes a CI failure for fuzzing and macos:
https://github.com/PX4/PX4-Autopilot/actions/runs/17906277709/job/50907922642

/__w/PX4-Autopilot/PX4-Autopilot/src/modules/commander/Commander.cpp:471:37: fatal error: implicit conversion increases floating-point precision: 'float' to 'double' [-Wdouble-promotion]
  470 |                         bool ret = send_vehicle_command(vehicle_command_s::VEHICLE_CMD_EXTERNAL_ATTITUDE_ESTIMATE,
      |                                    ~~~~~~~~~~~~~~~~~~~~
  471 |                                                         0.f, 0.f, heading, 0.f, 0.f, 0.f, heading_accuracy);
      |                                                                                      ^~~
1 error generated.
2025-09-22 09:31:26 -07:00
Beat Küng 061f34919e ci: JasonEtco/create-an-issue needs permissions to create issues 2025-09-22 09:31:26 -07:00
Claudio Chies b730acfc76 BOARDS: MISC: remove "auto-generated" for files which are not autogenerated anymore 2025-09-22 15:02:24 +02:00
Claudio Chies d3acee315a BAT: Consolidate the highest feasible number of batteries into just 3 2025-09-22 15:02:24 +02:00
Claudio Chies f90d6c03fc LOG: increase number of loggable batteries to 3 2025-09-22 15:02:24 +02:00
H S Helson Go b081cf5c31 ucrxe_dds_client: Implement simple parameter-driven message namespace (#25444)
* ucrxe_dds_client: Implement simple parameter-driven message namespace

* chore: remove change of parameter_reference.md

Signed-off-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>

---------

Signed-off-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>
Co-authored-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>
2025-09-20 16:32:00 +01:00
Alex Klimaj 91fa0f4693 boards: ark x20 and f9p gps (#25149)
* boards: ark x20 gps

* update startup

* fix cmake variants

* boards: ark f9p gps

* ark x20 gps add serial dma hrt call

* update gps submodule with x20 support

* update default constellations

* fix mag rotation
2025-09-19 10:06:03 -08:00
Hamish Willee 799f910ca9 uORB message layout fixes (#25581)
* uORB message layout fixes

* Apply suggestions from code review

---------

Co-authored-by: PX4BuildBot <bot@pixhawk.org>
2025-09-19 09:06:01 +10:00
bresch c06ba93175 mc-auto: handle EKF heading reset 2025-09-18 17:00:16 +02:00
bresch 82308da18d ekf2: support heading external update from MAV_CMD_EXTERNAL_ATTITUDE_ESTIMATE 2025-09-18 17:00:16 +02:00
bresch eba0b99950 ekf2: remove unnecessary code
The delta angles are now correctly accumulated in case
multiple resets are triggered during the same epoch
2025-09-18 17:00:16 +02:00
bresch 361d66bb44 ekf2: add reporting of gnss_vel status flag 2025-09-18 17:00:16 +02:00
Silvan Fuhrer d2e4d85bce Add Altitude Cruise mode
-add new NAVIGATION_STATE_ALTITUDE_VOYAGER
-this mode does require manual control to enter
-but you can disable the manual control loss failsafe to continue
flying in case of manual control loss
-for MC: in throttle and yaw are controlled like in Altitude mode,
the tilt is controlled via integrated rate input (similar to Acro,
but with tilt limit)

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2025-09-18 15:50:10 +02:00
Matthias Grob 5c5bf0b83d Remove parameters MPC_{XY/Z/YAW}_MAN_EXPO and use default value instead 2025-09-18 15:50:10 +02:00
Matthias Grob 5b94557310 Sticks: change internal order and sign of stick positions 2025-09-18 15:50:10 +02:00
Matthias Grob 234e4688b0 Sticks: calculate expo only upon getter call 2025-09-18 15:50:10 +02:00
Matthias Grob 2e910fe185 FlightTask{Altitude+Orbit}: use getter for specific stick value instead of entire array 2025-09-18 15:50:10 +02:00
Matthias Grob 2bf9fce577 Sticks: globalize MPC_HOLD_DZ to MAN_DEADZONE 2025-09-18 15:50:10 +02:00
mahima-yoga a9720cf1ef FixedWingModeManager: use Sticks library 2025-09-18 15:50:10 +02:00
mahima-yoga a514289a68 Move Stick class into a globally available library 2025-09-18 15:50:10 +02:00
Pernilla 2cb97e79b9 FlightTaskManualAccelerationSlow: Acquire gimbal control until expected IDs are reported (#25565)
* Acquire control until expected id s are reported

* require an updated message and allow release in case early exit of FlightTask

* FlightTask Gimbal: acquiring logic simplification suggestion

* formatting

---------

Co-authored-by: Matthias Grob <maetugr@gmail.com>
2025-09-18 11:09:09 +02:00
Hamish Willee e8ccb23dc8 PurePursuitStatus.msg - whitespace indentation (#25544) 2025-09-18 17:33:36 +10:00
Hamish Willee dd65380bf3 Ark GNSS CAN - link to the DroneCAN docs for fixed base (#25382)
* Ark GNSS CAN - link to the DroneCAN docs for fixed base

* Update docs/en/dronecan/ark_rtk_gps.md
2025-09-17 22:58:56 -08:00
Hamish Willee 0303d36e60 RoverAttitudeSetpoint et al - whitespace (#25545)
* RoverAttitudeSetpoint - whitespace

* Format RoverAttitudeStatus.msg for consistency

* Format RoverPositionSetpoint.msg for consistency

* Format msg/RoverRateSetpoint.msg for consistency

* Format msg/RoverRateStatus.msg for consistency

* Format msg/RoverSpeedSetpoint.msg for consistency

* Reformat RoverSpeedStatus.msg for consistency

* Fix formatting of pid_yaw_rate_integral field

* Fix formatting in RoverSteeringSetpoint.msg

* Fix formatting in RoverThrottleSetpoint.msg

* Apply suggestions from code review
2025-09-18 15:59:54 +10:00
Alex Espinoza 78d602e68a switched instructions for cloning Micro-XRCE-DDS from v2.4.2 to v2.4.3 (#25525)
* switched instructions for clodning Micro-XRCE-DDS from v2.4.2 to v2.4.3 since v2.4.2 references a bad fast-dds tag that doesnt build

* reverted uxrce instructions changes from docs/ko docs/uk and docs/zh sin
ce they are generated automatically and should not be changed manually
2025-09-17 11:57:32 +10:00
Jacob Dahl 2cc64c438f docs: UAVCAN_ESC_IFACE (#25560)
* dronecan: esc: change UAVCAN_ESC_IFACE to 2 to default to only outputting on CAN2

* revert param default and update docs

* Subedit

---------

Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
2025-09-16 15:53:00 -08:00
Eric Katzfey e72ffa3b1f QURT: Changed the non-blocking UART write to use the blocking write with a comment that Qurt (#25573)
still needs a non-blocking write implemented.
2025-09-16 10:40:19 -08:00
Pernilla 0c8f5ebc32 Navigator: delay neutral gimbal command (#25551)
* Set gimbal neutral after delay
2025-09-16 10:38:47 +02:00
Rowan Dempster d205d11c3d Recovering UTC timestamps from ULog without sensor_gps (#25534)
* Added overloaded get_log_time util for fractional seconds

* Added write_info implementation for double info types

* Save boot time to .ulg via info message key boot_time_utc

* Changed time type from double to uint64_t, formatted

* Fixing get_log_time function doc
2025-09-15 16:18:26 -08:00
Daniel Agar d3f912ad25 platforms: Serial new dedicated writeBlocking method (#25537)
* platforms: Serial new dedicated writeBlocking method

* finish writeBlocking()

* add back fsync

* updated posix, added string constant for port not open error

* format

* fix build

* remove fsync

* actually remove fsync

* remove fsync from write

* review feedback

---------

Co-authored-by: Jacob Dahl <dahl.jakejacob@gmail.com>
Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
2025-09-15 15:22:49 -08:00
Daniel Agar 41d3403ec7 drivers/gps: prioritize non-blocking reads over injection (#25535) 2025-09-15 15:18:45 -08:00
PX4 Build Bot a14cd9ad79 New Crowdin translations - ko (#25557)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-09-16 08:57:44 +10:00
PX4 Build Bot d42aebe100 New Crowdin translations - uk (#25558)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-09-16 08:57:19 +10:00
PX4 Build Bot 0068fea2f5 New Crowdin translations - zh-CN (#25559)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2025-09-16 08:56:46 +10:00
Jacob Dahl 5d0bbaabb2 codestyle: exclude sgbecom submodule from style check 2025-09-15 11:18:52 -06:00
Jacob Dahl 27f9161458 ark: UAVCAN_ESC_IFACE per board, v6x uses CAN2 2025-09-15 10:37:53 -06:00
Silvan db8a1f11a7 EstimatorCheck: fix reporting of low position accuracy failsafe
Signed-off-by: Silvan <silvan@auterion.com>
2025-09-12 14:16:16 +02:00
jmackay2 8669947bcb Support Gazebo Jetty (#25521)
* Support Gazebo Jetty

* Gazebo jetty cmake spelling fix

---------

Co-authored-by: jmackay2 <jmackay2@gmail.com>
2025-09-11 19:30:27 -08:00
Jacob Dahl 1aad8b6ec9 serial: nuttx: revert tcdrain back to fsync (#25538)
* serial: nuttx: revert tcdrain back to fsync

* serial: do not print error on EAGAIN

---------

Co-authored-by: Alexander Lerach <alexander@auterion.com>
2025-09-11 12:32:34 -08:00
Matthias Grob 7b68c5dbfc parameters: remove parameters_injected.xml and support for it in the build system (#25549)
This was apparently added 10 years ago to store metadata of UAVCAN components within the PX4 binary. The parameters in the xml are mostly early UAVCAN ESC parameters that are presumably out of date and not used. Also it does not scale to maintain metadata for all the possible UAVCAN components and it causes confusion when users read the metadata documentation because these parameters are not available in PX4. That's why I suggest to remove it.
2025-09-11 10:47:45 -08:00
Samuel Toledano b2672910da sbgecom: Implement sbgECom INS driver (#24137)
* Add new INS driver sbgECom

Implement sbgECom messages handling to provide IMU sensors, GNSS and EKF data to the autopilot
Be able to parametrize the serial port, baudrate and the communicating mode
Clone sbgECom library only if sbgecom support is enabled and apply a patch
Be able to send SBG Systems INS settings in several ways when starting sbgecom driver

* Fix sensor airspeed simulator units

* Fix HIGHRES_IMU pressure unit

* Allow HIGHRES_IMU to support 4 IMUs

* sbgECom: Add documentation

* Use submodule instead of fetching sbgECom using CMake

* Remove patch strategy

* Fix dates

* Remove patch file

* Update SBG dev type ID

Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>

---------

Co-authored-by: Samuel Toledano <samuel.toledano@sbg-systems.com>
Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
2025-09-11 00:37:41 -08:00
SolderSyntax 05394162ce Update dev_env_windows_wsl.md (#25441)
* Update dev_env_windows_wsl.md

Add info about enabling broadcasting or streaming to work with PX4 SITL on WSL and QGC on Windows.

* Update dev_env_windows_wsl.md

Fix links

* Update dev_env_windows_wsl.md

moved troubleshooting section at the bottom of WSL2<>Windows section.

* Move under troubleshooting

---------

Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
2025-09-11 17:55:02 +10:00
Hamish Willee d1da30911e Update metadata and tidy a few docs (#25547)
* Fix up metadata except for uorb graphs

* Additional customization of startup tidy
2025-09-11 16:06:51 +10:00
Holden Ramsey 264b8fe277 Tools: Support Setup for Linux Mint (#25486) 2025-09-10 18:01:37 -08:00
439 changed files with 12174 additions and 4905 deletions
+1
View File
@@ -5,6 +5,7 @@ on:
permissions:
contents: read
issues: write # for JasonEtco/create-an-issue
env:
RUNS_IN_DOCKER: true
+3
View File
@@ -100,3 +100,6 @@
[submodule "src/drivers/ins/microstrain/mip_sdk"]
path = src/drivers/ins/microstrain/mip_sdk
url = https://github.com/PX4/LORD-MicroStrain_mip_sdk.git
[submodule "src/drivers/ins/sbgecom/sbgECom"]
path = src/drivers/ins/sbgecom/sbgECom
url = https://github.com/PX4/sbgECom.git
+20
View File
@@ -206,6 +206,16 @@ CONFIG:
buildType: MinSizeRel
settings:
CONFIG: ark_dist_canbootloader
ark_f9p-gps_default:
short: ark_f9p-gps_default
buildType: MinSizeRel
settings:
CONFIG: ark_f9p-gps_default
ark_f9p-gps_canbootloader:
short: ark_f9p-gps_canbootloader
buildType: MinSizeRel
settings:
CONFIG: ark_f9p-gps_canbootloader
ark_fmu-v6x_bootloader:
short: ark_fmu-v6x_bootloader
buildType: MinSizeRel
@@ -236,6 +246,16 @@ CONFIG:
buildType: MinSizeRel
settings:
CONFIG: ark_pi6x_default
ark_x20-gps_default:
short: ark_x20-gps_default
buildType: MinSizeRel
settings:
CONFIG: ark_x20-gps_default
ark_x20-gps_canbootloader:
short: ark_x20-gps_canbootloader
buildType: MinSizeRel
settings:
CONFIG: ark_x20-gps_canbootloader
atl_mantis-edu_default:
short: atl_mantis-edu
buildType: MinSizeRel
@@ -49,3 +49,9 @@ param set-default SIM_GZ_EC_MAX4 1000
param set-default MPC_THR_HOVER 0.60
param set-default NAV_DLL_ACT 2
# DEBUGGING: ekf range fusion
# default, ekf replay, cv+avoid, high rate sensors
param set-default SDLOG_PROFILE 2179
# sim distance on ground
param set-default EKF2_MIN_RNG 0.177
@@ -39,4 +39,5 @@ exec find boards msg src platforms test \
-path boards/modalai/voxl2/libfc-sensor-api -prune -o \
-path src/drivers/actuators/vertiq_io/iq-module-communication-cpp -prune -o \
-path src/lib/tensorflow_lite_micro/tflite_micro -prune -o \
-path src/drivers/ins/sbgecom/sbgECom -prune -o \
\( -type f \( -name "*.c" -o -name "*.h" -o -name "*.cpp" -o -name "*.hpp" \) -print \) | grep $PATTERN
+16
View File
@@ -54,6 +54,22 @@ if [[ ! -f "${DIR}/${REQUIREMENTS_FILE}" ]]; then
return 1
fi
# Linux Mint compatibility: use upstream Ubuntu values
if [ -r /etc/upstream-release/lsb-release ]; then
. /etc/upstream-release/lsb-release
UBUNTU_CODENAME="${DISTRIB_CODENAME:-${UBUNTU_CODENAME:-}}"
UBUNTU_RELEASE="${DISTRIB_RELEASE:-${UBUNTU_RELEASE:-}}"
lsb_release() {
if [ "$1" = "-cs" ]; then
printf '%s' "$UBUNTU_CODENAME"
elif [ "$1" = "-rs" ]; then
printf '%s' "$UBUNTU_RELEASE"
else
command lsb_release "$@"
fi
}
fi
# check ubuntu version
# otherwise warn and point to docker?
@@ -0,0 +1,5 @@
CONFIG_BOARD_TOOLCHAIN="arm-none-eabi"
CONFIG_BOARD_ARCHITECTURE="cortex-m4"
CONFIG_BOARD_ROMFSROOT=""
CONFIG_BOARD_CONSTRAINED_MEMORY=y
CONFIG_DRIVERS_BOOTLOADERS=y
+37
View File
@@ -0,0 +1,37 @@
CONFIG_BOARD_TOOLCHAIN="arm-none-eabi"
CONFIG_BOARD_ARCHITECTURE="cortex-m4"
CONFIG_BOARD_ROMFSROOT="cannode"
CONFIG_BOARD_CONSTRAINED_MEMORY=y
CONFIG_DRIVERS_BAROMETER_BMP388=y
CONFIG_DRIVERS_BOOTLOADERS=y
CONFIG_DRIVERS_GPS=y
CONFIG_DRIVERS_IMU_INVENSENSE_ICM42688P=y
CONFIG_DRIVERS_MAGNETOMETER_ST_IIS2MDC=y
CONFIG_DRIVERS_SAFETY_BUTTON=y
CONFIG_DRIVERS_TONE_ALARM=y
CONFIG_BOARD_UAVCAN_INTERFACES=1
CONFIG_DRIVERS_UAVCANNODE=y
CONFIG_UAVCANNODE_BEEP_COMMAND=y
CONFIG_UAVCANNODE_GNSS_FIX=y
CONFIG_UAVCANNODE_LIGHTS_COMMAND=y
CONFIG_UAVCANNODE_MAGNETIC_FIELD_STRENGTH=y
CONFIG_UAVCANNODE_RTK_DATA=y
CONFIG_UAVCANNODE_RAW_IMU=y
CONFIG_UAVCANNODE_SAFETY_BUTTON=y
CONFIG_UAVCANNODE_STATIC_PRESSURE=y
CONFIG_UAVCANNODE_STATIC_TEMPERATURE=y
CONFIG_MODULES_EKF2=y
CONFIG_MODULES_GYRO_CALIBRATION=y
CONFIG_MODULES_SENSORS=y
# CONFIG_SENSORS_VEHICLE_AIRSPEED is not set
# CONFIG_SENSORS_VEHICLE_AIR_DATA is not set
# CONFIG_SENSORS_VEHICLE_GPS_POSITION is not set
CONFIG_SYSTEMCMDS_PARAM=y
CONFIG_SYSTEMCMDS_PERF=y
CONFIG_SYSTEMCMDS_REBOOT=y
CONFIG_SYSTEMCMDS_SYSTEM_TIME=y
CONFIG_SYSTEMCMDS_TOP=y
CONFIG_SYSTEMCMDS_TOPIC_LISTENER=y
CONFIG_SYSTEMCMDS_UORB=y
CONFIG_SYSTEMCMDS_VER=y
CONFIG_SYSTEMCMDS_WORK_QUEUE=y
+13
View File
@@ -0,0 +1,13 @@
{
"board_id": 90,
"magic": "PX4FWv1",
"description": "Firmware for the ARK F9P GPS",
"image": "",
"build_time": 0,
"summary": "ARKF9PGPS",
"version": "0.1",
"image_size": 0,
"image_maxsize": 2080768,
"git_identity": "",
"board_revision": 0
}
+13
View File
@@ -0,0 +1,13 @@
#!/bin/sh
#
# board specific defaults
#------------------------------------------------------------------------------
param set-default CBRK_IO_SAFETY 0
param set-default CANNODE_SUB_MBD 1
param set-default CANNODE_SUB_RTCM 1
param set-default GPS_1_GNSS 63
param set-default SENS_IMU_CLPNOTI 0
safety_button start
tone_alarm start
+11
View File
@@ -0,0 +1,11 @@
#!/bin/sh
#
# board sensors init
#------------------------------------------------------------------------------
gps start -d /dev/ttyS0 -p ubx
icm42688p -R 0 -s start
bmp388 -I -b 1 start
iis2mdc -R 2 -I -b 1 start
@@ -0,0 +1,57 @@
#
# This file is autogenerated: PLEASE DO NOT EDIT IT.
#
# You can use "make menuconfig" to make any modifications to the installed .config file.
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
# modifications.
#
CONFIG_ARCH="arm"
CONFIG_ARCH_BOARD_CUSTOM=y
CONFIG_ARCH_BOARD_CUSTOM_DIR="../../../../boards/ark/f9p-gps/nuttx-config"
CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y
CONFIG_ARCH_BOARD_CUSTOM_NAME="px4"
CONFIG_ARCH_CHIP="stm32"
CONFIG_ARCH_CHIP_STM32=y
CONFIG_ARCH_CHIP_STM32F412CE=y
CONFIG_ARCH_INTERRUPTSTACK=4096
CONFIG_ARMV7M_MEMCPY=y
CONFIG_ARMV7M_USEBASEPRI=y
CONFIG_BINFMT_DISABLE=y
CONFIG_BOARDCTL=y
CONFIG_BOARD_LOOPSPERMSEC=16717
CONFIG_DEBUG_FULLOPT=y
CONFIG_DEBUG_SYMBOLS=y
CONFIG_DEBUG_TCBINFO=y
CONFIG_DEFAULT_SMALL=y
CONFIG_DISABLE_MOUNTPOINT=y
CONFIG_EXPERIMENTAL=y
CONFIG_FDCLONE_DISABLE=y
CONFIG_FDCLONE_STDIO=y
CONFIG_HAVE_CXX=y
CONFIG_HAVE_CXXINITIALIZE=y
CONFIG_IDLETHREAD_STACKSIZE=4096
CONFIG_INIT_STACKSIZE=4096
CONFIG_LIBC_FLOATINGPOINT=y
CONFIG_LIBC_LONG_LONG=y
CONFIG_LIBC_STRERROR=y
CONFIG_MM_REGIONS=2
CONFIG_NAME_MAX=0
CONFIG_NUNGET_CHARS=0
CONFIG_PREALLOC_TIMERS=0
CONFIG_PTHREAD_STACK_MIN=512
CONFIG_RAM_SIZE=262144
CONFIG_RAM_START=0x20010000
CONFIG_RAW_BINARY=y
CONFIG_SIG_DEFAULT=y
CONFIG_SIG_SIGALRM_ACTION=y
CONFIG_SIG_SIGUSR1_ACTION=y
CONFIG_SIG_SIGUSR2_ACTION=y
CONFIG_STACK_COLORATION=y
CONFIG_START_DAY=30
CONFIG_START_MONTH=11
CONFIG_STDIO_DISABLE_BUFFERING=y
CONFIG_STM32_FLASH_CONFIG_G=y
CONFIG_STM32_NOEXT_VECTORS=y
CONFIG_STM32_TIM8=y
CONFIG_TASK_NAME_SIZE=0
CONFIG_USEC_PER_TICK=1000
@@ -0,0 +1,152 @@
/************************************************************************************
* configs/px4fmu/include/board.h
* include/arch/board/board.h
*
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
************************************************************************************/
#include "board_dma_map.h"
#ifndef __ARCH_BOARD_BOARD_H
#define __ARCH_BOARD_BOARD_H
#include <nuttx/config.h>
#ifndef __ASSEMBLY__
# include <stdint.h>
#endif
#include <stm32.h>
/* HSI - 8 MHz RC factory-trimmed
* LSI - 32 KHz RC
* HSE - 8 MHz Crystal
* LSE - not installed
*/
#define STM32_BOARD_USEHSE 1
#define STM32_BOARD_XTAL 8000000
#define STM32_HSE_FREQUENCY STM32_BOARD_XTAL
#define STM32_HSI_FREQUENCY 16000000ul
#define STM32_LSI_FREQUENCY 32000
/* Main PLL Configuration */
#define STM32_PLLCFG_PLLM RCC_PLLCFG_PLLM(8)
#define STM32_PLLCFG_PLLN RCC_PLLCFG_PLLN(384)
#define STM32_PLLCFG_PLLP RCC_PLLCFG_PLLP_4
#define STM32_PLLCFG_PLLQ RCC_PLLCFG_PLLQ(8)
#define STM32_PLLCFG_PLLR RCC_PLLCFG_PLLR(2)
#define STM32_RCC_PLLI2SCFGR_PLLI2SM RCC_PLLI2SCFGR_PLLI2SM(16)
#define STM32_RCC_PLLI2SCFGR_PLLI2SN RCC_PLLI2SCFGR_PLLI2SN(192)
#define STM32_RCC_PLLI2SCFGR_PLLI2SQ RCC_PLLI2SCFGR_PLLI2SQ(2)
#define STM32_RCC_PLLI2SCFGR_PLLI2SR RCC_PLLI2SCFGR_PLLI2SR(2)
#define STM32_RCC_PLLI2SCFGR_PLLI2SSRC RCC_PLLI2SCFGR_PLLI2SSRC(0) /* HSE or HSI depending on PLLSRC of PLLCFGR*/
#define STM32_RCC_DCKCFGR2_CK48MSEL RCC_DCKCFGR2_CK48MSEL_PLL
#define STM32_RCC_DCKCFGR2_FMPI2C1SEL RCC_DCKCFGR2_FMPI2C1SEL_APB
#define STM32_RCC_DCKCFGR2_SDIOSEL RCC_DCKCFGR2_SDIOSEL_48MHZ
#define STM32_SYSCLK_FREQUENCY 96000000ul
/* AHB clock (HCLK) is SYSCLK (96MHz) */
#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/2 (48MHz) */
#define STM32_RCC_CFGR_PPRE1 RCC_CFGR_PPRE1_HCLKd2 /* PCLK1 = HCLK / 2 */
#define STM32_PCLK1_FREQUENCY (STM32_HCLK_FREQUENCY/2)
/* Timers driven from APB1 will be twice PCLK1 (see page 112 of reference manual) */
#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_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 (96MHz) */
#define STM32_RCC_CFGR_PPRE2 RCC_CFGR_PPRE2_HCLK /* PCLK2 = HCLK */
#define STM32_PCLK2_FREQUENCY (STM32_HCLK_FREQUENCY)
/* Timers driven from APB2 will be PCLK2 since no prescale division */
#define STM32_APB2_TIM1_CLKIN (STM32_PCLK2_FREQUENCY)
#define STM32_APB2_TIM8_CLKIN (STM32_PCLK2_FREQUENCY)
#define STM32_APB2_TIM9_CLKIN (STM32_PCLK2_FREQUENCY)
#define STM32_APB2_TIM10_CLKIN (STM32_PCLK2_FREQUENCY)
#define STM32_APB2_TIM11_CLKIN (STM32_PCLK2_FREQUENCY)
/* Timer Frequencies, if APBx is set to 1, frequency is same to APBx otherwise frequency is 2xAPBx. */
#define BOARD_TIM2_FREQUENCY (2 * STM32_PCLK1_FREQUENCY)
#define BOARD_TIM3_FREQUENCY (2 * STM32_PCLK1_FREQUENCY)
#define BOARD_TIM4_FREQUENCY (2 * STM32_PCLK1_FREQUENCY)
#define BOARD_TIM5_FREQUENCY (2 * STM32_PCLK1_FREQUENCY)
#define BOARD_TIM6_FREQUENCY (2 * STM32_PCLK1_FREQUENCY)
#define BOARD_TIM7_FREQUENCY (2 * STM32_PCLK1_FREQUENCY)
#define BOARD_TIM8_FREQUENCY (2 * STM32_PCLK2_FREQUENCY)
/* Alternate function pin selections ************************************************/
/* UARTs */
#define GPIO_USART1_RX GPIO_USART1_RX_2
#define GPIO_USART1_TX GPIO_USART1_TX_3
#define GPIO_USART2_RX GPIO_USART2_RX_1
#define GPIO_USART2_TX GPIO_USART2_TX_1
/* CAN */
#define GPIO_CAN1_RX GPIO_CAN1_RX_1
#define GPIO_CAN1_TX GPIO_CAN1_TX_1
/* I2C */
#define GPIO_MCU_I2C1_SCL
#define GPIO_MCU_I2C1_SDA
#define GPIO_I2C1_SCL GPIO_I2C1_SCL_1
#define GPIO_I2C1_SDA GPIO_I2C1_SDA_1
#define GPIO_I2C1_SCL_GPIO (GPIO_OUTPUT | GPIO_OPENDRAIN |GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN6)
#define GPIO_I2C1_SDA_GPIO (GPIO_OUTPUT | GPIO_OPENDRAIN |GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN7)
#define GPIO_I2C2_SCL GPIO_I2C2_SCL_1
#define GPIO_I2C2_SDA GPIO_I2C2_SDA_4
#define GPIO_I2C2_SCL_GPIO (GPIO_OUTPUT | GPIO_OPENDRAIN |GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN9)
#define GPIO_I2C2_SDA_GPIO (GPIO_OUTPUT | GPIO_OPENDRAIN |GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN10)
/* SPI */
#define GPIO_SPI1_MISO GPIO_SPI1_MISO_1
#define GPIO_SPI1_MOSI GPIO_SPI1_MOSI_1
#define GPIO_SPI1_SCK GPIO_SPI1_SCK_1
#endif /* __ARCH_BOARD_BOARD_H */
@@ -0,0 +1,46 @@
/****************************************************************************
*
* Copyright (c) 2021 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name PX4 nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
#pragma once
// DMA1 Channel/Stream Selections
//--------------------------------------------//---------------------------//----------------
// DMA2 Channel/Stream Selections
//--------------------------------------------//---------------------------//----------------
#define DMACHAN_SPI1_RX DMAMAP_SPI1_RX_1 // DMA2, Stream 0, Channel 3
#define DMACHAN_SPI1_TX DMAMAP_SPI1_TX_1 // DMA2, Stream 3, Channel 3
#define DMACHAN_USART1_RX DMAMAP_USART1_RX_1 // DMA2, Stream 2, Channel 4
#define DMAMAP_USART1_RX DMAMAP_USART1_RX_1
//#define DMACHAN_USART1_TX DMAMAP_USART1_TX // DMA2, Stream 7, Channel 4
@@ -0,0 +1,153 @@
#
# 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_DISABLE_PTHREAD is not set
# CONFIG_NSH_DISABLEBG is not set
# CONFIG_NSH_DISABLESCRIPT is not set
# CONFIG_NSH_DISABLE_CAT is not set
# CONFIG_NSH_DISABLE_CD is not set
# CONFIG_NSH_DISABLE_CP is not set
# CONFIG_NSH_DISABLE_DATE is not set
# CONFIG_NSH_DISABLE_DF is not set
# CONFIG_NSH_DISABLE_ECHO is not set
# CONFIG_NSH_DISABLE_ENV is not set
# CONFIG_NSH_DISABLE_EXEC is not set
# CONFIG_NSH_DISABLE_EXPORT is not set
# CONFIG_NSH_DISABLE_FREE is not set
# CONFIG_NSH_DISABLE_GET is not set
# CONFIG_NSH_DISABLE_HELP is not set
# CONFIG_NSH_DISABLE_ITEF is not set
# CONFIG_NSH_DISABLE_KILL is not set
# CONFIG_NSH_DISABLE_LOOPS is not set
# CONFIG_NSH_DISABLE_LS is not set
# CONFIG_NSH_DISABLE_MKDIR is not set
# CONFIG_NSH_DISABLE_MOUNT is not set
# CONFIG_NSH_DISABLE_MV is not set
# CONFIG_NSH_DISABLE_PS is not set
# CONFIG_NSH_DISABLE_PSSTACKUSAGE is not set
# CONFIG_NSH_DISABLE_PWD is not set
# CONFIG_NSH_DISABLE_RM is not set
# CONFIG_NSH_DISABLE_RMDIR is not set
# CONFIG_NSH_DISABLE_SEMICOLON is not set
# CONFIG_NSH_DISABLE_SET is not set
# CONFIG_NSH_DISABLE_SLEEP is not set
# CONFIG_NSH_DISABLE_SOURCE is not set
# CONFIG_NSH_DISABLE_TEST is not set
# CONFIG_NSH_DISABLE_TIME is not set
# CONFIG_NSH_DISABLE_UMOUNT is not set
# CONFIG_NSH_DISABLE_UNSET is not set
# CONFIG_NSH_DISABLE_USLEEP is not set
CONFIG_ARCH="arm"
CONFIG_ARCH_BOARD_CUSTOM=y
CONFIG_ARCH_BOARD_CUSTOM_DIR="../../../../boards/ark/f9p-gps/nuttx-config"
CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y
CONFIG_ARCH_BOARD_CUSTOM_NAME="px4"
CONFIG_ARCH_CHIP="stm32"
CONFIG_ARCH_CHIP_STM32=y
CONFIG_ARCH_CHIP_STM32F412CE=y
CONFIG_ARCH_INTERRUPTSTACK=768
CONFIG_ARCH_STACKDUMP=y
CONFIG_ARMV7M_MEMCPY=y
CONFIG_ARMV7M_USEBASEPRI=y
CONFIG_BOARDCTL_RESET=y
CONFIG_BOARD_ASSERT_RESET_VALUE=0
CONFIG_BOARD_LOOPSPERMSEC=16717
CONFIG_BOARD_RESET_ON_ASSERT=2
CONFIG_BUILTIN=y
CONFIG_DEBUG_FULLOPT=y
CONFIG_DEBUG_HARDFAULT_ALERT=y
CONFIG_DEBUG_SYMBOLS=y
CONFIG_DEBUG_TCBINFO=y
CONFIG_DEFAULT_SMALL=y
CONFIG_FDCLONE_STDIO=y
CONFIG_FS_CROMFS=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_INIT_ENTRYPOINT="nsh_main"
CONFIG_INIT_STACKSIZE=2624
CONFIG_LIBC_FLOATINGPOINT=y
CONFIG_LIBC_LONG_LONG=y
CONFIG_LIBC_MAX_EXITFUNS=1
CONFIG_MEMSET_64BIT=y
CONFIG_MEMSET_OPTSPEED=y
CONFIG_MM_REGIONS=2
CONFIG_NAME_MAX=40
CONFIG_NSH_ARCHINIT=y
CONFIG_NSH_ARGCAT=y
CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_CMDPARMS=y
CONFIG_NSH_CROMFSETC=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_VARS=y
CONFIG_PREALLOC_TIMERS=50
CONFIG_PTHREAD_MUTEX_ROBUST=y
CONFIG_PTHREAD_STACK_MIN=512
CONFIG_RAM_SIZE=262144
CONFIG_RAM_START=0x20000000
CONFIG_RAW_BINARY=y
CONFIG_SCHED_HPWORK=y
CONFIG_SCHED_HPWORKPRIORITY=249
CONFIG_SCHED_HPWORKSTACKSIZE=1280
CONFIG_SCHED_INSTRUMENTATION=y
CONFIG_SCHED_INSTRUMENTATION_EXTERNAL=y
CONFIG_SCHED_INSTRUMENTATION_SWITCH=y
CONFIG_SCHED_WAITPID=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=32
CONFIG_STM32_ADC1=y
CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y
CONFIG_STM32_DMA1=y
CONFIG_STM32_DMA2=y
CONFIG_STM32_FLASH_CONFIG_G=y
CONFIG_STM32_FLASH_PREFETCH=y
CONFIG_STM32_FLOWCONTROL_BROKEN=y
CONFIG_STM32_I2C1=y
CONFIG_STM32_I2C2=y
CONFIG_STM32_JTAG_SW_ENABLE=y
CONFIG_STM32_PWR=y
CONFIG_STM32_SERIALBRK_BSDCOMPAT=y
CONFIG_STM32_SERIAL_DISABLE_REORDERING=y
CONFIG_STM32_SPI1=y
CONFIG_STM32_SPI1_DMA=y
CONFIG_STM32_SPI1_DMA_BUFFER=1024
CONFIG_STM32_TIM8=y
CONFIG_STM32_USART1=y
CONFIG_STM32_USART2=y
CONFIG_STM32_USART_BREAKS=y
CONFIG_STM32_WWDG=y
CONFIG_SYSTEM_NSH=y
CONFIG_TASK_NAME_SIZE=24
CONFIG_USART1_BAUD=57600
CONFIG_USART1_RXBUFSIZE=2000
CONFIG_USART1_RXDMA=y
CONFIG_USART1_TXBUFSIZE=2000
CONFIG_USART2_BAUD=57600
CONFIG_USART2_RXBUFSIZE=600
CONFIG_USART2_SERIAL_CONSOLE=y
CONFIG_USART2_TXBUFSIZE=1100
CONFIG_USEC_PER_TICK=1000
@@ -0,0 +1,134 @@
/****************************************************************************
* nuttx-config/scripts/canbootloader_script.ld
*
* Copyright (c) 2025 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/* The STM32F412 has 1M of FLASH beginning at address 0x0800:0000 and
* 256Kb of SRAM. SRAM is split up into three blocks:
*
* 1) 112Kb of SRAM beginning at address 0x2000:0000
* 2) 16Kb of SRAM beginning at address 0x2001:c000
* 3) 64Kb of SRAM beginning at address 0x2002:0000
* 4) 64Kb of TCM SRAM beginning at address 0x1000:0000
*
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
* where the code expects to begin execution by jumping to the entry point in
* the 0x0800:0000 address range.
*
* The first 0x10000 of flash is reserved for the bootloader.
*/
MEMORY
{
flash (rx) : ORIGIN = 0x08000000, LENGTH = 32K
sram (rwx) : ORIGIN = 0x20000000, LENGTH = 192K
}
OUTPUT_ARCH(arm)
ENTRY(__start) /* treat __start as the anchor for dead code stripping */
EXTERN(_vectors) /* force the vectors to be included in the output */
/*
* Ensure that abort() is present in the final object. The exception handling
* code pulled in by libgcc.a requires it (and that code cannot be easily avoided).
*/
EXTERN(abort)
SECTIONS
{
.text : {
_stext = ABSOLUTE(.);
*(.vectors)
*(.text .text.*)
*(.fixup)
*(.gnu.warning)
*(.rodata .rodata.*)
*(.gnu.linkonce.t.*)
*(.got)
*(.gcc_except_table)
*(.gnu.linkonce.r.*)
_etext = ABSOLUTE(.);
} > flash
/*
* Init functions (static constructors and the like)
*/
.init_section : {
_sinit = ABSOLUTE(.);
KEEP(*(.init_array .init_array.*))
_einit = ABSOLUTE(.);
} > flash
.ARM.extab : {
*(.ARM.extab*)
} > flash
__exidx_start = ABSOLUTE(.);
.ARM.exidx : {
*(.ARM.exidx*)
} > flash
__exidx_end = ABSOLUTE(.);
_eronly = ABSOLUTE(.);
.data : {
_sdata = ABSOLUTE(.);
*(.data .data.*)
*(.gnu.linkonce.d.*)
CONSTRUCTORS
_edata = ABSOLUTE(.);
} > sram AT > flash
.bss : {
_sbss = ABSOLUTE(.);
*(.bss .bss.*)
*(.gnu.linkonce.b.*)
*(COMMON)
. = ALIGN(4);
_ebss = ABSOLUTE(.);
} > sram
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { *(.comment) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_info 0 : { *(.debug_info) }
.debug_line 0 : { *(.debug_line) }
.debug_pubnames 0 : { *(.debug_pubnames) }
.debug_aranges 0 : { *(.debug_aranges) }
}
@@ -0,0 +1,146 @@
/****************************************************************************
* scripts/ld.script
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/* The STM32F412 has 1M of FLASH beginning at address 0x0800:0000 and
* 256Kb of SRAM. SRAM is split up into three blocks:
*
* 1) 112Kb of SRAM beginning at address 0x2000:0000
* 2) 16Kb of SRAM beginning at address 0x2001:c000
* 3) 64Kb of SRAM beginning at address 0x2002:0000
* 4) 64Kb of TCM SRAM beginning at address 0x1000:0000
*
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
* where the code expects to begin execution by jumping to the entry point in
* the 0x0800:0000 address range.
*
* The first 0x10000 of flash is reserved for the bootloader.
*/
MEMORY
{
flash (rx) : ORIGIN = 0x08010000, LENGTH = 928K
sram (rwx) : ORIGIN = 0x20000000, LENGTH = 192K
}
OUTPUT_ARCH(arm)
ENTRY(__start) /* treat __start as the anchor for dead code stripping */
EXTERN(_vectors) /* force the vectors to be included in the output */
/*
* Ensure that abort() is present in the final object. The exception handling
* code pulled in by libgcc.a requires it (and that code cannot be easily avoided).
*/
EXTERN(abort)
EXTERN(_bootdelay_signature)
SECTIONS
{
.text : {
_stext = ABSOLUTE(.);
*(.vectors)
. = ALIGN(8);
/*
* This section positions the app_descriptor_t used
* by the make_can_boot_descriptor.py tool to set
* the application image's descriptor so that the
* uavcan bootloader has the ability to validate the
* image crc, size etc
*/
KEEP(*(.app_descriptor))
*(.text .text.*)
*(.fixup)
*(.gnu.warning)
*(.rodata .rodata.*)
*(.gnu.linkonce.t.*)
*(.got)
*(.gcc_except_table)
*(.gnu.linkonce.r.*)
_etext = ABSOLUTE(.);
} > flash
/*
* Init functions (static constructors and the like)
*/
.init_section : {
_sinit = ABSOLUTE(.);
KEEP(*(.init_array .init_array.*))
_einit = ABSOLUTE(.);
} > flash
.ARM.extab : {
*(.ARM.extab*)
} > flash
__exidx_start = ABSOLUTE(.);
.ARM.exidx : {
*(.ARM.exidx*)
} > flash
__exidx_end = ABSOLUTE(.);
_eronly = ABSOLUTE(.);
.data : {
_sdata = ABSOLUTE(.);
*(.data .data.*)
*(.gnu.linkonce.d.*)
CONSTRUCTORS
_edata = ABSOLUTE(.);
} > sram AT > flash
.bss : {
_sbss = ABSOLUTE(.);
*(.bss .bss.*)
*(.gnu.linkonce.b.*)
*(COMMON)
. = ALIGN(4);
_ebss = ABSOLUTE(.);
} > sram
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { *(.comment) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_info 0 : { *(.debug_info) }
.debug_line 0 : { *(.debug_line) }
.debug_pubnames 0 : { *(.debug_pubnames) }
.debug_aranges 0 : { *(.debug_aranges) }
}
+66
View File
@@ -0,0 +1,66 @@
############################################################################
#
# Copyright (c) 2025 PX4 Development Team. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name PX4 nor the names of its contributors may be
# used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
############################################################################
if("${PX4_BOARD_LABEL}" STREQUAL "canbootloader")
add_library(drivers_board
boot_config.h
boot.c
led.c
)
target_link_libraries(drivers_board
PRIVATE
nuttx_arch
nuttx_drivers
canbootloader
)
target_include_directories(drivers_board PRIVATE ${PX4_SOURCE_DIR}/platforms/nuttx/src/canbootloader)
else()
add_library(drivers_board
can.c
i2c.cpp
init.c
led.c
spi.cpp
)
target_link_libraries(drivers_board
PRIVATE
arch_spi
drivers__led # drv_led_start
nuttx_arch
nuttx_drivers
px4_layer
)
endif()
+125
View File
@@ -0,0 +1,125 @@
/****************************************************************************
*
* 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 board_config.h
*
* board internal definitions
*/
#pragma once
#include <px4_platform_common/px4_config.h>
#include <nuttx/compiler.h>
#include <stdint.h>
/* BUTTON */
#define GPIO_BTN_SAFETY /* PB15 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTB|GPIO_PIN15)
/* Safety LED */
#define GPIO_LED_SAFETY /* PA1 */ (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTA|GPIO_PIN1)
/* Tone alarm output. */
#define TONE_ALARM_TIMER 2 /* timer 2 */
#define TONE_ALARM_CHANNEL 1 /* channel 1 */
#define GPIO_TONE_ALARM_IDLE /* PA0 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTA|GPIO_PIN0)
#define GPIO_TONE_ALARM /* PA0 */ (GPIO_ALT|GPIO_AF1|GPIO_SPEED_2MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN0)
/* CAN Silent mode control */
#define GPIO_CAN1_SILENT_S0 /* PB12 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN12)
/* CAN termination software control */
#define GPIO_CAN1_TERMINATION /* PB13 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN13)
#define GPIO_CAN_TERM GPIO_CAN1_TERMINATION
/* ICM42688p FSYNC */
#define GPIO_42688P_FSYNC /* PB8 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN8)
/* Boot config */
#define GPIO_BOOT_CONFIG /* PC15 */ (GPIO_INPUT|GPIO_PULLUP|GPIO_PORTC|GPIO_PIN15|GPIO_EXTI)
/* LEDs are driven with open drain to support Anode to 5V or 3.3V */
#define GPIO_TIM1_CH1 /* PA8 */ (GPIO_TIM1_CH1_1|GPIO_OPENDRAIN|GPIO_SPEED_2MHz)
#define GPIO_TIM1_CH2 /* PA9 */ (GPIO_TIM1_CH2_1|GPIO_OPENDRAIN|GPIO_SPEED_2MHz)
#define GPIO_TIM1_CH3 /* PA10 */ (GPIO_TIM1_CH3_1|GPIO_OPENDRAIN|GPIO_SPEED_2MHz)
#define GPIO_I2C1_SCL_RESET /* PB6 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN6)
#define GPIO_I2C1_SDA_RESET /* PB7 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN7)
#define GPIO_I2C2_SCL_RESET /* PB10 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN10)
#define GPIO_I2C2_SDA_RESET /* PB9 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN9)
#define GPIO_I2C2_SCL_RESET /* PB10 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN10)
#define GPIO_I2C2_SDA_RESET /* PB9 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN9)
#define GPIO_USART1_RX_GPIO (GPIO_INPUT|GPIO_PULLUP|GPIO_SPEED_50MHz|GPIO_PORTB|GPIO_PIN3)
#define GPIO_USART1_TX_GPIO (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_PULLUP|GPIO_SPEED_50MHz|GPIO_PORTA|GPIO_PIN15)
#define GPIO_USART2_RX_GPIO (GPIO_INPUT|GPIO_PULLUP|GPIO_SPEED_50MHz|GPIO_PORTA|GPIO_PIN3)
#define GPIO_USART2_TX_GPIO (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_PULLUP|GPIO_SPEED_50MHz|GPIO_PORTA|GPIO_PIN2)
#define FLASH_BASED_PARAMS
/* High-resolution timer */
#define HRT_TIMER 3 /* use timer 3 for the HRT */
#define HRT_TIMER_CHANNEL 4 /* use capture/compare channel 4 */
#define PX4_GPIO_INIT_LIST { \
GPIO_BTN_SAFETY, \
GPIO_LED_SAFETY, \
GPIO_I2C1_SCL_RESET, \
GPIO_I2C1_SDA_RESET, \
GPIO_I2C2_SCL_RESET, \
GPIO_I2C2_SDA_RESET, \
GPIO_42688P_FSYNC, \
GPIO_BOOT_CONFIG, \
GPIO_CAN1_TX, \
GPIO_CAN1_RX, \
GPIO_CAN1_SILENT_S0, \
GPIO_CAN1_TERMINATION, \
}
__BEGIN_DECLS
#define BOARD_HAS_N_S_RGB_LED 1
#define BOARD_MAX_LEDS BOARD_HAS_N_S_RGB_LED
#ifndef __ASSEMBLY__
extern void stm32_spiinitialize(void);
#include <px4_platform_common/board_common.h>
#endif /* __ASSEMBLY__ */
__END_DECLS
+188
View File
@@ -0,0 +1,188 @@
/****************************************************************************
*
* Copyright (c) 2025 PX4 Development Team. All rights reserved.
* Author: Ben Dyer <ben_dyer@mac.com>
* Pavel Kirienko <pavel.kirienko@zubax.com>
* David Sidrane <david_s5@nscdg.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name PX4 nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/****************************************************************************
* Included Files
****************************************************************************/
#include <px4_config.h>
#include <stdint.h>
#include "boot_config.h"
#include "board.h"
#include <debug.h>
#include <string.h>
#include <arch/board/board.h>
#include <nuttx/board.h>
#include "led.h"
/************************************************************************************
* Name: stm32_boardinitialize
*
* Description:
* All STM32 architectures must provide the following entry point. This entry point
* is called early in the initialization -- after all memory has been configured
* and mapped but before any devices have been initialized.
*
************************************************************************************/
__EXPORT void stm32_boardinitialize(void)
{
putreg32(getreg32(STM32_RCC_APB1ENR) | RCC_APB1ENR_CAN1EN, STM32_RCC_APB1ENR);
stm32_configgpio(GPIO_CAN1_RX);
stm32_configgpio(GPIO_CAN1_TX);
stm32_configgpio(GPIO_CAN1_SILENT_S0);
stm32_configgpio(GPIO_CAN1_TERMINATION);
putreg32(getreg32(STM32_RCC_APB1RSTR) | RCC_APB1RSTR_CAN1RST, STM32_RCC_APB1RSTR);
putreg32(getreg32(STM32_RCC_APB1RSTR) & ~RCC_APB1RSTR_CAN1RST, STM32_RCC_APB1RSTR);
#if defined(OPT_WAIT_FOR_GETNODEINFO_JUMPER_GPIO)
stm32_configgpio(GPIO_GETNODEINFO_JUMPER);
#endif
}
/************************************************************************************
* Name: board_deinitialize
*
* Description:
* This function is called by the bootloader code prior to booting
* the application. Is should place the HW into an benign initialized state.
*
************************************************************************************/
void board_deinitialize(void)
{
putreg32(getreg32(STM32_RCC_APB1RSTR) | RCC_APB1RSTR_CAN1RST, STM32_RCC_APB1RSTR);
}
/****************************************************************************
* Name: board_get_product_name
*
* Description:
* Called to retrieve the product name. The returned value is a assumed
* to be written to a pascal style string that will be length prefixed
* and not null terminated
*
* Input Parameters:
* product_name - A pointer to a buffer to write the name.
* maxlen - The maximum number of charter that can be written
*
* Returned Value:
* The length of characters written to the buffer.
*
****************************************************************************/
uint8_t board_get_product_name(uint8_t *product_name, size_t maxlen)
{
DEBUGASSERT(maxlen > UAVCAN_STRLEN(HW_UAVCAN_NAME));
memcpy(product_name, HW_UAVCAN_NAME, UAVCAN_STRLEN(HW_UAVCAN_NAME));
return UAVCAN_STRLEN(HW_UAVCAN_NAME);
}
/****************************************************************************
* Name: board_get_hardware_version
*
* Description:
* Called to retrieve the hardware version information. The function
* will first initialize the the callers struct to all zeros.
*
* Input Parameters:
* hw_version - A pointer to a uavcan_hardwareversion_t.
*
* Returned Value:
* Length of the unique_id
*
****************************************************************************/
size_t board_get_hardware_version(uavcan_HardwareVersion_t *hw_version)
{
memset(hw_version, 0, sizeof(uavcan_HardwareVersion_t));
hw_version->major = HW_VERSION_MAJOR;
hw_version->minor = HW_VERSION_MINOR;
return board_get_mfguid(*(mfguid_t *) hw_version->unique_id);
}
/****************************************************************************
* Name: board_indicate
*
* Description:
* Provides User feedback to indicate the state of the bootloader
* on board specific hardware.
*
* Input Parameters:
* indication - A member of the uiindication_t
*
* Returned Value:
* None
*
****************************************************************************/
#define led(n, code, r , g , b, h) {.red = (r),.green = (g), .blue = (b),.hz = (h)}
typedef begin_packed_struct struct led_t {
uint8_t red;
uint8_t green;
uint8_t blue;
uint8_t hz;
} end_packed_struct led_t;
static const led_t i2l[] = {
led(0, off, 0, 0, 0, 0),
led(1, reset, 128, 128, 128, 30),
led(2, autobaud_start, 0, 128, 0, 1),
led(3, autobaud_end, 0, 128, 0, 2),
led(4, allocation_start, 0, 0, 64, 2),
led(5, allocation_end, 0, 128, 64, 3),
led(6, fw_update_start, 32, 128, 64, 3),
led(7, fw_update_erase_fail, 32, 128, 32, 3),
led(8, fw_update_invalid_response, 64, 0, 0, 1),
led(9, fw_update_timeout, 64, 0, 0, 2),
led(a, fw_update_invalid_crc, 64, 0, 0, 4),
led(b, jump_to_app, 0, 128, 0, 10),
};
void board_indicate(uiindication_t indication)
{
rgb_led(i2l[indication].red,
i2l[indication].green,
i2l[indication].blue,
i2l[indication].hz);
}
+130
View File
@@ -0,0 +1,130 @@
/****************************************************************************
*
* Copyright (c) 2025 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name PX4 nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/*
* @file boot_config.h
*
* bootloader definitions that configures the behavior and options
* of the Boot loader
* This file is relies on the parent folder's boot_config.h file and defines
* different usages of the hardware for bootloading
*/
#pragma once
/************************************************************************************
* Included Files
************************************************************************************/
/* Bring in the board_config.h definitions
* todo:make this be pulled in from a targed's build
* files in nuttx*/
#include "board_config.h"
#include "uavcan.h"
#include <nuttx/compiler.h>
#include <stdint.h>
#include <stm32_flash.h>
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
#define OPT_PREFERRED_NODE_ID ANY_NODE_ID
//todo:wrap OPT_x in in ifdefs for command line definitions
#define OPT_TBOOT_MS 3000
#define OPT_NODE_STATUS_RATE_MS 800
#define OPT_NODE_INFO_RATE_MS 50
#define OPT_BL_NUMBER_TIMERS 7
/*
* This Option set is set to 1 ensure a provider of firmware has an
* opportunity update the node's firmware.
* This Option is the default policy and can be overridden by
* a jumper
* When this Policy is set, the node will ignore tboot and
* wait indefinitely for a GetNodeInfo request before booting.
*
* OPT_WAIT_FOR_GETNODEINFO_JUMPER_GPIO_INVERT is used to allow
* the polarity of the jumper to be True Active
*
* wait OPT_WAIT_FOR_GETNODEINFO OPT_WAIT_FOR_GETNODEINFO_JUMPER_GPIO
* Jumper
* yes 1 0 x
* yes 1 1 Active
* no 1 1 Not Active
* no 0 0 X
* yes 0 1 Active
* no 0 1 Not Active
*
*/
#define OPT_WAIT_FOR_GETNODEINFO 0
#define OPT_WAIT_FOR_GETNODEINFO_JUMPER_GPIO 1
#define OPT_WAIT_FOR_GETNODEINFO_JUMPER_GPIO_INVERT 1
#define OPT_ENABLE_WD 1
#define OPT_RESTART_TIMEOUT_MS 20000
/* Reserved for the Booloader */
#define OPT_BOOTLOADER_SIZE_IN_K (1024*64)
/* Reserved for the application out of the total
* system flash minus the BOOTLOADER_SIZE_IN_K
*/
#define OPT_APPLICATION_RESERVER_IN_K 0
#define OPT_APPLICATION_IMAGE_OFFSET OPT_BOOTLOADER_SIZE_IN_K
#define OPT_APPLICATION_IMAGE_LENGTH (FLASH_SIZE-(OPT_BOOTLOADER_SIZE_IN_K+OPT_APPLICATION_RESERVER_IN_K))
#define FLASH_BASE STM32_FLASH_BASE
#define FLASH_SIZE STM32_FLASH_SIZE
#define APPLICATION_LOAD_ADDRESS (FLASH_BASE + OPT_APPLICATION_IMAGE_OFFSET)
#define APPLICATION_SIZE (FLASH_SIZE-OPT_APPLICATION_IMAGE_OFFSET)
#define APPLICATION_LAST_8BIT_ADDRRESS ((uint8_t *)((APPLICATION_LOAD_ADDRESS+APPLICATION_SIZE)-sizeof(uint8_t)))
#define APPLICATION_LAST_32BIT_ADDRRESS ((uint32_t *)((APPLICATION_LOAD_ADDRESS+APPLICATION_SIZE)-sizeof(uint32_t)))
#define APPLICATION_LAST_64BIT_ADDRRESS ((uint64_t *)((APPLICATION_LOAD_ADDRESS+APPLICATION_SIZE)-sizeof(uint64_t)))
/* If this board uses big flash that have large sectors */
#define OPT_USE_YIELD
/* Bootloader Option*****************************************************************
*
*/
#define GPIO_GETNODEINFO_JUMPER (GPIO_BOOT_CONFIG & ~GPIO_EXTI)
+130
View File
@@ -0,0 +1,130 @@
/****************************************************************************
*
* Copyright (c) 2025 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name PX4 nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/**
* @file can.c
*
* Board-specific CAN functions.
*/
/************************************************************************************
* Included Files
************************************************************************************/
#include <px4_platform_common/px4_config.h>
#include <errno.h>
#include <debug.h>
#include <nuttx/can/can.h>
#include <arch/board/board.h>
#include "chip.h"
#include "arm_internal.h"
#include "stm32.h"
#include "stm32_can.h"
#include "board_config.h"
#ifdef CONFIG_CAN
/************************************************************************************
* Pre-processor Definitions
************************************************************************************/
/* Configuration ********************************************************************/
#if defined(CONFIG_STM32_CAN1) && defined(CONFIG_STM32_CAN2)
# warning "Both CAN1 and CAN2 are enabled. Assuming only CAN1."
# undef CONFIG_STM32_CAN2
#endif
#ifdef CONFIG_STM32_CAN1
# define CAN_PORT 1
#else
# define CAN_PORT 2
#endif
/************************************************************************************
* Private Functions
************************************************************************************/
/************************************************************************************
* Public Functions
************************************************************************************/
int can_devinit(void);
/************************************************************************************
* Name: can_devinit
*
* Description:
* All STM32 architectures must provide the following interface to work with
* examples/can.
*
************************************************************************************/
int can_devinit(void)
{
static bool initialized = false;
struct can_dev_s *can;
int ret;
/* Check if we have already initialized */
if (!initialized) {
/* Call stm32_caninitialize() to get an instance of the CAN interface */
can = stm32_caninitialize(CAN_PORT);
if (can == NULL) {
canerr("ERROR: Failed to get CAN interface\n");
return -ENODEV;
}
/* Register the CAN driver at "/dev/can0" */
ret = can_register("/dev/can0", can);
if (ret < 0) {
canerr("ERROR: can_register failed: %d\n", ret);
return ret;
}
/* Now we are initialized */
initialized = true;
}
return OK;
}
#endif
+39
View File
@@ -0,0 +1,39 @@
/****************************************************************************
*
* Copyright (C) 2021 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name PX4 nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
#include <px4_arch/i2c_hw_description.h>
constexpr px4_i2c_bus_t px4_i2c_buses[I2C_BUS_MAX_BUS_ITEMS] = {
initI2CBusInternal(1),
initI2CBusExternal(2),
};
+168
View File
@@ -0,0 +1,168 @@
/****************************************************************************
*
* Copyright (c) 2025 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name PX4 nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/**
* @file init.c
*
* board specific early startup code. This file implements the
* board_app_initialize() function that is called early by nsh during startup.
*
* Code here is run before the rcS script is invoked; it should start required
* subsystems and perform board-specific initialization.
*/
#include <px4_platform_common/px4_config.h>
#include <px4_platform_common/tasks.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <debug.h>
#include <errno.h>
#include <syslog.h>
#include <nuttx/board.h>
#include <stm32.h>
#include "board_config.h"
#include "led.h"
#include <stm32_uart.h>
#include <arch/board/board.h>
#include <drivers/drv_hrt.h>
#include <drivers/drv_board_led.h>
#include <drivers/drv_watchdog.h>
#include <systemlib/px4_macros.h>
#include <px4_platform_common/init.h>
#include <px4_platform/gpio.h>
# if defined(FLASH_BASED_PARAMS)
# include <parameters/flashparams/flashfs.h>
#endif
/************************************************************************************
* Name: stm32_boardinitialize
*
* Description:
* All STM32 architectures must provide the following entry point. This entry point
* is called early in the initialization -- after all memory has been configured
* and mapped but before any devices have been initialized.
*
************************************************************************************/
__EXPORT void stm32_boardinitialize(void)
{
watchdog_init();
/* configure pins */
const uint32_t gpio[] = PX4_GPIO_INIT_LIST;
px4_gpio_init(gpio, arraySize(gpio));
// Configure SPI all interfaces GPIO & enable power.
stm32_spiinitialize();
// Check if button is held. If so go into gps passthrough mode
if (stm32_gpioread(GPIO_BTN_SAFETY)) {
rgb_led(128, 128, 128, 10);
stm32_configgpio(GPIO_USART1_TX_GPIO);
stm32_configgpio(GPIO_USART1_RX_GPIO);
stm32_configgpio(GPIO_USART2_TX_GPIO);
stm32_configgpio(GPIO_USART2_RX_GPIO);
while (1) {
watchdog_pet();
stm32_gpiowrite(GPIO_USART2_TX_GPIO, stm32_gpioread(GPIO_USART1_RX_GPIO));
stm32_gpiowrite(GPIO_USART1_TX_GPIO, stm32_gpioread(GPIO_USART2_RX_GPIO));
}
}
}
/****************************************************************************
* Name: board_app_initialize
*
* Description:
* Perform application specific initialization. This function is never
* called directly from application code, but only indirectly via the
* (non-standard) boardctl() interface using the command BOARDIOC_INIT.
*
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/
__EXPORT int board_app_initialize(uintptr_t arg)
{
px4_platform_init();
#if defined(SERIAL_HAVE_RXDMA)
// set up the serial DMA polling at 1ms intervals for received bytes that have not triggered a DMA event.
static struct hrt_call serial_dma_call;
hrt_call_every(&serial_dma_call, 1000, 1000, (hrt_callout)stm32_serial_dma_poll, NULL);
#endif
#if defined(FLASH_BASED_PARAMS)
static sector_descriptor_t params_sector_map[] = {
{2, 16 * 1024, 0x08008000},
{3, 16 * 1024, 0x0800C000},
{0, 0, 0},
};
/* Initialize the flashfs layer to use heap allocated memory */
int result = parameter_flashfs_init(params_sector_map, NULL, 0);
if (result != OK) {
syslog(LOG_ERR, "[boot] FAILED to init params in FLASH %d\n", result);
}
#endif // FLASH_BASED_PARAMS
/* Configure the HW based on the manifest */
//px4_platform_configure();
return OK;
}
+124
View File
@@ -0,0 +1,124 @@
/****************************************************************************
*
* Copyright (c) 2025 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name PX4 nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/**
* @file led.c
*
* 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>
#include "led.h"
#define TMR_BASE STM32_TIM1_BASE
#define TMR_FREQUENCY STM32_APB2_TIM1_CLKIN
#define TMR_REG(o) (TMR_BASE+(o))
void rgb_led(int r, int g, int b, int freqs)
{
long fosc = TMR_FREQUENCY;
long prescale = 2048;
long p1s = fosc / prescale;
long p0p5s = p1s / 2;
uint16_t val;
static bool once = 0;
if (!once) {
once = 1;
/* Enabel Clock to Block */
modifyreg32(STM32_RCC_APB2ENR, 0, RCC_APB2ENR_TIM1EN);
/* Reload */
val = getreg16(TMR_REG(STM32_BTIM_EGR_OFFSET));
val |= ATIM_EGR_UG;
putreg16(val, TMR_REG(STM32_BTIM_EGR_OFFSET));
/* Set Prescaler STM32_TIM_SETCLOCK */
putreg16(prescale, TMR_REG(STM32_BTIM_PSC_OFFSET));
/* Enable STM32_TIM_SETMODE*/
putreg16(ATIM_CR1_CEN | ATIM_CR1_ARPE, TMR_REG(STM32_BTIM_CR1_OFFSET));
putreg16((ATIM_CCMR_MODE_PWM1 << ATIM_CCMR1_OC1M_SHIFT) | ATIM_CCMR1_OC1PE |
(ATIM_CCMR_MODE_PWM1 << ATIM_CCMR1_OC2M_SHIFT) | ATIM_CCMR1_OC2PE, TMR_REG(STM32_GTIM_CCMR1_OFFSET));
putreg16((ATIM_CCMR_MODE_PWM1 << ATIM_CCMR2_OC3M_SHIFT) | ATIM_CCMR2_OC3PE, TMR_REG(STM32_GTIM_CCMR2_OFFSET));
putreg16(ATIM_CCER_CC3E | ATIM_CCER_CC3P |
ATIM_CCER_CC2E | ATIM_CCER_CC2P |
ATIM_CCER_CC1E | ATIM_CCER_CC1P, TMR_REG(STM32_GTIM_CCER_OFFSET));
stm32_configgpio(GPIO_TIM1_CH1);
stm32_configgpio(GPIO_TIM1_CH2);
stm32_configgpio(GPIO_TIM1_CH3);
/* master output enable = on */
putreg16(ATIM_BDTR_MOE, (TMR_REG(STM32_ATIM_BDTR_OFFSET)));
}
long p = freqs == 0 ? p1s : p1s / freqs;
putreg32(p, TMR_REG(STM32_BTIM_ARR_OFFSET));
p = freqs == 0 ? p1s + 1 : p0p5s / freqs;
putreg32((r * p) / 255, TMR_REG(STM32_GTIM_CCR1_OFFSET));
putreg32((g * p) / 255, TMR_REG(STM32_GTIM_CCR2_OFFSET));
putreg32((b * p) / 255, TMR_REG(STM32_GTIM_CCR3_OFFSET));
val = getreg16(TMR_REG(STM32_BTIM_CR1_OFFSET));
if (freqs == 0) {
val &= ~ATIM_CR1_CEN;
} else {
val |= ATIM_CR1_CEN;
}
putreg16(val, TMR_REG(STM32_BTIM_CR1_OFFSET));
}
+37
View File
@@ -0,0 +1,37 @@
/****************************************************************************
*
* Copyright (c) 2025 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.
*
****************************************************************************/
__BEGIN_DECLS
void rgb_led(int r, int g, int b, int freqs);
__END_DECLS
@@ -1,6 +1,6 @@
/****************************************************************************
*
* Copyright (c) 2020-2023 PX4 Development Team. All rights reserved.
* 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
@@ -31,54 +31,14 @@
*
****************************************************************************/
/**
* @file Sensor.hpp
* Abstract class for sensors
*
* @author Mathieu Bresciani <brescianimathieu@gmail.com>
*
*/
#include <px4_arch/spi_hw_description.h>
#include <drivers/drv_sensor.h>
#include <nuttx/spi/spi.h>
#ifndef EKF_SENSOR_HPP
#define EKF_SENSOR_HPP
#include <cstdint>
namespace estimator
{
namespace sensor
{
class Sensor
{
public:
virtual ~Sensor() {};
/*
* run sanity checks on the current data
* this has to be called immediately after
* setting new data
*/
virtual void runChecks() {};
/*
* return true if the sensor is healthy
*/
virtual bool isHealthy() const = 0;
/*
* return true if the delayed sample is healthy
* and can be fused in the estimator
*/
virtual bool isDataHealthy() const = 0;
/*
* return true if the sensor data rate is
* stable and high enough
*/
virtual bool isRegularlySendingData() const = 0;
constexpr px4_spi_bus_t px4_spi_buses[SPI_BUS_MAX_BUS_ITEMS] = {
initSPIBus(SPI::Bus::SPI1, {
initSPIDevice(DRV_IMU_DEVTYPE_ICM42688P, SPI::CS{GPIO::PortB, GPIO::Pin0}, SPI::DRDY{GPIO::PortB, GPIO::Pin1}),
}),
};
} // namespace sensor
} // namespace estimator
#endif // !EKF_SENSOR_HPP
static constexpr bool unused = validateSPIConfig(px4_spi_buses);
+17
View File
@@ -0,0 +1,17 @@
# UAVCAN boot loadable Module ID
set(uavcanblid_sw_version_major ${PX4_VERSION_MAJOR})
set(uavcanblid_sw_version_minor ${PX4_VERSION_MINOR})
add_definitions(
-DAPP_VERSION_MAJOR=${uavcanblid_sw_version_major}
-DAPP_VERSION_MINOR=${uavcanblid_sw_version_minor}
)
set(uavcanblid_hw_version_major 0)
set(uavcanblid_hw_version_minor 90)
set(uavcanblid_name "\"org.ark.f9p-gps\"")
add_definitions(
-DHW_UAVCAN_NAME=${uavcanblid_name}
-DHW_VERSION_MAJOR=${uavcanblid_hw_version_major}
-DHW_VERSION_MINOR=${uavcanblid_hw_version_minor}
)
@@ -25,6 +25,8 @@ param set-default SENS_IMU_TEMP 10.0
#param set-default SENS_IMU_TEMP_I 0.025
#param set-default SENS_IMU_TEMP_P 1.0
param set-default UAVCAN_ESC_IFACE 2
if ver hwtypecmp ARKV6X000
then
param set-default SENS_TEMP_ID 2818058
+2
View File
@@ -30,6 +30,8 @@ param set-default BAT1_V_DIV 21.0
param set-default RC_CRSF_PRT_CFG 300
param set-default RC_SBUS_PRT_CFG 0
param set-default UAVCAN_ESC_IFACE 1
param set-default IMU_GYRO_DNF_EN 3
# Single IMU
+2
View File
@@ -26,6 +26,8 @@ param set-default SENS_IMU_TEMP 10.0
#param set-default SENS_IMU_TEMP_I 0.025
#param set-default SENS_IMU_TEMP_P 1.0
param set-default UAVCAN_ESC_IFACE 1
if ver hwtypecmp ARKPI6X000
then
# TODO: Add the correct sensor ID
@@ -0,0 +1,5 @@
CONFIG_BOARD_TOOLCHAIN="arm-none-eabi"
CONFIG_BOARD_ARCHITECTURE="cortex-m4"
CONFIG_BOARD_ROMFSROOT=""
CONFIG_BOARD_CONSTRAINED_MEMORY=y
CONFIG_DRIVERS_BOOTLOADERS=y
+37
View File
@@ -0,0 +1,37 @@
CONFIG_BOARD_TOOLCHAIN="arm-none-eabi"
CONFIG_BOARD_ARCHITECTURE="cortex-m4"
CONFIG_BOARD_ROMFSROOT="cannode"
CONFIG_BOARD_CONSTRAINED_MEMORY=y
CONFIG_DRIVERS_BAROMETER_BMP388=y
CONFIG_DRIVERS_BOOTLOADERS=y
CONFIG_DRIVERS_GPS=y
CONFIG_DRIVERS_IMU_INVENSENSE_ICM42688P=y
CONFIG_DRIVERS_MAGNETOMETER_ST_IIS2MDC=y
CONFIG_DRIVERS_SAFETY_BUTTON=y
CONFIG_DRIVERS_TONE_ALARM=y
CONFIG_BOARD_UAVCAN_INTERFACES=1
CONFIG_DRIVERS_UAVCANNODE=y
CONFIG_UAVCANNODE_BEEP_COMMAND=y
CONFIG_UAVCANNODE_GNSS_FIX=y
CONFIG_UAVCANNODE_LIGHTS_COMMAND=y
CONFIG_UAVCANNODE_MAGNETIC_FIELD_STRENGTH=y
CONFIG_UAVCANNODE_RTK_DATA=y
CONFIG_UAVCANNODE_RAW_IMU=y
CONFIG_UAVCANNODE_SAFETY_BUTTON=y
CONFIG_UAVCANNODE_STATIC_PRESSURE=y
CONFIG_UAVCANNODE_STATIC_TEMPERATURE=y
CONFIG_MODULES_EKF2=y
CONFIG_MODULES_GYRO_CALIBRATION=y
CONFIG_MODULES_SENSORS=y
# CONFIG_SENSORS_VEHICLE_AIRSPEED is not set
# CONFIG_SENSORS_VEHICLE_AIR_DATA is not set
# CONFIG_SENSORS_VEHICLE_GPS_POSITION is not set
CONFIG_SYSTEMCMDS_PARAM=y
CONFIG_SYSTEMCMDS_PERF=y
CONFIG_SYSTEMCMDS_REBOOT=y
CONFIG_SYSTEMCMDS_SYSTEM_TIME=y
CONFIG_SYSTEMCMDS_TOP=y
CONFIG_SYSTEMCMDS_TOPIC_LISTENER=y
CONFIG_SYSTEMCMDS_UORB=y
CONFIG_SYSTEMCMDS_VER=y
CONFIG_SYSTEMCMDS_WORK_QUEUE=y
+13
View File
@@ -0,0 +1,13 @@
{
"board_id": 89,
"magic": "PX4FWv1",
"description": "Firmware for the ARK X20 GPS",
"image": "",
"build_time": 0,
"summary": "ARKX20GPS",
"version": "0.1",
"image_size": 0,
"image_maxsize": 2080768,
"git_identity": "",
"board_revision": 0
}
+13
View File
@@ -0,0 +1,13 @@
#!/bin/sh
#
# board specific defaults
#------------------------------------------------------------------------------
param set-default CBRK_IO_SAFETY 0
param set-default CANNODE_SUB_MBD 1
param set-default CANNODE_SUB_RTCM 1
param set-default GPS_1_GNSS 47
param set-default SENS_IMU_CLPNOTI 0
safety_button start
tone_alarm start
+11
View File
@@ -0,0 +1,11 @@
#!/bin/sh
#
# board sensors init
#------------------------------------------------------------------------------
gps start -d /dev/ttyS0 -p ubx
icm42688p -R 0 -s start
bmp388 -I -b 1 start
iis2mdc -R 2 -I -b 1 start
@@ -0,0 +1,57 @@
#
# This file is autogenerated: PLEASE DO NOT EDIT IT.
#
# You can use "make menuconfig" to make any modifications to the installed .config file.
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
# modifications.
#
CONFIG_ARCH="arm"
CONFIG_ARCH_BOARD_CUSTOM=y
CONFIG_ARCH_BOARD_CUSTOM_DIR="../../../../boards/ark/x20-gps/nuttx-config"
CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y
CONFIG_ARCH_BOARD_CUSTOM_NAME="px4"
CONFIG_ARCH_CHIP="stm32"
CONFIG_ARCH_CHIP_STM32=y
CONFIG_ARCH_CHIP_STM32F412CE=y
CONFIG_ARCH_INTERRUPTSTACK=4096
CONFIG_ARMV7M_MEMCPY=y
CONFIG_ARMV7M_USEBASEPRI=y
CONFIG_BINFMT_DISABLE=y
CONFIG_BOARDCTL=y
CONFIG_BOARD_LOOPSPERMSEC=16717
CONFIG_DEBUG_FULLOPT=y
CONFIG_DEBUG_SYMBOLS=y
CONFIG_DEBUG_TCBINFO=y
CONFIG_DEFAULT_SMALL=y
CONFIG_DISABLE_MOUNTPOINT=y
CONFIG_EXPERIMENTAL=y
CONFIG_FDCLONE_DISABLE=y
CONFIG_FDCLONE_STDIO=y
CONFIG_HAVE_CXX=y
CONFIG_HAVE_CXXINITIALIZE=y
CONFIG_IDLETHREAD_STACKSIZE=4096
CONFIG_INIT_STACKSIZE=4096
CONFIG_LIBC_FLOATINGPOINT=y
CONFIG_LIBC_LONG_LONG=y
CONFIG_LIBC_STRERROR=y
CONFIG_MM_REGIONS=2
CONFIG_NAME_MAX=0
CONFIG_NUNGET_CHARS=0
CONFIG_PREALLOC_TIMERS=0
CONFIG_PTHREAD_STACK_MIN=512
CONFIG_RAM_SIZE=262144
CONFIG_RAM_START=0x20010000
CONFIG_RAW_BINARY=y
CONFIG_SIG_DEFAULT=y
CONFIG_SIG_SIGALRM_ACTION=y
CONFIG_SIG_SIGUSR1_ACTION=y
CONFIG_SIG_SIGUSR2_ACTION=y
CONFIG_STACK_COLORATION=y
CONFIG_START_DAY=30
CONFIG_START_MONTH=11
CONFIG_STDIO_DISABLE_BUFFERING=y
CONFIG_STM32_FLASH_CONFIG_G=y
CONFIG_STM32_NOEXT_VECTORS=y
CONFIG_STM32_TIM8=y
CONFIG_TASK_NAME_SIZE=0
CONFIG_USEC_PER_TICK=1000
@@ -0,0 +1,152 @@
/************************************************************************************
* configs/px4fmu/include/board.h
* include/arch/board/board.h
*
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
************************************************************************************/
#include "board_dma_map.h"
#ifndef __ARCH_BOARD_BOARD_H
#define __ARCH_BOARD_BOARD_H
#include <nuttx/config.h>
#ifndef __ASSEMBLY__
# include <stdint.h>
#endif
#include <stm32.h>
/* HSI - 8 MHz RC factory-trimmed
* LSI - 32 KHz RC
* HSE - 8 MHz Crystal
* LSE - not installed
*/
#define STM32_BOARD_USEHSE 1
#define STM32_BOARD_XTAL 8000000
#define STM32_HSE_FREQUENCY STM32_BOARD_XTAL
#define STM32_HSI_FREQUENCY 16000000ul
#define STM32_LSI_FREQUENCY 32000
/* Main PLL Configuration */
#define STM32_PLLCFG_PLLM RCC_PLLCFG_PLLM(8)
#define STM32_PLLCFG_PLLN RCC_PLLCFG_PLLN(384)
#define STM32_PLLCFG_PLLP RCC_PLLCFG_PLLP_4
#define STM32_PLLCFG_PLLQ RCC_PLLCFG_PLLQ(8)
#define STM32_PLLCFG_PLLR RCC_PLLCFG_PLLR(2)
#define STM32_RCC_PLLI2SCFGR_PLLI2SM RCC_PLLI2SCFGR_PLLI2SM(16)
#define STM32_RCC_PLLI2SCFGR_PLLI2SN RCC_PLLI2SCFGR_PLLI2SN(192)
#define STM32_RCC_PLLI2SCFGR_PLLI2SQ RCC_PLLI2SCFGR_PLLI2SQ(2)
#define STM32_RCC_PLLI2SCFGR_PLLI2SR RCC_PLLI2SCFGR_PLLI2SR(2)
#define STM32_RCC_PLLI2SCFGR_PLLI2SSRC RCC_PLLI2SCFGR_PLLI2SSRC(0) /* HSE or HSI depending on PLLSRC of PLLCFGR*/
#define STM32_RCC_DCKCFGR2_CK48MSEL RCC_DCKCFGR2_CK48MSEL_PLL
#define STM32_RCC_DCKCFGR2_FMPI2C1SEL RCC_DCKCFGR2_FMPI2C1SEL_APB
#define STM32_RCC_DCKCFGR2_SDIOSEL RCC_DCKCFGR2_SDIOSEL_48MHZ
#define STM32_SYSCLK_FREQUENCY 96000000ul
/* AHB clock (HCLK) is SYSCLK (96MHz) */
#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/2 (48MHz) */
#define STM32_RCC_CFGR_PPRE1 RCC_CFGR_PPRE1_HCLKd2 /* PCLK1 = HCLK / 2 */
#define STM32_PCLK1_FREQUENCY (STM32_HCLK_FREQUENCY/2)
/* Timers driven from APB1 will be twice PCLK1 (see page 112 of reference manual) */
#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_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 (96MHz) */
#define STM32_RCC_CFGR_PPRE2 RCC_CFGR_PPRE2_HCLK /* PCLK2 = HCLK */
#define STM32_PCLK2_FREQUENCY (STM32_HCLK_FREQUENCY)
/* Timers driven from APB2 will be PCLK2 since no prescale division */
#define STM32_APB2_TIM1_CLKIN (STM32_PCLK2_FREQUENCY)
#define STM32_APB2_TIM8_CLKIN (STM32_PCLK2_FREQUENCY)
#define STM32_APB2_TIM9_CLKIN (STM32_PCLK2_FREQUENCY)
#define STM32_APB2_TIM10_CLKIN (STM32_PCLK2_FREQUENCY)
#define STM32_APB2_TIM11_CLKIN (STM32_PCLK2_FREQUENCY)
/* Timer Frequencies, if APBx is set to 1, frequency is same to APBx otherwise frequency is 2xAPBx. */
#define BOARD_TIM2_FREQUENCY (2 * STM32_PCLK1_FREQUENCY)
#define BOARD_TIM3_FREQUENCY (2 * STM32_PCLK1_FREQUENCY)
#define BOARD_TIM4_FREQUENCY (2 * STM32_PCLK1_FREQUENCY)
#define BOARD_TIM5_FREQUENCY (2 * STM32_PCLK1_FREQUENCY)
#define BOARD_TIM6_FREQUENCY (2 * STM32_PCLK1_FREQUENCY)
#define BOARD_TIM7_FREQUENCY (2 * STM32_PCLK1_FREQUENCY)
#define BOARD_TIM8_FREQUENCY (2 * STM32_PCLK2_FREQUENCY)
/* Alternate function pin selections ************************************************/
/* UARTs */
#define GPIO_USART1_RX GPIO_USART1_RX_2
#define GPIO_USART1_TX GPIO_USART1_TX_3
#define GPIO_USART2_RX GPIO_USART2_RX_1
#define GPIO_USART2_TX GPIO_USART2_TX_1
/* CAN */
#define GPIO_CAN1_RX GPIO_CAN1_RX_1
#define GPIO_CAN1_TX GPIO_CAN1_TX_1
/* I2C */
#define GPIO_MCU_I2C1_SCL
#define GPIO_MCU_I2C1_SDA
#define GPIO_I2C1_SCL GPIO_I2C1_SCL_1
#define GPIO_I2C1_SDA GPIO_I2C1_SDA_1
#define GPIO_I2C1_SCL_GPIO (GPIO_OUTPUT | GPIO_OPENDRAIN |GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN6)
#define GPIO_I2C1_SDA_GPIO (GPIO_OUTPUT | GPIO_OPENDRAIN |GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN7)
#define GPIO_I2C2_SCL GPIO_I2C2_SCL_1
#define GPIO_I2C2_SDA GPIO_I2C2_SDA_4
#define GPIO_I2C2_SCL_GPIO (GPIO_OUTPUT | GPIO_OPENDRAIN |GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN9)
#define GPIO_I2C2_SDA_GPIO (GPIO_OUTPUT | GPIO_OPENDRAIN |GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN10)
/* SPI */
#define GPIO_SPI1_MISO GPIO_SPI1_MISO_1
#define GPIO_SPI1_MOSI GPIO_SPI1_MOSI_1
#define GPIO_SPI1_SCK GPIO_SPI1_SCK_1
#endif /* __ARCH_BOARD_BOARD_H */
@@ -0,0 +1,46 @@
/****************************************************************************
*
* Copyright (c) 2021 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name PX4 nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
#pragma once
// DMA1 Channel/Stream Selections
//--------------------------------------------//---------------------------//----------------
// DMA2 Channel/Stream Selections
//--------------------------------------------//---------------------------//----------------
#define DMACHAN_SPI1_RX DMAMAP_SPI1_RX_1 // DMA2, Stream 0, Channel 3
#define DMACHAN_SPI1_TX DMAMAP_SPI1_TX_1 // DMA2, Stream 3, Channel 3
#define DMACHAN_USART1_RX DMAMAP_USART1_RX_1 // DMA2, Stream 2, Channel 4
#define DMAMAP_USART1_RX DMAMAP_USART1_RX_1
//#define DMACHAN_USART1_TX DMAMAP_USART1_TX // DMA2, Stream 7, Channel 4
@@ -0,0 +1,153 @@
#
# 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_DISABLE_PTHREAD is not set
# CONFIG_NSH_DISABLEBG is not set
# CONFIG_NSH_DISABLESCRIPT is not set
# CONFIG_NSH_DISABLE_CAT is not set
# CONFIG_NSH_DISABLE_CD is not set
# CONFIG_NSH_DISABLE_CP is not set
# CONFIG_NSH_DISABLE_DATE is not set
# CONFIG_NSH_DISABLE_DF is not set
# CONFIG_NSH_DISABLE_ECHO is not set
# CONFIG_NSH_DISABLE_ENV is not set
# CONFIG_NSH_DISABLE_EXEC is not set
# CONFIG_NSH_DISABLE_EXPORT is not set
# CONFIG_NSH_DISABLE_FREE is not set
# CONFIG_NSH_DISABLE_GET is not set
# CONFIG_NSH_DISABLE_HELP is not set
# CONFIG_NSH_DISABLE_ITEF is not set
# CONFIG_NSH_DISABLE_KILL is not set
# CONFIG_NSH_DISABLE_LOOPS is not set
# CONFIG_NSH_DISABLE_LS is not set
# CONFIG_NSH_DISABLE_MKDIR is not set
# CONFIG_NSH_DISABLE_MOUNT is not set
# CONFIG_NSH_DISABLE_MV is not set
# CONFIG_NSH_DISABLE_PS is not set
# CONFIG_NSH_DISABLE_PSSTACKUSAGE is not set
# CONFIG_NSH_DISABLE_PWD is not set
# CONFIG_NSH_DISABLE_RM is not set
# CONFIG_NSH_DISABLE_RMDIR is not set
# CONFIG_NSH_DISABLE_SEMICOLON is not set
# CONFIG_NSH_DISABLE_SET is not set
# CONFIG_NSH_DISABLE_SLEEP is not set
# CONFIG_NSH_DISABLE_SOURCE is not set
# CONFIG_NSH_DISABLE_TEST is not set
# CONFIG_NSH_DISABLE_TIME is not set
# CONFIG_NSH_DISABLE_UMOUNT is not set
# CONFIG_NSH_DISABLE_UNSET is not set
# CONFIG_NSH_DISABLE_USLEEP is not set
CONFIG_ARCH="arm"
CONFIG_ARCH_BOARD_CUSTOM=y
CONFIG_ARCH_BOARD_CUSTOM_DIR="../../../../boards/ark/x20-gps/nuttx-config"
CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y
CONFIG_ARCH_BOARD_CUSTOM_NAME="px4"
CONFIG_ARCH_CHIP="stm32"
CONFIG_ARCH_CHIP_STM32=y
CONFIG_ARCH_CHIP_STM32F412CE=y
CONFIG_ARCH_INTERRUPTSTACK=768
CONFIG_ARCH_STACKDUMP=y
CONFIG_ARMV7M_MEMCPY=y
CONFIG_ARMV7M_USEBASEPRI=y
CONFIG_BOARDCTL_RESET=y
CONFIG_BOARD_ASSERT_RESET_VALUE=0
CONFIG_BOARD_LOOPSPERMSEC=16717
CONFIG_BOARD_RESET_ON_ASSERT=2
CONFIG_BUILTIN=y
CONFIG_DEBUG_FULLOPT=y
CONFIG_DEBUG_HARDFAULT_ALERT=y
CONFIG_DEBUG_SYMBOLS=y
CONFIG_DEBUG_TCBINFO=y
CONFIG_DEFAULT_SMALL=y
CONFIG_FDCLONE_STDIO=y
CONFIG_FS_CROMFS=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_INIT_ENTRYPOINT="nsh_main"
CONFIG_INIT_STACKSIZE=2624
CONFIG_LIBC_FLOATINGPOINT=y
CONFIG_LIBC_LONG_LONG=y
CONFIG_LIBC_MAX_EXITFUNS=1
CONFIG_MEMSET_64BIT=y
CONFIG_MEMSET_OPTSPEED=y
CONFIG_MM_REGIONS=2
CONFIG_NAME_MAX=40
CONFIG_NSH_ARCHINIT=y
CONFIG_NSH_ARGCAT=y
CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_CMDPARMS=y
CONFIG_NSH_CROMFSETC=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_VARS=y
CONFIG_PREALLOC_TIMERS=50
CONFIG_PTHREAD_MUTEX_ROBUST=y
CONFIG_PTHREAD_STACK_MIN=512
CONFIG_RAM_SIZE=262144
CONFIG_RAM_START=0x20000000
CONFIG_RAW_BINARY=y
CONFIG_SCHED_HPWORK=y
CONFIG_SCHED_HPWORKPRIORITY=249
CONFIG_SCHED_HPWORKSTACKSIZE=1280
CONFIG_SCHED_INSTRUMENTATION=y
CONFIG_SCHED_INSTRUMENTATION_EXTERNAL=y
CONFIG_SCHED_INSTRUMENTATION_SWITCH=y
CONFIG_SCHED_WAITPID=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=32
CONFIG_STM32_ADC1=y
CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y
CONFIG_STM32_DMA1=y
CONFIG_STM32_DMA2=y
CONFIG_STM32_FLASH_CONFIG_G=y
CONFIG_STM32_FLASH_PREFETCH=y
CONFIG_STM32_FLOWCONTROL_BROKEN=y
CONFIG_STM32_I2C1=y
CONFIG_STM32_I2C2=y
CONFIG_STM32_JTAG_SW_ENABLE=y
CONFIG_STM32_PWR=y
CONFIG_STM32_SERIALBRK_BSDCOMPAT=y
CONFIG_STM32_SERIAL_DISABLE_REORDERING=y
CONFIG_STM32_SPI1=y
CONFIG_STM32_SPI1_DMA=y
CONFIG_STM32_SPI1_DMA_BUFFER=1024
CONFIG_STM32_TIM8=y
CONFIG_STM32_USART1=y
CONFIG_STM32_USART2=y
CONFIG_STM32_USART_BREAKS=y
CONFIG_STM32_WWDG=y
CONFIG_SYSTEM_NSH=y
CONFIG_TASK_NAME_SIZE=24
CONFIG_USART1_BAUD=57600
CONFIG_USART1_RXBUFSIZE=2000
CONFIG_USART1_RXDMA=y
CONFIG_USART1_TXBUFSIZE=2000
CONFIG_USART2_BAUD=57600
CONFIG_USART2_RXBUFSIZE=600
CONFIG_USART2_SERIAL_CONSOLE=y
CONFIG_USART2_TXBUFSIZE=1100
CONFIG_USEC_PER_TICK=1000
@@ -0,0 +1,134 @@
/****************************************************************************
* nuttx-config/scripts/canbootloader_script.ld
*
* Copyright (c) 2025 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/* The STM32F412 has 1M of FLASH beginning at address 0x0800:0000 and
* 256Kb of SRAM. SRAM is split up into three blocks:
*
* 1) 112Kb of SRAM beginning at address 0x2000:0000
* 2) 16Kb of SRAM beginning at address 0x2001:c000
* 3) 64Kb of SRAM beginning at address 0x2002:0000
* 4) 64Kb of TCM SRAM beginning at address 0x1000:0000
*
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
* where the code expects to begin execution by jumping to the entry point in
* the 0x0800:0000 address range.
*
* The first 0x10000 of flash is reserved for the bootloader.
*/
MEMORY
{
flash (rx) : ORIGIN = 0x08000000, LENGTH = 32K
sram (rwx) : ORIGIN = 0x20000000, LENGTH = 192K
}
OUTPUT_ARCH(arm)
ENTRY(__start) /* treat __start as the anchor for dead code stripping */
EXTERN(_vectors) /* force the vectors to be included in the output */
/*
* Ensure that abort() is present in the final object. The exception handling
* code pulled in by libgcc.a requires it (and that code cannot be easily avoided).
*/
EXTERN(abort)
SECTIONS
{
.text : {
_stext = ABSOLUTE(.);
*(.vectors)
*(.text .text.*)
*(.fixup)
*(.gnu.warning)
*(.rodata .rodata.*)
*(.gnu.linkonce.t.*)
*(.got)
*(.gcc_except_table)
*(.gnu.linkonce.r.*)
_etext = ABSOLUTE(.);
} > flash
/*
* Init functions (static constructors and the like)
*/
.init_section : {
_sinit = ABSOLUTE(.);
KEEP(*(.init_array .init_array.*))
_einit = ABSOLUTE(.);
} > flash
.ARM.extab : {
*(.ARM.extab*)
} > flash
__exidx_start = ABSOLUTE(.);
.ARM.exidx : {
*(.ARM.exidx*)
} > flash
__exidx_end = ABSOLUTE(.);
_eronly = ABSOLUTE(.);
.data : {
_sdata = ABSOLUTE(.);
*(.data .data.*)
*(.gnu.linkonce.d.*)
CONSTRUCTORS
_edata = ABSOLUTE(.);
} > sram AT > flash
.bss : {
_sbss = ABSOLUTE(.);
*(.bss .bss.*)
*(.gnu.linkonce.b.*)
*(COMMON)
. = ALIGN(4);
_ebss = ABSOLUTE(.);
} > sram
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { *(.comment) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_info 0 : { *(.debug_info) }
.debug_line 0 : { *(.debug_line) }
.debug_pubnames 0 : { *(.debug_pubnames) }
.debug_aranges 0 : { *(.debug_aranges) }
}
@@ -0,0 +1,146 @@
/****************************************************************************
* scripts/ld.script
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/* The STM32F412 has 1M of FLASH beginning at address 0x0800:0000 and
* 256Kb of SRAM. SRAM is split up into three blocks:
*
* 1) 112Kb of SRAM beginning at address 0x2000:0000
* 2) 16Kb of SRAM beginning at address 0x2001:c000
* 3) 64Kb of SRAM beginning at address 0x2002:0000
* 4) 64Kb of TCM SRAM beginning at address 0x1000:0000
*
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
* where the code expects to begin execution by jumping to the entry point in
* the 0x0800:0000 address range.
*
* The first 0x10000 of flash is reserved for the bootloader.
*/
MEMORY
{
flash (rx) : ORIGIN = 0x08010000, LENGTH = 928K
sram (rwx) : ORIGIN = 0x20000000, LENGTH = 192K
}
OUTPUT_ARCH(arm)
ENTRY(__start) /* treat __start as the anchor for dead code stripping */
EXTERN(_vectors) /* force the vectors to be included in the output */
/*
* Ensure that abort() is present in the final object. The exception handling
* code pulled in by libgcc.a requires it (and that code cannot be easily avoided).
*/
EXTERN(abort)
EXTERN(_bootdelay_signature)
SECTIONS
{
.text : {
_stext = ABSOLUTE(.);
*(.vectors)
. = ALIGN(8);
/*
* This section positions the app_descriptor_t used
* by the make_can_boot_descriptor.py tool to set
* the application image's descriptor so that the
* uavcan bootloader has the ability to validate the
* image crc, size etc
*/
KEEP(*(.app_descriptor))
*(.text .text.*)
*(.fixup)
*(.gnu.warning)
*(.rodata .rodata.*)
*(.gnu.linkonce.t.*)
*(.got)
*(.gcc_except_table)
*(.gnu.linkonce.r.*)
_etext = ABSOLUTE(.);
} > flash
/*
* Init functions (static constructors and the like)
*/
.init_section : {
_sinit = ABSOLUTE(.);
KEEP(*(.init_array .init_array.*))
_einit = ABSOLUTE(.);
} > flash
.ARM.extab : {
*(.ARM.extab*)
} > flash
__exidx_start = ABSOLUTE(.);
.ARM.exidx : {
*(.ARM.exidx*)
} > flash
__exidx_end = ABSOLUTE(.);
_eronly = ABSOLUTE(.);
.data : {
_sdata = ABSOLUTE(.);
*(.data .data.*)
*(.gnu.linkonce.d.*)
CONSTRUCTORS
_edata = ABSOLUTE(.);
} > sram AT > flash
.bss : {
_sbss = ABSOLUTE(.);
*(.bss .bss.*)
*(.gnu.linkonce.b.*)
*(COMMON)
. = ALIGN(4);
_ebss = ABSOLUTE(.);
} > sram
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { *(.comment) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_info 0 : { *(.debug_info) }
.debug_line 0 : { *(.debug_line) }
.debug_pubnames 0 : { *(.debug_pubnames) }
.debug_aranges 0 : { *(.debug_aranges) }
}
+66
View File
@@ -0,0 +1,66 @@
############################################################################
#
# Copyright (c) 2025 PX4 Development Team. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name PX4 nor the names of its contributors may be
# used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
############################################################################
if("${PX4_BOARD_LABEL}" STREQUAL "canbootloader")
add_library(drivers_board
boot_config.h
boot.c
led.c
)
target_link_libraries(drivers_board
PRIVATE
nuttx_arch
nuttx_drivers
canbootloader
)
target_include_directories(drivers_board PRIVATE ${PX4_SOURCE_DIR}/platforms/nuttx/src/canbootloader)
else()
add_library(drivers_board
can.c
i2c.cpp
init.c
led.c
spi.cpp
)
target_link_libraries(drivers_board
PRIVATE
arch_spi
drivers__led # drv_led_start
nuttx_arch
nuttx_drivers
px4_layer
)
endif()
+125
View File
@@ -0,0 +1,125 @@
/****************************************************************************
*
* 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 board_config.h
*
* board internal definitions
*/
#pragma once
#include <px4_platform_common/px4_config.h>
#include <nuttx/compiler.h>
#include <stdint.h>
/* BUTTON */
#define GPIO_BTN_SAFETY /* PB15 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_PORTB|GPIO_PIN15)
/* Safety LED */
#define GPIO_LED_SAFETY /* PA1 */ (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTA|GPIO_PIN1)
/* Tone alarm output. */
#define TONE_ALARM_TIMER 2 /* timer 2 */
#define TONE_ALARM_CHANNEL 1 /* channel 1 */
#define GPIO_TONE_ALARM_IDLE /* PA0 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTA|GPIO_PIN0)
#define GPIO_TONE_ALARM /* PA0 */ (GPIO_ALT|GPIO_AF1|GPIO_SPEED_2MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN0)
/* CAN Silent mode control */
#define GPIO_CAN1_SILENT_S0 /* PB12 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN12)
/* CAN termination software control */
#define GPIO_CAN1_TERMINATION /* PB13 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN13)
#define GPIO_CAN_TERM GPIO_CAN1_TERMINATION
/* ICM42688p FSYNC */
#define GPIO_42688P_FSYNC /* PB8 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN8)
/* Boot config */
#define GPIO_BOOT_CONFIG /* PC15 */ (GPIO_INPUT|GPIO_PULLUP|GPIO_PORTC|GPIO_PIN15|GPIO_EXTI)
/* LEDs are driven with open drain to support Anode to 5V or 3.3V */
#define GPIO_TIM1_CH1 /* PA8 */ (GPIO_TIM1_CH1_1|GPIO_OPENDRAIN|GPIO_SPEED_2MHz)
#define GPIO_TIM1_CH2 /* PA9 */ (GPIO_TIM1_CH2_1|GPIO_OPENDRAIN|GPIO_SPEED_2MHz)
#define GPIO_TIM1_CH3 /* PA10 */ (GPIO_TIM1_CH3_1|GPIO_OPENDRAIN|GPIO_SPEED_2MHz)
#define GPIO_I2C1_SCL_RESET /* PB6 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN6)
#define GPIO_I2C1_SDA_RESET /* PB7 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN7)
#define GPIO_I2C2_SCL_RESET /* PB10 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN10)
#define GPIO_I2C2_SDA_RESET /* PB9 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN9)
#define GPIO_I2C2_SCL_RESET /* PB10 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN10)
#define GPIO_I2C2_SDA_RESET /* PB9 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN9)
#define GPIO_USART1_RX_GPIO (GPIO_INPUT|GPIO_PULLUP|GPIO_SPEED_50MHz|GPIO_PORTB|GPIO_PIN3)
#define GPIO_USART1_TX_GPIO (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_PULLUP|GPIO_SPEED_50MHz|GPIO_PORTA|GPIO_PIN15)
#define GPIO_USART2_RX_GPIO (GPIO_INPUT|GPIO_PULLUP|GPIO_SPEED_50MHz|GPIO_PORTA|GPIO_PIN3)
#define GPIO_USART2_TX_GPIO (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_PULLUP|GPIO_SPEED_50MHz|GPIO_PORTA|GPIO_PIN2)
#define FLASH_BASED_PARAMS
/* High-resolution timer */
#define HRT_TIMER 3 /* use timer 3 for the HRT */
#define HRT_TIMER_CHANNEL 4 /* use capture/compare channel 4 */
#define PX4_GPIO_INIT_LIST { \
GPIO_BTN_SAFETY, \
GPIO_LED_SAFETY, \
GPIO_I2C1_SCL_RESET, \
GPIO_I2C1_SDA_RESET, \
GPIO_I2C2_SCL_RESET, \
GPIO_I2C2_SDA_RESET, \
GPIO_42688P_FSYNC, \
GPIO_BOOT_CONFIG, \
GPIO_CAN1_TX, \
GPIO_CAN1_RX, \
GPIO_CAN1_SILENT_S0, \
GPIO_CAN1_TERMINATION, \
}
__BEGIN_DECLS
#define BOARD_HAS_N_S_RGB_LED 1
#define BOARD_MAX_LEDS BOARD_HAS_N_S_RGB_LED
#ifndef __ASSEMBLY__
extern void stm32_spiinitialize(void);
#include <px4_platform_common/board_common.h>
#endif /* __ASSEMBLY__ */
__END_DECLS
+188
View File
@@ -0,0 +1,188 @@
/****************************************************************************
*
* Copyright (c) 2025 PX4 Development Team. All rights reserved.
* Author: Ben Dyer <ben_dyer@mac.com>
* Pavel Kirienko <pavel.kirienko@zubax.com>
* David Sidrane <david_s5@nscdg.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name PX4 nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/****************************************************************************
* Included Files
****************************************************************************/
#include <px4_config.h>
#include <stdint.h>
#include "boot_config.h"
#include "board.h"
#include <debug.h>
#include <string.h>
#include <arch/board/board.h>
#include <nuttx/board.h>
#include "led.h"
/************************************************************************************
* Name: stm32_boardinitialize
*
* Description:
* All STM32 architectures must provide the following entry point. This entry point
* is called early in the initialization -- after all memory has been configured
* and mapped but before any devices have been initialized.
*
************************************************************************************/
__EXPORT void stm32_boardinitialize(void)
{
putreg32(getreg32(STM32_RCC_APB1ENR) | RCC_APB1ENR_CAN1EN, STM32_RCC_APB1ENR);
stm32_configgpio(GPIO_CAN1_RX);
stm32_configgpio(GPIO_CAN1_TX);
stm32_configgpio(GPIO_CAN1_SILENT_S0);
stm32_configgpio(GPIO_CAN1_TERMINATION);
putreg32(getreg32(STM32_RCC_APB1RSTR) | RCC_APB1RSTR_CAN1RST, STM32_RCC_APB1RSTR);
putreg32(getreg32(STM32_RCC_APB1RSTR) & ~RCC_APB1RSTR_CAN1RST, STM32_RCC_APB1RSTR);
#if defined(OPT_WAIT_FOR_GETNODEINFO_JUMPER_GPIO)
stm32_configgpio(GPIO_GETNODEINFO_JUMPER);
#endif
}
/************************************************************************************
* Name: board_deinitialize
*
* Description:
* This function is called by the bootloader code prior to booting
* the application. Is should place the HW into an benign initialized state.
*
************************************************************************************/
void board_deinitialize(void)
{
putreg32(getreg32(STM32_RCC_APB1RSTR) | RCC_APB1RSTR_CAN1RST, STM32_RCC_APB1RSTR);
}
/****************************************************************************
* Name: board_get_product_name
*
* Description:
* Called to retrieve the product name. The returned value is a assumed
* to be written to a pascal style string that will be length prefixed
* and not null terminated
*
* Input Parameters:
* product_name - A pointer to a buffer to write the name.
* maxlen - The maximum number of charter that can be written
*
* Returned Value:
* The length of characters written to the buffer.
*
****************************************************************************/
uint8_t board_get_product_name(uint8_t *product_name, size_t maxlen)
{
DEBUGASSERT(maxlen > UAVCAN_STRLEN(HW_UAVCAN_NAME));
memcpy(product_name, HW_UAVCAN_NAME, UAVCAN_STRLEN(HW_UAVCAN_NAME));
return UAVCAN_STRLEN(HW_UAVCAN_NAME);
}
/****************************************************************************
* Name: board_get_hardware_version
*
* Description:
* Called to retrieve the hardware version information. The function
* will first initialize the the callers struct to all zeros.
*
* Input Parameters:
* hw_version - A pointer to a uavcan_hardwareversion_t.
*
* Returned Value:
* Length of the unique_id
*
****************************************************************************/
size_t board_get_hardware_version(uavcan_HardwareVersion_t *hw_version)
{
memset(hw_version, 0, sizeof(uavcan_HardwareVersion_t));
hw_version->major = HW_VERSION_MAJOR;
hw_version->minor = HW_VERSION_MINOR;
return board_get_mfguid(*(mfguid_t *) hw_version->unique_id);
}
/****************************************************************************
* Name: board_indicate
*
* Description:
* Provides User feedback to indicate the state of the bootloader
* on board specific hardware.
*
* Input Parameters:
* indication - A member of the uiindication_t
*
* Returned Value:
* None
*
****************************************************************************/
#define led(n, code, r , g , b, h) {.red = (r),.green = (g), .blue = (b),.hz = (h)}
typedef begin_packed_struct struct led_t {
uint8_t red;
uint8_t green;
uint8_t blue;
uint8_t hz;
} end_packed_struct led_t;
static const led_t i2l[] = {
led(0, off, 0, 0, 0, 0),
led(1, reset, 128, 128, 128, 30),
led(2, autobaud_start, 0, 128, 0, 1),
led(3, autobaud_end, 0, 128, 0, 2),
led(4, allocation_start, 0, 0, 64, 2),
led(5, allocation_end, 0, 128, 64, 3),
led(6, fw_update_start, 32, 128, 64, 3),
led(7, fw_update_erase_fail, 32, 128, 32, 3),
led(8, fw_update_invalid_response, 64, 0, 0, 1),
led(9, fw_update_timeout, 64, 0, 0, 2),
led(a, fw_update_invalid_crc, 64, 0, 0, 4),
led(b, jump_to_app, 0, 128, 0, 10),
};
void board_indicate(uiindication_t indication)
{
rgb_led(i2l[indication].red,
i2l[indication].green,
i2l[indication].blue,
i2l[indication].hz);
}
+130
View File
@@ -0,0 +1,130 @@
/****************************************************************************
*
* Copyright (c) 2025 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name PX4 nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/*
* @file boot_config.h
*
* bootloader definitions that configures the behavior and options
* of the Boot loader
* This file is relies on the parent folder's boot_config.h file and defines
* different usages of the hardware for bootloading
*/
#pragma once
/************************************************************************************
* Included Files
************************************************************************************/
/* Bring in the board_config.h definitions
* todo:make this be pulled in from a targed's build
* files in nuttx*/
#include "board_config.h"
#include "uavcan.h"
#include <nuttx/compiler.h>
#include <stdint.h>
#include <stm32_flash.h>
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
#define OPT_PREFERRED_NODE_ID ANY_NODE_ID
//todo:wrap OPT_x in in ifdefs for command line definitions
#define OPT_TBOOT_MS 3000
#define OPT_NODE_STATUS_RATE_MS 800
#define OPT_NODE_INFO_RATE_MS 50
#define OPT_BL_NUMBER_TIMERS 7
/*
* This Option set is set to 1 ensure a provider of firmware has an
* opportunity update the node's firmware.
* This Option is the default policy and can be overridden by
* a jumper
* When this Policy is set, the node will ignore tboot and
* wait indefinitely for a GetNodeInfo request before booting.
*
* OPT_WAIT_FOR_GETNODEINFO_JUMPER_GPIO_INVERT is used to allow
* the polarity of the jumper to be True Active
*
* wait OPT_WAIT_FOR_GETNODEINFO OPT_WAIT_FOR_GETNODEINFO_JUMPER_GPIO
* Jumper
* yes 1 0 x
* yes 1 1 Active
* no 1 1 Not Active
* no 0 0 X
* yes 0 1 Active
* no 0 1 Not Active
*
*/
#define OPT_WAIT_FOR_GETNODEINFO 0
#define OPT_WAIT_FOR_GETNODEINFO_JUMPER_GPIO 1
#define OPT_WAIT_FOR_GETNODEINFO_JUMPER_GPIO_INVERT 1
#define OPT_ENABLE_WD 1
#define OPT_RESTART_TIMEOUT_MS 20000
/* Reserved for the Booloader */
#define OPT_BOOTLOADER_SIZE_IN_K (1024*64)
/* Reserved for the application out of the total
* system flash minus the BOOTLOADER_SIZE_IN_K
*/
#define OPT_APPLICATION_RESERVER_IN_K 0
#define OPT_APPLICATION_IMAGE_OFFSET OPT_BOOTLOADER_SIZE_IN_K
#define OPT_APPLICATION_IMAGE_LENGTH (FLASH_SIZE-(OPT_BOOTLOADER_SIZE_IN_K+OPT_APPLICATION_RESERVER_IN_K))
#define FLASH_BASE STM32_FLASH_BASE
#define FLASH_SIZE STM32_FLASH_SIZE
#define APPLICATION_LOAD_ADDRESS (FLASH_BASE + OPT_APPLICATION_IMAGE_OFFSET)
#define APPLICATION_SIZE (FLASH_SIZE-OPT_APPLICATION_IMAGE_OFFSET)
#define APPLICATION_LAST_8BIT_ADDRRESS ((uint8_t *)((APPLICATION_LOAD_ADDRESS+APPLICATION_SIZE)-sizeof(uint8_t)))
#define APPLICATION_LAST_32BIT_ADDRRESS ((uint32_t *)((APPLICATION_LOAD_ADDRESS+APPLICATION_SIZE)-sizeof(uint32_t)))
#define APPLICATION_LAST_64BIT_ADDRRESS ((uint64_t *)((APPLICATION_LOAD_ADDRESS+APPLICATION_SIZE)-sizeof(uint64_t)))
/* If this board uses big flash that have large sectors */
#define OPT_USE_YIELD
/* Bootloader Option*****************************************************************
*
*/
#define GPIO_GETNODEINFO_JUMPER (GPIO_BOOT_CONFIG & ~GPIO_EXTI)
+130
View File
@@ -0,0 +1,130 @@
/****************************************************************************
*
* Copyright (c) 2025 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name PX4 nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/**
* @file can.c
*
* Board-specific CAN functions.
*/
/************************************************************************************
* Included Files
************************************************************************************/
#include <px4_platform_common/px4_config.h>
#include <errno.h>
#include <debug.h>
#include <nuttx/can/can.h>
#include <arch/board/board.h>
#include "chip.h"
#include "arm_internal.h"
#include "stm32.h"
#include "stm32_can.h"
#include "board_config.h"
#ifdef CONFIG_CAN
/************************************************************************************
* Pre-processor Definitions
************************************************************************************/
/* Configuration ********************************************************************/
#if defined(CONFIG_STM32_CAN1) && defined(CONFIG_STM32_CAN2)
# warning "Both CAN1 and CAN2 are enabled. Assuming only CAN1."
# undef CONFIG_STM32_CAN2
#endif
#ifdef CONFIG_STM32_CAN1
# define CAN_PORT 1
#else
# define CAN_PORT 2
#endif
/************************************************************************************
* Private Functions
************************************************************************************/
/************************************************************************************
* Public Functions
************************************************************************************/
int can_devinit(void);
/************************************************************************************
* Name: can_devinit
*
* Description:
* All STM32 architectures must provide the following interface to work with
* examples/can.
*
************************************************************************************/
int can_devinit(void)
{
static bool initialized = false;
struct can_dev_s *can;
int ret;
/* Check if we have already initialized */
if (!initialized) {
/* Call stm32_caninitialize() to get an instance of the CAN interface */
can = stm32_caninitialize(CAN_PORT);
if (can == NULL) {
canerr("ERROR: Failed to get CAN interface\n");
return -ENODEV;
}
/* Register the CAN driver at "/dev/can0" */
ret = can_register("/dev/can0", can);
if (ret < 0) {
canerr("ERROR: can_register failed: %d\n", ret);
return ret;
}
/* Now we are initialized */
initialized = true;
}
return OK;
}
#endif
+39
View File
@@ -0,0 +1,39 @@
/****************************************************************************
*
* Copyright (C) 2021 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name PX4 nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
#include <px4_arch/i2c_hw_description.h>
constexpr px4_i2c_bus_t px4_i2c_buses[I2C_BUS_MAX_BUS_ITEMS] = {
initI2CBusInternal(1),
initI2CBusExternal(2),
};
+168
View File
@@ -0,0 +1,168 @@
/****************************************************************************
*
* Copyright (c) 2025 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name PX4 nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/**
* @file init.c
*
* board specific early startup code. This file implements the
* board_app_initialize() function that is called early by nsh during startup.
*
* Code here is run before the rcS script is invoked; it should start required
* subsystems and perform board-specific initialization.
*/
#include <px4_platform_common/px4_config.h>
#include <px4_platform_common/tasks.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <debug.h>
#include <errno.h>
#include <syslog.h>
#include <nuttx/board.h>
#include <stm32.h>
#include "board_config.h"
#include "led.h"
#include <stm32_uart.h>
#include <arch/board/board.h>
#include <drivers/drv_hrt.h>
#include <drivers/drv_board_led.h>
#include <drivers/drv_watchdog.h>
#include <systemlib/px4_macros.h>
#include <px4_platform_common/init.h>
#include <px4_platform/gpio.h>
# if defined(FLASH_BASED_PARAMS)
# include <parameters/flashparams/flashfs.h>
#endif
/************************************************************************************
* Name: stm32_boardinitialize
*
* Description:
* All STM32 architectures must provide the following entry point. This entry point
* is called early in the initialization -- after all memory has been configured
* and mapped but before any devices have been initialized.
*
************************************************************************************/
__EXPORT void stm32_boardinitialize(void)
{
watchdog_init();
/* configure pins */
const uint32_t gpio[] = PX4_GPIO_INIT_LIST;
px4_gpio_init(gpio, arraySize(gpio));
// Configure SPI all interfaces GPIO & enable power.
stm32_spiinitialize();
// Check if button is held. If so go into gps passthrough mode
if (stm32_gpioread(GPIO_BTN_SAFETY)) {
rgb_led(128, 128, 128, 10);
stm32_configgpio(GPIO_USART1_TX_GPIO);
stm32_configgpio(GPIO_USART1_RX_GPIO);
stm32_configgpio(GPIO_USART2_TX_GPIO);
stm32_configgpio(GPIO_USART2_RX_GPIO);
while (1) {
watchdog_pet();
stm32_gpiowrite(GPIO_USART2_TX_GPIO, stm32_gpioread(GPIO_USART1_RX_GPIO));
stm32_gpiowrite(GPIO_USART1_TX_GPIO, stm32_gpioread(GPIO_USART2_RX_GPIO));
}
}
}
/****************************************************************************
* Name: board_app_initialize
*
* Description:
* Perform application specific initialization. This function is never
* called directly from application code, but only indirectly via the
* (non-standard) boardctl() interface using the command BOARDIOC_INIT.
*
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/
__EXPORT int board_app_initialize(uintptr_t arg)
{
px4_platform_init();
#if defined(SERIAL_HAVE_RXDMA)
// set up the serial DMA polling at 1ms intervals for received bytes that have not triggered a DMA event.
static struct hrt_call serial_dma_call;
hrt_call_every(&serial_dma_call, 1000, 1000, (hrt_callout)stm32_serial_dma_poll, NULL);
#endif
#if defined(FLASH_BASED_PARAMS)
static sector_descriptor_t params_sector_map[] = {
{2, 16 * 1024, 0x08008000},
{3, 16 * 1024, 0x0800C000},
{0, 0, 0},
};
/* Initialize the flashfs layer to use heap allocated memory */
int result = parameter_flashfs_init(params_sector_map, NULL, 0);
if (result != OK) {
syslog(LOG_ERR, "[boot] FAILED to init params in FLASH %d\n", result);
}
#endif // FLASH_BASED_PARAMS
/* Configure the HW based on the manifest */
//px4_platform_configure();
return OK;
}
+124
View File
@@ -0,0 +1,124 @@
/****************************************************************************
*
* Copyright (c) 2025 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name PX4 nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/**
* @file led.c
*
* 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>
#include "led.h"
#define TMR_BASE STM32_TIM1_BASE
#define TMR_FREQUENCY STM32_APB2_TIM1_CLKIN
#define TMR_REG(o) (TMR_BASE+(o))
void rgb_led(int r, int g, int b, int freqs)
{
long fosc = TMR_FREQUENCY;
long prescale = 2048;
long p1s = fosc / prescale;
long p0p5s = p1s / 2;
uint16_t val;
static bool once = 0;
if (!once) {
once = 1;
/* Enabel Clock to Block */
modifyreg32(STM32_RCC_APB2ENR, 0, RCC_APB2ENR_TIM1EN);
/* Reload */
val = getreg16(TMR_REG(STM32_BTIM_EGR_OFFSET));
val |= ATIM_EGR_UG;
putreg16(val, TMR_REG(STM32_BTIM_EGR_OFFSET));
/* Set Prescaler STM32_TIM_SETCLOCK */
putreg16(prescale, TMR_REG(STM32_BTIM_PSC_OFFSET));
/* Enable STM32_TIM_SETMODE*/
putreg16(ATIM_CR1_CEN | ATIM_CR1_ARPE, TMR_REG(STM32_BTIM_CR1_OFFSET));
putreg16((ATIM_CCMR_MODE_PWM1 << ATIM_CCMR1_OC1M_SHIFT) | ATIM_CCMR1_OC1PE |
(ATIM_CCMR_MODE_PWM1 << ATIM_CCMR1_OC2M_SHIFT) | ATIM_CCMR1_OC2PE, TMR_REG(STM32_GTIM_CCMR1_OFFSET));
putreg16((ATIM_CCMR_MODE_PWM1 << ATIM_CCMR2_OC3M_SHIFT) | ATIM_CCMR2_OC3PE, TMR_REG(STM32_GTIM_CCMR2_OFFSET));
putreg16(ATIM_CCER_CC3E | ATIM_CCER_CC3P |
ATIM_CCER_CC2E | ATIM_CCER_CC2P |
ATIM_CCER_CC1E | ATIM_CCER_CC1P, TMR_REG(STM32_GTIM_CCER_OFFSET));
stm32_configgpio(GPIO_TIM1_CH1);
stm32_configgpio(GPIO_TIM1_CH2);
stm32_configgpio(GPIO_TIM1_CH3);
/* master output enable = on */
putreg16(ATIM_BDTR_MOE, (TMR_REG(STM32_ATIM_BDTR_OFFSET)));
}
long p = freqs == 0 ? p1s : p1s / freqs;
putreg32(p, TMR_REG(STM32_BTIM_ARR_OFFSET));
p = freqs == 0 ? p1s + 1 : p0p5s / freqs;
putreg32((r * p) / 255, TMR_REG(STM32_GTIM_CCR1_OFFSET));
putreg32((g * p) / 255, TMR_REG(STM32_GTIM_CCR2_OFFSET));
putreg32((b * p) / 255, TMR_REG(STM32_GTIM_CCR3_OFFSET));
val = getreg16(TMR_REG(STM32_BTIM_CR1_OFFSET));
if (freqs == 0) {
val &= ~ATIM_CR1_CEN;
} else {
val |= ATIM_CR1_CEN;
}
putreg16(val, TMR_REG(STM32_BTIM_CR1_OFFSET));
}
+37
View File
@@ -0,0 +1,37 @@
/****************************************************************************
*
* Copyright (c) 2025 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.
*
****************************************************************************/
__BEGIN_DECLS
void rgb_led(int r, int g, int b, int freqs);
__END_DECLS
+44
View File
@@ -0,0 +1,44 @@
/****************************************************************************
*
* Copyright (C) 2021 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name PX4 nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
#include <px4_arch/spi_hw_description.h>
#include <drivers/drv_sensor.h>
#include <nuttx/spi/spi.h>
constexpr px4_spi_bus_t px4_spi_buses[SPI_BUS_MAX_BUS_ITEMS] = {
initSPIBus(SPI::Bus::SPI1, {
initSPIDevice(DRV_IMU_DEVTYPE_ICM42688P, SPI::CS{GPIO::PortB, GPIO::Pin0}, SPI::DRDY{GPIO::PortB, GPIO::Pin1}),
}),
};
static constexpr bool unused = validateSPIConfig(px4_spi_buses);
+17
View File
@@ -0,0 +1,17 @@
# UAVCAN boot loadable Module ID
set(uavcanblid_sw_version_major ${PX4_VERSION_MAJOR})
set(uavcanblid_sw_version_minor ${PX4_VERSION_MINOR})
add_definitions(
-DAPP_VERSION_MAJOR=${uavcanblid_sw_version_major}
-DAPP_VERSION_MINOR=${uavcanblid_sw_version_minor}
)
set(uavcanblid_hw_version_major 0)
set(uavcanblid_hw_version_minor 89)
set(uavcanblid_name "\"org.ark.x20-gps\"")
add_definitions(
-DHW_UAVCAN_NAME=${uavcanblid_name}
-DHW_VERSION_MAJOR=${uavcanblid_hw_version_major}
-DHW_VERSION_MINOR=${uavcanblid_hw_version_minor}
)
@@ -1,4 +1,3 @@
/* Auto-generated */
*(.text._ZN4uORB7Manager27orb_add_internal_subscriberE6ORB_IDhPj)
*(.text._ZN13MavlinkStream6updateERKy)
*(.text._ZN7Mavlink16update_rate_multEv)
@@ -394,7 +393,7 @@
*(.text._ZN4EKF215PublishBaroBiasERKy)
*(.text._ZN4EKF221UpdateGyroCalibrationERKy)
*(.text._ZN6matrix9constrainIfLj3ELj1EEENS_6MatrixIT_XT0_EXT1_EEERKS3_S2_S2_)
*(.text._ZN4uORB22SubscriptionMultiArrayI16battery_status_sLh4EE16advertised_countEv)
*(.text._ZN4uORB22SubscriptionMultiArrayI16battery_status_sLh3EE16advertised_countEv)
*(.text._ZN23MavlinkStreamScaledIMU34sendEv)
*(.text.__aeabi_ldivmod)
*(.text._ZN15PositionControl16setInputSetpointERK21trajectory_setpoint_s)
@@ -1,4 +1,3 @@
/* Auto-generated */
*(.text._ZN4uORB7Manager27orb_add_internal_subscriberE6ORB_IDhPj)
*(.text._ZN13MavlinkStream6updateERKy)
*(.text._ZN7Mavlink16update_rate_multEv)
@@ -402,7 +401,7 @@
*(.text._ZN4EKF215PublishBaroBiasERKy)
*(.text._ZN4EKF221UpdateGyroCalibrationERKy)
*(.text._ZN6matrix9constrainIfLj3ELj1EEENS_6MatrixIT_XT0_EXT1_EEERKS3_S2_S2_)
*(.text._ZN4uORB22SubscriptionMultiArrayI16battery_status_sLh4EE16advertised_countEv)
*(.text._ZN4uORB22SubscriptionMultiArrayI16battery_status_sLh3EE16advertised_countEv)
*(.text._ZN23MavlinkStreamScaledIMU34sendEv)
*(.text.__aeabi_ldivmod)
*(.text._ZN15PositionControl16setInputSetpointERK21trajectory_setpoint_s)
-3
View File
@@ -71,18 +71,15 @@ add_custom_target(metadata_parameters
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/src/lib/parameters/px_process_params.py
--src-path `find ${PX4_SOURCE_DIR}/src -maxdepth 4 -type d` ${generated_params_dir}
--inject-xml ${PX4_SOURCE_DIR}/src/lib/parameters/parameters_injected.xml
--markdown ${PX4_BINARY_DIR}/docs/parameters.md
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/src/lib/parameters/px_process_params.py
--src-path `find ${PX4_SOURCE_DIR}/src -maxdepth 4 -type d` ${generated_params_dir}
--inject-xml ${PX4_SOURCE_DIR}/src/lib/parameters/parameters_injected.xml
--json ${PX4_BINARY_DIR}/docs/parameters.json
--compress
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/src/lib/parameters/px_process_params.py
--src-path `find ${PX4_SOURCE_DIR}/src -maxdepth 4 -type d` ${generated_params_dir}
--inject-xml ${PX4_SOURCE_DIR}/src/lib/parameters/parameters_injected.xml
--xml ${PX4_BINARY_DIR}/docs/parameters.xml
COMMENT "Generating full parameter metadata (markdown, xml, and json)"
@@ -645,7 +645,6 @@
1 1 MPC_ACC_HOR_MAX 5.000000000000000000 9
1 1 MPC_ACC_UP_MAX 4.000000000000000000 9
1 1 MPC_ALT_MODE 2 6
1 1 MPC_HOLD_DZ 0.100000001490116119 9
1 1 MPC_HOLD_MAX_XY 0.800000011920928955 9
1 1 MPC_HOLD_MAX_Z 0.600000023841857910 9
1 1 MPC_JERK_AUTO 4.000000000000000000 9
@@ -678,7 +677,6 @@
1 1 MPC_VEL_MAN_SIDE -1.000000000000000000 9
1 1 MPC_XY_CRUISE 5.000000000000000000 9
1 1 MPC_XY_ERR_MAX 2.000000000000000000 9
1 1 MPC_XY_MAN_EXPO 0.600000023841857910 9
1 1 MPC_XY_P 0.949999988079071045 9
1 1 MPC_XY_TRAJ_P 0.500000000000000000 9
1 1 MPC_XY_VEL_ALL -10.000000000000000000 9
@@ -688,9 +686,7 @@
1 1 MPC_XY_VEL_P_ACC 1.799999952316284180 9
1 1 MPC_YAWRAUTO_ACC 60.000000000000000000 9
1 1 MPC_YAWRAUTO_MAX 45.000000000000000000 9
1 1 MPC_YAW_EXPO 0.600000023841857910 9
1 1 MPC_YAW_MODE 0 6
1 1 MPC_Z_MAN_EXPO 0.600000023841857910 9
1 1 MPC_Z_P 1.000000000000000000 9
1 1 MPC_Z_VEL_ALL -3.000000000000000000 9
1 1 MPC_Z_VEL_D_ACC 0.000000000000000000 9
Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

+5
View File
@@ -7,6 +7,7 @@
- [Position Mode (MC)](flight_modes_mc/position.md)
- [Position Slow Mode (MC)](flight_modes_mc/position_slow.md)
- [Altitude Mode (MC)](flight_modes_mc/altitude.md)
- [Altitude Cruise Mode (MC)](flight_modes_mc/altitude_cruise.md)
- [Stabilized Mode (MC)](flight_modes_mc/manual_stabilized.md)
- [Acro Mode (MC)](flight_modes_mc/acro.md)
- [Orbit Mode (MC)](flight_modes_mc/orbit.md)
@@ -282,6 +283,7 @@
- [CubePilot Here+ (Discontined)](gps_compass/rtk_gps_hex_hereplus.md)
- [INS (Inertial Navigation/GNSS)](sensor/inertial_navigation_systems.md)
- [InertialLabs](sensor/inertiallabs.md)
- [sbgECom](sensor/sbgecom.md)
- [VectorNav](sensor/vectornav.md)
- [Optical Flow](sensor/optical_flow.md)
- [ARK Flow](dronecan/ark_flow.md)
@@ -660,6 +662,8 @@
- [RoverPositionSetpoint](msg_docs/RoverPositionSetpoint.md)
- [RoverRateSetpoint](msg_docs/RoverRateSetpoint.md)
- [RoverRateStatus](msg_docs/RoverRateStatus.md)
- [RoverSpeedSetpoint](msg_docs/RoverSpeedSetpoint.md)
- [RoverSpeedStatus](msg_docs/RoverSpeedStatus.md)
- [RoverSteeringSetpoint](msg_docs/RoverSteeringSetpoint.md)
- [RoverThrottleSetpoint](msg_docs/RoverThrottleSetpoint.md)
- [RoverVelocitySetpoint](msg_docs/RoverVelocitySetpoint.md)
@@ -720,6 +724,7 @@
- [YawEstimatorStatus](msg_docs/YawEstimatorStatus.md)
- [AirspeedValidatedV0](msg_docs/AirspeedValidatedV0.md)
- [ArmingCheckReplyV0](msg_docs/ArmingCheckReplyV0.md)
- [ArmingCheckRequestV0](msg_docs/ArmingCheckRequestV0.md)
- [BatteryStatusV0](msg_docs/BatteryStatusV0.md)
- [EventV0](msg_docs/EventV0.md)
- [HomePositionV0](msg_docs/HomePositionV0.md)
+46 -31
View File
@@ -1,10 +1,9 @@
<!-- GENERATED CONTENT: DO NOT EDIT -->
- [Introduction](/index.md)
- [Introduction](/index.md)
- [Basic Concepts](/getting_started/px4_basic_concepts.md)
- [Multicopters](/frames_multicopter/index.md)
- [Features](/features_mc/index.md)
- [Flight Modes](/flight_modes_mc/index.md)
- [Position Mode (MC)](/flight_modes_mc/position.md)
@@ -37,7 +36,7 @@
- [Static Pressure Buildup](/advanced_config/static_pressure_buildup.md)
- [Flying (Basics)](/flying/basic_flying_mc.md)
- [Complete Vehicles](/complete_vehicles_mc/index.md)
- [ModalAI Starling](/complete_vehicles_mc/modalai_starling.md)
- [ModalAI Starling (PX4 Dev Kit)](/complete_vehicles_mc/modalai_starling.md)
- [PX4 Vision Kit](/complete_vehicles_mc/px4_vision_kit.md)
- [MindRacer BNF & RTF](/complete_vehicles_mc/mindracer_BNF_RTF.md)
- [MindRacer 210](/complete_vehicles_mc/mindracer210.md)
@@ -58,7 +57,6 @@
- [DJI F450 (CUAV v5 nano)](/frames_multicopter/dji_f450_cuav_5nano.md)
- [Planes (Fixed-Wing)](/frames_plane/index.md)
- [Assembly](/assembly/assembly_fw.md)
- [Config/Tuning](/config_fw/index.md)
- [Auto-tune](/config/autotune_fw.md)
@@ -86,7 +84,6 @@
- [Wing Wing Z84 (Pixracer)](/frames_plane/wing_wing_z84.md)
- [VTOL](/frames_vtol/index.md)
- [Assembly](/assembly/assembly_vtol.md)
- [VTOL Config/Tuning](/config_vtol/index.md)
- [Auto-tune](/config/autotune_vtol.md)
@@ -111,7 +108,6 @@
- [Complete Vehicles](/complete_vehicles_vtol/index.md)
- [Operations](/config/operations.md)
- [Safety](/config/safety_intro.md)
- [Safety Configuration (Failsafes)](/config/safety.md)
- [Failsafe Simulation](/config/safety_simulation.md)
@@ -132,7 +128,6 @@
- [QGroundControl Flight-Readiness Status](/flying/pre_flight_checks.md)
- [Hardware Selection & Setup](/hardware/drone_parts.md)
- [Flight Controllers (Autopilots)](/flight_controller/index.md)
- [Flight Controller Selection](/getting_started/flight_controller_selection.md)
- [Pixhawk Series](/flight_controller/pixhawk_series.md)
@@ -164,18 +159,18 @@
- [mRo (3DR) Pixhawk Wiring Quickstart](/assembly/quick_start_pixhawk.md)
- [Holybro Pixhawk Mini (FMUv3) - Discontinued](/flight_controller/pixhawk_mini.md)
- [Manufacturer-Supported Autopilots](/flight_controller/autopilot_manufacturer_supported.md)
- [Accton Godwit GA1](/flight_controller/accton-godwit_ga1.md)
- [AirMind MindPX](/flight_controller/mindpx.md)
- [AirMind MindRacer](/flight_controller/mindracer.md)
- [ARK Electronics ARKV6X](/flight_controller/ark_v6x.md)
- [ARK FPV Flight Controller](/flight_controller/ark_fpv.md)
- [ARK Pi6X Flow Flight Controller](/flight_controller/ark_pi6x.md)
- [CUAV X7](/flight_controller/cuav_x7.md)
- [CUAV Nora](/flight_controller/cuav_nora.md)
- [CUAV V5+ (FMUv5)](/flight_controller/cuav_v5_plus.md)
- [Wiring Quickstart](/assembly/quick_start_cuav_v5_plus.md)
- [CUAV V5 nano (FMUv5)](/flight_controller/cuav_v5_nano.md)
- [CUAV V5 nano Wiring Quickstart](/assembly/quick_start_cuav_v5_nano.md)
- [CUAV Pixhack v3 (FMUv3)](/flight_controller/pixhack_v3.md)
- [CUAV X25 EVO](/flight_controller/cuav_x25-evo.md)
- [CubePilot Cube Orange+ (CubePilot)](/flight_controller/cubepilot_cube_orangeplus.md)
- [CubePilot Cube Orange (CubePilot)](/flight_controller/cubepilot_cube_orange.md)
- [CubePilot Cube Yellow (CubePilot)](/flight_controller/cubepilot_cube_yellow.md)
@@ -188,11 +183,8 @@
- [Wiring Quickstart](/assembly/quick_start_durandal.md)
- [Holybro Pix32 v5](/flight_controller/holybro_pix32_v5.md)
- [Wiring Quickstart](/assembly/quick_start_holybro_pix32_v5.md)
- [ModalAI Flight Core v1](/flight_controller/modalai_fc_v1.md)
- [ModalAI VOXL Flight](/flight_controller/modalai_voxl_flight.md)
- [ModalAI VOXL 2](/flight_controller/modalai_voxl_2.md)
- [mRobotics-X2.1 (FMUv2)](/flight_controller/mro_x2.1.md)
- [mRo Control Zero F7)](/flight_controller/mro_control_zero_f7.md)
- [mRo Control Zero F7](/flight_controller/mro_control_zero_f7.md)
- [Sky-Drones AIRLink](/flight_controller/airlink.md)
- [SPRacing SPRacingH7EXTREME](/flight_controller/spracingh7extreme.md)
- [ThePeach FCC-K1](/flight_controller/thepeach_k1.md)
@@ -206,18 +198,20 @@
- [Discontinued Autopilots/Vehicles](/flight_controller/autopilot_discontinued.md)
- [Drotek Dropix (FMUv2)](/flight_controller/dropix.md)
- [Omnibus F4 SD](/flight_controller/omnibus_f4_sd.md)
- [BetaFPV Beta75X 2S Brushless Whoop](/complete_vehicles_mc/betafpv_beta75x.md)
- [Bitcraze Crazyflie 2.0 ](/complete_vehicles_mc/crazyflie2.md)
- [Aerotenna OcPoC-Zynq Mini](/flight_controller/ocpoc_zynq.md)
- [CUAV X7](/flight_controller/cuav_x7.md)
- [CUAV v5](/flight_controller/cuav_v5.md)
- [CUAV Pixhack v3 (FMUv3)](/flight_controller/pixhack_v3.md)
- [Holybro Kakute F7](/flight_controller/kakutef7.md)
- [Holybro Pixfalcon](/flight_controller/pixfalcon.md)
- [Holybro pix32 (FMUv2)](/flight_controller/holybro_pix32.md)
- [ModalAI Flight Core v1](/flight_controller/modalai_fc_v1.md)
- [ModalAI VOXL Flight](/flight_controller/modalai_voxl_flight.md)
- [mRo X2.1 (FMUv2)](/flight_controller/mro_x2.1.md)
- [mRo AUAV-X2](/flight_controller/auav_x2.md)
- [NXP RDDRONE-FMUK66 FMU](/flight_controller/nxp_rddrone_fmuk66.md)
- [3DR Pixhawk 1](/flight_controller/pixhawk.md)
- [Snapdragon Flight](/flight_controller/snapdragon_flight.md)
- [Intel® Aero RTF Drone](/complete_vehicles_mc/intel_aero.md)
- [Pixhawk Autopilot Bus (PAB) & Carriers](/flight_controller/pixhawk_autopilot_bus.md)
- [ARK Electronics Pixhawk Autopilot Bus Carrier](/flight_controller/ark_pab.md)
- [Mounting the Flight Controller](/assembly/mount_and_orient_controller.md)
@@ -241,6 +235,7 @@
- [Compass Power Compensation](/advanced_config/compass_power_compensation.md)
- [Airspeed Sensors](/sensor/airspeed.md)
- [Calibration](/config/airspeed.md)
- [Airspeed Validation](/advanced_config/airspeed_validation.md)
- [TFSlot Airspeed Sensor](/sensor/airspeed_tfslot.md)
- [Barometers](/sensor/barometer.md)
- [Distance Sensors \(Rangefinders\)](/sensor/rangefinders.md)
@@ -272,6 +267,7 @@
- [CUAV C-RTK](/gps_compass/rtk_gps_cuav_c-rtk.md)
- [CUAV C-RTK2 PPK/RTK GNSS](/gps_compass/rtk_gps_cuav_c-rtk2.md)
- [CUAV C-RTK 9Ps](/gps_compass/rtk_gps_cuav_c-rtk-9ps.md)
- [DATAGNSS NANO HRTK GNSS](/gps_compass/rtk_gps_datagnss_nano_hrtk.md)
- [DATAGNSS GEM1305 RTK GNSS](/gps_compass/rtk_gps_gem1305.md)
- [Femtones MINI2 Receiver](/gps_compass/rtk_gps_fem_mini2.md)
- [Freefly RTK GPS](/gps_compass/rtk_gps_freefly.md)
@@ -287,6 +283,7 @@
- [Trimble MB-Two](/gps_compass/rtk_gps_trimble_mb_two.md)
- [CubePilot Here+ (Discontined)](/gps_compass/rtk_gps_hex_hereplus.md)
- [INS (Inertial Navigation/GNSS)](/sensor/inertial_navigation_systems.md)
- [InertialLabs](/sensor/inertiallabs.md)
- [VectorNav](/sensor/vectornav.md)
- [Optical Flow](/sensor/optical_flow.md)
- [ARK Flow](/dronecan/ark_flow.md)
@@ -308,7 +305,6 @@
- [Zubax Telega](/dronecan/zubax_telega.md)
- [PX4 Sapog ESC Firmware](/dronecan/sapog.md)
- [Holybro Kotleta](/dronecan/holybro_kotleta.md)
- [Zubax Orel](/dronecan/zubax_orel.md)
- [Vertiq](/peripherals/vertiq.md)
- [VESC](/peripherals/vesc.md)
- [Radio Control (RC)](/getting_started/rc_transmitter_receiver.md)
@@ -320,6 +316,7 @@
- [Telemetry Radios](/telemetry/index.md)
- [SiK Radio](/telemetry/sik_radio.md)
- [RFD900 (SiK) Telemetry Radio](/telemetry/rfd900_telemetry.md)
- [ThunderFly TFSIK01 Telemetry Radio](/telemetry/tfsik_telemetry.md)
- [HolyBro (SIK) Telemetry Radio](/telemetry/holybro_sik_radio.md)
- [Telemetry Wifi](/telemetry/telemetry_wifi.md)
- [ESP8266 WiFi Module](/telemetry/esp8266_wifi_module.md)
@@ -335,6 +332,7 @@
- [FrSky Telemetry](/peripherals/frsky_telemetry.md)
- [TBS Crossfire (CRSF) Telemetry](/telemetry/crsf_telemetry.md)
- [Satellite Comms (Iridium/RockBlock)](/advanced_features/satcom_roadblock.md)
- [Power Systems](/power_systems/index.md)
- [Battery Estimation Tuning](/config/battery.md)
- [Battery Chemistry Overview](/power_systems/battery_chemistry.md)
@@ -401,7 +399,6 @@
- [Full Parameter Reference](/advanced_config/parameter_reference.md)
- [Other Vehicles](/airframes/index.md)
- [Airships (experimental)](/frames_airship/index.md)
- [Autogyros (experimental)](/frames_autogyro/index.md)
- [ThunderFly Auto-G2 (Holybro pix32)](/frames_autogyro/thunderfly_auto_g2.md)
@@ -409,17 +406,17 @@
- [Helicopter (experimental)](/frames_helicopter/index.md)
- [Helicopter Config/Tuning](/config_heli/index.md)
- [Rovers (experimental)](/frames_rover/index.md)
- [Ackermann Rovers](/frames_rover/ackermann.md)
- [Drive Modes](/flight_modes_rover/ackermann.md)
- [Configuration/Tuning](/config_rover/ackermann.md)
- [Differential Rovers](/frames_rover/differential.md)
- [Drive Modes](/flight_modes_rover/differential.md)
- [Configuration/Tuning](/config_rover/differential.md)
- [Aion Robotics R1](/frames_rover/aion_r1.md)
- [Mecanum Rovers](/frames_rover/mecanum.md)
- [Drive Modes](/flight_modes_rover/mecanum.md)
- [Configuration/Tuning](/config_rover/mecanum.md)
- [(Deprecated) Rover Position Control](/frames_rover/rover_position_control.md)
- [Drive Modes](/flight_modes_rover/index.md)
- [Manual](/flight_modes_rover/manual.md)
- [Auto](/flight_modes_rover/auto.md)
- [Configuration/Tuning](/config_rover/index.md)
- [Basic Setup](/config_rover/basic_setup.md)
- [Rate Tuning](/config_rover/rate_tuning.md)
- [Attitude Tuning](/config_rover/attitude_tuning.md)
- [Velocity Tuning](/config_rover/velocity_tuning.md)
- [Position Tuning](/config_rover/position_tuning.md)
- [Complete Vehicles](/complete_vehicles_rover/index.md)
- [Aion Robotics R1](/complete_vehicles_rover/aion_r1.md)
- [Submarines (experimental)](/frames_sub/index.md)
- [BlueROV2](/frames_sub/bluerov2.md)
- [Airframes Reference](/airframes/airframe_reference.md)
@@ -531,6 +528,7 @@
- [Airspeed](/msg_docs/Airspeed.md)
- [AirspeedWind](/msg_docs/AirspeedWind.md)
- [AutotuneAttitudeControlStatus](/msg_docs/AutotuneAttitudeControlStatus.md)
- [BatteryInfo](/msg_docs/BatteryInfo.md)
- [ButtonEvent](/msg_docs/ButtonEvent.md)
- [CameraCapture](/msg_docs/CameraCapture.md)
- [CameraStatus](/msg_docs/CameraStatus.md)
@@ -549,6 +547,7 @@
- [DifferentialPressure](/msg_docs/DifferentialPressure.md)
- [DistanceSensor](/msg_docs/DistanceSensor.md)
- [DistanceSensorModeChangeRequest](/msg_docs/DistanceSensorModeChangeRequest.md)
- [DronecanNodeStatus](/msg_docs/DronecanNodeStatus.md)
- [Ekf2Timestamps](/msg_docs/Ekf2Timestamps.md)
- [EscReport](/msg_docs/EscReport.md)
- [EscStatus](/msg_docs/EscStatus.md)
@@ -623,6 +622,7 @@
- [MountOrientation](/msg_docs/MountOrientation.md)
- [NavigatorMissionItem](/msg_docs/NavigatorMissionItem.md)
- [NavigatorStatus](/msg_docs/NavigatorStatus.md)
- [NeuralControl](/msg_docs/NeuralControl.md)
- [NormalizedUnsignedSetpoint](/msg_docs/NormalizedUnsignedSetpoint.md)
- [ObstacleDistance](/msg_docs/ObstacleDistance.md)
- [OffboardControlMode](/msg_docs/OffboardControlMode.md)
@@ -662,6 +662,8 @@
- [RoverPositionSetpoint](/msg_docs/RoverPositionSetpoint.md)
- [RoverRateSetpoint](/msg_docs/RoverRateSetpoint.md)
- [RoverRateStatus](/msg_docs/RoverRateStatus.md)
- [RoverSpeedSetpoint](/msg_docs/RoverSpeedSetpoint.md)
- [RoverSpeedStatus](/msg_docs/RoverSpeedStatus.md)
- [RoverSteeringSetpoint](/msg_docs/RoverSteeringSetpoint.md)
- [RoverThrottleSetpoint](/msg_docs/RoverThrottleSetpoint.md)
- [RoverVelocitySetpoint](/msg_docs/RoverVelocitySetpoint.md)
@@ -721,7 +723,13 @@
- [Wind](/msg_docs/Wind.md)
- [YawEstimatorStatus](/msg_docs/YawEstimatorStatus.md)
- [AirspeedValidatedV0](/msg_docs/AirspeedValidatedV0.md)
- [ArmingCheckReplyV0](/msg_docs/ArmingCheckReplyV0.md)
- [ArmingCheckRequestV0](/msg_docs/ArmingCheckRequestV0.md)
- [BatteryStatusV0](/msg_docs/BatteryStatusV0.md)
- [EventV0](/msg_docs/EventV0.md)
- [HomePositionV0](/msg_docs/HomePositionV0.md)
- [VehicleAttitudeSetpointV0](/msg_docs/VehicleAttitudeSetpointV0.md)
- [VehicleLocalPositionV0](/msg_docs/VehicleLocalPositionV0.md)
- [VehicleStatusV0](/msg_docs/VehicleStatusV0.md)
- [MAVLink Messaging](/mavlink/index.md)
- [Adding Messages](/mavlink/adding_messages.md)
@@ -761,7 +769,7 @@
- [Debugging with GDB](/debug/gdb_debugging.md)
- [SWD Debug Port](/debug/swd_debug.md)
- [JLink Probe](/debug/probe_jlink.md)
- [Black Magic/DroneCode Probe](/debug/probe_bmp.md)
- [Black Magic/Zubax BugFace BF1 Probe](/debug/probe_bmp.md)
- [STLink Probe](/debug/probe_stlink.md)
- [MCU-Link Probe](/debug/probe_mculink.md)
- [Hardfault Debugging](/debug/gdb_hardfault.md)
@@ -785,6 +793,9 @@
- [Camera Integration/Architecture](/camera/camera_architecture.md)
- [Computer Vision](/advanced/computer_vision.md)
- [Motion Capture (VICON, Optitrack, NOKOV)](/tutorials/motion-capture.md)
- [Neural Networks](/advanced/neural_networks.md)
- [Neural Network Module Utilities](/advanced/nn_module_utilities.md)
- [TensorFlow Lite Micro (TFLM)](/advanced/tflm.md)
- [Installing driver for Intel RealSense R200](/advanced/realsense_intel_driver.md)
- [Switching State Estimators](/advanced/switching_state_estimators.md)
- [Out-of-Tree Modules](/advanced/out_of_tree_modules.md)
@@ -816,8 +827,12 @@
- [Test MC_02 - Full Autonomous](/test_cards/mc_02_full_autonomous.md)
- [Test MC_03 - Auto Manual Mix](/test_cards/mc_03_auto_manual_mix.md)
- [Test MC_04 - Failsafe Testing](/test_cards/mc_04_failsafe_testing.md)
- [Test MC_05 - Indoor Flight (Manual Modes)](/test_cards/mc_05_indoor_flight_manual_modes.md)
- [Test MC_05 - Manual Modes (Inside)](/test_cards/mc_05_indoor_flight_manual_modes.md)
- [Test MC_06 - Optical Flow (Inside)](/test_cards/mc_06_optical_flow.md)
- [Test MC_07 - VIO (Inside)](/test_cards/mc_07_vio.md)
- [Test MC_08 - DSHOT ESC](/test_cards/mc_08_dshot.md)
- [Unit Tests](/test_and_ci/unit_tests.md)
- [Fuzz Tests](/test_and_ci/fuzz_tests.md)
- [Continuous Integration](/test_and_ci/continous_integration.md)
- [Integration Testing](/test_and_ci/integration_testing.md)
- [MAVSDK Integration Testing](/test_and_ci/integration_testing_mavsdk.md)
+203 -29
View File
@@ -692,6 +692,16 @@ to 0 and 4096. Other standard params follows the same rule.
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 65535 | | 0 |
### PCA9685_EN_BUS (`INT32`) {#PCA9685_EN_BUS}
Enable the PCA9685 output driver.
The integer refers to the I2C bus number where PCA9685 is connected.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 10 | | 0 |
### PCA9685_FAIL1 (`INT32`) {#PCA9685_FAIL1}
PCA9685 Output Channel 1 Failsafe Value.
@@ -14435,9 +14445,9 @@ Set bits in the following positions to enable:
### FW_AT_MAN_AUX (`INT32`) {#FW_AT_MAN_AUX}
Enable/disable auto tuning using an RC AUX input.
Enable/disable auto tuning using a manual control AUX input.
Defines which RC_MAP_AUXn parameter maps the RC channel used to enable/disable auto tuning.
Defines which RC_MAP_AUXn parameter maps the manual control channel used to enable/disable auto tuning.
**Values:**
@@ -16242,21 +16252,6 @@ Expect and require a healthy MAVLink parachute system.
| ------ | -------- | -------- | --------- | ------------ | ---- |
| &nbsp; | | | | Disabled (0) |
### COM_POSCTL_NAVL (`INT32`) {#COM_POSCTL_NAVL}
Position mode navigation loss response.
This sets the flight mode that will be used if navigation accuracy is no longer adequate for position control in manual Position mode.
**Values:**
- `0`: Altitude mode
- `1`: Land mode (descend)
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | | | | 0 |
### COM_POS_FS_EPH (`FLOAT`) {#COM_POS_FS_EPH}
Horizontal position error threshold for hovering systems.
@@ -16363,7 +16358,7 @@ A negative value disables the check.
### COM_RCL_EXCEPT (`INT32`) {#COM_RCL_EXCEPT}
RC loss exceptions.
Manual control loss exceptions.
Specify modes where manual control loss is ignored and no failsafe is triggered.
External modes requiring stick input will still failsafe.
@@ -16381,7 +16376,7 @@ External modes requiring stick input will still failsafe.
### COM_RC_ARM_HYST (`INT32`) {#COM_RC_ARM_HYST}
RC input arm/disarm command duration.
Manual control input arm/disarm command duration.
The default value of 1000 requires the stick to be held in the arm or disarm position for 1 second.
@@ -16429,9 +16424,9 @@ Ensure the value is not set lower than the update interval of the RC or Joystick
### COM_RC_OVERRIDE (`INT32`) {#COM_RC_OVERRIDE}
Enable RC stick override of auto and/or offboard modes.
Enable manual control stick override.
When RC stick override is enabled, moving the RC sticks more than COM_RC_STICK_OV
When enabled, moving the sticks more than COM_RC_STICK_OV
immediately gives control back to the pilot by switching to Position mode and
if position is unavailable Altitude mode.
Note: Only has an effect on multicopters, and VTOLs in multicopter mode.
@@ -16447,7 +16442,7 @@ Note: Only has an effect on multicopters, and VTOLs in multicopter mode.
### COM_RC_STICK_OV (`FLOAT`) {#COM_RC_STICK_OV}
RC stick override threshold.
Stick override threshold.
If COM_RC_OVERRIDE is enabled and the joystick input is moved more than this threshold
the autopilot the pilot takes over control.
@@ -16591,11 +16586,10 @@ action will be executed.
### NAV_RCL_ACT (`INT32`) {#NAV_RCL_ACT}
Set RC loss failsafe mode.
Set manual control loss failsafe mode.
The RC loss failsafe will only be entered after a timeout,
set by COM_RC_LOSS_T in seconds. If RC input checks have been disabled
by setting the COM_RC_IN_MODE param it will not be triggered.
The manual control loss failsafe will only be entered after a timeout,
set by COM_RC_LOSS_T in seconds.
**Values:**
@@ -16876,7 +16870,7 @@ armed.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 1 | 0.01 | 0.055 | % |
| &nbsp; | 0 | 1 | 0.01 | 0.055 | norm |
### DSHOT_TEL_CFG (`INT32`) {#DSHOT_TEL_CFG}
@@ -19929,7 +19923,7 @@ Yaw behaviour during orbit flight.
- `1`: Hold Initial Heading
- `2`: Uncontrolled
- `3`: Hold Front Tangent to Circle
- `4`: RC Controlled
- `4`: Manually (yaw stick) Controlled
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
@@ -20268,6 +20262,7 @@ Modes 1 and 2 require each F9P UART1 to be connected to the Autopilot. In additi
F9P units are connected to each other.
Modes 3 and 4 only require UART1 on each F9P connected to the Autopilot or Can Node. UART RX DMA is required.
RTK is still possible with this setup.
Mode 6 is intended for use with a ground control station (not necessarily an RTK correction base).
**Values:**
@@ -20277,6 +20272,7 @@ RTK is still possible with this setup.
- `3`: Heading (Rover With Moving Base UART1 Connected to Autopilot Or Can Node At 921600)
- `4`: Moving Base (Moving Base UART1 Connected to Autopilot Or Can Node At 921600)
- `5`: Rover with Static Base on UART2 (similar to Default, except coming in on UART2)
- `6`: Ground Control Station (UART2 outputs NMEA)
| Reboot | minValue | maxValue | increment | default | unit |
| ------- | -------- | -------- | --------- | ------- | ---- |
@@ -29542,6 +29538,16 @@ Distance from the center of the right wheel to the center of the left wheel.
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 100 | 0.001 | 0 | m |
### RD_YAW_STK_GAIN (`FLOAT`) {#RD_YAW_STK_GAIN}
Yaw stick gain for Manual mode.
Assign value <1.0 to decrease stick response for yaw control.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0.1 | 1 | 0.01 | 1 |
## Rover Mecanum
### RM_COURSE_CTL_TH (`FLOAT`) {#RM_COURSE_CTL_TH}
@@ -29567,6 +29573,16 @@ Distance from the center of the right wheel to the center of the left wheel.
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 100 | 0.001 | 0 | m |
### RM_YAW_STK_GAIN (`FLOAT`) {#RM_YAW_STK_GAIN}
Yaw stick gain for Manual mode.
Assign value <1.0 to decrease stick response for yaw control.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0.1 | 1 | 0.01 | 1 |
## Rover Rate Control
### RO_YAW_ACCEL_LIM (`FLOAT`) {#RO_YAW_ACCEL_LIM}
@@ -29591,6 +29607,18 @@ Set to -1 to disable.
| ------ | -------- | -------- | --------- | ------- | ------- |
| &nbsp; | -1 | 10000 | 0.01 | -1. | deg/s^2 |
### RO_YAW_EXPO (`FLOAT`) {#RO_YAW_EXPO}
Yaw rate expo factor.
Exponential factor for tuning the input curve shape.
0 Purely linear input curve
1 Purely cubic input curve
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 1 | | 0. |
### RO_YAW_RATE_CORR (`FLOAT`) {#RO_YAW_RATE_CORR}
Yaw rate correction factor.
@@ -29651,6 +29679,19 @@ Percentage of stick input range that will be interpreted as zero around the stic
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 1 | 0.01 | 0.1 |
### RO_YAW_SUPEXPO (`FLOAT`) {#RO_YAW_SUPEXPO}
Yaw rate super expo factor.
"Superexponential" factor for refining the input curve shape tuned using RO_YAW_EXPO.
0 Pure Expo function
0.7 reasonable shape enhancement for intuitive stick feel
0.95 very strong bent input curve only near maxima have effect
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 0.95 | | 0. |
## Rover Velocity Control
### RO_ACCEL_LIM (`FLOAT`) {#RO_ACCEL_LIM}
@@ -29838,6 +29879,24 @@ Selects the algorithm used for logfile encryption
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | | | | 2 |
### SDLOG_BACKEND (`INT32`) {#SDLOG_BACKEND}
Logging Backend (integer bitmask).
If no logging is set the logger will not be started.
Set bits true to enable:
0: SD card logging
1: Mavlink logging
**Bitmask:**
- `0`: SD card logging
- `1`: Mavlink logging
| Reboot | minValue | maxValue | increment | default | unit |
| ------- | -------- | -------- | --------- | ------- | ---- |
| &check; | 0 | 3 | | 3 |
### SDLOG_BOOT_BAT (`INT32`) {#SDLOG_BOOT_BAT}
Battery-only Logging.
@@ -29924,10 +29983,12 @@ Logging Mode.
Determines when to start and stop logging. By default, logging is started
when arming the system, and stopped when disarming.
Note: The logging start/end points that can be configured here only apply to
SD logging. The mavlink backend is started/stopped independently
of these points.
**Values:**
- `-1`: disabled
- `0`: when armed until disarm (default)
- `1`: from boot until disarm
- `2`: from boot until shutdown
@@ -33018,6 +33079,31 @@ The mode will switch from long to short range when the distance is less than the
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 1 | 50 | | 4 | m |
### SENS_BAHRS_CFG (`INT32`) {#SENS_BAHRS_CFG}
Serial Configuration for EULER-NAV BAHRS.
Configure on which serial port to run EULER-NAV BAHRS.
**Values:**
- `0`: Disabled
- `6`: UART 6
- `101`: TELEM 1
- `102`: TELEM 2
- `103`: TELEM 3
- `104`: TELEM/SERIAL 4
- `201`: GPS 1
- `202`: GPS 2
- `203`: GPS 3
- `300`: Radio Controller
- `301`: Wifi Port
- `401`: EXT2
| Reboot | minValue | maxValue | increment | default | unit |
| ------- | -------- | -------- | --------- | ------- | ---- |
| &check; | | | | 0 |
### SENS_BARO_QNH (`FLOAT`) {#SENS_BARO_QNH}
QNH for barometer.
@@ -35562,6 +35648,86 @@ Note: certain drivers such as the GPS can determine the Baudrate automatically.
| ------- | -------- | -------- | --------- | ------- | ---- |
| &check; | | | | 1 |
## Simulation
### SIM_GZ_EN_ASPD (`INT32`) {#SIM_GZ_EN_ASPD}
Enable airspeed sensor in Gazebo bridge.
**Values:**
- `0`: Disabled
- `1`: Enabled
| Reboot | minValue | maxValue | increment | default | unit |
| ------- | -------- | -------- | --------- | ----------- | ---- |
| &check; | | | | Enabled (1) |
### SIM_GZ_EN_BARO (`INT32`) {#SIM_GZ_EN_BARO}
Enable barometer/air pressure sensor in Gazebo bridge.
**Values:**
- `0`: Disabled
- `1`: Enabled
| Reboot | minValue | maxValue | increment | default | unit |
| ------- | -------- | -------- | --------- | ----------- | ---- |
| &check; | | | | Enabled (1) |
### SIM_GZ_EN_FLOW (`INT32`) {#SIM_GZ_EN_FLOW}
Enable optical flow sensor in Gazebo bridge.
**Values:**
- `0`: Disabled
- `1`: Enabled
| Reboot | minValue | maxValue | increment | default | unit |
| ------- | -------- | -------- | --------- | ----------- | ---- |
| &check; | | | | Enabled (1) |
### SIM_GZ_EN_GPS (`INT32`) {#SIM_GZ_EN_GPS}
Enable GPS/NavSat sensor in Gazebo bridge.
**Values:**
- `0`: Disabled
- `1`: Enabled
| Reboot | minValue | maxValue | increment | default | unit |
| ------- | -------- | -------- | --------- | ----------- | ---- |
| &check; | | | | Enabled (1) |
### SIM_GZ_EN_LIDAR (`INT32`) {#SIM_GZ_EN_LIDAR}
Enable laser/lidar sensors in Gazebo bridge.
**Values:**
- `0`: Disabled
- `1`: Enabled
| Reboot | minValue | maxValue | increment | default | unit |
| ------- | -------- | -------- | --------- | ----------- | ---- |
| &check; | | | | Enabled (1) |
### SIM_GZ_EN_ODOM (`INT32`) {#SIM_GZ_EN_ODOM}
Enable odometry in Gazebo bridge.
**Values:**
- `0`: Disabled
- `1`: Enabled
| Reboot | minValue | maxValue | increment | default | unit |
| ------- | -------- | -------- | --------- | ----------- | ---- |
| &check; | | | | Enabled (1) |
## Simulation In Hardware
### SIH_DISTSNSR_MAX (`FLOAT`) {#SIH_DISTSNSR_MAX}
@@ -41075,3 +41241,11 @@ SPC_VEHICLE_RESP.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | | | | 0.5 |
### ZENOH_DOMAIN_ID (`INT32`) {#ZENOH_DOMAIN_ID}
ROS2 RMW_ZENOH_CPP Domain id.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 232 | | 0 |
+11 -2
View File
@@ -628,7 +628,16 @@ div.frame_variant td, div.frame_variant th {
### Free-Flyer
<div class="frame_common">
<img src="../../assets/airframes/types/AirframeUnknown.svg"/>
<img src="../../assets/airframes/types/FreeFlyer.svg"/>
<table>
<thead>
<tr><th>Common Outputs</th></tr>
</thead>
<tbody>
<tr>
<td><ul><li><b>Motor1</b>: back left thruster, +x thrust</li><li><b>Motor2</b>: front left thruster, -x thrust</li><li><b>Motor3</b>: back right thruster, +x thrust</li><li><b>Motor4</b>: front right thruster, -x thrust</li><li><b>Motor5</b>: front left thruster, +y thrust</li><li><b>Motor6</b>: front right thruster, -y thrust</li><li><b>Motor7</b>: back left thruster, +y thrust</li><li><b>Motor8</b>: back right thruster, -y thrust</li></ul></td>
</tr>
</tbody></table>
</div>
<div class="frame_variant">
@@ -638,7 +647,7 @@ div.frame_variant td, div.frame_variant th {
</thead>
<tbody>
<tr id="spacecraft_free-flyer_kth-atmos">
<td>KTH-ATMOS</td>
<td><a href="https://atmos.discower.io">KTH-ATMOS</a></td>
<td>Maintainer: DISCOWER<p><code>SYS_AUTOSTART</code> = 70000</p></td>
</tr>
</tbody>
+21 -12
View File
@@ -13,9 +13,9 @@ The first executed file is the [init.d/rcS](https://github.com/PX4/PX4-Autopilot
The following sections are split according to the operating system that PX4 runs on.
## Posix (Linux/MacOS)
## POSIX (Linux/MacOS)
On Posix, the system shell is used as script interpreter (e.g. /bin/sh, being symlinked to dash on Ubuntu).
On POSIX, the system shell is used as script interpreter (e.g. /bin/sh, being symlinked to dash on Ubuntu).
For that to work, a few things are required:
- PX4 modules need to look like individual executables to the system.
@@ -54,7 +54,7 @@ cd <PX4-Autopilot>/build/px4_sitl_default/bin
### Dynamic Modules
Normally, all modules are compiled into a single PX4 executable.
However, on Posix, there's the option of compiling a module into a separate file, which can be loaded into PX4 using the `dyn` command.
However, on POSIX, there's the option of compiling a module into a separate file, which can be loaded into PX4 using the `dyn` command.
```sh
dyn ./test.px4mod
@@ -90,7 +90,7 @@ This is documented below.
The best way to customize the system startup is to introduce a [new frame configuration](../dev_airframes/adding_a_new_frame.md).
The frame configuration file can be included in the firmware or on an SD Card.
#### Dynamic customization
#### Dynamic Customization
If you only need to "tweak" the existing configuration, such as starting one more application or setting the value of a few parameters, you can specify these by creating two files in the `/etc/` directory of the SD Card:
@@ -148,27 +148,36 @@ The following example shows how to start custom applications:
mandatory_app start # Will abort boot if mandatory_app is unknown or fails
```
#### Additional customization
#### Additional Init-File Customization
In rare cases where the desired setup cannot be achieved through frame configuration or dynamic customization,
you can add a script that will be contained in the binary.
In rare cases where the desired setup cannot be achieved through frame configuration or dynamic customization, you can add a script that will be compiled into the binary for a particular `make` target build variant.
**Note**: In almost all cases, you should use a frame configuration. This method should only be used for
edge-cases such as customizing `cannode` based boards.
::: warning
In almost all cases, you should use a frame configuration.
This method should only be used for edge-cases such as customizing `cannode` based boards.
:::
The steps are:
- Add a new init script in `boards/<vendor>/<board>/init` that will run during board startup.
For example:
- Add a new init script in `boards/<vendor>/<board>/init` that will run during board startup. For example:
```sh
# File: boards/<vendor>/<board>/init/rc.additional
param set-default <param> <value>
```
- Add a new board variant in `boards/<vendor>/<board>/<variant>.px4board` that includes the additional script. For example:
- Add a new board variant in `boards/<vendor>/<board>/<variant>.px4board` that includes the additional script.
For example:
```sh
# File: boards/<vendor>/<board>/var.px4board
CONFIG_BOARD_ADDITIONAL_INIT="rc.additional"
```
- Compile the firmware with your new variant by appending the variant name to the compile target. For example:
- Compile the firmware with your new variant by appending the variant name to the compile target.
For example:
```sh
make <target>_var
```
+7 -1
View File
@@ -33,7 +33,7 @@ _QGroundControl for Windows_ is additionally required if you need to:
Note that you can also use it to monitor a simulation, but you must manually [connect to the simulation running in WSL](#qgroundcontrol-on-windows).
::: info
Connecting to an USB device from within WSL is not natively supported, however it can still be achieved by using the [USBIPD-WIN](https://learn.microsoft.com/en-us/windows/wsl/connect-usb) project. With this you can automatically upload firmware from the command line in WSL using the [`upload`](../dev_setup/building_px4.md#uploading-firmware-flashing-the-board) function.
Connecting to an USB device from within WSL is not natively supported, however it can still be achieved by using the [USBIPD-WIN](https://learn.microsoft.com/en-us/windows/wsl/connect-usb) project. With this you can automatically upload firmware from the command line in WSL using the [`upload`](../dev_setup/building_px4.md#uploading-firmware-flashing-the-board) function.
:::
::: info
@@ -325,3 +325,9 @@ sudo add-apt-repository ppa:kisak/kisak-mesa
sudo apt update
sudo apt upgrade
```
### QGroundControl not connecting to PX4 SITL
- The connection between PX4 SITL on WSL2 and QGroundControl on Windows requires [broadcasting](../simulation/index.md#enable-udp-broadcasting) or [streaming to a specific address](../simulation/index.md#enable-streaming-to-specific-address) to be enabled.
Streaming to a specific address should be enabled by default, but is something to check if a connection can't be established.
- Network traffic might be blocked by firewall or antivirus on you system.
+22 -2
View File
@@ -27,7 +27,7 @@ Order this module from:
- Safety Button
- Buzzer
- Two Pixhawk Standard CAN Connectors (4 Pin JST GH)
- F9P UART 2 Connector
- F9P `UART 2` Connector
- 3 Pin JST GH
- TX, RX, GND
- Pixhawk Standard Debug Connector (6 Pin JST SH)
@@ -87,6 +87,25 @@ You need to set necessary [DroneCAN](index.md) parameters and define offsets if
- The parameters [EKF2_GPS_POS_X](../advanced_config/parameter_reference.md#EKF2_GPS_POS_X), [EKF2_GPS_POS_Y](../advanced_config/parameter_reference.md#EKF2_GPS_POS_Y) and [EKF2_GPS_POS_Z](../advanced_config/parameter_reference.md#EKF2_GPS_POS_Z) can be set to account for the offset of the ARK RTK GPS from the vehicles centre of gravity.
- Set [CANNODE_TERM](../advanced_config/parameter_reference.md#CANNODE_TERM) to `1` on the GPS if this it that last node on the CAN bus.
### Setting Up Rover and Fixed Base
Position of the rover is established using RTCM messages from the RTK base module (the base module is connected to QGC, which sends the RTCM information to PX4 via MAVLink).
PX4 DroneCAN parameters:
- [UAVCAN_PUB_RTCM](../advanced_config/parameter_reference.md#UAVCAN_PUB_RTCM):
- Makes PX4 publish RTCM messages ([RTCMStream](https://dronecan.github.io/Specification/7._List_of_standard_data_types/#rtcmstream)) to the bus (which it gets from the RTK base module via QGC).
Rover module parameters (also [set using QGC](../dronecan/index.md#qgc-cannode-parameter-configuration)):
- [CANNODE_SUB_RTCM](../advanced_config/parameter_reference.md#CANNODE_SUB_RTCM) tells the rover that it should subscribe to [RTCMStream](https://dronecan.github.io/Specification/7._List_of_standard_data_types/#rtcmstream) RTCM messages on the bus (from the moving base).
::: info
Use [UAVCAN_PUB_MBD](../advanced_config/parameter_reference.md#UAVCAN_PUB_MBD) and [CANNODE_SUB_MBD](../advanced_config/parameter_reference.md#CANNODE_SUB_MBD) instead if you want to implement moving base (see below) at the same time.
:::
For more information see [Rover and Fixed Base](../dronecan/index.md#rover-and-fixed-base) in the DroneCAN guide.
### Setting Up Moving Baseline & GPS Heading
The simplest way to set up moving baseline and GPS heading with two ARK RTK GPS modules is via CAN, though it can be done via UART to reduce traffic on the CAN bus if desired.
@@ -127,10 +146,11 @@ Setup via UART:
- On the _Moving Base_, set the following:
- [GPS_UBX_MODE](../advanced_config/parameter_reference.md#GPS_UBX_MODE) to `2`.
For more information see [Rover and Moving Base](../dronecan/index.md#rover-and-moving-base) in the DroneCAN guide.
## LED Meanings
- The GPS status lights are located to the right of the connectors
- Blinking green is GPS fix
- Blinking blue is received corrections and RTK Float
- Solid blue is RTK Fixed
+15
View File
@@ -9,3 +9,18 @@ For more information, see the following articles for specific hardware/firmware:
- [Vertiq](../peripherals/vertiq.md) (larger modules)
- [VESC Project](../peripherals/vesc.md)
- [RaccoonLab Cyphal and DroneCAN PWM nodes](raccoonlab_nodes.md)
## Hardware Configuration
General DroneCAN hardware configuration is covered in [DroneCAN > Hardware Setup](../dronecan/index.md#hardware-setup).
DroneCAN ESCs should be on their own dedicated CAN interface(s) because ESC messages can saturate the bus and starve other nodes of bandwidth.
## PX4 Configuration
DroneCAN peripherals are configured by following the procedure outlined in [DroneCAN](../dronecan/index.md).
In addition to the general setup, such as setting `UAVCAN_ENABLE` to `3`:
- Select the specific CAN interface(s) used for ESC data output using the [UAVCAN_ESC_IFACE](../advanced_config/parameter_reference.md#UAVCAN_ESC_IFACE) parameter (all that all interfaces are selected by default).
- Configure the [motor order and servo outputs](../config/actuators.md).
+7 -1
View File
@@ -270,6 +270,9 @@ PX4 DroneCAN parameters:
[DroneCAN ESCs and servos](../dronecan/escs.md) require the [motor order and servo outputs](../config/actuators.md) to be configured.
Select the specific CAN interface(s) used for ESC data output using the [UAVCAN_ESC_IFACE](../advanced_config/parameter_reference.md#UAVCAN_ESC_IFACE) parameter (all that all interfaces are selected by default).
Note that DroneCAN ESCs should be on their own dedicated CAN interface(s) because ESC messages can saturate the bus and starve other nodes of bandwidth.
## QGC CANNODE Parameter Configuration
QGroundControl can inspect and modify parameters belonging to CAN devices attached to the flight controller, provided the device are connected to the flight controller before QGC is started.
@@ -307,7 +310,10 @@ If successful, the firmware binary will be removed from the root directory and t
**Q**: The motors aren't spinning when armed.
**A**: Make sure `UAVCAN_ENABLE` is set to `3` to enable DroneCAN ESC output.
**A**:
- Make sure `UAVCAN_ENABLE` is set to `3` to enable DroneCAN ESC output.
- Make sure `UAVCAN_ESC_IFACE` is set to enable the CAN interface(s) used for ESCs.
---
+2
View File
@@ -17,6 +17,8 @@ Manual-Easy:
Airspeed is actively controlled if an airspeed sensor is installed.
- [Altitude](../flight_modes_fw/altitude.md) — Easiest and safest _non-GPS_ manual mode.
The only difference compared to _Position mode_ is that the pilot always directly controls the roll angle of the plane and there is no automatic course holding.
- Altitude Cruise mode — It behaves exactly like _Altitude mode_, with the only difference being that the manual control failsafe can be disabled. This is done by setting the corresponding flag in [COM_RCL_EXCEPT](../advanced_config/parameter_reference.md#COM_RCL_EXCEPT). In that case the current altitude, airspeed and heading (by leveling out the roll angle) are kept until the manual control link is regained or the mode is exited.
It is highly recommended to only disable the manual control loss failsafe for this mode if there is a stable data link connection to the vehicle at all times, or to enable the data link loss failsafe through [NAV_DLL_ACT](../advanced_config/parameter_reference.md#NAV_DLL_ACT).
- [Stabilized mode](../flight_modes_fw/stabilized.md) — The pilot directly commands the roll and pitch angle and the vehicle keeps the setpoint until the sticks are moved again.
Thrust is directly set by the pilot.
Turn coordination is still handled by the controller.
+1 -1
View File
@@ -21,7 +21,7 @@ The diagram below shows the mode behaviour visually (for a [mode 2 transmitter](
RC/manual mode like [Stabilized mode](../flight_modes_mc/manual_stabilized.md) but with _altitude stabilization_ (centred sticks level vehicle and hold it to fixed altitude).
The horizontal position of the vehicle can move due to wind (or pre-existing momentum).
- Centered sticks (inside deadband):
- Centered sticks:
- RPY sticks levels vehicle.
- Throttle (~50%) holds current altitude steady against wind.
- Outside center:
@@ -0,0 +1,45 @@
# Altitude Cruise Mode (Multicopter)
<img src="../../assets/site/difficulty_easy.png" title="Easy to fly" width="30px" />&nbsp;<img src="../../assets/site/remote_control.svg" title="Manual/Remote control required" width="30px" />&nbsp;<img src="../../assets/site/altitude_icon.svg" title="Altitude required (e.g. Baro, Rangefinder)" width="30px" />
_Altitude Cruise mode_ is a _relatively_ easy-to-fly manual control mode in which roll and pitch sticks control vehicle movement in the left-right and forward-back directions (relative to the "front" of the vehicle), yaw stick controls rate of rotation over the horizontal plane, and throttle controls speed of ascent-descent.
When the sticks are released/centered the vehicle will keep the current tilt and heading angle and maintain the current _altitude_.
If moving in the horizontal plane the vehicle will accelerate until the wind resistance equals the acceleration caused by the set tilt angle.
The vehicle will then continue to move with a constant velocity (unlike for Altitude mode, in which the vehicle will eventually slow down and stop).
If the wind blows the aircraft will drift in the direction of the wind even if flying perfectly level.
:::tip
_Altitude Cruise mode_ is intended for long distance flights where the same tilt angle is kept for a long period of time. It is just like [Altitude](../flight_modes_mc/altitude.md) mode but does not go back to level tilt when the sticks are released.
:::
The diagram below shows the mode behaviour visually (for a [mode 2 transmitter](../getting_started/rc_transmitter_receiver.md#transmitter_modes)).
![Altitude Control MC - Mode2 RC Controller](../../assets/flight_modes/altitude_mc.png)
## Technical Summary
A manual mode that is similar to [Altitude mode](../flight_modes_mc/altitude.md) but with different interpretation of roll and pitch sticks.
- Centered sticks:
- Roll/Pitch sticks: the current tilt is kept.
- Yaw: the current heading is kept.
- Throttle (~50%) holds current altitude.
- Outside center:
- Roll/Pitch sticks control the rate of change of the tilt angle, resulting in corresponding left-right and forward-back movement. A maximum stick deflection results in a tilting rate setpoint to go from level to max tilt within 0.5 seconds.
- Yaw stick deflection rotates the tilt angle either left or right, causing the vehicle to change course. It is _not_ causing a direct rotation around the body yaw axis like in [Acro mode](../flight_modes_mc/acro.md).
- Throttle stick controls up/down speed with a predetermined maximum rate (and movement speed in other axes).
- Takeoff:
- When landed, the vehicle will take off if the throttle stick is raised above 62.5% percent (of the full range from bottom).
- Manual control input is required (such as RC control, joystick) to enter this mode. Other than in all other manual modes, it's though possible to disable the manual control loss failsafe by setting the corresponding flag in [COM_RCL_EXCEPT](../advanced_config/parameter_reference.md#COM_RCL_EXCEPT). In that case the current altitude, tilt and heading are kept until the manual control link is regained or the mode is exited.
It is highly recommended to only disable the manual control loss failsafe for this mode if there is a stable data link connection to the vehicle at all times, and to enable the data link loss failsafe through [NAV_DLL_ACT](../advanced_config/parameter_reference.md#NAV_DLL_ACT).
## Parameters
Most of the relevant parameters are already covered in the corresponding section in the [Altitude mode](../flight_modes_mc/altitude.md). Here a list of parameters of particular importance for Altitude Cruise.
| Parameter | Description |
| ----------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| <a id="COM_RCL_EXCEPT"></a>[COM_RCL_EXCEPT](../advanced_config/parameter_reference.md#COM_RCL_EXCEPT) | The manual control failsafe can be disabled for Altitude Cruise by setting the corresponding bit in this parameter. |
| <a id="NAV_DLL_ACT"></a>[NAV_DLL_ACT](../advanced_config/parameter_reference.md#NAV_DLL_ACT) | Data link lost failsafe action. Recommended to set if the manual control failsafe is disabled to avoid fly-aways. |
| <a id="MPC_MAN_TILT_MAX"></a>[MPC_MAN_TILT_MAX](../advanced_config/parameter_reference.md#MPC_MAN_TILT_MAX) | The maximum tilt angle the vehicle will go to. At max stick deflection, it will take 0.5 seconds from level flight to this tilt angle. |
+3 -1
View File
@@ -21,10 +21,12 @@ Manual-Easy:
- [Stabilized mode](../flight_modes_mc/manual_stabilized.md) — Releasing the sticks levels and maintains the vehicle horizontal posture (but not altitude or position).
The vehicle will continue to move with momentum, and both altitude and horizontal position may be affected by wind.
This mode is also used if "Manual mode" is selected in a ground station.
- [Altitude Cruise mode](../flight_modes_mc/altitude_cruise.md) — Very similar to _Altitude mode_, with the difference that when the roll and pitch sticks are released the vehicle does not level out but keeps the tilt until further inputs are given.
Additionally it is possible to disable the manual control failsafe for this mode, having the vehicle continue on it's set path even if there are no new control inputs.
Manual-Acrobatic
- [Acro](../flight_modes_mc/acro.md) — Manual mode for performing acrobatic maneuvers, such as rolls and loops.
- [Acro](../flight_modes_mc/acro.md) — Manual mode for performing acrobatic manoeuvrers, such as rolls and loops.
Releasing the sticks stops the vehicle rotating in the roll, pitch, yaw axes, but does not otherwise stabilise the vehicle.
Autonomous:
+1 -1
View File
@@ -31,7 +31,7 @@ Throttle is rescaled (see [below](#params)) and passed directly to control alloc
The autopilot controls the attitude, meaning it regulates the roll and pitch angles to zero when the RC sticks are centered inside the controller deadzone (consequently leveling-out the attitude).
The autopilot does not compensate for drift due to wind (or other sources).
- Centered sticks (inside deadband):
- Centered sticks:
- Roll/Pitch sticks level vehicle.
- Outside center:
- Roll/Pitch sticks control tilt angle in those orientations, resulting in corresponding left-right and forward-back movement.
+6 -6
View File
@@ -43,7 +43,7 @@ While very rare on a well calibrated vehicle, sometimes there may be problems wi
RC mode where roll, pitch, throttle (RPT) sticks control movement in corresponding axes/directions.
Centered sticks level vehicle and hold it to fixed altitude and position against wind.
- Centered roll, pitch, throttle sticks (within RC deadzone [MPC_HOLD_DZ](../advanced_config/parameter_reference.md#MPC_HOLD_DZ)) hold x, y, z position steady against any disturbance like wind.
- Centered roll, pitch, throttle sticks (within RC deadzone [MAN_DEADZONE](../advanced_config/parameter_reference.md#MAN_DEADZONE)) hold x, y, z position steady against any disturbance like wind.
- Outside center:
- Roll/Pitch sticks control horizontal acceleration over ground in the vehicle's left-right and forward-back directions (respectively).
- Throttle stick controls speed of ascent-descent.
@@ -51,10 +51,10 @@ Centered sticks level vehicle and hold it to fixed altitude and position against
- Takeoff:
- When landed, the vehicle will take off if the throttle stick is raised above 62.5% percent (of the full range from bottom).
- Global position estimate is required.
- Manual control input is required (such as RC control, joystick).
- Roll, Pitch, Throttle: Assistance from autopilot to hold position against wind.
- Yaw: Assistance from autopilot to stabilize the attitude rate.
Position of RC stick maps to the rate of rotation of vehicle in that orientation.
- Manual control input is required (such as RC control, joystick).
- Roll, Pitch, Throttle: Assistance from autopilot to hold position against wind.
- Yaw: Assistance from autopilot to stabilize the attitude rate.
Position of RC stick maps to the rate of rotation of vehicle in that orientation.
### Parameters
@@ -62,7 +62,7 @@ All the parameters in the [Multicopter Position Control](../advanced_config/para
| Parameter | Description |
| ----------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| <a id="MPC_HOLD_DZ"></a>[MPC_HOLD_DZ](../advanced_config/parameter_reference.md#MPC_HOLD_DZ) | Deadzone of sticks where position hold is enabled. Default: 0.1 (10% of full stick range). |
| <a id="MAN_DEADZONE"></a>[MAN_DEADZONE](../advanced_config/parameter_reference.md#MAN_DEADZONE) | Deadzone of sticks where position hold is enabled. Default: 0.1 (10% of full stick range). |
| <a id="MPC_Z_VEL_MAX_UP"></a>[MPC_Z_VEL_MAX_UP](../advanced_config/parameter_reference.md#MPC_Z_VEL_MAX_UP) | Maximum vertical ascent velocity. Default: 3 m/s. |
| <a id="MPC_Z_VEL_MAX_DN"></a>[MPC_Z_VEL_MAX_DN](../advanced_config/parameter_reference.md#MPC_Z_VEL_MAX_DN) | Maximum vertical descent velocity. Default: 1 m/s. |
| <a id="MPC_LAND_ALT1"></a>[MPC_LAND_ALT1](../advanced_config/parameter_reference.md#MPC_LAND_ALT1) | Altitude for triggering first phase of slow landing. Below this altitude descending velocity gets limited to a value between [MPC_Z_VEL_MAX_DN](#MPC_Z_VEL_MAX_DN) (or `MPC_Z_V_AUTO_DN`) and [MPC_LAND_SPEED](#MPC_LAND_SPEED). Value needs to be higher than [MPC_LAND_ALT2](#MPC_LAND_ALT2). Default 10m. |
+22 -3
View File
@@ -65,7 +65,7 @@ PX4 Micro XRCE-DDS Client is based on version `v2.x` which is not compatible wit
On Ubuntu you can build from source and install the Agent standalone using the following commands:
```sh
git clone -b v2.4.2 https://github.com/eProsima/Micro-XRCE-DDS-Agent.git
git clone -b v2.4.3 https://github.com/eProsima/Micro-XRCE-DDS-Agent.git
cd Micro-XRCE-DDS-Agent
mkdir build
cd build
@@ -126,7 +126,7 @@ To build the agent within ROS:
```sh
cd ~/px4_ros_uxrce_dds_ws/src
git clone -b v2.4.2 https://github.com/eProsima/Micro-XRCE-DDS-Agent.git
git clone -b v2.4.3 https://github.com/eProsima/Micro-XRCE-DDS-Agent.git
```
1. Source the ROS 2 development environment, and compile the workspace using `colcon`:
@@ -274,6 +274,9 @@ The configuration can be done using the [UXRCE-DDS parameters](../advanced_confi
- [UXRCE_DDS_SYNCT](../advanced_config/parameter_reference.md#UXRCE_DDS_SYNCT): Bridge time synchronization enable.
The uXRCE-DDS client module can synchronize the timestamp of the messages exchanged over the bridge.
This is the default configuration. In certain situations, for example during [simulations](../ros2/user_guide.md#ros-gazebo-and-px4-time-synchronization), this feature may be disabled.
- [`UXRCE_DDS_NS_IDX`](../advanced_config/parameter_reference.md#UXRCE_DDS_NS_IDX): Index-based namespace definition
Setting this parameter to any value other than `-1` creates a namespace with the prefix `uav_` and the specified value, e.g. `uav_0`, `uav_1`, etc.
See [namespace](#customizing-the-namespace) for methods to define richer or arbitrary namespaces.
::: info
Many ports are already have a default configuration.
@@ -347,7 +350,7 @@ Therefore,
## Customizing the Namespace
Custom topic and service namespaces can be applied at build time (changing [dds_topics.yaml](../middleware/dds_topics.md)) or at runtime (which is useful for multi vehicle operations):
Custom topic and service namespaces can be applied at build time (changing [dds_topics.yaml](../middleware/dds_topics.md)), at runtime, or through a parameter (which is useful for multi vehicle operations):
- One possibility is to use the `-n` option when starting the [uxrce_dds_client](../modules/modules_system.md#uxrce-dds-client) from command line.
This technique can be used both in simulation and real vehicles.
@@ -376,6 +379,22 @@ will generate topics under the namespaces:
:::
- A simple index-based namespace can be applied by setting the parameter [`UXRCE_DDS_NS_IDX`](../advanced_config/parameter_reference.md#UXRCE_DDS_NS_IDX) to a value between 0 and 9999.
This will generate a namespace such as `/uav_0`, `/uav_1`, and so on.
This technique is ideal if vehicles must be persistently associated with namespaces because their clients are automatically started through PX4.
::: info
PX4 parameters cannot carry rich text strings.
Therefore, you cannot use [`UXRCE_DDS_NS_IDX`](../advanced_config/parameter_reference.md#UXRCE_DDS_NS_IDX) to automatically start a client with an arbitrary message namespace through PX4.
You can however specify a namespace when starting the client, using the `-n` argument:
```sh
# In etc/extras.txt on the MicroSD card
uxrce_dds_client start -n fancy_uav
```
This can be included in `etc/extras.txt` as part of a custom [System Startup](../concept/system_startup.md).
## PX4 ROS 2 QoS Settings
PX4 QoS settings for publishers are incompatible with the default QoS settings for ROS 2 subscribers.
+35
View File
@@ -45,6 +45,41 @@ MicroStrain <command> [arguments...]
status Driver status
```
## eulernav_bahrs
Source: [drivers/ins/eulernav_bahrs](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/ins/eulernav_bahrs)
### Description
Serial bus driver for the EULER-NAV Baro-Inertial AHRS.
### Examples
Attempt to start driver on a specified serial device.
```
eulernav_bahrs start -d /dev/ttyS1
```
Stop driver
```
eulernav_bahrs stop
```
### Usage {#eulernav_bahrs_usage}
```
eulernav_bahrs <command> [arguments...]
Commands:
start Start driver
-d <val> Serial device
status Print driver status
stop Stop driver
```
## ilabs
Source: [drivers/ins/ilabs](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/ins/ilabs)
+17 -17
View File
@@ -15,25 +15,25 @@ Request are published by `manual_control` and subscribed by the `commander` and
# It allows mapping triggers from various external interfaces like RC channels or MAVLink to cause an action.
# Request are published by `manual_control` and subscribed by the `commander` and `vtol_att_control` modules.
uint64 timestamp # [us] Time since system start
uint64 timestamp # [us] Time since system start
uint8 action # [@enum ACTION] Requested action
uint8 ACTION_DISARM = 0 # Disarm vehicle
uint8 ACTION_ARM = 1 # Arm vehicle
uint8 ACTION_TOGGLE_ARMING = 2 # Toggle arming
uint8 ACTION_UNKILL = 3 # Revert a kill action
uint8 ACTION_KILL = 4 # Kill vehicle (instantly stop the motors)
uint8 ACTION_SWITCH_MODE = 5 # Switch mode. The target mode is set in the `mode` field.
uint8 ACTION_VTOL_TRANSITION_TO_MULTICOPTER = 6 # Transition to hover flight
uint8 ACTION_VTOL_TRANSITION_TO_FIXEDWING = 7 # Transition to fast forward flight
uint8 ACTION_TERMINATION = 8 # Irreversably output failsafe values on all outputs, trigger parachute
uint8 action # [@enum ACTION] Requested action
uint8 ACTION_DISARM = 0 # Disarm vehicle
uint8 ACTION_ARM = 1 # Arm vehicle
uint8 ACTION_TOGGLE_ARMING = 2 # Toggle arming
uint8 ACTION_UNKILL = 3 # Revert a kill action
uint8 ACTION_KILL = 4 # Kill vehicle (instantly stop the motors)
uint8 ACTION_SWITCH_MODE = 5 # Switch mode. The target mode is set in the `mode` field.
uint8 ACTION_VTOL_TRANSITION_TO_MULTICOPTER = 6 # Transition to hover flight
uint8 ACTION_VTOL_TRANSITION_TO_FIXEDWING = 7 # Transition to fast forward flight
uint8 ACTION_TERMINATION = 8 # Irreversibly output failsafe values on all outputs, trigger parachute
uint8 source # [@enum SOURCE] Request trigger type, such as a switch, button or gesture
uint8 SOURCE_STICK_GESTURE = 0 # Triggered by holding the sticks in a certain position
uint8 SOURCE_RC_SWITCH = 1 # Triggered by an RC switch moving into a certain position
uint8 SOURCE_RC_BUTTON = 2 # Triggered by a momentary button on the RC being pressed or held
uint8 SOURCE_RC_MODE_SLOT = 3 # Mode change through the RC mode selection mechanism
uint8 source # [@enum SOURCE] Request trigger type, such as a switch, button or gesture
uint8 SOURCE_STICK_GESTURE = 0 # Triggered by holding the sticks in a certain position
uint8 SOURCE_RC_SWITCH = 1 # Triggered by an RC switch moving into a certain position
uint8 SOURCE_RC_BUTTON = 2 # Triggered by a momentary button on the RC being pressed or held
uint8 SOURCE_RC_MODE_SLOT = 3 # Mode change through the RC mode selection mechanism
uint8 mode # Requested mode. Only applies when `action` is `ACTION_SWITCH_MODE`. Values for this field are defined by the `vehicle_status_s::NAVIGATION_STATE_*` enumeration.
uint8 mode # Requested mode. Only applies when `action` is `ACTION_SWITCH_MODE`. Values for this field are defined by the `vehicle_status_s::NAVIGATION_STATE_*` enumeration.
```
+6 -6
View File
@@ -15,14 +15,14 @@ Published by the vehicle's allocation and consumed by the ESC protocol drivers e
uint32 MESSAGE_VERSION = 0
uint64 timestamp # [us] Time since system start
uint64 timestamp_sample # [us] Sampling timestamp of the data this control response is based on
uint64 timestamp # [us] Time since system start
uint64 timestamp_sample # [us] Sampling timestamp of the data this control response is based on
uint16 reversible_flags # Bitset indicating which motors are configured to be reversible
uint16 reversible_flags # Bitset indicating which motors are configured to be reversible
uint8 ACTUATOR_FUNCTION_MOTOR1 = 101
uint8 ACTUATOR_FUNCTION_MOTOR1 = 101 #
uint8 NUM_CONTROLS = 12
float32[12] control # [@range -1, 1] Normalized thrust. where 1 means maximum positive thrust, -1 maximum negative (if not supported by the output, <0 maps to NaN). NaN maps to disarmed (stop the motors)
uint8 NUM_CONTROLS = 12 #
float32[12] control # [@range -1, 1] Normalized thrust. where 1 means maximum positive thrust, -1 maximum negative (if not supported by the output, <0 maps to NaN). NaN maps to disarmed (stop the motors)
```
+4 -4
View File
@@ -15,10 +15,10 @@ Published by the vehicle's allocation and consumed by the actuator output driver
uint32 MESSAGE_VERSION = 0
uint64 timestamp # [us] Time since system start
uint64 timestamp_sample # [us] Sampling timestamp of the data this control response is based on
uint64 timestamp # [us] Time since system start
uint64 timestamp_sample # [us] Sampling timestamp of the data this control response is based on
uint8 NUM_CONTROLS = 8
float32[8] control # [@range -1, 1] Normalized output. 1 means maximum positive position. -1 maximum negative position (if not supported by the output, <0 maps to NaN). NaN maps to disarmed.
uint8 NUM_CONTROLS = 8 #
float32[8] control # [@range -1, 1] Normalized output. 1 means maximum positive position. -1 maximum negative position (if not supported by the output, <0 maps to NaN). NaN maps to disarmed.
```
+5 -5
View File
@@ -13,10 +13,10 @@ It is subscribed by the airspeed selector module, which validates the data from
# This is published by airspeed sensor drivers, CAN airspeed sensors, simulators.
# It is subscribed by the airspeed selector module, which validates the data from multiple sensors and passes on a single estimation to the EKF, controllers and telemetry providers.
uint64 timestamp # [us] Time since system start
uint64 timestamp_sample # [us] Timestamp of the raw data
float32 indicated_airspeed_m_s # [m/s] Indicated airspeed
float32 true_airspeed_m_s # [m/s] True airspeed
float32 confidence # [@range 0,1] Confidence value for this sensor
uint64 timestamp # [us] Time since system start
uint64 timestamp_sample # [us] Timestamp of the raw data
float32 indicated_airspeed_m_s # [m/s] Indicated airspeed
float32 true_airspeed_m_s # [m/s] True airspeed
float32 confidence # [@range 0,1] Confidence value for this sensor
```
+23 -23
View File
@@ -21,39 +21,39 @@ The message is not used by internal/FMU components, as their mode requirements a
# Note that the external component is identified by its registration_id, which is allocated to the component during registration (arming_check_id in RegisterExtComponentReply).
# The message is not used by internal/FMU components, as their mode requirements are known at compile time.
uint32 MESSAGE_VERSION = 1
uint32 MESSAGE_VERSION = 1
uint64 timestamp # [us] Time since system start.
uint8 request_id # Id of ArmingCheckRequest for which this is a response.
uint8 registration_id # Id of external component emitting this response.
uint8 request_id # Id of ArmingCheckRequest for which this is a response.
uint8 registration_id # Id of external component emitting this response.
uint8 HEALTH_COMPONENT_INDEX_NONE = 0 # Index of health component for which this response applies.
uint8 HEALTH_COMPONENT_INDEX_NONE = 0 # Index of health component for which this response applies.
uint8 health_component_index # [@enum HEALTH_COMPONENT_INDEX]
bool health_component_is_present # Unused. Intended for use with health events interface (health_component_t in events.json).
bool health_component_warning # Unused. Intended for use with health events interface (health_component_t in events.json).
bool health_component_error # Unused. Intended for use with health events interface (health_component_t in events.json).
uint8 health_component_index # [@enum HEALTH_COMPONENT_INDEX]
bool health_component_is_present # Unused. Intended for use with health events interface (health_component_t in events.json).
bool health_component_warning # Unused. Intended for use with health events interface (health_component_t in events.json).
bool health_component_error # Unused. Intended for use with health events interface (health_component_t in events.json).
bool can_arm_and_run # True if the component can arm. For navigation mode components, true if the component can arm in the mode or switch to the mode when already armed.
bool can_arm_and_run # True if the component can arm. For navigation mode components, true if the component can arm in the mode or switch to the mode when already armed.
uint8 num_events # Number of queued failure messages (Event) in the events field.
uint8 num_events # Number of queued failure messages (Event) in the events field.
Event[5] events # Arming failure reasons (Queue of events to report to GCS).
Event[5] events # Arming failure reasons (Queue of events to report to GCS).
# Mode requirements
bool mode_req_angular_velocity # Requires angular velocity estimate (e.g. from gyroscope).
bool mode_req_attitude # Requires an attitude estimate.
bool mode_req_local_alt # Requires a local altitude estimate.
bool mode_req_local_position # Requires a local position estimate.
bool mode_req_local_position_relaxed # Requires a more relaxed global position estimate.
bool mode_req_global_position # Requires a global position estimate.
bool mode_req_global_position_relaxed # Requires a relaxed global position estimate.
bool mode_req_mission # Requires an uploaded mission.
bool mode_req_home_position # Requires a home position (such as RTL/Return mode).
bool mode_req_prevent_arming # Prevent arming (such as in Land mode).
bool mode_req_manual_control # Requires a manual controller
bool mode_req_angular_velocity # Requires angular velocity estimate (e.g. from gyroscope).
bool mode_req_attitude # Requires an attitude estimate.
bool mode_req_local_alt # Requires a local altitude estimate.
bool mode_req_local_position # Requires a local position estimate.
bool mode_req_local_position_relaxed # Requires a more relaxed global position estimate.
bool mode_req_global_position # Requires a global position estimate.
bool mode_req_global_position_relaxed # Requires a relaxed global position estimate.
bool mode_req_mission # Requires an uploaded mission.
bool mode_req_home_position # Requires a home position (such as RTL/Return mode).
bool mode_req_prevent_arming # Prevent arming (such as in Land mode).
bool mode_req_manual_control # Requires a manual controller
uint8 ORB_QUEUE_LENGTH = 4 #
uint8 ORB_QUEUE_LENGTH = 4
```
+5 -3
View File
@@ -21,10 +21,12 @@ The reply will also include the registration_id for each external component, pro
# The reply will include the published request_id, allowing correlation of all arming check information for a particular request.
# The reply will also include the registration_id for each external component, provided to it during the registration process (RegisterExtComponentReply).
uint32 MESSAGE_VERSION = 0
uint32 MESSAGE_VERSION = 1
uint64 timestamp # [us] Time since system start.
uint64 timestamp # [us] Time since system start.
uint8 request_id # Id of this request. Allows correlation with associated ArmingCheckReply messages.
uint8 request_id # Id of this request. Allows correlation with associated ArmingCheckReply messages.
uint32 valid_registrations_mask # Bitmask of valid registration ID's (the bit is also cleared if flagged as unresponsive)
```
+30
View File
@@ -0,0 +1,30 @@
# ArmingCheckRequestV0 (UORB message)
Arming check request.
Broadcast message to request arming checks be reported by all registered components, such as external ROS 2 navigation modes.
All registered components should respond with an ArmingCheckReply message that indicates their current mode requirements, and any arming failure information.
The request is sent regularly, even while armed, so that the FMU always knows the current arming state for external modes, and can forward it to ground stations.
The reply will include the published request_id, allowing correlation of all arming check information for a particular request.
The reply will also include the registration_id for each external component, provided to it during the registration process (RegisterExtComponentReply).
[source file](https://github.com/PX4/PX4-Autopilot/blob/main/msg/px4_msgs_old/msg/ArmingCheckRequestV0.msg)
```c
# Arming check request.
#
# Broadcast message to request arming checks be reported by all registered components, such as external ROS 2 navigation modes.
# All registered components should respond with an ArmingCheckReply message that indicates their current mode requirements, and any arming failure information.
# The request is sent regularly, even while armed, so that the FMU always knows the current arming state for external modes, and can forward it to ground stations.
#
# The reply will include the published request_id, allowing correlation of all arming check information for a particular request.
# The reply will also include the registration_id for each external component, provided to it during the registration process (RegisterExtComponentReply).
uint32 MESSAGE_VERSION = 0
uint64 timestamp # [us] Time since system start.
uint8 request_id # Id of this request. Allows correlation with associated ArmingCheckReply messages.
```
+30 -30
View File
@@ -11,39 +11,39 @@ This is currently used only for logging cell status from MAVLink.
#
# This is currently used only for logging cell status from MAVLink.
uint64 timestamp # [us] Time since system start
uint64 timestamp # [us] Time since system start
uint16 status # [@enum STATUS_FLAG] Status bitmap
uint16 STATUS_FLAG_UNKNOWN = 1 # State unknown or not reportable
uint16 STATUS_FLAG_FAILED = 2 # Modem is unusable
uint16 STATUS_FLAG_INITIALIZING = 4 # Modem is being initialized
uint16 STATUS_FLAG_LOCKED = 8 # Modem is locked
uint16 STATUS_FLAG_DISABLED = 16 # Modem is not enabled and is powered down
uint16 STATUS_FLAG_DISABLING = 32 # Modem is currently transitioning to the STATUS_FLAG_DISABLED state
uint16 STATUS_FLAG_ENABLING = 64 # Modem is currently transitioning to the STATUS_FLAG_ENABLED state
uint16 STATUS_FLAG_ENABLED = 128 # Modem is enabled and powered on but not registered with a network provider and not available for data connections
uint16 STATUS_FLAG_SEARCHING = 256 # Modem is searching for a network provider to register
uint16 STATUS_FLAG_REGISTERED = 512 # Modem is registered with a network provider, and data connections and messaging may be available for use
uint16 STATUS_FLAG_DISCONNECTING = 1024 # Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated
uint16 STATUS_FLAG_CONNECTING = 2048 # Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered
uint16 STATUS_FLAG_CONNECTED = 4096 # One or more packet data bearers is active and connected
uint16 status # [@enum STATUS_FLAG] Status bitmap
uint16 STATUS_FLAG_UNKNOWN = 1 # State unknown or not reportable
uint16 STATUS_FLAG_FAILED = 2 # Modem is unusable
uint16 STATUS_FLAG_INITIALIZING = 4 # Modem is being initialized
uint16 STATUS_FLAG_LOCKED = 8 # Modem is locked
uint16 STATUS_FLAG_DISABLED = 16 # Modem is not enabled and is powered down
uint16 STATUS_FLAG_DISABLING = 32 # Modem is currently transitioning to the STATUS_FLAG_DISABLED state
uint16 STATUS_FLAG_ENABLING = 64 # Modem is currently transitioning to the STATUS_FLAG_ENABLED state
uint16 STATUS_FLAG_ENABLED = 128 # Modem is enabled and powered on but not registered with a network provider and not available for data connections
uint16 STATUS_FLAG_SEARCHING = 256 # Modem is searching for a network provider to register
uint16 STATUS_FLAG_REGISTERED = 512 # Modem is registered with a network provider, and data connections and messaging may be available for use
uint16 STATUS_FLAG_DISCONNECTING = 1024 # Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated
uint16 STATUS_FLAG_CONNECTING = 2048 # Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered
uint16 STATUS_FLAG_CONNECTED = 4096 # One or more packet data bearers is active and connected
uint8 failure_reason # [@enum FAILURE_REASON] Failure reason
uint8 FAILURE_REASON_NONE = 0 # No error
uint8 FAILURE_REASON_UNKNOWN = 1 # Error state is unknown
uint8 FAILURE_REASON_SIM_MISSING = 2 # SIM is required for the modem but missing
uint8 FAILURE_REASON_SIM_ERROR = 3 # SIM is available, but not usable for connection
uint8 failure_reason # [@enum FAILURE_REASON] Failure reason
uint8 FAILURE_REASON_NONE = 0 # No error
uint8 FAILURE_REASON_UNKNOWN = 1 # Error state is unknown
uint8 FAILURE_REASON_SIM_MISSING = 2 # SIM is required for the modem but missing
uint8 FAILURE_REASON_SIM_ERROR = 3 # SIM is available, but not usable for connection
uint8 type # [@enum CELLULAR_NETWORK_RADIO_TYPE] Cellular network radio type
uint8 CELLULAR_NETWORK_RADIO_TYPE_NONE = 0 # None
uint8 CELLULAR_NETWORK_RADIO_TYPE_GSM = 1 # GSM
uint8 CELLULAR_NETWORK_RADIO_TYPE_CDMA = 2 # CDMA
uint8 CELLULAR_NETWORK_RADIO_TYPE_WCDMA = 3 # WCDMA
uint8 CELLULAR_NETWORK_RADIO_TYPE_LTE = 4 # LTE
uint8 type # [@enum CELLULAR_NETWORK_RADIO_TYPE] Cellular network radio type
uint8 CELLULAR_NETWORK_RADIO_TYPE_NONE = 0 # None
uint8 CELLULAR_NETWORK_RADIO_TYPE_GSM = 1 # GSM
uint8 CELLULAR_NETWORK_RADIO_TYPE_CDMA = 2 # CDMA
uint8 CELLULAR_NETWORK_RADIO_TYPE_WCDMA = 3 # WCDMA
uint8 CELLULAR_NETWORK_RADIO_TYPE_LTE = 4 # LTE
uint8 quality # [dBm] Cellular network RSSI/RSRP, absolute value
uint16 mcc # [@invalid UINT16_MAX] Mobile country code
uint16 mnc # [@invalid UINT16_MAX] Mobile network code
uint16 lac # [@invalid 0] Location area code
uint8 quality # [dBm] Cellular network RSSI/RSRP, absolute value
uint16 mcc # [@invalid UINT16_MAX] Mobile country code
uint16 mnc # [@invalid UINT16_MAX] Mobile network code
uint16 lac # [@invalid 0] Location area code
```
+14
View File
@@ -0,0 +1,14 @@
# RoverSpeedSetpoint (UORB message)
Rover Speed Setpoint
[source file](https://github.com/PX4/PX4-Autopilot/blob/main/msg/RoverSpeedSetpoint.msg)
```c
# Rover Speed Setpoint
uint64 timestamp # [us] Time since system start
float32 speed_body_x # [m/s] [@range -inf (Backwards), inf (Forwards)] [@frame Body] Speed setpoint in body x direction
float32 speed_body_y # [m/s] [@range -inf (Left), inf (Right)] [@frame Body] [@invalid NaN If not mecanum] Mecanum only: Speed setpoint in body y direction
```
+18
View File
@@ -0,0 +1,18 @@
# RoverSpeedStatus (UORB message)
Rover Velocity Status
[source file](https://github.com/PX4/PX4-Autopilot/blob/main/msg/RoverSpeedStatus.msg)
```c
# Rover Velocity Status
uint64 timestamp # [us] Time since system start
float32 measured_speed_body_x # [m/s] [@range -inf (Backwards), inf (Forwards)] [@frame Body] Measured speed in body x direction
float32 adjusted_speed_body_x_setpoint # [m/s] [@range -inf (Backwards), inf (Forwards)] [@frame Body] Speed setpoint in body x direction that is being tracked (Applied slew rates)
float32 pid_throttle_body_x_integral # [] [@range -1, 1] Integral of the PID for the closed loop controller of the speed in body x direction
float32 measured_speed_body_y # [m/s] [@range -inf (Left), inf (Right)] [@frame Body] [@invalid NaN If not mecanum] Mecanum only: Measured speed in body y direction
float32 adjusted_speed_body_y_setpoint # [m/s] [@range -inf (Left), inf (Right)] [@frame Body] [@invalid NaN If not mecanum] Mecanum only: Speed setpoint in body y direction that is being tracked (Applied slew rates)
float32 pid_throttle_body_y_integral # [] [@range -1, 1] [@invalid NaN If not mecanum] Mecanum only: Integral of the PID for the closed loop controller of the speed in body y direction
```
+16 -14
View File
@@ -1,24 +1,26 @@
# VehicleAirData (UORB message)
Vehicle air data
Data from the currently selected barometer (plus ambient temperature from the source specified in temperature_source).
Includes calculated data such as barometric altitude and air density.
[source file](https://github.com/PX4/PX4-Autopilot/blob/main/msg/VehicleAirData.msg)
```c
# Vehicle air data
#
# Data from the currently selected barometer (plus ambient temperature from the source specified in temperature_source).
# Includes calculated data such as barometric altitude and air density.
uint64 timestamp # time since system start (microseconds)
uint64 timestamp_sample # the timestamp of the raw data (microseconds)
uint32 baro_device_id # unique device ID for the selected barometer
float32 baro_alt_meter # Altitude above MSL calculated from temperature compensated baro sensor data using an ISA corrected for sea level pressure SENS_BARO_QNH.
float32 baro_pressure_pa # Absolute pressure in Pascals
float32 ambient_temperature # Abient temperature in degrees Celsius
uint8 temperature_source # Source of temperature data: 0: Default Temperature (15°C), 1: External Baro, 2: Airspeed
float32 rho # air density
uint8 calibration_count # Calibration changed counter. Monotonically increases whenever calibration changes.
uint64 timestamp # [us] Time since system start
uint64 timestamp_sample # [us] Timestamp of the raw data
uint32 baro_device_id # Unique device ID for the selected barometer
float32 baro_alt_meter # [m] [@frame MSL] Altitude above MSL calculated from temperature compensated baro sensor data using an ISA corrected for sea level pressure SENS_BARO_QNH
float32 baro_pressure_pa # [Pa] Absolute pressure
float32 ambient_temperature # [degC] Ambient temperature
uint8 temperature_source # Source of temperature data: 0: Default Temperature (15°C), 1: External Baro, 2: Airspeed
float32 rho # [kg/m^3] Air density
uint8 calibration_count # Calibration changed counter. Monotonically increases whenever calibration changes.
```
+4 -3
View File
@@ -229,10 +229,10 @@ Graphs showing how these are used [can be found here](../middleware/uorb_graph.m
- [RoverPositionSetpoint](RoverPositionSetpoint.md) — Rover Position Setpoint
- [RoverRateSetpoint](RoverRateSetpoint.md) — Rover Rate setpoint
- [RoverRateStatus](RoverRateStatus.md) — Rover Rate Status
- [RoverSpeedSetpoint](RoverSpeedSetpoint.md) — Rover Speed Setpoint
- [RoverSpeedStatus](RoverSpeedStatus.md) — Rover Velocity Status
- [RoverSteeringSetpoint](RoverSteeringSetpoint.md) — Rover Steering setpoint
- [RoverThrottleSetpoint](RoverThrottleSetpoint.md) — Rover Throttle setpoint
- [RoverVelocitySetpoint](RoverVelocitySetpoint.md) — Rover Velocity Setpoint
- [RoverVelocityStatus](RoverVelocityStatus.md) — Rover Velocity Status
- [Rpm](Rpm.md)
- [RtlStatus](RtlStatus.md)
- [RtlTimeEstimate](RtlTimeEstimate.md)
@@ -281,7 +281,7 @@ Graphs showing how these are used [can be found here](../middleware/uorb_graph.m
- [UlogStreamAck](UlogStreamAck.md) — Ack a previously sent ulog_stream message that had
the NEED_ACK flag set
- [VehicleAcceleration](VehicleAcceleration.md)
- [VehicleAirData](VehicleAirData.md)
- [VehicleAirData](VehicleAirData.md) — Vehicle air data
- [VehicleAngularAccelerationSetpoint](VehicleAngularAccelerationSetpoint.md)
- [VehicleConstraints](VehicleConstraints.md) — Local setpoint constraints in NED frame
setting something to NaN means that no limit is provided
@@ -301,6 +301,7 @@ Graphs showing how these are used [can be found here](../middleware/uorb_graph.m
- [YawEstimatorStatus](YawEstimatorStatus.md)
- [AirspeedValidatedV0](AirspeedValidatedV0.md)
- [ArmingCheckReplyV0](ArmingCheckReplyV0.md)
- [ArmingCheckRequestV0](ArmingCheckRequestV0.md) — Arming check request.
- [BatteryStatusV0](BatteryStatusV0.md) — Battery status
- [EventV0](EventV0.md) — this message is required here in the msg_old folder because other msg are depending on it
Events interface
+6 -3
View File
@@ -44,7 +44,9 @@ Please continue reading for [upgrade instructions](#upgrade-guide).
### Control
- TBD
- Added new flight mode(s): [Altitude Cruise (MC)](../flight_modes_mc/altitude_cruise.md), Altitude Cruise (FW).
For fixed-wing the mode behaves the same as Altitude mode but you can disable the manual control loss failsafe. ([PX4-Autopilot#25435: Add new flight mode: Altitude Cruise
](https://github.com/PX4/PX4-Autopilot/pull/25435)).
### Estimation
@@ -52,7 +54,7 @@ Please continue reading for [upgrade instructions](#upgrade-guide).
### Sensors
- TBD
- Add [sbgECom INS driver](../sensor/sbgecom.md) ([PX4-Autopilot#24137](https://github.com/PX4/PX4-Autopilot/pull/24137))
### Simulation
@@ -72,7 +74,8 @@ Please continue reading for [upgrade instructions](#upgrade-guide).
### Multi-Rotor
- TBD
- Removed parameters `MPC_{XY/Z/YAW}_MAN_EXPO` and use default value instead, as they were not deemed necessary anymore. ([PX4-Autopilot#25435: Add new flight mode: Altitude Cruise](https://github.com/PX4/PX4-Autopilot/pull/25435)).
- Renamed `MPC_HOLD_DZ` to `MAN_DEADZONE` to have it globally available in modes that allow for a dead zone. ([PX4-Autopilot#25435: Add new flight mode: Altitude Cruise](https://github.com/PX4/PX4-Autopilot/pull/25435)).
### VTOL
+1 -1
View File
@@ -152,7 +152,7 @@ To setup and start the agent:
1. Enter the following commands to fetch and build the agent from source:
```sh
git clone -b v2.4.2 https://github.com/eProsima/Micro-XRCE-DDS-Agent.git
git clone -b v2.4.3 https://github.com/eProsima/Micro-XRCE-DDS-Agent.git
cd Micro-XRCE-DDS-Agent
mkdir build
cd build
@@ -9,6 +9,7 @@ However PX4 can also use some INS devices as either sources of raw data, or as a
INS systems that can be used as a replacement for EKF2 in PX4:
- [InertialLabs](../sensor/inertiallabs.md)
- [SBG Systems](../sensor/sbgecom.md): IMU/AHRS, GNSS/INS, Dual GNSS/INS systems that can be used as an external INS or as a source of raw sensor data.
- [VectorNav](../sensor/vectornav.md): IMU/AHRS, GNSS/INS, Dual GNSS/INS systems that can be used as an external INS or as a source of raw sensor data.
## PX4 Firmware
+150
View File
@@ -0,0 +1,150 @@
# SBG Systems INS/AHRS (Pulse, Ellipse, etc.)
[SBG-Systems](https://www.sbg-systems.com/) designs, manufactures, and support an extensive range of state-of-the-art inertial sensors such as Inertial Measurement Units (IMU), Attitude and Heading Reference Systems (AHRS), Inertial Navigation Systems with embedded GNSS (INS/GNSS), and so on.
PX4 supports [all SBG Systems products](https://www.sbg-systems.com/products/) and can use these as an [external INS](../sensor/inertial_navigation_systems.md) (bypassing/replacing the EKF2 estimator), or as a source of raw sensor data provided to the navigation estimator.
![Ellipse](../../assets/hardware/sensors/inertial/ellipse-inertial-navigation-system.png)
## Overview
SBG Systems products provide a range of benefits to PX4 users and can be integrated for:
- Higher accuracy heading, pitch, and roll estimates
- More robust and reliable GNSS positioning
- Improved positioning and attitude performance in GNSS-contested environments
- Performance under challenging dynamic conditions (e.g. catapult launches, VTOL operations, high-g or high angular rate operations)
The sbgECom PX4 driver is streamlined to provide a simple plug-and-play architecture, removing engineering obstacles and allowing the acceleration of the design, development, and launch of platforms to keep pace with the rapid rate of innovation.
The driver supports [all SBG Systems products](https://www.sbg-systems.com/products/).
In particular the following systems are recommended:
- **Pulse:** Recommended for fixed-wing systems without hovering, where static heading is not necessary.
- **Ellipse:** Recommended for multicopter systems where hovering and low dynamics requires the use of static heading.
## Where to Buy
SBG Systems solutions are available directly from [MySBG](https://my.sbg-systems.com) (FR) or through their Global Sales Representatives. For more information on their solutions or for international orders, please contact contact@sbg-systems.com.
## Hardware Setup
### Wiring
Connect any unused flight controller serial interface, such as a spare `GPS` or `TELEM` port, to the SBG Systems product MAIN port (required by PX4).
### Mounting
The SBG Systems product sensor can be mounted in any orientation, in any position on the vehicle, without regard to center of gravity.
All SBG Systems product sensors default to a coordinate system of x-forward, y-right, and z-down, making the default mounting as connector-back, base down.
This can be changed to any rigid rotation using the sbgECom Reference Frame Rotation register.
If using a GNSS-enabled product, the GNSS antenna must be mounted rigidly with respect to the inertial sensor and with an unobstructed sky view. If using a dual-GNSS-enabled product (Ellipse-D), the secondary antenna must be mounted rigidly with respect to the primary antenna and the inertial sensor with an unobstructed sky view.
For more mounting and configuration requirements and recommendations, see the relevant [SBG SUPPORT CENTER](https://support.sbg-systems.com/sc).
## Firmware Configuration
### PX4 Configuration
To use the sbgECom driver:
1. Include the module in firmware in the [kconfig board configuration](../hardware/porting_guide_config.md#px4-board-configuration-kconfig) by setting the kconfig variables: `CONFIG_DRIVERS_INS_SBGECOM` or `CONFIG_COMMON_INS`.
2. [Set the parameter](../advanced_config/parameters.md) [SENS_SBG_CFG](../advanced_config/parameter_reference.md#SENS_SBG_CFG) to the hardware port connected to the SBG Systems product (for more information see [Serial Port Configuration](../peripherals/serial_configuration.md)).
::: warning
Disable or change port of other sensors that are using the same one, for example [GPS_1_CONFIG](../advanced_config/parameter_reference.md#GPS_1_CONFIG) if using GPS1 port.
:::
3. Set [SBG_BAUDRATE](../advanced_config/parameter_reference.md#SBG_BAUDRATE) to the desired default baudrate value.
4. Allow the sbgECom driver to initialize by restarting PX4.
5. Configure driver to provide IMU data, GNSS data and INS :
1. Set [SBG_MODE](../advanced_config/parameter_reference.md#SBG_MODE) to the desired mode.
2. Make sensor module select sensors by enabling [SENS_IMU_MODE](../advanced_config/parameter_reference.md#SENS_IMU_MODE).
3. Prioritize SBG Systems sensors using [CAL_GYROn_PRIO](../advanced_config/parameter_reference.md#CAL_GYRO0_PRIO), [CAL_ACCn_PRIO](../advanced_config/parameter_reference.md#CAL_ACC0_PRIO), [CAL_BAROn_PRIO](../advanced_config/parameter_reference.md#CAL_BARO0_PRIO), [CAL_MAGn_PRIO](../advanced_config/parameter_reference.md#CAL_MAG0_PRIO), where _n_ is the instance number of the IMU component (0, 1, etc.).
::: tip
In most cases the external IMU (SBG) is the highest-numbered.
You can get a list of the IMU components available using [`uorb top -1`](../middleware/uorb.md#uorb-top-command), you can differentiate between them using the [`listener`](../modules/modules_command.md#listener) command and looking through the data, or just the rates.
Alternatively, you can check [CAL_GYROn_ID](../advanced_config/parameter_reference.md#CAL_GYRO0_ID) to see the device id.
The priority is 0-255, where 0 is entirely disabled and 255 is highest priority.
:::
::: warning
When configuring both SBG Systems and Pixhawk sensors to have non-zero priority, if the selected sensor is errored (timeout), it can change during operation without being notified.
In this case, MAVLink messages will be updated with the newly selected sensor.
If you don't want to have this fallback mechanism, you must disable unwanted sensors.
:::
4. If using the sbgECom as an INS, disable EKF2 using [EKF2_EN](../advanced_config/parameter_reference.md#EKF2_EN).
6. Restart PX4.
Once enabled, the module will be detected on boot.
IMU data should be published at 200Hz.
## SBG Systems Configuration
All High Performance and Ellipse 3.0 and higher SBG Systems INS can be configured directly from PX4 firmware:
1. Enable [SBG_CONFIGURATION_EN](../advanced_config/parameter_reference.md#SBG_CONFIGURATION_EN)
2. Provide a JSON file `sbg_settings.json` containing SBG Systems INS settings to be applied in your PX4 board `extras` directory (ex: `boards/px4/fmu-v5/extras`). The settings JSON file will be installed in `/etc/extras/sbg_settings.json` on the board.
::: tip
The settings can be retrieved using [sbgEComAPI](https://github.com/SBG-Systems/sbgECom/tree/main/tools/sbgEComApi) or [sbgInsRestApi](https://developer.sbg-systems.com/sbgInsRestApi/1.3/#tag/Settings) and then modified as a JSON file.
:::
::: tip
The settings file can be provided in the SD card in q`/fs/microsd/etc/extras/sbg_settings.json` to avoid rebuilding a new firmware to change JSON settings file.
:::
3. For testing purpose, it's also possible to modify SBG Systems INS settings on the fly:
- By passing a JSON file path as argument when starting sbgecom driver (ex: `sbgecom start -f /fs/microsd/new_sbg_settings.json`)
- By passing a JSON string as argument when starting sbgecom driver: (ex: `sbgecom start -s {"output":{"comA":{"messages":{"airData":"onChange"}}}}`)
For older Ellipse SBG Systems INS or to configure any SBG Systems INS directly, all commands and registers can be found in the [SBG SUPPORT CENTER](https://support.sbg-systems.com/sc).
::: warning
If the baudrate of the serial port on the INS product (used to communicate with PX4) is changed, the parameter [SBG_BAUDRATE](../advanced_config/parameter_reference.md#SBG_BAUDRATE) must be changed to match.
:::
## Published Data
Upon initialization, the driver should print the following information to console (printed using `PX4_INFO`)
- Unit model number
- Unit hardware version
- Unit serial number
- Unit firmware number
This should be accessible using the [`dmesg`](../modules/modules_system.md#dmesg) command.
The sbgECom driver always publishes the unit's data to the following uORB topics:
- [sensor_accel](../msg_docs/SensorAccel.md)
- [sensor_gyro](../msg_docs/SensorGyro.md)
- [sensor_mag](../msg_docs/SensorMag.md)
if configured as a GNSS, publishes:
- [sensor_gps](../msg_docs/SensorGps.md)
and, if configured as an INS, publishes:
- [estimator_status](../msg_docs/EstimatorStatus.md)
- [vehicle_local_position](../msg_docs/VehicleLocalPosition.md)
- [vehicle_global_positon](../msg_docs/VehicleGlobalPosition.md)
- [vehicle_attitude](../msg_docs/VehicleAttitude.md)
::: tip
Published topics can be viewed using the `listener` command.
:::
## Hardware Specifications
- [Product Briefs](https://www.sbg-systems.com/products/)
- [Datasheets](https://www.sbg-systems.com/contact/#products)
+5
View File
@@ -157,6 +157,7 @@
- [mRo (3DR) Pixhawk 배선 퀵 스타트](assembly/quick_start_pixhawk.md)
- [Holybro Pixhawk Mini (FMUv3) - Discontinued](flight_controller/pixhawk_mini.md)
- [Manufacturer-Supported Autopilots](flight_controller/autopilot_manufacturer_supported.md)
- [Accton Godwit GA1](flight_controller/accton-godwit_ga1.md)
- [AirMind MindPX](flight_controller/mindpx.md)
- [AirMind MindRacer](flight_controller/mindracer.md)
- [ARK Electronics ARKV6X](flight_controller/ark_v6x.md)
@@ -283,6 +284,7 @@
- [CubePilot Here+ (Discontined)](gps_compass/rtk_gps_hex_hereplus.md)
- [INS (Inertial Navigation/GNSS)](sensor/inertial_navigation_systems.md)
- [InertialLabs](sensor/inertiallabs.md)
- [sbgECom](sensor/sbgecom.md)
- [VectorNav](sensor/vectornav.md)
- [광류 센서](sensor/optical_flow.md)
- [ARK Flow](dronecan/ark_flow.md)
@@ -679,6 +681,8 @@
- [RoverPositionSetpoint](msg_docs/RoverPositionSetpoint.md)
- [RoverRateSetpoint](msg_docs/RoverRateSetpoint.md)
- [RoverRateStatus](msg_docs/RoverRateStatus.md)
- [RoverSpeedSetpoint](msg_docs/RoverSpeedSetpoint.md)
- [RoverSpeedStatus](msg_docs/RoverSpeedStatus.md)
- [RoverSteeringSetpoint](msg_docs/RoverSteeringSetpoint.md)
- [RoverThrottleSetpoint](msg_docs/RoverThrottleSetpoint.md)
- [RoverVelocitySetpoint](msg_docs/RoverVelocitySetpoint.md)
@@ -739,6 +743,7 @@
- [YawEstimatorStatus](msg_docs/YawEstimatorStatus.md)
- [AirspeedValidatedV0](msg_docs/AirspeedValidatedV0.md)
- [ArmingCheckReplyV0](msg_docs/ArmingCheckReplyV0.md)
- [ArmingCheckRequestV0](msg_docs/ArmingCheckRequestV0.md)
- [BatteryStatusV0](msg_docs/BatteryStatusV0.md)
- [EventV0](msg_docs/EventV0.md)
- [HomePositionV0](msg_docs/HomePositionV0.md)
+61 -33
View File
@@ -1,10 +1,8 @@
<!-- GENERATED CONTENT: DO NOT EDIT -->
- [Introduction](/index.md)
- [기본 개념](/getting_started/px4_basic_concepts.md)
- [멀티콥터](/frames_multicopter/index.md)
- [Features](/features_mc/index.md)
- [비행 모드 ](/flight_modes_mc/index.md)
- [위치 모드 (멀티콥터)](/flight_modes_mc/position.md)
@@ -37,7 +35,7 @@
- [정압 축적](/advanced_config/static_pressure_buildup.md)
- [Flying (Basics)](/flying/basic_flying_mc.md)
- [완성 기체](/complete_vehicles_mc/index.md)
- [ModalAI Starling](/complete_vehicles_mc/modalai_starling.md)
- [ModalAI Starling (PX4 Dev Kit)](/complete_vehicles_mc/modalai_starling.md)
- [PX4 비전 키트](/complete_vehicles_mc/px4_vision_kit.md)
- [마인드레이서 BNF & RTF](/complete_vehicles_mc/mindracer_BNF_RTF.md)
- [마인드레이서 210](/complete_vehicles_mc/mindracer210.md)
@@ -58,7 +56,6 @@
- [DJI F450 (CUAV v5 nano)](/frames_multicopter/dji_f450_cuav_5nano.md)
- [Planes (Fixed-Wing)](/frames_plane/index.md)
- [Assembly](/assembly/assembly_fw.md)
- [Config/Tuning](/config_fw/index.md)
- [Auto-tune](/config/autotune_fw.md)
@@ -86,7 +83,6 @@
- [Wing Wing Z84 (Pixracer)](/frames_plane/wing_wing_z84.md)
- [수직이착륙기(VTOL)](/frames_vtol/index.md)
- [Assembly](/assembly/assembly_vtol.md)
- [VTOL 설정 및 튜닝](/config_vtol/index.md)
- [Auto-tune](/config/autotune_vtol.md)
@@ -111,7 +107,6 @@
- [Complete Vehicles](/complete_vehicles_vtol/index.md)
- [Operations](/config/operations.md)
- [안전 설정](/config/safety_intro.md)
- [Safety Configuration (Failsafes)](/config/safety.md)
- [Failsafe Simulation](/config/safety_simulation.md)
@@ -132,7 +127,6 @@
- [QGroundControl Flight-Readiness Status](/flying/pre_flight_checks.md)
- [Hardware Selection & Setup](/hardware/drone_parts.md)
- [비행 컨트롤러 (오토파일럿)](/flight_controller/index.md)
- [Flight Controller Selection](/getting_started/flight_controller_selection.md)
- [Pixhawk Series](/flight_controller/pixhawk_series.md)
@@ -169,13 +163,12 @@
- [ARK Electronics ARKV6X](/flight_controller/ark_v6x.md)
- [ARK FPV Flight Controller](/flight_controller/ark_fpv.md)
- [ARK Pi6X Flow Flight Controller](/flight_controller/ark_pi6x.md)
- [CUAV X7](/flight_controller/cuav_x7.md)
- [CUAV Nora](/flight_controller/cuav_nora.md)
- [CUAV V5+ (FMUv5)](/flight_controller/cuav_v5_plus.md)
- [Wiring Quickstart](/assembly/quick_start_cuav_v5_plus.md)
- [CUAV V5 nano (FMUv5)](/flight_controller/cuav_v5_nano.md)
- [CUAV V5 nano 배선 퀵 스타트](/assembly/quick_start_cuav_v5_nano.md)
- [CUAV Pixhack v3 (FMUv3)](/flight_controller/pixhack_v3.md)
- [CUAV X25 EVO](/flight_controller/cuav_x25-evo.md)
- [CubePilot Cube Orange+ (CubePilot)](/flight_controller/cubepilot_cube_orangeplus.md)
- [CubePilot Cube Orange (CubePilot)](/flight_controller/cubepilot_cube_orange.md)
- [CubePilot Cube Yellow (CubePilot)](/flight_controller/cubepilot_cube_yellow.md)
@@ -188,11 +181,8 @@
- [Wiring Quickstart](/assembly/quick_start_durandal.md)
- [Holybro Pix32 v5](/flight_controller/holybro_pix32_v5.md)
- [Wiring Quickstart](/assembly/quick_start_holybro_pix32_v5.md)
- [ModalAI Flight Core v1](/flight_controller/modalai_fc_v1.md)
- [ModalAI VOXL Flight](/flight_controller/modalai_voxl_flight.md)
- [ModalAI VOXL 2](/flight_controller/modalai_voxl_2.md)
- [mRobotics-X2.1 (FMUv2)](/flight_controller/mro_x2.1.md)
- [mRo Control Zero F7)](/flight_controller/mro_control_zero_f7.md)
- [mRo Control Zero F7](/flight_controller/mro_control_zero_f7.md)
- [Sky-Drones AIRLink](/flight_controller/airlink.md)
- [SPRacing SPRacingH7EXTREME](/flight_controller/spracingh7extreme.md)
- [ThePeach FCC-K1](/flight_controller/thepeach_k1.md)
@@ -206,18 +196,20 @@
- [Discontinued Autopilots/Vehicles](/flight_controller/autopilot_discontinued.md)
- [Drotek Dropix (FMUv2)](/flight_controller/dropix.md)
- [Omnibus F4 SD](/flight_controller/omnibus_f4_sd.md)
- [BetaFPV Beta75X 2S Brushless Whoop](/complete_vehicles_mc/betafpv_beta75x.md)
- [Bitcraze Crazyflie 2.0 ](/complete_vehicles_mc/crazyflie2.md)
- [Aerotenna OcPoC-Zynq Mini](/flight_controller/ocpoc_zynq.md)
- [CUAV X7](/flight_controller/cuav_x7.md)
- [CUAV v5](/flight_controller/cuav_v5.md)
- [CUAV Pixhack v3 (FMUv3)](/flight_controller/pixhack_v3.md)
- [Holybro Kakute F7](/flight_controller/kakutef7.md)
- [Holybro Pixfalcon](/flight_controller/pixfalcon.md)
- [Holybro pix32 (FMUv2)](/flight_controller/holybro_pix32.md)
- [ModalAI Flight Core v1](/flight_controller/modalai_fc_v1.md)
- [ModalAI VOXL Flight](/flight_controller/modalai_voxl_flight.md)
- [mRo X2.1 (FMUv2)](/flight_controller/mro_x2.1.md)
- [mRo AUAV-X2](/flight_controller/auav_x2.md)
- [NXP RDDRONE-FMUK66 FMU](/flight_controller/nxp_rddrone_fmuk66.md)
- [3DR Pixhawk 1](/flight_controller/pixhawk.md)
- [Snapdragon Flight](/flight_controller/snapdragon_flight.md)
- [Intel® Aero RTF Drone](/complete_vehicles_mc/intel_aero.md)
- [Pixhawk Autopilot Bus (PAB) & Carriers](/flight_controller/pixhawk_autopilot_bus.md)
- [ARK Electronics Pixhawk Autopilot Bus Carrier](/flight_controller/ark_pab.md)
- [Mounting the Flight Controller](/assembly/mount_and_orient_controller.md)
@@ -229,7 +221,9 @@
- [Bootloader Update](/advanced_config/bootloader_update.md)
- [Bootloader Update FMUv6X-RT via USB](/advanced_config/bootloader_update_v6xrt.md)
- [Bootloader Flashing onto Betaflight Systems](/advanced_config/bootloader_update_from_betaflight.md)
- [Airframe Selection](/config/airframe.md)
- [센서](/sensor/index.md)
- [가속도계](/sensor/accelerometer.md)
- [Calibration](/config/accelerometer.md)
@@ -241,6 +235,7 @@
- [나침반 전력 보정](/advanced_config/compass_power_compensation.md)
- [항속 센서](/sensor/airspeed.md)
- [Calibration](/config/airspeed.md)
- [Airspeed Validation](/advanced_config/airspeed_validation.md)
- [TFSlot Airspeed Sensor](/sensor/airspeed_tfslot.md)
- [Barometers](/sensor/barometer.md)
- [거리 센서](/sensor/rangefinders.md)
@@ -272,6 +267,7 @@
- [CUAV C-RTK](/gps_compass/rtk_gps_cuav_c-rtk.md)
- [CUAV C-RTK2 PPK/RTK GNSS](/gps_compass/rtk_gps_cuav_c-rtk2.md)
- [CUAV C-RTK 9Ps](/gps_compass/rtk_gps_cuav_c-rtk-9ps.md)
- [DATAGNSS NANO HRTK GNSS](/gps_compass/rtk_gps_datagnss_nano_hrtk.md)
- [DATAGNSS GEM1305 RTK GNSS](/gps_compass/rtk_gps_gem1305.md)
- [Femtones MINI2 Receiver](/gps_compass/rtk_gps_fem_mini2.md)
- [Freefly RTK GPS](/gps_compass/rtk_gps_freefly.md)
@@ -287,6 +283,7 @@
- [Trimble MB-Two](/gps_compass/rtk_gps_trimble_mb_two.md)
- [CubePilot Here+ (Discontined)](/gps_compass/rtk_gps_hex_hereplus.md)
- [INS (Inertial Navigation/GNSS)](/sensor/inertial_navigation_systems.md)
- [InertialLabs](/sensor/inertiallabs.md)
- [VectorNav](/sensor/vectornav.md)
- [광류 센서](/sensor/optical_flow.md)
- [ARK Flow](/dronecan/ark_flow.md)
@@ -297,6 +294,7 @@
- [ThunderFly TFRPM01 타코미터 센서](/sensor/thunderfly_tachometer.md)
- [IMU Factory Calibration](/advanced_config/imu_factory_calibration.md)
- [센서 온도 보정](/advanced_config/sensor_thermal_calibration.md)
- [액츄에이터](/actuators/index.md)
- [ADSB/FLARM (트래픽 회피)](/config/actuators.md)
- [ESC 보정](/advanced_config/esc_calibration.md)
@@ -308,19 +306,22 @@
- [Zubax Telega](/dronecan/zubax_telega.md)
- [PX4 Sapog ESC Firmware](/dronecan/sapog.md)
- [Holybro Kotleta](/dronecan/holybro_kotleta.md)
- [Zubax Orel](/dronecan/zubax_orel.md)
- [Vertiq](/peripherals/vertiq.md)
- [VESC](/peripherals/vesc.md)
- [Radio Control (RC)](/getting_started/rc_transmitter_receiver.md)
- [무선 조종기 설정](/config/radio.md)
- [비행 모드](/config/flight_mode.md)
- [Joysticks](/config/joystick.md)
- [Data Links](/data_links/index.md)
- [MAVLink 텔레메트리(OSD/GCS) ](/peripherals/mavlink_peripherals.md)
- [텔레메트리 무선통신](/telemetry/index.md)
- [SiK 무선통신](/telemetry/sik_radio.md)
- [RFD900 (SiK) 텔레메트리](/telemetry/rfd900_telemetry.md)
- [ThunderFly TFSIK01 Telemetry Radio](/telemetry/tfsik_telemetry.md)
- [HolyBro (SIK) Telemetry Radio](/telemetry/holybro_sik_radio.md)
- [Wifi 텔레메트리](/telemetry/telemetry_wifi.md)
- [ESP8266 WiFi 모듈](/telemetry/esp8266_wifi_module.md)
@@ -338,6 +339,7 @@
- [TBS Crossfire (CRSF) Telemetry](/telemetry/crsf_telemetry.md)
- [Satellite Comms (Iridium/RockBlock)](/advanced_features/satcom_roadblock.md)
- [Power Systems](/power_systems/index.md)
- [Battery Estimation Tuning](/config/battery.md)
- [Battery Chemistry Overview](/power_systems/battery_chemistry.md)
@@ -356,6 +358,7 @@
- [Sky-Drones SmartAP PDB](/power_module/sky-drones_smartap-pdb.md)
- [Smart/MAVLink Batteries](/smart_batteries/index.md)
- [Rotoye Batmon 배터리 스마트 키트](/smart_batteries/rotoye_batmon.md)
- [탑재중량과 카메라](/payloads/index.md)
- [Use Cases](/payloads/use_cases.md)
- [Package Delivery Mission](/flying/package_delivery_mission.md)
@@ -367,19 +370,25 @@
- [Gimbal \(Mount\) Configuration](/advanced/gimbal_control.md)
- [Grippers](/peripherals/gripper.md)
- [Servo Gripper](/peripherals/gripper_servo.md)
- [Peripherals](/peripherals/index.md)
- [ADSB/FLARM/UTM (Traffic Avoidance)](/peripherals/adsb_flarm.md)
- [낙하산](/peripherals/parachute.md)
- [Remote ID](/peripherals/remote_id.md)
- [I2C Peripherals](/sensor_bus/i2c_general.md)
- [I2C bus accelerators](/sensor_bus/i2c_general.md#i2c-bus-accelerators)
- [TFI2CADT01 I2C address translator](/sensor_bus/translator_tfi2cadt.md)
- [CAN Peripherals](/can/index.md)
- [DroneCAN Peripherals](/dronecan/index.md)
- [PX4 DroneCAN Firmware](/dronecan/px4_cannode_fw.md)
- [ARK CANnode](/dronecan/ark_cannode.md)
- [RaccoonLab CAN Nodes](/dronecan/raccoonlab_nodes.md)
- [배선 개요](/assembly/cable_wiring.md)
- [보조 컴퓨터](/companion_computer/index.md)
- [Pixhawk + Companion Setup](/companion_computer/pixhawk_companion.md)
- [RPi Pixhawk Companion](/companion_computer/pixhawk_rpi.md)
@@ -395,16 +404,19 @@
- [리얼센스 T265 트래킹 카메라 (VIO)](/camera/camera_intel_realsense_t265_vio.md)
- [동영상 스트리밍](/companion_computer/video_streaming.md)
- [Video Streaming using WFB-ng Wifi (Long range)](/companion_computer/video_streaming_wfb_ng_wifi.md)
- [직렬 포트 설정 ](/peripherals/serial_configuration.md)
- [PX4 이더넷 설정](/advanced_config/ethernet_setup.md)
- [Standard Configuration](/config/index.md)
- [고급 설정](/advanced_config/index.md)
- [Using PX4's Navigation Filter (EKF2)](/advanced_config/tuning_the_ecl_ekf.md)
- [매개변수 검색 및 수정](/advanced_config/parameters.md)
- [전체 매개변수 정의서](/advanced_config/parameter_reference.md)
- [Other Vehicles](/airframes/index.md)
- [Airships (experimental)](/frames_airship/index.md)
- [Autogyros (experimental)](/frames_autogyro/index.md)
- [선더플라이 Auto-G2 (Holybro pix32)](/frames_autogyro/thunderfly_auto_g2.md)
@@ -412,17 +424,17 @@
- [Helicopter (experimental)](/frames_helicopter/index.md)
- [Helicopter Config/Tuning](/config_heli/index.md)
- [Rovers (experimental)](/frames_rover/index.md)
- [Ackermann Rovers](/frames_rover/ackermann.md)
- [Drive Modes](/flight_modes_rover/ackermann.md)
- [Configuration/Tuning](/config_rover/ackermann.md)
- [Differential Rovers](/frames_rover/differential.md)
- [Drive Modes](/flight_modes_rover/differential.md)
- [Configuration/Tuning](/config_rover/differential.md)
- [Aion Robotics R1](/frames_rover/aion_r1.md)
- [Mecanum Rovers](/frames_rover/mecanum.md)
- [Drive Modes](/flight_modes_rover/mecanum.md)
- [Configuration/Tuning](/config_rover/mecanum.md)
- [(Deprecated) Rover Position Control](/frames_rover/rover_position_control.md)
- [Drive Modes](/flight_modes_rover/index.md)
- [Manual](/flight_modes_rover/manual.md)
- [Auto](/flight_modes_rover/auto.md)
- [Configuration/Tuning](/config_rover/index.md)
- [Basic Setup](/config_rover/basic_setup.md)
- [Rate Tuning](/config_rover/rate_tuning.md)
- [Attitude Tuning](/config_rover/attitude_tuning.md)
- [Velocity Tuning](/config_rover/velocity_tuning.md)
- [Position Tuning](/config_rover/position_tuning.md)
- [Complete Vehicles](/complete_vehicles_rover/index.md)
- [Aion Robotics R1](/complete_vehicles_rover/aion_r1.md)
- [Submarines (experimental)](/frames_sub/index.md)
- [블루로브2](/frames_sub/bluerov2.md)
- [기체 프레임 정의서](/airframes/airframe_reference.md)
@@ -534,6 +546,7 @@
- [Airspeed](/msg_docs/Airspeed.md)
- [AirspeedWind](/msg_docs/AirspeedWind.md)
- [AutotuneAttitudeControlStatus](/msg_docs/AutotuneAttitudeControlStatus.md)
- [BatteryInfo](/msg_docs/BatteryInfo.md)
- [ButtonEvent](/msg_docs/ButtonEvent.md)
- [CameraCapture](/msg_docs/CameraCapture.md)
- [CameraStatus](/msg_docs/CameraStatus.md)
@@ -552,6 +565,7 @@
- [DifferentialPressure](/msg_docs/DifferentialPressure.md)
- [DistanceSensor](/msg_docs/DistanceSensor.md)
- [DistanceSensorModeChangeRequest](/msg_docs/DistanceSensorModeChangeRequest.md)
- [DronecanNodeStatus](/msg_docs/DronecanNodeStatus.md)
- [Ekf2Timestamps](/msg_docs/Ekf2Timestamps.md)
- [EscReport](/msg_docs/EscReport.md)
- [EscStatus](/msg_docs/EscStatus.md)
@@ -626,6 +640,7 @@
- [MountOrientation](/msg_docs/MountOrientation.md)
- [NavigatorMissionItem](/msg_docs/NavigatorMissionItem.md)
- [NavigatorStatus](/msg_docs/NavigatorStatus.md)
- [NeuralControl](/msg_docs/NeuralControl.md)
- [NormalizedUnsignedSetpoint](/msg_docs/NormalizedUnsignedSetpoint.md)
- [ObstacleDistance](/msg_docs/ObstacleDistance.md)
- [OffboardControlMode](/msg_docs/OffboardControlMode.md)
@@ -724,7 +739,12 @@
- [Wind](/msg_docs/Wind.md)
- [YawEstimatorStatus](/msg_docs/YawEstimatorStatus.md)
- [AirspeedValidatedV0](/msg_docs/AirspeedValidatedV0.md)
- [ArmingCheckReplyV0](/msg_docs/ArmingCheckReplyV0.md)
- [BatteryStatusV0](/msg_docs/BatteryStatusV0.md)
- [EventV0](/msg_docs/EventV0.md)
- [HomePositionV0](/msg_docs/HomePositionV0.md)
- [VehicleAttitudeSetpointV0](/msg_docs/VehicleAttitudeSetpointV0.md)
- [VehicleLocalPositionV0](/msg_docs/VehicleLocalPositionV0.md)
- [VehicleStatusV0](/msg_docs/VehicleStatusV0.md)
- [MAVLink Messaging](/mavlink/index.md)
- [Adding Messages](/mavlink/adding_messages.md)
@@ -734,6 +754,7 @@
- [Protocols/Microservices](/mavlink/protocols.md)
- [Standard Modes Protocol](/mavlink/standard_modes.md)
- [uXRCE-DDS (PX4-ROS 2/DDS Bridge)](/middleware/uxrce_dds.md)
- [UORB Bridged to ROS 2](/middleware/dds_topics.md)
- [모듈과 명령어](/modules/modules_main.md)
- [자동 튜닝](/modules/modules_autotune.md)
- [명령어](/modules/modules_command.md)
@@ -763,7 +784,7 @@
- [Debugging with GDB](/debug/gdb_debugging.md)
- [SWD Debug Port](/debug/swd_debug.md)
- [JLink Probe](/debug/probe_jlink.md)
- [Black Magic/DroneCode Probe](/debug/probe_bmp.md)
- [Black Magic/Zubax BugFace BF1 Probe](/debug/probe_bmp.md)
- [STLink Probe](/debug/probe_stlink.md)
- [MCU-Link Probe](/debug/probe_mculink.md)
- [Hardfault Debugging](/debug/gdb_hardfault.md)
@@ -787,6 +808,9 @@
- [Camera Integration/Architecture](/camera/camera_architecture.md)
- [컴퓨터 비전](/advanced/computer_vision.md)
- [Motion Capture (VICON, Optitrack, NOKOV)](/tutorials/motion-capture.md)
- [Neural Networks](/advanced/neural_networks.md)
- [Neural Network Module Utilities](/advanced/nn_module_utilities.md)
- [TensorFlow Lite Micro (TFLM)](/advanced/tflm.md)
- [Intel RealSense R200용 드라이버 설치](/advanced/realsense_intel_driver.md)
- [상태 추정기 전환](/advanced/switching_state_estimators.md)
- [트리 외부 모듈](/advanced/out_of_tree_modules.md)
@@ -818,8 +842,12 @@
- [시험 MC_02 - 완전 자동](/test_cards/mc_02_full_autonomous.md)
- [시험 MC_03 - 자동 / 수동 혼합](/test_cards/mc_03_auto_manual_mix.md)
- [시험 MC_04 - 안전 장치 시험](/test_cards/mc_04_failsafe_testing.md)
- [시험 MC_05 - 실내 비행 (수동 모드)](/test_cards/mc_05_indoor_flight_manual_modes.md)
- [Test MC_05 - Manual Modes (Inside)](/test_cards/mc_05_indoor_flight_manual_modes.md)
- [Test MC_06 - Optical Flow (Inside)](/test_cards/mc_06_optical_flow.md)
- [Test MC_07 - VIO (Inside)](/test_cards/mc_07_vio.md)
- [Test MC_08 - DSHOT ESC](/test_cards/mc_08_dshot.md)
- [단위 테스트](/test_and_ci/unit_tests.md)
- [Fuzz Tests](/test_and_ci/fuzz_tests.md)
- [지속 통합](/test_and_ci/continous_integration.md)
- [Integration Testing](/test_and_ci/integration_testing.md)
- [MAVSDK 통합 테스트](/test_and_ci/integration_testing_mavsdk.md)
@@ -862,8 +890,8 @@
- [출시](/releases/index.md)
- [main (alpha)](/releases/main.md)
- [1.16 (release candidate)](/releases/1.16.md)
- [1.15 (stable)](/releases/1.15.md)
- [1.16 (stable)](/releases/1.16.md)
- [1.15](/releases/1.15.md)
- [1.14](/releases/1.14.md)
- [1.13](/releases/1.13.md)
- [1.12](/releases/1.12.md)
+11 -2
View File
@@ -631,7 +631,16 @@ div.frame_variant td, div.frame_variant th {
### Free-Flyer
<div class="frame_common">
<img src="../../assets/airframes/types/AirframeUnknown.svg"/>
<img src="../../assets/airframes/types/FreeFlyer.svg"/>
<table>
<thead>
<tr><th>공통 출력</th></tr>
</thead>
<tbody>
<tr>
<td><ul><li><b>Motor1</b>: back left thruster, +x thrust</li><li><b>Motor2</b>: front left thruster, -x thrust</li><li><b>Motor3</b>: back right thruster, +x thrust</li><li><b>Motor4</b>: front right thruster, -x thrust</li><li><b>Motor5</b>: front left thruster, +y thrust</li><li><b>Motor6</b>: front right thruster, -y thrust</li><li><b>Motor7</b>: back left thruster, +y thrust</li><li><b>Motor8</b>: back right thruster, -y thrust</li></ul></td>
</tr>
</tbody></table>
</div>
<div class="frame_variant">
@@ -641,7 +650,7 @@ div.frame_variant td, div.frame_variant th {
</thead>
<tbody>
<tr id="spacecraft_free-flyer_kth-atmos">
<td>KTH-ATMOS</td>
<td><a href="https://atmos.discower.io">KTH-ATMOS</a></td>
<td>Maintainer: DISCOWER<p><code>SYS_AUTOSTART</code> = 70000</p></td>
</tr>
</tbody>
+1 -1
View File
@@ -291,7 +291,7 @@ If you're using [DroneCAN ESC](../peripherals/esc_motors.md#dronecan) the contro
### Flight Controller Power
Pixhawk FCs require a regulated power supply that can supply at around 5V/3A continuous (check your specific FC)!
This is sufficient to power the controller itself and a few low-power peripherals, such as a GNSS module, RC transmitter, and low power telemetry radio, but not for motors, actuators, and other peripherals.
This is sufficient to power the controller itself and a few low-power peripherals, such as a GNSS module, RC receiver, and low power telemetry radio, but not for motors, actuators, and other peripherals.
[Power modules](../power_module/index.md) are commonly used to "split off" this regulated power supply for the FC and also to provide measurements of the battery voltage and total current to the whole system — which PX4 can use to estimate power levels.
The power module is connected to the FC power port, which is normally labeled `POWER` (or `POWER 1` or `POWER 2` for FCs that have redundant power supply).
+20 -11
View File
@@ -15,7 +15,7 @@ The first executed file is the [init.d/rcS](https://github.com/PX4/PX4-Autopilot
## POSIX (Linux/MacOS)
Posix에서 시스템 셸은 스크립트 인터프리터로 사용됩니다(예: /bin/sh, Ubuntu에서 dash에 심볼릭 링크됨).
On POSIX, the system shell is used as script interpreter (e.g. /bin/sh, being symlinked to dash on Ubuntu).
동작하기 위한 몇가지 조건이 있습니다.
- PX4 모듈은 시스템에서 개별적으로 실행할 수 있어야합니다.
@@ -59,7 +59,7 @@ cd <PX4-Autopilot>/build/px4_sitl_default/bin
### Dynamic Modules
일반적으로 모든 모듈은 단일 PX4 실행 파일로 컴파일됩니다.
However, on Posix, there's the option of compiling a module into a separate file, which can be loaded into PX4 using the `dyn` command.
However, on POSIX, there's the option of compiling a module into a separate file, which can be loaded into PX4 using the `dyn` command.
```sh
dyn ./test.px4mod
@@ -95,7 +95,7 @@ This is documented below.
The best way to customize the system startup is to introduce a [new frame configuration](../dev_airframes/adding_a_new_frame.md).
The frame configuration file can be included in the firmware or on an SD Card.
#### Dynamic customization
#### Dynamic Customization
If you only need to "tweak" the existing configuration, such as starting one more application or setting the value of a few parameters, you can specify these by creating two files in the `/etc/` directory of the SD Card:
@@ -153,27 +153,36 @@ Calling an unknown command in system boot files may result in boot failure.
mandatory_app start # Will abort boot if mandatory_app is unknown or fails
```
#### Additional customization
#### Additional Init-File Customization
In rare cases where the desired setup cannot be achieved through frame configuration or dynamic customization,
you can add a script that will be contained in the binary.
In rare cases where the desired setup cannot be achieved through frame configuration or dynamic customization, you can add a script that will be compiled into the binary for a particular `make` target build variant.
**Note**: In almost all cases, you should use a frame configuration. This method should only be used for
edge-cases such as customizing `cannode` based boards.
:::warning
In almost all cases, you should use a frame configuration.
This method should only be used for edge-cases such as customizing `cannode` based boards.
:::
단계는 다음과 같습니다:
- Add a new init script in `boards/<vendor>/<board>/init` that will run during board startup.
예:
- Add a new init script in `boards/<vendor>/<board>/init` that will run during board startup. 예:
```sh
# File: boards/<vendor>/<board>/init/rc.additional
param set-default <param> <value>
```
- Add a new board variant in `boards/<vendor>/<board>/<variant>.px4board` that includes the additional script. 예:
- Add a new board variant in `boards/<vendor>/<board>/<variant>.px4board` that includes the additional script.
예:
```sh
# File: boards/<vendor>/<board>/var.px4board
CONFIG_BOARD_ADDITIONAL_INIT="rc.additional"
```
- Compile the firmware with your new variant by appending the variant name to the compile target. 예:
- Compile the firmware with your new variant by appending the variant name to the compile target.
예:
```sh
make <target>_var
```
+1 -11
View File
@@ -206,23 +206,13 @@ The relevant parameters shown below.
### Position Loss Failsafe Action
The failure action is controlled by [COM_POSCTL_NAVL](../advanced_config/parameter_reference.md#COM_POSCTL_NAVL), based on whether RC control is assumed to be available (and altitude information):
- `0`: Remote control available.
Switch to _Altitude mode_ if a height estimate is available, otherwise _Stabilized mode_.
- `1`: Remote control _not_ available.
Switch to _Descend mode_ if a height estimate is available, otherwise enter flight termination.
_Descend mode_ is a landing mode that does not require a position estimate.
Multicopters will switch to [Altitude mode](../flight_modes_mc/altitude.md) if a height estimate is available, otherwise [Stabilized mode](../flight_modes_mc/manual_stabilized.md).
Fixed-wing planes, and VTOLs not configured to land in hover ([NAV_FORCE_VT](../advanced_config/parameter_reference.md#NAV_FORCE_VT)), have a parameter ([FW_GPSF_LT](../advanced_config/parameter_reference.md#FW_GPSF_LT)) that defines how long they will loiter (circle with a constant roll angle ([FW_GPSF_R](../advanced_config/parameter_reference.md#FW_GPSF_R)) at the current altitude) after losing position before attempting to land.
If VTOLs have are configured to switch to hover for landing ([NAV_FORCE_VT](../advanced_config/parameter_reference.md#NAV_FORCE_VT)) then they will first transition and then descend.
The relevant parameters for all vehicles shown below.
| 매개변수 | 설명 |
| -------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <a id="COM_POSCTL_NAVL"></a>[COM_POSCTL_NAVL](../advanced_config/parameter_reference.md#COM_POSCTL_NAVL) | Position control navigation loss response during mission. Values: `0` - assume use of RC, `1` - Assume no RC. |
Parameters that only affect Fixed-wing vehicles:
| 매개변수 | 설명 |
+103 -97
View File
@@ -33,7 +33,7 @@ _QGroundControl for Windows_ is additionally required if you need to:
Note that you can also use it to monitor a simulation, but you must manually [connect to the simulation running in WSL](#qgroundcontrol-on-windows).
:::info
Connecting to an USB device from within WSL is not natively supported, however it can still be achieved by using the [USBIPD-WIN](https://learn.microsoft.com/en-us/windows/wsl/connect-usb) project. With this you can automatically upload firmware from the command line in WSL using the [`upload`](../dev_setup/building_px4.md#uploading-firmware-flashing-the-board) function.
Connecting to an USB device from within WSL is not natively supported, however it can still be achieved by using the [USBIPD-WIN](https://learn.microsoft.com/en-us/windows/wsl/connect-usb) project. With this you can automatically upload firmware from the command line in WSL using the [`upload`](../dev_setup/building_px4.md#uploading-firmware-flashing-the-board) function.
:::
:::info
@@ -48,38 +48,38 @@ The benefit of WSL2 is that its virtual machine is deeply integrated into Window
To install WSL2 with Ubuntu on a new installation of Windows 10 or 11:
1. Make sure your computer your computer's virtualization feature is enabled in the BIOS.
It's usually referred as "Virtualization Technology", "Intel VT-x" or "AMD-V" respectively
It's usually referred as "Virtualization Technology", "Intel VT-x" or "AMD-V" respectively
2. Open _cmd.exe_ as administrator.
This can be done by pressing the start key, typing `cmd`, right-clicking on the _Command prompt_ entry and selecting **Run as administrator**.
This can be done by pressing the start key, typing `cmd`, right-clicking on the _Command prompt_ entry and selecting **Run as administrator**.
3. Execute the following commands to install WSL2 and a particular Ubuntu version:
- Default version (Ubuntu 22.04):
- Default version (Ubuntu 22.04):
```sh
wsl --install
```
```sh
wsl --install
```
- Ubuntu 20.04 ([Gazebo-Classic Simulation](../sim_gazebo_classic/index.md))
- Ubuntu 20.04 ([Gazebo-Classic Simulation](../sim_gazebo_classic/index.md))
```sh
wsl --install -d Ubuntu-20.04
```
```sh
wsl --install -d Ubuntu-20.04
```
- Ubuntu 22.04 ([Gazebo Simulation](../sim_gazebo_gz/index.md))
- Ubuntu 22.04 ([Gazebo Simulation](../sim_gazebo_gz/index.md))
```sh
wsl --install -d Ubuntu-22.04
```
```sh
wsl --install -d Ubuntu-22.04
```
::: info
You can also install[Ubuntu 20.04](https://www.microsoft.com/store/productId/9MTTCL66CPXJ) and [Ubuntu 22.04](https://www.microsoft.com/store/productId/9PN20MSR04DW) from the store, which allows you to delete the application using the normal Windows Add/Remove settings:
::: info
You can also install[Ubuntu 20.04](https://www.microsoft.com/store/productId/9MTTCL66CPXJ) and [Ubuntu 22.04](https://www.microsoft.com/store/productId/9PN20MSR04DW) from the store, which allows you to delete the application using the normal Windows Add/Remove settings:
:::
4. WSL will prompt you for a user name and password for the Ubuntu installation.
Record these credentials as you will need them later on!
Record these credentials as you will need them later on!
The command prompt is now a terminal within the newly installed Ubuntu environment.
@@ -94,26 +94,26 @@ If you're using [Windows Terminal](https://learn.microsoft.com/en-us/windows/ter
To open a WSL shell using a command prompt:
1. Open a command prompt:
- Press the Windows **Start** key.
- Type `cmd` and press **Enter** to open the prompt.
- Press the Windows **Start** key.
- Type `cmd` and press **Enter** to open the prompt.
2. To start WSL and access the WSL shell, execute the command:
```sh
wsl -d <distribution_name>
```
```sh
wsl -d <distribution_name>
```
예:
예:
```sh
wsl -d Ubuntu
```
```sh
wsl -d Ubuntu
```
```sh
wsl -d Ubuntu-20.04
```
```sh
wsl -d Ubuntu-20.04
```
If you only have one version of Ubuntu, you can just use `wsl`.
If you only have one version of Ubuntu, you can just use `wsl`.
Enter the following commands to first close the WSL shell, and then shut down WSL:
@@ -135,57 +135,57 @@ To install the development toolchain:
2. Execute the command `cd ~` to switch to the home folder of WSL for the next steps.
:::warning
This is important!
If you work from a location outside of the WSL file system you'll run into issues such as very slow execution and access right/permission errors.
:::warning
This is important!
If you work from a location outside of the WSL file system you'll run into issues such as very slow execution and access right/permission errors.
:::
3. Download the PX4 source code using `git` (which is already installed in WSL2):
```sh
git clone https://github.com/PX4/PX4-Autopilot.git --recursive
```
```sh
git clone https://github.com/PX4/PX4-Autopilot.git --recursive
```
::: info
The environment setup scripts in the source usually work for recent PX4 releases.
If working with an older version of PX4 you may need to [get the source code specific to your release](../contribute/git_examples.md#get-a-specific-release).
::: info
The environment setup scripts in the source usually work for recent PX4 releases.
If working with an older version of PX4 you may need to [get the source code specific to your release](../contribute/git_examples.md#get-a-specific-release).
:::
4. Run the **ubuntu.sh** installer script and acknowledge any prompts as the script progresses:
```sh
bash ./PX4-Autopilot/Tools/setup/ubuntu.sh
```
```sh
bash ./PX4-Autopilot/Tools/setup/ubuntu.sh
```
::: info
This installs tools to build PX4 for Pixhawk and either Gazebo or Gazebo Classic targets:
::: info
This installs tools to build PX4 for Pixhawk and either Gazebo or Gazebo Classic targets:
- You can use the `--no-nuttx` and `--no-sim-tools` options to omit the NuttX and/or simulation tools.
- Other Linux build targets are untested (you can try these by entering the appropriate commands in [Ubuntu Development Environment](../dev_setup/dev_env_linux_ubuntu.md) into the WSL shell).
- You can use the `--no-nuttx` and `--no-sim-tools` options to omit the NuttX and/or simulation tools.
- Other Linux build targets are untested (you can try these by entering the appropriate commands in [Ubuntu Development Environment](../dev_setup/dev_env_linux_ubuntu.md) into the WSL shell).
:::
5. Restart the "WSL computer" after the script completes (exit the shell, shutdown WSL, and restart WSL):
```sh
exit
wsl --shutdown
wsl
```
```sh
exit
wsl --shutdown
wsl
```
6. Switch to the PX4 repository in the WSL home folder:
```sh
cd ~/PX4-Autopilot
```
```sh
cd ~/PX4-Autopilot
```
7. Build the PX4 SITL target and test your environment:
```sh
make px4_sitl
```
```sh
make px4_sitl
```
For more build options see [Building PX4 Software](../dev_setup/building_px4.md).
@@ -205,26 +205,26 @@ To set up the integration:
5. In the WSL shell, switch to the PX4 folder:
```sh
cd ~/PX4-Autopilot
```
```sh
cd ~/PX4-Autopilot
```
6. In the WSL shell, start VS Code:
```sh
code .
```
```sh
code .
```
This will open the IDE fully integrated with the WSL shell.
This will open the IDE fully integrated with the WSL shell.
Make sure you always open the PX4 repository in the Remote WSL mode.
Make sure you always open the PX4 repository in the Remote WSL mode.
7. Next time you want to develop WSL2 you can very easily open it again in Remote WSL mode by selecting **Open Recent** (as shown below).
This will start WSL for you.
This will start WSL for you.
![](../../assets/toolchain/vscode/vscode_wsl.png)
![](../../assets/toolchain/vscode/vscode_wsl.png)
Note however that the IP address of the WSL virtual machine will have changed, so you won't be able to monitor simulation from QGC for Windows (you can still monitor using QGC for Linux)
Note however that the IP address of the WSL virtual machine will have changed, so you won't be able to monitor simulation from QGC for Windows (you can still monitor using QGC for Linux)
## QGroundControl
@@ -240,21 +240,21 @@ You can do this from within the WSL shell.
1. In a web browser, navigate to the QGC [Ubuntu download section](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/getting_started/download_and_install.html#ubuntu)
2. Right-click on the **QGroundControl.AppImage** link, and select "Copy link address".
This will be something like _https://d176td9ibe4jno.cloudfront.net/builds/master/QGroundControl.AppImage_
This will be something like _https://d176td9ibe4jno.cloudfront.net/builds/master/QGroundControl.AppImage_
3. [Open a WSL shell](#opening-a-wsl-shell) and enter the following commands to download the appimage and make it executable (replace the AppImage URL where indicated):
```sh
cd ~
wget <the_copied_AppImage_URL>
chmod +x QGroundControl.AppImage
```
```sh
cd ~
wget <the_copied_AppImage_URL>
chmod +x QGroundControl.AppImage
```
4. Run QGroundControl:
```sh
./QGroundControl.AppImage
```
```sh
./QGroundControl.AppImage
```
QGroundControl will launch and automatically connect to a running simulation and allow you to monitor and control your vehicle(s).
@@ -270,15 +270,15 @@ These steps describe how you can connect to the simulation running in the WSL:
2. Check the IP address of the WSL virtual machine by running the command `ip addr | grep eth0`:
```sh
$ ip addr | grep eth0
```sh
$ ip addr | grep eth0
6: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
inet 172.18.46.131/20 brd 172.18.47.255 scope global eth0
```
6: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
inet 172.18.46.131/20 brd 172.18.47.255 scope global eth0
```
Copy the first part of the `eth0` interface `inet` address to the clipboard.
In this case: `172.18.46.131`.
Copy the first part of the `eth0` interface `inet` address to the clipboard.
In this case: `172.18.46.131`.
3. In QGC go to **Q > Application Settings > Comm Links**
@@ -304,14 +304,14 @@ Do the following steps to flash your custom binary built in WSL:
1. If you haven't already built the binary in WSL e.g. with a [WSL shell](dev_env_windows_wsl.md#opening-a-wsl-shell) and by running:
```sh
cd ~/PX4-Autopilot
make px4_fmu-v5
```
```sh
cd ~/PX4-Autopilot
make px4_fmu-v5
```
::: tip
Use the correct `make` target for your board.
`px4_fmu-v5` can be used for a Pixhawk 4 board.
::: tip
Use the correct `make` target for your board.
`px4_fmu-v5` can be used for a Pixhawk 4 board.
:::
@@ -325,12 +325,12 @@ Do the following steps to flash your custom binary built in WSL:
6. Continue and select the firmware binary you just built in WSL.
In the open dialog look for the "Linux" location with the penguin icon in the left pane.
It's usually all the way at the bottom.
Choose the file in the path: `Ubuntu\home\{your WSL user name}\PX4-Autopilot\build\{your build target}\{your build target}.px4`
In the open dialog look for the "Linux" location with the penguin icon in the left pane.
It's usually all the way at the bottom.
Choose the file in the path: `Ubuntu\home\{your WSL user name}\PX4-Autopilot\build\{your build target}\{your build target}.px4`
::: info
You can add the folder to the favourites to access it quickly next time.
::: info
You can add the folder to the favourites to access it quickly next time.
:::
@@ -349,3 +349,9 @@ sudo add-apt-repository ppa:kisak/kisak-mesa
sudo apt update
sudo apt upgrade
```
### QGroundControl not connecting to PX4 SITL
- The connection between PX4 SITL on WSL2 and QGroundControl on Windows requires [broadcasting](../simulation/index.md#enable-udp-broadcasting) or [streaming to a specific address](../simulation/index.md#enable-streaming-to-specific-address) to be enabled.
Streaming to a specific address should be enabled by default, but is something to check if a connection can't be established.
- Network traffic might be blocked by firewall or antivirus on you system.
@@ -0,0 +1,153 @@
# Accton Godwit G-A1
:::warning
PX4 does not manufacture this (or any) autopilot.
Contact the [manufacturer](https://cubepilot.org/#/home) for hardware support or compliance issues.
:::
The G-A1 is a state-of-the-art flight controller developed derived from the [Pixhawk Autopilot v6X Standard](https://github.com/pixhawk/Pixhawk-Standards/blob/master/DS-012%20Pixhawk%20Autopilot%20v6X%20Standard.pdf).
It includes an STM32H753 double-precision floating-point FMU processor and an STM32F103 IO coprocessor, multiple IMUs with 6-axis inertial sensors, two pressure/temperature sensors, and a geomagnetic sensor.
It also has independent buses and power supplies, and is designed for safety and rich expansion capabilities.
With an integrated 10/100M Ethernet Physical Layer (PHY), the G-A1 can also communicate with a mission computer (airborne computer), high-end surveying and mapping cameras, and other UxV-mounted equipment for high-speed communications, meeting the needs of advanced UxV systems.
:::tip
Visit [Accton-IoT Godwit](https://www.accton-iot.com/godwit/) for more information.
:::
![AccGodwitGA1](../../assets/flight_controller/accton-godwit/ga1/outlook.png "Accton Godwit G-A1")
![AccGodwitGA1 Top View](../../assets/flight_controller/accton-godwit/ga1/orientation.png "Accton Godwit G-A1 Top View")
:::info
This flight controller is [manufacturer supported](../flight_controller/autopilot_manufacturer_supported.md).
:::
## 사양
### 프로세서
- STM32H753IIK (Arm® Cortex®-M7 480MHz)
- STM32F103 (Arm® Cortex®-M3, 72MHz)
### 센서
- Bosch BMI088 (vibration isolated)
- TDK InvenSense ICM-42688-P x 2 (one vibration isolated)
- TDK Barometric Pressure and Temperature Sensor CP-20100 x 2 (one vibration isolated)
- PNI RM3100 Geomagnetic Sensor (vibration isolated)
### 전원
- 4.6V to 5.7V
### External ports
- 2 CAN Buses (CAN1 and CAN2)
- 3 TELEM Ports (TELEM1, TELEM2 and TELEM3)
- 2 GPS Ports (GPS1 with safety switch, LED, buzzer, and GPS2)
- 1 PPM IN
- 1 SBUS OUT
- 2 USB Ports (1 TYPE-C and 1 JST GH1.25)
- 1 10/100Base-T Ethernet Port
- 1 DSM/SBUS RC
- 1 UART 4
- 1 AD&IO Port
- 2 Debug Ports (1 IO Debug and 1 FMU Debug)
- 1 SPI6 Bus
- 4 Power Inputs (Power 1, Power 2, Power C1 and Power C2)
- 16 PWM Servo Outputs (A1-A8 from FMU and M1-M8 from IO)
- Micro SD Socket (supports SD 4.1 & SDIO 4.0 in two databus modes: 1 bit (default) and 4 bits)
### Size and Dimensions
- 92.2 (L) x 51.2 (W) x 28.3 (H) mm
- 77.6g (carrier board with IMU)
## 구매처
- [Accton-IoT Godwit](https://www.accton-iot.com/godwit/)
- [sales@accton-iot.com](sales@accton-iot.com)
## 핀배열
![G-A1 Pin definition](../../assets/flight_controller/accton-godwit/ga1/pin_definition.png "G-A1 Pin definition")
## UART Mapping
| Serial# | Protocol | 포트 | 참고 |
| ------- | --------- | ------ | ---------- |
| SERIAL1 | Telem1 | UART7 | /dev/ttyS6 |
| SERIAL2 | Telem2 | UART5 | /dev/ttyS4 |
| SERIAL3 | GPS1 | USART1 | /dev/ttyS0 |
| SERIAL4 | GPS2 | UART8 | /dev/ttyS7 |
| SERIAL5 | Telem3 | USART2 | /dev/ttyS1 |
| SERIAL6 | UART4 | UART4 | /dev/ttyS3 |
| SERIAL7 | FMU Debug | USART3 | |
| SERIAL8 | OTG2 | USB | |
## Wiring Diagram
![G-A1 Wiring](../../assets/flight_controller/accton-godwit/ga1/wiring.png "G-A1 Wiring")
## PWM Output
PWM M1-M8 (IO Main PWM), A1-A8(FMU PWM).
All these 16 support normal PWM output formats.
FMU PWM A1-A6 can support DShot and B-Directional DShot.
A1-A8(FMU PWM) are grouped as:
- Group 1: A1, A2, A3, A4
- Group 2: A5, A6
- Group 3: A7, A8
The motor and servo system should be connected to these ports according to the order outlined in the fuselage reference for your carrier.
![G-A1 PWM Motor Servo](../../assets/flight_controller/accton-godwit/ga1/motor_servo.png "G-A1 PWM Motor Servo")
## RC Input
For DSM/SBUS receivers, connect them to the DSM/SBUS interface which provides dedicated 3.3V and 5V power pins respectively, and check above "Pinout" for detailed pin definition.
PPM receivers should be connected to the PPM interface. And other RC systems can be connected via other spare telemetry ports.
![G-A1 Radio](../../assets/flight_controller/accton-godwit/ga1/radio.png "G-A1 Radio")
## GPS/나침반
The Godwit G-A1 has a built-in compass
Due to potential interference, the autopilot is usually used with an external I2C compass as part of a GPS/Compass combination.
![G-A1 GPS](../../assets/flight_controller/accton-godwit/ga1/gps.png "G-A1 GPS")
## Power Connection and Battery Monitor
This universal controller features a CAN PMU module that supports 3 to 14s lithium batteries.
To ensure proper connection, attach the module's 6-pin connector to the flight control Power C1 and/or Power C2 interface.
This universal controller does not provide power to the servos.
To power them, an external BEC must be connected to the positive and negative terminals of any A1A8 or M1M8 port.
![G-A1 Power](../../assets/flight_controller/accton-godwit/ga1/power.png "G-A1 Power")
## SD 카드
The SD card is NOT included in the package, you need to prepare the SD card and insert it into the slot.
![G-A1 SD Card](../../assets/flight_controller/accton-godwit/ga1/sdcard.png "G-A1 SD Card")
## 펌웨어
The autopilot is compatible with PX4 firmware. And G-A1 can be detected by QGroundControl automatically. Users can also build it with target "accton-godwit_ga1"
To [build PX4](../dev_setup/building_px4.md) for this target, open up the terminal and enter:
```sh
make accton-godwit_ga1
```
## More Information and Support
- [Accton-IoT Godwit](https://www.accton-iot.com/godwit/)
- [sales@accton-iot.com](sales@accton-iot.com)
- [support@accton-iot.com](mailto:support@accton-iot.com)
@@ -12,6 +12,7 @@ This category includes boards that are not fully compliant with the pixhawk stan
이 카테고리의 보드는 다음과 같습니다.
- [Accton Godwit GA1](../flight_controller/accton-godwit_ga1.md)
- [AirMind MindPX](../flight_controller/mindpx.md)
- [AirMind MindRacer](../flight_controller/mindracer.md)
- [ARK Electronics ARKV6X](../flight_controller/ark_v6x.md) (and [ARK Electronics Pixhawk Autopilot Bus Carrier](../flight_controller/ark_pab.md))

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