forked from PX4/PX4-Autopilot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hello, our flight control is based on the V6X standard, and board_types.txt,pixhawk-standards and pab_manifest.c were merged before. Now the firmware I modified is written into our flight control board, and the sensors are all normal. I have the following questions: 1. Every time I modify the code, I execute make zeroone_x6_bootloader and make zeroone_x6_default, and then connect the debug port of fmu through STLink to write Zeroone_x6_bootloader.bin. Then connect QGC or MP to write zeroone_x6_default.px4 via USB port. Is this process correct? 2. Is our CONFIG_CDCACM_PRODUCTID 0x15E0 (5600)? 3. How do I get this value from CONFIG_CDCACM_VENDORID? 4. Does the bootloader of the flight control board need to be replaced when PX4 firmware and APM firmware are used respectively? 5, After burning the bootloader, and then downloading the Firmware through the ground station, an ERROR will be reported: firmware not suitable for this board fw: 53-board :101, what is the reason? 6. the remote control channel can not be identified, what is the problem? 7. Can I compile firmware with bootloader?
- Loading branch information
1 parent
c471400
commit 5667c84
Showing
33 changed files
with
4,025 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
CONFIG_BOARD_TOOLCHAIN="arm-none-eabi" | ||
CONFIG_BOARD_ARCHITECTURE="cortex-m7" | ||
CONFIG_BOARD_ROMFSROOT="" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
############################################################################ | ||
# | ||
# Copyright (c) 2023 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. | ||
# | ||
############################################################################ | ||
|
||
|
||
set(PX4_FW_NAME ${PX4_BINARY_DIR}/${PX4_BOARD_VENDOR}_${PX4_BOARD_MODEL}_${PX4_BOARD_LABEL}.px4) | ||
|
||
add_custom_target(upload_skynode_usb | ||
COMMAND ${PX4_SOURCE_DIR}/Tools/auterion/upload_skynode.sh --file=${PX4_FW_NAME} | ||
DEPENDS ${PX4_FW_NAME} | ||
COMMENT "Uploading PX4" | ||
USES_TERMINAL | ||
) | ||
|
||
add_custom_target(upload_skynode_wifi | ||
COMMAND ${PX4_SOURCE_DIR}/Tools/auterion/upload_skynode.sh --file=${PX4_FW_NAME} --wifi | ||
DEPENDS ${PX4_FW_NAME} | ||
COMMENT "Uploading PX4" | ||
USES_TERMINAL | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
CONFIG_BOARD_TOOLCHAIN="arm-none-eabi" | ||
CONFIG_BOARD_ARCHITECTURE="cortex-m7" | ||
CONFIG_BOARD_ETHERNET=y | ||
CONFIG_BOARD_SERIAL_GPS1="/dev/ttyS0" | ||
CONFIG_BOARD_SERIAL_GPS2="/dev/ttyS7" | ||
CONFIG_BOARD_SERIAL_TEL1="/dev/ttyS6" | ||
CONFIG_BOARD_SERIAL_TEL2="/dev/ttyS4" | ||
CONFIG_BOARD_SERIAL_TEL3="/dev/ttyS1" | ||
CONFIG_BOARD_SERIAL_EXT2="/dev/ttyS3" | ||
CONFIG_DRIVERS_ADC_ADS1115=y | ||
CONFIG_DRIVERS_ADC_BOARD_ADC=y | ||
#CONFIG_DRIVERS_BAROMETER_BMP388=y | ||
CONFIG_DRIVERS_BAROMETER_INVENSENSE_ICP201XX=y | ||
#CONFIG_DRIVERS_BAROMETER_MS5611=y | ||
CONFIG_DRIVERS_CAMERA_CAPTURE=y | ||
CONFIG_DRIVERS_CAMERA_TRIGGER=y | ||
CONFIG_DRIVERS_CDCACM_AUTOSTART=y | ||
CONFIG_COMMON_DIFFERENTIAL_PRESSURE=y | ||
CONFIG_COMMON_DISTANCE_SENSOR=y | ||
CONFIG_DRIVERS_DSHOT=y | ||
CONFIG_DRIVERS_GPS=y | ||
CONFIG_DRIVERS_HEATER=y | ||
#CONFIG_DRIVERS_IMU_ANALOG_DEVICES_ADIS16470=y | ||
CONFIG_DRIVERS_IMU_BOSCH_BMI088=y | ||
#CONFIG_DRIVERS_IMU_INVENSENSE_ICM20602=y | ||
#CONFIG_DRIVERS_IMU_INVENSENSE_ICM20649=y | ||
#CONFIG_DRIVERS_IMU_INVENSENSE_ICM20948=y | ||
#CONFIG_DRIVERS_IMU_INVENSENSE_ICM42670P=y | ||
#CONFIG_DRIVERS_IMU_INVENSENSE_ICM42688P=y | ||
CONFIG_DRIVERS_IMU_INVENSENSE_ICM45686=y | ||
#CONFIG_DRIVERS_IMU_INVENSENSE_IIM42652=y | ||
CONFIG_COMMON_INS=y | ||
CONFIG_COMMON_LIGHT=y | ||
CONFIG_COMMON_MAGNETOMETER=y | ||
CONFIG_DRIVERS_OSD_MSP_OSD=y | ||
CONFIG_DRIVERS_POWER_MONITOR_INA226=y | ||
CONFIG_DRIVERS_POWER_MONITOR_INA228=y | ||
CONFIG_DRIVERS_POWER_MONITOR_INA238=y | ||
CONFIG_DRIVERS_POWER_MONITOR_PM_SELECTOR_AUTERION=y | ||
CONFIG_DRIVERS_PWM_OUT=y | ||
CONFIG_DRIVERS_PX4IO=y | ||
CONFIG_DRIVERS_RC_INPUT=y | ||
CONFIG_DRIVERS_SAFETY_BUTTON=y | ||
CONFIG_DRIVERS_TONE_ALARM=y | ||
CONFIG_DRIVERS_UAVCAN=y | ||
CONFIG_BOARD_UAVCAN_TIMER_OVERRIDE=2 | ||
CONFIG_MODULES_AIRSPEED_SELECTOR=y | ||
CONFIG_MODULES_BATTERY_STATUS=y | ||
CONFIG_MODULES_CAMERA_FEEDBACK=y | ||
CONFIG_MODULES_COMMANDER=y | ||
CONFIG_MODULES_CONTROL_ALLOCATOR=y | ||
CONFIG_MODULES_DATAMAN=y | ||
CONFIG_MODULES_EKF2=y | ||
CONFIG_MODULES_ESC_BATTERY=y | ||
CONFIG_MODULES_EVENTS=y | ||
CONFIG_MODULES_FLIGHT_MODE_MANAGER=y | ||
CONFIG_MODULES_FW_ATT_CONTROL=y | ||
CONFIG_MODULES_FW_AUTOTUNE_ATTITUDE_CONTROL=y | ||
CONFIG_MODULES_FW_POS_CONTROL=y | ||
CONFIG_MODULES_FW_RATE_CONTROL=y | ||
CONFIG_MODULES_GIMBAL=y | ||
CONFIG_MODULES_GYRO_CALIBRATION=y | ||
CONFIG_MODULES_LAND_DETECTOR=y | ||
CONFIG_MODULES_LANDING_TARGET_ESTIMATOR=y | ||
CONFIG_MODULES_LOAD_MON=y | ||
CONFIG_MODULES_LOGGER=y | ||
CONFIG_MODULES_MAG_BIAS_ESTIMATOR=y | ||
CONFIG_MODULES_MANUAL_CONTROL=y | ||
CONFIG_MODULES_MAVLINK=y | ||
CONFIG_MAVLINK_DIALECT="development" | ||
CONFIG_MODULES_MC_ATT_CONTROL=y | ||
CONFIG_MODULES_MC_AUTOTUNE_ATTITUDE_CONTROL=y | ||
CONFIG_MODULES_MC_HOVER_THRUST_ESTIMATOR=y | ||
CONFIG_MODULES_MC_POS_CONTROL=y | ||
CONFIG_MODULES_MC_RATE_CONTROL=y | ||
CONFIG_MODULES_NAVIGATOR=y | ||
CONFIG_MODE_NAVIGATOR_VTOL_TAKEOFF=y | ||
CONFIG_MODULES_RC_UPDATE=y | ||
CONFIG_MODULES_SENSORS=y | ||
CONFIG_MODULES_TEMPERATURE_COMPENSATION=y | ||
CONFIG_MODULES_UXRCE_DDS_CLIENT=y | ||
CONFIG_MODULES_VTOL_ATT_CONTROL=y | ||
CONFIG_SYSTEMCMDS_ACTUATOR_TEST=y | ||
CONFIG_SYSTEMCMDS_BSONDUMP=y | ||
CONFIG_SYSTEMCMDS_DMESG=y | ||
CONFIG_SYSTEMCMDS_GPIO=y | ||
CONFIG_SYSTEMCMDS_HARDFAULT_LOG=y | ||
CONFIG_SYSTEMCMDS_I2C_LAUNCHER=y | ||
CONFIG_SYSTEMCMDS_I2CDETECT=y | ||
CONFIG_SYSTEMCMDS_LED_CONTROL=y | ||
CONFIG_SYSTEMCMDS_MFT=y | ||
CONFIG_SYSTEMCMDS_MTD=y | ||
CONFIG_SYSTEMCMDS_NETMAN=y | ||
CONFIG_SYSTEMCMDS_NSHTERM=y | ||
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_TUNE_CONTROL=y | ||
CONFIG_SYSTEMCMDS_UORB=y | ||
CONFIG_SYSTEMCMDS_VER=y | ||
CONFIG_SYSTEMCMDS_WORK_QUEUE=y |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"board_id": 53, | ||
"magic": "PX4FWv1", | ||
"description": "Firmware for the ZeroOneX6 board", | ||
"image": "", | ||
"build_time": 0, | ||
"summary": "ZeroOneX6", | ||
"version": "0.1", | ||
"image_size": 0, | ||
"image_maxsize": 1966080, | ||
"git_identity": "", | ||
"board_revision": 0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/sh | ||
# | ||
# board specific defaults | ||
#------------------------------------------------------------------------------ | ||
|
||
# By disabling all 3 INA modules, we use the | ||
# i2c_launcher instead. | ||
param set-default SENS_EN_INA238 0 | ||
param set-default SENS_EN_INA228 0 | ||
param set-default SENS_EN_INA226 0 | ||
|
||
if ver hwbasecmp 009 010 011 | ||
then | ||
# Skynode: use the "custom participant", IP=10.41.10.1 config for uxrce_dds_client | ||
param set-default UXRCE_DDS_PTCFG 2 | ||
param set-default UXRCE_DDS_AG_IP 170461697 | ||
param set-default UXRCE_DDS_CFG 1000 | ||
else | ||
# Mavlink ethernet (CFG 1000) | ||
param set-default MAV_2_CONFIG 1000 | ||
param set-default MAV_2_BROADCAST 1 | ||
param set-default MAV_2_MODE 0 | ||
param set-default MAV_2_RADIO_CTL 0 | ||
param set-default MAV_2_RATE 100000 | ||
param set-default MAV_2_REMOTE_PRT 14550 | ||
param set-default MAV_2_UDP_PRT 14550 | ||
fi | ||
|
||
safety_button start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/sh | ||
# | ||
# PX4 FMUv6X specific board MAVLink startup script. | ||
#------------------------------------------------------------------------------ | ||
|
||
# if skynode base board is detected start Mavlink on Telem2 | ||
if ver hwbasecmp 009 010 011 | ||
then | ||
mavlink start -d /dev/ttyS4 -b 3000000 -r 290000 -m onboard_low_bandwidth -x -z | ||
|
||
# Ensure nothing else starts on TEL2 (ttyS4) | ||
set PRT_TEL2_ 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,177 @@ | ||
#!/bin/sh | ||
# | ||
# PX4 FMUv6X specific board sensors init | ||
#------------------------------------------------------------------------------ | ||
set HAVE_PM2 yes | ||
set INA_CONFIGURED no | ||
|
||
if mft query -q -k MFT -s MFT_PM2 -v 0 | ||
then | ||
set HAVE_PM2 no | ||
fi | ||
if param compare -s ADC_ADS1115_EN 1 | ||
then | ||
ads1115 start -X | ||
board_adc start -n | ||
else | ||
board_adc start | ||
fi | ||
|
||
|
||
if param compare SENS_EN_INA226 1 | ||
then | ||
# Start Digital power monitors | ||
ina226 -X -b 1 -t 1 -k start | ||
|
||
if [ $HAVE_PM2 = yes ] | ||
then | ||
ina226 -X -b 2 -t 2 -k start | ||
fi | ||
|
||
set INA_CONFIGURED yes | ||
fi | ||
|
||
if param compare SENS_EN_INA228 1 | ||
then | ||
# Start Digital power monitors | ||
ina228 -X -b 1 -t 1 -k start | ||
if [ $HAVE_PM2 = yes ] | ||
then | ||
ina228 -X -b 2 -t 2 -k start | ||
fi | ||
|
||
set INA_CONFIGURED yes | ||
fi | ||
|
||
if param compare SENS_EN_INA238 1 | ||
then | ||
# Start Digital power monitors | ||
ina238 -X -b 1 -t 1 -k start | ||
if [ $HAVE_PM2 = yes ] | ||
then | ||
ina238 -X -b 2 -t 2 -k start | ||
fi | ||
|
||
set INA_CONFIGURED yes | ||
fi | ||
|
||
#Start Auterion Power Module selector for Skynode boards | ||
if ver hwbasecmp 009 010 011 | ||
then | ||
pm_selector_auterion start | ||
else | ||
if [ $INA_CONFIGURED = no ] | ||
then | ||
# INA226, INA228, INA238 auto-start | ||
i2c_launcher start -b 1 | ||
if [ $HAVE_PM2 = yes ] | ||
then | ||
i2c_launcher start -b 2 | ||
fi | ||
fi | ||
fi | ||
|
||
# Keep nesting shallow | ||
if ver hwtypecmp V6X006 V6X008 | ||
then | ||
if ver hwtypecmp V6X006 | ||
then | ||
# Internal SPI bus ICM45686 | ||
adis16470 -s -R 0 start | ||
iim42652 -s -R 6 start | ||
icm45686 -s -R 10 start | ||
else | ||
# Internal SPI bus 3x ICM45686 | ||
icm45686 -b 3 -s -R 0 start | ||
icm45686 -b 2 -s -R 0 start | ||
icm45686 -b 1 -s -R 10 start | ||
fi | ||
else | ||
if ver hwtypecmp V6X004 | ||
then | ||
# Internal SPI bus ICM20649 | ||
icm20649 -s -R 6 start | ||
else | ||
# Internal SPI BMI088 | ||
if ver hwbasecmp 009 010 011 | ||
then | ||
bmi088 -A -R 6 -s start | ||
bmi088 -G -R 6 -s start | ||
else | ||
if ver hwtypecmp V6X010 | ||
then | ||
bmi088 -A -R 0 -s start | ||
bmi088 -G -R 0 -s start | ||
else | ||
bmi088 -A -R 4 -s start | ||
bmi088 -G -R 4 -s start | ||
fi | ||
fi | ||
fi | ||
|
||
# Internal SPI bus ICM42688p | ||
if ver hwbasecmp 009 010 011 | ||
then | ||
icm42688p -R 12 -s start | ||
else | ||
if ver hwtypecmp V6X010 | ||
then | ||
icm42688p -R 14 -s start | ||
else | ||
icm45686 -b 1 -s -R 8 start //ZeroOne | ||
fi | ||
fi | ||
|
||
if ver hwtypecmp V6X003 V6X004 | ||
then | ||
# Internal SPI bus ICM-42670-P (hard-mounted) | ||
icm42670p -R 10 -s start | ||
else | ||
if ver hwbasecmp 009 010 011 | ||
then | ||
icm20602 -R 6 -s start | ||
else | ||
# Internal SPI bus ICM-20649 (hard-mounted) | ||
icm45686 -b 2 -s -R 6 start //ZeroOne | ||
fi | ||
fi | ||
fi | ||
rm3100 -I -b 4 start | ||
# Internal magnetometer on I2c | ||
# if ver hwtypecmp V6X001 | ||
# then | ||
# rm3100 -I -b 4 start | ||
# else | ||
# # Internal magnetometer on I2C | ||
# bmm150 -I -R 0 start | ||
# fi | ||
|
||
# External compass on GPS1/I2C1 (the 3rd external bus): standard Holybro Pixhawk 4 or CUAV V5 GPS/compass puck (with lights, safety button, and buzzer) | ||
ist8310 -X -b 1 -R 10 start | ||
|
||
# Possible internal Baro | ||
if param compare SENS_INT_BARO_EN 1 | ||
then | ||
icp201xx -I -a 0x64 start | ||
# if ver hwtypecmp V6X001 V6X006 V6X008 | ||
# then | ||
# icp201xx -I -a 0x64 start | ||
# else | ||
# bmp388 -I -a 0x77 start | ||
# fi | ||
fi | ||
icp201xx -X start | ||
#external baro | ||
# if ver hwtypecmp V6X001 | ||
# then | ||
# icp201xx -X start | ||
# else | ||
# bmp388 -X start | ||
# fi | ||
|
||
# Baro on I2C3 | ||
ms5611 -X start | ||
|
||
unset INA_CONFIGURED | ||
unset HAVE_PM2 | ||
|
Oops, something went wrong.