I am having issues with building PX4 v1.13 for hardware targets.
OS: Ubuntu 18.04
What has worked so far:
- Built the firmware on the “main” branch for hardware targets and jmavsim simulation. No issues here.
- Built the firmware on the “stable” branch for jmavsim simulation. This works fine as well.
What has not worked:
- Building the firmware on the “stable” branch of px4 for the following targets:
- pixhawk 4 - make px4_fmu-v4_default
[283/1133] Building CXX object src/lib/rc/CMakeFiles/rc.dir/sbus.cpp.obj
FAILED: src/lib/rc/CMakeFiles/rc.dir/sbus.cpp.obj
/usr/bin/ccache /opt/gcc-arm-none-eabi-9-2020-q2-update/bin/arm-none-eabi-g++ -DAPP_VERSION_MAJOR=0 -DAPP_VERSION_MINOR=1 -DCONFIG_ARCH_BOARD_PX4_FMU_V4 -DCONSTRAINED_MEMORY -DHW_UAVCAN_NAME=\"org.px4.fmu-v4_cannode\" -DHW_VERSION_MAJOR=1 -DHW_VERSION_MINOR=0 -D_SYS_CDEFS_H_ -D_SYS_REENT_H_ -D__CUSTOM_FILE_IO__ -D__PX4_LINUX -D__PX4_NUTTX -D__STDC_FORMAT_MACROS
...
/home/PX4-Autopilot/src/lib/rc/sbus.cpp:61:10: fatal error: asm-generic/termbits.h: No such file or directory
61 | #include <asm-generic/termbits.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
- Cube orange - make cubepilot_cubeorange
[485/1112] Building CXX object src/drivers/gps/CMakeFiles/drivers__gps.dir/gps.cpp.obj
FAILED: src/drivers/gps/CMakeFiles/drivers__gps.dir/gps.cpp.obj
/usr/bin/ccache /opt/gcc-arm-none-eabi-9-2020-q2-update/bin/arm-none-eabi-g++ -DCONFIG_ARCH_BOARD_CUBEPILOT_CUBEORANGE -DMODULE_NAME=\"gps\" -DPX4_MAIN=gps_app_main -D_SYS_CDEFS_H_ -D_SYS_REENT_H_ -D__CUSTOM_FILE_IO__ -D__PX4_LINUX -D__PX4_NUTTX -D__STDC_FORMAT_MACROS
...
/home/PX4-Autopilot/src/drivers/gps/gps.cpp:78:10: fatal error: linux/spi/spidev.h: No such file or directory
78 | #include <linux/spi/spidev.h>
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
The above “make” commands also failed for older versions of px4.
Calling “make” for other build targets (for example: make px4_fmu-v4pro_default
) results in the same “#include <linux/spi/spidev.h> no such file or directory” as that shown above.
Has anyone else run into similar issues? Any advice would be much appreciated. What puzzles me most is that all of the above commands work for the firmware on the “main” branch.