Error in building mro pixracer firmware

Hello, I am trying to build px4 for the mro pixracer pro with crossfire, but ran into an error of:
‘septentrio::sbf::Header::id_number’ is too small to hold all values of 'enum class septentrio::sbf::BlockID [-Werror]
101 | BlockID id_number:13;

I then resent the buildconfig to the default settings and attempted to build again with the same error. I also tried building the ark_fmu-v6x_default from the crsf build guide, which was built successfully.

I am wondering what I can do to fix this, the following is the output of my terminal:

alexsuarez@Alex-Legion-S7:~/PX4-Autopilot$ make ark_fmu-v6x_default
– PX4_GIT_TAG: v1.16.0-alpha2-16-g7462e98e16
– Found PythonInterp: /usr/bin/python3 (found suitable version “3.8.10”, minimum required is “3”)
– PX4 config file: /home/alexsuarez/PX4-Autopilot/boards/ark/fmu-v6x/default.px4board
– PLATFORM nuttx
– TOOLCHAIN arm-none-eabi
– ARCHITECTURE cortex-m7
– ROMFSROOT px4fmu_common
– IO px4_io-v2_default
– ETHERNET y
– SERIAL_GPS1 /dev/ttyS0
– SERIAL_GPS2 /dev/ttyS7
– SERIAL_TEL1 /dev/ttyS6
– SERIAL_TEL2 /dev/ttyS4
– SERIAL_TEL3 /dev/ttyS1
– SERIAL_TEL4 /dev/ttyS3
– SERIAL_RC /dev/ttyS5
– ROOT_PATH /fs/microsd
– PARAM_FILE /fs/mtd_params
– UAVCAN_INTERFACES 2
– UAVCAN_TIMER_OVERRIDE 2
– PX4 config: ark_fmu-v6x_default
– PX4 platform: nuttx
– The CXX compiler identification is GNU 10.2.1
– The C compiler identification is GNU 10.2.1
– The ASM compiler identification is GNU
– Found assembler: /usr/lib/ccache/arm-none-eabi-gcc
– Check for working CXX compiler: /usr/lib/ccache/arm-none-eabi-g++
– Check for working CXX compiler: /usr/lib/ccache/arm-none-eabi-g++ – works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Detecting CXX compile features
– Detecting CXX compile features - done
– Check for working C compiler: /usr/lib/ccache/arm-none-eabi-gcc
– Check for working C compiler: /usr/lib/ccache/arm-none-eabi-gcc – works
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Detecting C compile features
– Detecting C compile features - done
– Enabling double FP precision hardware instructions
– cmake build type: MinSizeRel
– ccache enabled via symlink (/usr/lib/ccache/arm-none-eabi-g++ → /usr/bin/ccache)
– drivers/px4io: ROMFS including px4_io-v2_default
– Found PythonInterp: /usr/bin/python3 (found version “3.8.10”)
– Release build type: MinSizeRel
/usr/bin/python3: Error while finding module specification for ‘symforce.symbolic’ (ModuleNotFoundError: No module named ‘symforce’)
– ROMFS: ROMFS/px4fmu_common
– ROMFS: Adding platforms/nuttx/init/stm32h7/rc.board_arch_defaults → /etc/init.d/rc.board_arch_defaults
– ROMFS: Adding boards/ark/fmu-v6x/init/rc.board_defaults → /etc/init.d/rc.board_defaults
– ROMFS: Adding boards/ark/fmu-v6x/init/rc.board_sensors → /etc/init.d/rc.board_sensors
– ROMFS: Adding boards/ark/fmu-v6x/extras/px4_io-v2_default.bin → /etc/extras/px4_io-v2_default.bin
– Configuring done
– Generating done
– Build files have been written to: /home/alexsuarez/PX4-Autopilot/build/ark_fmu-v6x_default
[0/1205] git submodule src/modules/uxrce_dds_client/Micro-XRCE-DDS-Client
[7/1205] git submodule platforms/nuttx/NuttX/nuttx
[10/1205] git submodule src/drivers/gps/devices
[11/1205] git submodule src/drivers/uavcan/libdronecan/libuavcan/dsdl_compiler/pydronecan
[13/1205] git submodule src/drivers/uavcan/libdronecan/dsdl
[14/1205] git submodule src/modules/mavlink/mavlink
[172/1205] Performing configure step for ‘libmicroxrceddsclient_project’
– libmicroxrceddsclient_project configure command succeeded. See also /home/alexsuarez/PX4-Autopilot/build/ark_fmu-v6x_default/src/modules/uxrce_dds_client/src/libmicroxrceddsclient_project-stamp/libmicroxrceddsclient_project-configure-.log
[384/1205] Performing build step for ‘libmicroxrceddsclient_project’
– libmicroxrceddsclient_project build command succeeded. See also /home/alexsuarez/PX4-Autopilot/build/ark_fmu-v6x_default/src/modules/uxrce_dds_client/src/libmicroxrceddsclient_project-stamp/libmicroxrceddsclient_project-build-
.log
[385/1205] Performing install step for ‘libmicroxrceddsclient_project’
– libmicroxrceddsclient_project install command succeeded. See also /home/alexsuarez/PX4-Autopilot/build/ark_fmu-v6x_default/src/modules/uxrce_dds_client/src/libmicroxrceddsclient_project-stamp/libmicroxrceddsclient_project-install-.log
[390/1205] Generating nuttx/arch/arm/src/libarch.a
chip/stm32_gpio.c:47:11: note: ‘#pragma message: CONFIG_STM32H7_USE_LEGACY_PINMAP will be deprecated migrate board.h see tools/stm32_pinmap_tool.py’
47 | # pragma message “CONFIG_STM32H7_USE_LEGACY_PINMAP will be deprecated migrate board.h see tools/stm32_pinmap_tool.py”
| ^~~~~~~
[1203/1205] Linking CXX executable ark_fmu-v6x_default.elf
Memory region Used Size Region Size %age Used
ITCM_RAM: 0 GB 64 KB 0.00%
FLASH: 1926108 B 1920 KB 97.97%
DTCM1_RAM: 0 GB 64 KB 0.00%
DTCM2_RAM: 0 GB 64 KB 0.00%
AXI_SRAM: 99396 B 512 KB 18.96%
SRAM1: 0 GB 128 KB 0.00%
SRAM2: 0 GB 128 KB 0.00%
SRAM3: 0 GB 32 KB 0.00%
SRAM4: 2 KB 64 KB 3.12%
BKPRAM: 0 GB 4 KB 0.00%
[1205/1205] Creating /home/alexsuarez/PX4-Autopilot/build/ark_fmu-v6x_default/ark_fmu-v6x_default.px4
alexsuarez@Alex-Legion-S7:~/PX4-Autopilot$ make mro_pixracerpro_default
[0/1] Re-running CMake…
– PX4_GIT_TAG: v1.16.0-alpha2-16-g7462e98e16
– Found PythonInterp: /usr/bin/python3 (found suitable version “3.8.10”, minimum required is “3”)
– PX4 config file: /home/alexsuarez/PX4-Autopilot/boards/mro/pixracerpro/default.px4board
– PLATFORM nuttx
– TOOLCHAIN arm-none-eabi
– ARCHITECTURE cortex-m7
– ROMFSROOT px4fmu_common
– SERIAL_GPS1 /dev/ttyS3
– SERIAL_TEL1 /dev/ttyS1
– SERIAL_TEL2 /dev/ttyS2
– ROOT_PATH /fs/microsd
– PARAM_FILE /fs/mtd_params
– UAVCAN_INTERFACES 2
– PX4 config: mro_pixracerpro_default
– PX4 platform: nuttx
– Enabling double FP precision hardware instructions
– cmake build type: MinSizeRel
– ccache enabled (export CCACHE_DISABLE=1 to disable)
– Found PythonInterp: /usr/bin/python3 (found version “3.8.10”)
– Release build type: MinSizeRel
/usr/bin/python3: Error while finding module specification for ‘symforce.symbolic’ (ModuleNotFoundError: No module named ‘symforce’)
– ROMFS: ROMFS/px4fmu_common
– ROMFS: Adding platforms/nuttx/init/stm32h7/rc.board_arch_defaults → /etc/init.d/rc.board_arch_defaults
– ROMFS: Adding boards/mro/pixracerpro/init/rc.board_defaults → /etc/init.d/rc.board_defaults
– ROMFS: Adding boards/mro/pixracerpro/init/rc.board_sensors → /etc/init.d/rc.board_sensors
– ROMFS: Adding boards/mro/pixracerpro/init/rc.board_extras → /etc/init.d/rc.board_extras
– Configuring done
– Generating done
– Build files have been written to: /home/alexsuarez/PX4-Autopilot/build/mro_pixracerpro_default
[336/1210] Performing build step for ‘libmicroxrceddsclient_project’
– libmicroxrceddsclient_project build command succeeded. See also /home/alexsuarez/PX4-Autopilot/build/mro_pixracerpro_default/src/modules/uxrce_dds_client/src/libmicroxrceddsclient_project-stamp/libmicroxrceddsclient_project-build-
.log
[337/1210] Performing install step for ‘libmicroxrceddsclient_project’
– libmicroxrceddsclient_project install command succeeded. See also /home/alexsuarez/PX4-Autopilot/build/mro_pixracerpro_default/src/modules/uxrce_dds_client/src/libmicroxrceddsclient_project-stamp/libmicroxrceddsclient_project-install-*.log
[341/1210] Generating nuttx/arch/arm/src/libarch.a
chip/stm32_gpio.c:47:11: note: #pragma message: CONFIG_STM32H7_USE_LEGACY_PINMAP will be deprecated migrate board.h see tools/stm32_pinmap_tool.py
47 | # pragma message “CONFIG_STM32H7_USE_LEGACY_PINMAP will be deprecated migrate board.h see tools/stm32_pinmap_tool.py”
| ^~~~~~~
[581/1210] Building CXX object src/drivers/gnss/septentrio/CMakeFiles/driver__septentrio.dir/sbf/decoder.cpp.obj
FAILED: src/drivers/gnss/septentrio/CMakeFiles/driver__septentrio.dir/sbf/decoder.cpp.obj
/usr/bin/ccache /usr/bin/arm-none-eabi-g++ -DCONFIG_ARCH_BOARD_MRO_PIXRACERPRO -DMODULE_NAME="septentrio" -DPX4_MAIN=septentrio_app_main -D_SYS_CDEFS_H_ -D_SYS_REENT_H_ -D__CUSTOM_FILE_IO__ -D__PX4_NUTTX -D__STDC_FORMAT_MACROS -I…/…/boards/mro/pixracerpro/src -I…/…/platforms/nuttx/src/px4/common/include -I. -Isrc/lib -I…/…/platforms/nuttx/src/px4/stm/stm32h7/include -I…/…/platforms/common -I…/…/platforms/common/include -I…/…/src -I…/…/src/include -I…/…/src/lib -I…/…/src/lib/matrix -I…/…/src/modules -I…/…/platforms/nuttx/NuttX/nuttx/arch/arm/src/armv7-m -I…/…/platforms/nuttx/NuttX/nuttx/arch/arm/src/chip -I…/…/platforms/nuttx/NuttX/nuttx/arch/arm/src/common -I…/…/platforms/nuttx/NuttX/apps/include -Iexternal/Install/include -isystem …/…/platforms/nuttx/NuttX/include/cxx -isystem …/…/platforms/nuttx/NuttX/nuttx/include/cxx -isystem …/…/platforms/nuttx/NuttX/nuttx/include -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard -Os -DNDEBUG -g -fdata-sections -ffunction-sections -fomit-frame-pointer -fmerge-all-constants -fno-signed-zeros -fno-trapping-math -freciprocal-math -fno-math-errno -fno-strict-aliasing -fvisibility=hidden -include visibility.h -Wall -Wextra -Werror -Warray-bounds -Wcast-align -Wdisabled-optimization -Wdouble-promotion -Wfatal-errors -Wfloat-equal -Wformat-security -Winit-self -Wlogical-op -Wpointer-arith -Wshadow -Wuninitialized -Wunknown-pragmas -Wunused-variable -Wno-missing-field-initializers -Wno-missing-include-dirs -Wno-unused-parameter -fdiagnostics-color=always -fno-builtin-printf -fno-strength-reduce -Wformat=1 -Wunused-but-set-variable -Wno-format-truncation -fcheck-new -Wreorder -Wno-overloaded-virtual -fno-rtti -fno-exceptions -fno-sized-deallocation -fno-threadsafe-statics -nostdinc++ -Wframe-larger-than=2048 -DSEP_LOG_ERROR -std=gnu++14 -MD -MT src/drivers/gnss/septentrio/CMakeFiles/driver__septentrio.dir/sbf/decoder.cpp.obj -MF src/drivers/gnss/septentrio/CMakeFiles/driver__septentrio.dir/sbf/decoder.cpp.obj.d -o src/drivers/gnss/septentrio/CMakeFiles/driver__septentrio.dir/sbf/decoder.cpp.obj -c …/…/src/drivers/gnss/septentrio/sbf/decoder.cpp
In file included from …/…/src/drivers/gnss/septentrio/sbf/decoder.h:46,
from …/…/src/drivers/gnss/septentrio/sbf/decoder.cpp:42:
…/…/src/drivers/gnss/septentrio/sbf/messages.h:101:10: error: ‘septentrio::sbf::Header::id_number’ is too small to hold all values of ‘enum class septentrio::sbf::BlockID’ [-Werror]
101 | BlockID id_number: 13;
| ^~~~~~~~~
compilation terminated due to -Wfatal-errors.
cc1plus: all warnings being treated as errors
[582/1210] Building CXX object src/drivers/gnss/septentrio/CMakeFiles/driver__septentrio.dir/septentrio.cpp.obj
FAILED: src/drivers/gnss/septentrio/CMakeFiles/driver__septentrio.dir/septentrio.cpp.obj
/usr/bin/ccache /usr/bin/arm-none-eabi-g++ -DCONFIG_ARCH_BOARD_MRO_PIXRACERPRO -DMODULE_NAME="septentrio" -DPX4_MAIN=septentrio_app_main -D_SYS_CDEFS_H_ -D_SYS_REENT_H_ -D__CUSTOM_FILE_IO__ -D__PX4_NUTTX -D__STDC_FORMAT_MACROS -I…/…/boards/mro/pixracerpro/src -I…/…/platforms/nuttx/src/px4/common/include -I. -Isrc/lib -I…/…/platforms/nuttx/src/px4/stm/stm32h7/include -I…/…/platforms/common -I…/…/platforms/common/include -I…/…/src -I…/…/src/include -I…/…/src/lib -I…/…/src/lib/matrix -I…/…/src/modules -I…/…/platforms/nuttx/NuttX/nuttx/arch/arm/src/armv7-m -I…/…/platforms/nuttx/NuttX/nuttx/arch/arm/src/chip -I…/…/platforms/nuttx/NuttX/nuttx/arch/arm/src/common -I…/…/platforms/nuttx/NuttX/apps/include -Iexternal/Install/include -isystem …/…/platforms/nuttx/NuttX/include/cxx -isystem …/…/platforms/nuttx/NuttX/nuttx/include/cxx -isystem …/…/platforms/nuttx/NuttX/nuttx/include -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard -Os -DNDEBUG -g -fdata-sections -ffunction-sections -fomit-frame-pointer -fmerge-all-constants -fno-signed-zeros -fno-trapping-math -freciprocal-math -fno-math-errno -fno-strict-aliasing -fvisibility=hidden -include visibility.h -Wall -Wextra -Werror -Warray-bounds -Wcast-align -Wdisabled-optimization -Wdouble-promotion -Wfatal-errors -Wfloat-equal -Wformat-security -Winit-self -Wlogical-op -Wpointer-arith -Wshadow -Wuninitialized -Wunknown-pragmas -Wunused-variable -Wno-missing-field-initializers -Wno-missing-include-dirs -Wno-unused-parameter -fdiagnostics-color=always -fno-builtin-printf -fno-strength-reduce -Wformat=1 -Wunused-but-set-variable -Wno-format-truncation -fcheck-new -Wreorder -Wno-overloaded-virtual -fno-rtti -fno-exceptions -fno-sized-deallocation -fno-threadsafe-statics -nostdinc++ -Wframe-larger-than=2048 -DSEP_LOG_ERROR -std=gnu++14 -MD -MT src/drivers/gnss/septentrio/CMakeFiles/driver__septentrio.dir/septentrio.cpp.obj -MF src/drivers/gnss/septentrio/CMakeFiles/driver__septentrio.dir/septentrio.cpp.obj.d -o src/drivers/gnss/septentrio/CMakeFiles/driver__septentrio.dir/septentrio.cpp.obj -c …/…/src/drivers/gnss/septentrio/septentrio.cpp
In file included from …/…/src/drivers/gnss/septentrio/sbf/decoder.h:46,
from …/…/src/drivers/gnss/septentrio/septentrio.h:63,
from …/…/src/drivers/gnss/septentrio/septentrio.cpp:44:
…/…/src/drivers/gnss/septentrio/sbf/messages.h:101:10: error: ‘septentrio::sbf::Header::id_number’ is too small to hold all values of ‘enum class septentrio::sbf::BlockID’ [-Werror]
101 | BlockID id_number: 13;
| ^~~~~~~~~
compilation terminated due to -Wfatal-errors.
cc1plus: all warnings being treated as errors
[598/1210] Building CXX object src/drivers/magnetometer/vt…Files/drivers__magnetometer__vcm1193l.dir/VCM1193L.cpp.obj
ninja: build stopped: subcommand failed.
make: *** [Makefile:227: mro_pixracerpro_default] Error 1

Here is the output of my git diff and git log:

alexsuarez@Alex-Legion-S7:~/PX4-Autopilot$ git diff
diff --git a/boards/mro/pixracerpro/default.px4board b/boards/mro/pixracerpro/default.px4board
index fb49c90866…6d4d384b80 100644
— a/boards/mro/pixracerpro/default.px4board
+++ b/boards/mro/pixracerpro/default.px4board
@@ -26,7 +26,7 @@ CONFIG_COMMON_OPTICAL_FLOW=y
CONFIG_DRIVERS_PCA9685_PWM_OUT=y
CONFIG_DRIVERS_POWER_MONITOR_INA226=y
CONFIG_DRIVERS_PWM_OUT=y
-CONFIG_DRIVERS_RC_INPUT=y
+CONFIG_DRIVERS_RC_CRSF_RC=y
CONFIG_DRIVERS_SMART_BATTERY_BATMON=y
CONFIG_COMMON_TELEMETRY=y
CONFIG_DRIVERS_TONE_ALARM=y
alexsuarez@Alex-Legion-S7:~/PX4-Autopilot$ git log
commit 7462e98e160ee0c7a65e592f0eb16515d87bf9eb (HEAD → main, origin/main, origin/HEAD)
Author: Ramon Roche mrpollo@gmail.com
Date: Fri Nov 22 05:41:24 2024 -0800

ci: publish pr images to registry

commit 3240cf4dc744d922d7a6b754df9eecbc97533d1c
Author: Ramon Roche mrpollo@gmail.com
Date: Fri Nov 22 05:39:48 2024 -0800

ci: push px4-dev container to docker hub registry

commit f2bd3105adf934501a425458d31ffcd252abe30e
Author: Ramon Roche mrpollo@gmail.com
Date: Fri Nov 22 05:36:31 2024 -0800

ci: tag container main & main-date

Make sure we always have a { branch name } container tag in addition to
a { branch name + date } tag. This way we have a rolling { branch name }
of the main and release branches

commit fb42770131016394dc645f87a43ecab396c6d235
Author: Ramon Roche mrpollo@gmail.com
Date: Fri Nov 22 05:30:45 2024 -0800

Tools: instal ccache on ubuntu

commit 14468d49c1f0000a4eda55edd27031dd6f3a6579
:

Hello @14AlexSuarez I just had a successful build using commit 7462e98 with your diff output. Maybe there was a problem with the submodule sync. You can get it solved with the following steps (assuming the current state of your workspace), make sure to apply the change indicated at your diff:

  1. make clean
  2. make distclean
  3. git submodule deinit -f --all
  4. git submodule update --init --recursive
  5. make mro_pixracerpro

Hey @TOTON95 I’m not sure if it could be related, but we recently upgraded GCC in main to 10.2.1, just in case you have an older version installed and want to double check!

1 Like

Thank you both, @TOTON95 list fixed it for me. @rroche I was running into that gcc version issue when trying to build ardupilot, but that was after successfully building px4 from TOTON95’s steps.

@rroche Thanks for the heads-up, I will check if there are problems with the recent changes

1 Like