Unable to build stable release 1.10.1: UAVCAN_PLATFORM not set

I tried to build v1.10.1 myself. But failed with error “UAVCAN_PLATFORM not set” while building drivers/uavcan.

  OS: Ubuntu Linux LTS 20.04
  Device: CUAV V5+
  Build target: px4_fmu-v5
  Airframe: Blade130

I want to use CUAV V5+ on a helicopter. I can build master branch code (around May 10, 2020). But that latest code seems having problems working with Blade130 air frame (works fine with Quadrotor x).

I know the online downloaded PX4 Pro v1.10.1 Stable Release build works. That’s why I am trying to build v1.10.1.

Following are commands I used:

  git clone https://github.com/PX4/Firmware.git
  cd Firmware
  git checkout v1.10.1
  bash ./Tools/setup/ubuntu.sh
  <Restart the computer>
  make px4_fmu-v5_default

I also ran

  git submodule update --recursive
  make distclean

after I got that error. But that didn’t help.

Can someone tell me if I did something wrong when building a previous release? Or what I need to do specifically for v1.10.1?

Thanks a lot!

Can this be related to the Scandinavian letter issue (fmu-v3/4/5 not building on Arch Linux #11702, https://github.com/PX4/Firmware/issues/11702)?

I tried to build older stable releases. They all failed. When I build v1.9.2, I got following error:

CMake Error at cmake/px4_add_module.cmake:210 (get_target_property):
  get_target_property() called with non-existent target

Target nuttx_xx is not created.

It seems to me the failure I got when building v1.10.1 is also due to the target not being set. Something may prevent Python scripts from configuring correctly. I am not familiar on how the scripts work during build.

superuser@Dell-Laptop:~/Firmware$ make px4_fmu-v5_default
– PX4 version: v1.10.1
– PX4 config file: /home/superuser/Firmware/boards/px4/fmu-v5/default.cmake
– PX4 config: px4_fmu-v5_default
– PX4 platform: nuttx
– PX4 lockstep: disabled
– cmake build type: MinSizeRel
– The CXX compiler identification is GNU 7.2.1
– The C compiler identification is GNU 7.2.1
– The ASM compiler identification is GNU
– Found assembler: /opt/gcc-arm-none-eabi-7-2017-q4-major/bin/arm-none-eabi-gcc
– Check for working CXX compiler: /opt/gcc-arm-none-eabi-7-2017-q4-major/bin/arm-none-eabi-g++
– Check for working CXX compiler: /opt/gcc-arm-none-eabi-7-2017-q4-major/bin/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: /opt/gcc-arm-none-eabi-7-2017-q4-major/bin/arm-none-eabi-gcc
– Check for working C compiler: /opt/gcc-arm-none-eabi-7-2017-q4-major/bin/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
– ccache enabled (export CCACHE_DISABLE=1 to disable)
– Found PythonInterp: /usr/bin/python3.8 (found version “3.8.2”)
– Found PY_jinja2: /home/superuser/.local/lib/python3.8/site-packages/jinja2
– PX4 ECL: Very lightweight Estimation & Control Library v1.9.0-rc1-64-gdec1ed0
– Building and including px4_io-v2_default
CMake Error at src/drivers/uavcan/CMakeLists.txt:49 (message):

– Configuring incomplete, errors occurred!
See also “/home/superuser/Firmware/build/px4_fmu-v5_default/CMakeFiles/CMakeOutput.log”.
See also “/home/superuser/Firmware/build/px4_fmu-v5_default/CMakeFiles/CMakeError.log”.
Error: /home/superuser/Firmware/build/px4_fmu-v5_default is not a directory
make: *** [Makefile:195: px4_fmu-v5_default] Error 1

I got this error too.
PX4 version :v1.10.2

I dont know why this happened

did you solve it? i am getting the same error.
ubuntu 20.04. code based on v1.9.0. simulation works fine. but cant build for pixhawks.

ubuntu 16.04 builds it fine also.

HELP :pray:t2:

Make sure you do sudo apt-get install python-is-python3 and compile using gcc-arm-none-eabi-7-2017-q4-major version of gcc compiler.
Hopefully this will solve the issue.
Best of luck.