These are chat archives for PX4/Hardware

26th
Apr 2018
xiaofyao
@xiaofyao
Apr 26 05:18

When I compile the PX4 source code of 1.6.2 version, I meet this error. But when I compile the latest version(1.7.3), It can be compiled successfully. Anyone who can help me?

root@ubuntu:~/px4_code/px4_0/xyi_px4# make px4fmu-v2_default
-- CMAKE_MODULE_PATH: /home/yst/px4_code/px4_0/xyi_px4/cmake
-- Nuttx build for px4fmu-v2 on m4 hardware, using nsh with ROMFS on px4fmu_common
-- Build Type: MinSizeRel
Traceback (most recent call last):
File "Tools/tag_to_version.py", line 19, in <module>
minor = res[1]
IndexError: list index out of range
-- PX4 VERSION: 3284b7d
-- CONFIG: nuttx-px4fmu-v2-default
-- The ASM compiler identification is GNU
-- Found assembler: /home/yst/gcc-arm-none-eabi-7-2017-q4-major/bin/arm-none-eabi-gcc
-- Found PythonInterp: /usr/bin/python (found version "2.7.12")
-- Found PY_jinja2: /usr/local/lib/python2.7/dist-packages/jinja2
-- C compiler: arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 7-2017-q4-major) 7.2.1 20170904 (release) [ARM/embedded-7-branch revision 255204]
-- C++ compiler: arm-none-eabi-g++ (GNU Tools for Arm Embedded Processors 7-2017-q4-major) 7.2.1 20170904 (release) [ARM/embedded-7-branch revision 255204]
-- Adding ROMFS on px4fmu-v2
-- Nuttx build for px4fmu-v2 on m3 hardware, using nsh
-- Configuring done
-- Generating done
-- Build files have been written to: /home/yst/px4_code/px4_0/xyi_px4/build_px4fmu-v2_default
[73/566] Building NuttX for px4io-v2 with nsh
FAILED: cd /home/yst/px4_code/px4_0/xyi_px4/build_px4fmu-v2_default/px4io-v2 && /bin/rm -rf /home/yst/px4_code/px4_0/xyi_px4/build_px4fmu-v2_default/px4io-v2/NuttX/nuttx/nuttx-export && /usr/bin/make --quiet --no-print-directory -C /home/yst/px4_code/px4_0/xyi_px4/build_px4fmu-v2_default/px4io-v2/NuttX/nuttx -r CONFIG_ARCH_BOARD=px4io-v2 export >nuttx_build.log && cmake -E touch /home/yst/px4_code/px4_0/xyi_px4/build_px4fmu-v2_default/px4io-v2/nuttx_export.stamp
stdio/lib_sscanf.c: In function 'vsscanf':
stdio/lib_sscanf.c:419:28: error: this statement may fall through [-Werror=implicit-fallthrough=]
sign = true;
^
stdio/lib_sscanf.c:420:21: note: here
case 'u':
^~
cc1: all warnings being treated as errors
make[2]: [bin/lib_sscanf.o] Error 1
make[1]: [libc/libc.a] Error 2
[73/566] Building NuttX for px4fmu-v2 with nsh
FAILED: cd /home/yst/px4_code/px4_0/xyi_px4/build_px4fmu-v2_default/px4fmu-v2 && /bin/rm -rf /home/yst/px4_code/px4_0/xyi_px4/build_px4fmu-v2_default/px4fmu-v2/NuttX/nuttx/nuttx-export && /usr/bin/make --quiet --no-print-directory -C /home/yst/px4_code/px4_0/xyi_px4/build_px4fmu-v2_default/px4fmu-v2/NuttX/nuttx -r CONFIG_ARCH_BOARD=px4fmu-v2 export >nuttx_build.log && cmake -E touch /home/yst/px4_code/px4_0/xyi_px4/build_px4fmu-v2_default/px4fmu-v2/nuttx_export.stamp
stdio/lib_sscanf.c: In function 'vsscanf':
stdio/lib_sscanf.c:419:28: error: this statement may fall through [-Werror=implicit-fallthrough=]
sign = true;
^
stdio/lib_sscanf.c:420:21: note: here
case 'u':
^~
cc1: all warnings being treated as errors
make[2]: [bin/lib_sscanf.o] Error 1
make[1]: [libc/libc.a] Error 2
ninja: build stopped: subcommand failed.
Makefile:164: recipe for target 'px4fmu-v2_default' failed
make: * [px4fmu-v2_default] Error 1
root@ubuntu:~/px4_code/px4_0/xyi_px4#

_