pixhawk orange cube build firmware error

37 views (last 30 days)
Hello, I'm SeungWoo Park.
I'm using uav toolbox support pakcage for PX4 autopilot.
I flied quadcopter with pixhawk 4 using uav toolbox support package for autopilot PX4.
It did not faced any error with pixhawk 4.
And I wanted to use pixhawk orange cube. So I tried hardware setup process.
and I faced this problem.
In this step,
I clicked 'Build Firmware', and I saw this error although firmware build successful.
SUBMODULEUPDATESTART
SUBMODULEUPDATEEND
-- PX4 version: v1.12.3
-- PX4 config file: /cygdrive/c/px4_cygwin/home/Firmware/boards/cubepilot/cubeorange/default.cmake
-- PX4 config: cubepilot_cubeorange_default
-- PX4 platform: nuttx
-- cmake build type: MinSizeRel
-- The CXX compiler identification is GNU 7.3.1
-- The C compiler identification is GNU 7.3.1
-- The ASM compiler identification is GNU
-- Found assembler: /cygdrive/c/px4_cygwin/toolchain/gcc-arm/bin/arm-none-eabi-gcc.exe
-- Check for working CXX compiler: /cygdrive/c/px4_cygwin/toolchain/gcc-arm/bin/arm-none-eabi-g++.exe
-- Check for working CXX compiler: /cygdrive/c/px4_cygwin/toolchain/gcc-arm/bin/arm-none-eabi-g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Detecting CXX compile features
-- Detecting CXX compile features - failed
-- Check for working C compiler: /cygdrive/c/px4_cygwin/toolchain/gcc-arm/bin/arm-none-eabi-gcc.exe
-- Check for working C compiler: /cygdrive/c/px4_cygwin/toolchain/gcc-arm/bin/arm-none-eabi-gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Detecting C compile features
-- Detecting C compile features - failed
-- Enabling double FP precision hardware instructions
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.6.9", minimum required is "3")
-- build type is MinSizeRel
-- PX4 ECL: Very lightweight Estimation & Control Library v1.9.0-rc1-591-gb3fed06
-- Building and including cubepilot_io-v2_default
-- Found PythonInterp: /usr/bin/python3 (found version "3.6.9")
-- Using C++11
-- Release build type: MinSizeRel
-- Building and including bootloader cubepilot_cubeorange_bootloader
-- ROMFS: ROMFS/px4fmu_common
-- ROMFS: Adding build/cubepilot_cubeorange_default/romfs_extras/cubepilot_io-v2_default.bin -> /etc/extras/cubepilot_io-v2_default.bin
-- ROMFS: Adding build/cubepilot_cubeorange_default/external/Build/bootloader_firmware/cubepilot_cubeorange_bootloader.elf -> /etc/extras/bootloader.bin
-- ROMFS: Adding platforms/nuttx/init/stm32h7/rc.board_arch_defaults -> /etc/init.d/rc.board_arch_defaults
-- ROMFS: Adding boards/cubepilot/cubeorange/init/rc.board_defaults -> /etc/init.d/rc.board_defaults
-- ROMFS: Adding boards/cubepilot/cubeorange/init/rc.board_sensors -> /etc/init.d/rc.board_sensors
-- ROMFS: Adding boards/cubepilot/cubeorange/init/rc.board_extras -> /etc/init.d/rc.board_extras
-- ROMFS: Adding boards/cubepilot/cubeorange/init/rc.board_mavlink -> /etc/init.d/rc.board_mavlink
-- Configuring done
-- Generating done
-- Build files have been written to: /cygdrive/c/px4_cygwin/home/Firmware/build/cubepilot_cubeorange_default
[0/1326] git submodule platforms/nuttx/NuttX/nuttx
[2/1326] Running dsdl compiler
[3/1326] git submodule platforms/nuttx/NuttX/apps
[8/1326] Generating serial_params.c
[9/1326] git submodule src/lib/ecl
[18/1326] Generating uORB topic headers
[19/1326] git submodule src/drivers/gps/devices
[21/1326] Generating parameters.xml
[22/1326] git submodule src/drivers/uavcan/libuavcan
[23/1326] git submodule mavlink/include/mavlink/v2.0
[25/1326] Copying NuttX/nuttx to build/cubepilot_cubeorange_default/NuttX
[26/1326] Generating nuttx_config_kconfig.stamp
[27/1326] Copying NuttX config nsh
[28/1326] Generating git version header
[29/1326] Generating component_general.json
[30/1326] Generating component_information/checksums.h
[31/1326] Copying NuttX compressed config nsh and inflating (make olddefconfig)
[32/1326] Performing configure step for 'px4io_firmware'
-- PX4 version: v1.12.3
-- PX4 config file: /cygdrive/c/px4_cygwin/home/Firmware/boards/cubepilot/io-v2/default.cmake
-- PX4 config: cubepilot_io-v2_default
-- PX4 platform: nuttx
-- cmake build type: MinSizeRel
-- The CXX compiler identification is GNU 7.3.1
-- The C compiler identification is GNU 7.3.1
-- The ASM compiler identification is GNU
-- Found assembler: /cygdrive/c/px4_cygwin/toolchain/gcc-arm/bin/arm-none-eabi-gcc.exe
-- Check for working CXX compiler: /cygdrive/c/px4_cygwin/toolchain/gcc-arm/bin/arm-none-eabi-g++.exe
-- Check for working CXX compiler: /cygdrive/c/px4_cygwin/toolchain/gcc-arm/bin/arm-none-eabi-g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Detecting CXX compile features
-- Detecting CXX compile features - failed
-- Check for working C compiler: /cygdrive/c/px4_cygwin/toolchain/gcc-arm/bin/arm-none-eabi-gcc.exe
-- Check for working C compiler: /cygdrive/c/px4_cygwin/toolchain/gcc-arm/bin/arm-none-eabi-gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Detecting C compile features
-- Detecting C compile features - failed
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.6.9", minimum required is "3")
-- build type is MinSizeRel
-- PX4 ECL: Very lightweight Estimation & Control Library v1.9.0-rc1-591-gb3fed06
-- Configuring done
-- Generating done
-- Build files have been written to: /cygdrive/c/px4_cygwin/home/Firmware/build/cubepilot_cubeorange_default/external/Build/px4io_firmware
[32/1326] Performing build step for 'px4io_firmware'
[0/248] git submodule platforms/nuttx/NuttX/nuttx
[5/248] Generating serial_params.c
...(skip due to character limitation)
[246/248] Linking CXX executable cubepilot_io-v2_default.elf
Memory region Used Size Region Size %age Used
flash: 60432 B 60 KB 98.36%
sram: 3856 B 8 KB 47.07%
[247/248] Generating ../../cubepilot_io-v2.bin
[248/248] Creating /cygdrive/c/px4_cygwin/home/Firmware/build/cubepilot_cubeorange_default/external/Build/px4io_firmware/cubepilot_io-v2_default.px4
[33/1326] Performing configure step for 'bootloader_firmware'
-- PX4 version: v1.12.3
-- PX4 config file: /cygdrive/c/px4_cygwin/home/Firmware/boards/cubepilot/cubeorange/bootloader.cmake
-- PX4 config: cubepilot_cubeorange_bootloader
-- PX4 platform: nuttx
-- cmake build type: MinSizeRel
-- The CXX compiler identification is GNU 7.3.1
-- The C compiler identification is GNU 7.3.1
-- The ASM compiler identification is GNU
-- Found assembler: /cygdrive/c/px4_cygwin/toolchain/gcc-arm/bin/arm-none-eabi-gcc.exe
-- Check for working CXX compiler: /cygdrive/c/px4_cygwin/toolchain/gcc-arm/bin/arm-none-eabi-g++.exe
-- Check for working CXX compiler: /cygdrive/c/px4_cygwin/toolchain/gcc-arm/bin/arm-none-eabi-g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Detecting CXX compile features
-- Detecting CXX compile features - failed
-- Check for working C compiler: /cygdrive/c/px4_cygwin/toolchain/gcc-arm/bin/arm-none-eabi-gcc.exe
-- Check for working C compiler: /cygdrive/c/px4_cygwin/toolchain/gcc-arm/bin/arm-none-eabi-gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Detecting C compile features
-- Detecting C compile features - failed
-- Enabling double FP precision hardware instructions
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.6.9", minimum required is "3")
-- build type is MinSizeRel
-- PX4 ECL: Very lightweight Estimation & Control Library v1.9.0-rc1-591-gb3fed06
-- Configuring done
-- Generating done
-- Build files have been written to: /cygdrive/c/px4_cygwin/home/Firmware/build/cubepilot_cubeorange_default/external/Build/bootloader_firmware
[880/1326] Building CXX object src/modules/px4_simulink_app/CMakeFiles/modules__px4_simulink_app.dir/MW_PX4_TaskControl.cpp.obj
In file included from ../../mavlink/include/mavlink/v2.0/standard/standard.h:30:0,
from ../../mavlink/include/mavlink/v2.0/standard/mavlink.h:32,
from ../../src/modules/mavlink/mavlink_bridge_header.h:95,
from ../../src/modules/mavlink/mavlink_command_sender.h:51,
from ../../src/modules/mavlink/mavlink_main.h:81,
from ../../src/modules/px4_simulink_app/MW_PX4_TaskControl.cpp:37:
../../mavlink/include/mavlink/v2.0/standard/../protocol.h: In function 'uint16_t _MAV_RETURN_uint16_t(const mavlink_message_t*, uint8_t)':
../../mavlink/include/mavlink/v2.0/standard/../protocol.h:271:49: warning: cast from 'const char*' to 'const uint16_t* {aka const short unsigned int*}' increases required alignment of target type [-Wcast-align]
{ return *(const TYPE *)(&_MAV_PAYLOAD(msg)[ofs]);}
^
../../mavlink/include/mavlink/v2.0/standard/../protocol.h:273:1: note: in expansion of macro '_MAV_MSG_RETURN_TYPE'
_MAV_MSG_RETURN_TYPE(uint16_t)
^~~~~~~~~~~~~~~~~~~~
../../mavlink/include/mavlink/v2.0/standard/../protocol.h: In function 'int16_t _MAV_RETURN_int16_t(const mavlink_message_t*, uint8_t)':
../../mavlink/include/mavlink/v2.0/standard/../protocol.h:271:49: warning: cast from 'const char*' to 'const int16_t* {aka const short int*}' increases required alignment of target type [-Wcast-align]
{ return *(const TYPE *)(&_MAV_PAYLOAD(msg)[ofs]);}
^
...(skip due to character limitation)
../../mavlink/include/mavlink/v2.0/standard/../protocol.h:279:1: note: in expansion of macro '_MAV_MSG_RETURN_TYPE'
_MAV_MSG_RETURN_TYPE(float)
^~~~~~~~~~~~~~~~~~~~
../../mavlink/include/mavlink/v2.0/standard/../protocol.h: In function 'double _MAV_RETURN_double(const mavlink_message_t*, uint8_t)':
../../mavlink/include/mavlink/v2.0/standard/../protocol.h:271:49: warning: cast from 'const char*' to 'const double*' increases required alignment of target type [-Wcast-align]
{ return *(const TYPE *)(&_MAV_PAYLOAD(msg)[ofs]);}
^
../../mavlink/include/mavlink/v2.0/standard/../protocol.h:280:1: note: in expansion of macro '_MAV_MSG_RETURN_TYPE'
_MAV_MSG_RETURN_TYPE(double)
^~~~~~~~~~~~~~~~~~~~
In file included from ../../mavlink/include/mavlink/v2.0/standard/../common/common.h:2248:0,
from ../../mavlink/include/mavlink/v2.0/standard/standard.h:53,
from ../../mavlink/include/mavlink/v2.0/standard/mavlink.h:32,
from ../../src/modules/mavlink/mavlink_bridge_header.h:95,
from ../../src/modules/mavlink/mavlink_command_sender.h:51,
from ../../src/modules/mavlink/mavlink_main.h:81,
from ../../src/modules/px4_simulink_app/MW_PX4_TaskControl.cpp:37:
../../mavlink/include/mavlink/v2.0/standard/../common/./mavlink_msg_sys_status.h: In function 'void mavlink_msg_sys_status_send_buf(mavlink_message_t*, mavlink_channel_t, uint32_t, uint32_t, uint32_t, uint16_t, uint16_t, int16_t, int8_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t)':
../../mavlink/include/mavlink/v2.0/standard/../common/./mavlink_msg_sys_status.h:331:60: warning: cast from 'mavlink_message_t* {aka __mavlink_message*}' to 'mavlink_sys_status_t* {aka __mavlink_sys_status_t*}' increases required alignment of target type [-Wcast-align]
mavlink_sys_status_t *packet = (mavlink_sys_status_t *)msgbuf;
^~~~~~
In file included from ../../mavlink/include/mavlink/v2.0/standard/../common/common.h:2249:0,
from ../../mavlink/include/mavlink/v2.0/standard/standard.h:53,
from ../../mavlink/include/mavlink/v2.0/standard/mavlink.h:32,
from ../../src/modules/mavlink/mavlink_bridge_header.h:95,
from ../../src/modules/mavlink/mavlink_command_sender.h:51,
from ../../src/modules/mavlink/mavlink_main.h:81,
from ../../src/modules/px4_simulink_app/MW_PX4_TaskControl.cpp:37:
../../mavlink/include/mavlink/v2.0/standard/../common/./mavlink_msg_system_time.h: In function 'void mavlink_msg_system_time_send_buf(mavlink_message_t*, mavlink_channel_t, uint64_t, uint32_t)':
../../mavlink/include/mavlink/v2.0/standard/../common/./mavlink_msg_system_time.h:188:62: warning: cast from 'mavlink_message_t* {aka __mavlink_message*}' to 'mavlink_system_time_t* {aka __mavlink_system_time_t*}' increases required alignment of target type [-Wcast-align]
mavlink_system_time_t *packet = (mavlink_system_time_t *)msgbuf;
^~~~~~
...(skip due to character limitation)
In file included from ../../mavlink/include/mavlink/v2.0/standard/../common/../minimal/minimal.h:321:0,
from ../../mavlink/include/mavlink/v2.0/standard/../common/common.h:2464,
from ../../mavlink/include/mavlink/v2.0/standard/standard.h:53,
from ../../mavlink/include/mavlink/v2.0/standard/mavlink.h:32,
from ../../src/modules/mavlink/mavlink_bridge_header.h:95,
from ../../src/modules/mavlink/mavlink_command_sender.h:51,
from ../../src/modules/mavlink/mavlink_main.h:81,
from ../../src/modules/px4_simulink_app/MW_PX4_TaskControl.cpp:37:
c:\px4_cygwin\home\firmware\mavlink\include\mavlink\v2.0\minimal\mavlink_msg_heartbeat.h: In function 'void mavlink_msg_heartbeat_send_buf(mavlink_message_t*, mavlink_channel_t, uint8_t, uint8_t, uint8_t, uint32_t, uint8_t)':
c:\px4_cygwin\home\firmware\mavlink\include\mavlink\v2.0\minimal\mavlink_msg_heartbeat.h:237:58: warning: cast from 'mavlink_message_t* {aka __mavlink_message*}' to 'mavlink_heartbeat_t* {aka __mavlink_heartbeat_t*}' increases required alignment of target type [-Wcast-align]
mavlink_heartbeat_t *packet = (mavlink_heartbeat_t *)msgbuf;
^~~~~~
In file included from ../../mavlink/include/mavlink/v2.0/standard/../common/../minimal/minimal.h:322:0,
from ../../mavlink/include/mavlink/v2.0/standard/../common/common.h:2464,
from ../../mavlink/include/mavlink/v2.0/standard/standard.h:53,
from ../../mavlink/include/mavlink/v2.0/standard/mavlink.h:32,
from ../../src/modules/mavlink/mavlink_bridge_header.h:95,
from ../../src/modules/mavlink/mavlink_command_sender.h:51,
from ../../src/modules/mavlink/mavlink_main.h:81,
from ../../src/modules/px4_simulink_app/MW_PX4_TaskControl.cpp:37:
c:\px4_cygwin\home\firmware\mavlink\include\mavlink\v2.0\minimal\mavlink_msg_protocol_version.h: In function 'void mavlink_msg_protocol_version_send_buf(mavlink_message_t*, mavlink_channel_t, uint16_t, uint16_t, uint16_t, const uint8_t*, const uint8_t*)':
c:\px4_cygwin\home\firmware\mavlink\include\mavlink\v2.0\minimal\mavlink_msg_protocol_version.h:221:72: warning: cast from 'mavlink_message_t* {aka __mavlink_message*}' to 'mavlink_protocol_version_t* {aka __mavlink_protocol_version_t*}' increases required alignment of target type [-Wcast-align]
mavlink_protocol_version_t *packet = (mavlink_protocol_version_t *)msgbuf;
^~~~~~
[1300/1326] Linking CXX static library src/modules/mavlink/libmodules__mavlink.a
[1301/1326] Performing build step for 'bootloader_firmware'
[0/257] git submodule platforms/nuttx/NuttX/nuttx
[3/257] Generating parameters.xml
[4/257] git submodule platforms/nuttx/NuttX/apps
[6/257] Generating uORB topic headers
[7/257] Copying NuttX/apps to build/cubepilot_cubeorange_default/external/Build/bootloader_firmware/NuttX
[8/257] Copying NuttX/nuttx to build/cubepilot_cubeorange_default/external/Build/bootloader_firmware/NuttX
[9/257] Generating nuttx_config_kconfig.stamp
[10/257] Copying NuttX config bootloader
[11/257] Copying NuttX compressed config bootloader and inflating (make olddefconfig)
[12/257] Generating nuttx/include/nuttx/config.h, nuttx/include/nuttx/version.h
[13/257] Generating nuttx/boards/libboards.a
[14/257] Generating nuttx/binfmt/libbinfmt.a
[15/257] Generating nuttx/libs/libxx/libxx.a
[16/257] Generating apps/libapps.a
FAILED: NuttX/apps/libapps.a
cd /cygdrive/c/px4_cygwin/home/Firmware/build/cubepilot_cubeorange_default/external/Build/bootloader_firmware/NuttX/apps && find /cygdrive/c/px4_cygwin/home/Firmware/build/cubepilot_cubeorange_default/external/Build/bootloader_firmware/NuttX/apps -name *.o -delete && make --quiet --no-print-directory TOPDIR="/cygdrive/c/px4_cygwin/home/Firmware/build/cubepilot_cubeorange_default/external/Build/bootloader_firmware/NuttX/nuttx" > nuttx_apps.log
Assembler messages:
Fatal error: can't create cdcacm_main.cygdrive.c.px4_cygwin.home.Firmware.build.cubepilot_cubeorange_default.external.Build.bootloader_firmware.NuttX.apps.system.cdcacm.o: No such file or directory
make[3]: *** [/cygdrive/c/px4_cygwin/home/Firmware/build/cubepilot_cubeorange_default/external/Build/bootloader_firmware/NuttX/apps/Application.mk:193: cdcacm_main.cygdrive.c.px4_cygwin.home.Firmware.build.cubepilot_cubeorange_default.external.Build.bootloader_firmware.NuttX.apps.system.cdcacm.o] 오류 1
make[2]: *** [Makefile:59: /cygdrive/c/px4_cygwin/home/Firmware/build/cubepilot_cubeorange_default/external/Build/bootloader_firmware/NuttX/apps/system/cdcacm_all] 오류 2
make[1]: *** [Makefile:53: all] error 2
[17/257] Generating nuttx/mm/libmm.a
[18/257] Generating nuttx/fs/libfs.a
[19/257] Generating nuttx/drivers/libdrivers.a
[20/257] Generating nuttx/sched/libsched.a
[21/257] Generating nuttx/arch/arm/src/libarch.a
[22/257] Generating nuttx/libs/libc/libc.a
ninja: build stopped: subcommand failed.
[1304/1326] Copying cubepilot_io-v2_default to ROMFS extras
FAILED: external/Stamp/bootloader_firmware/bootloader_firmware-build
cd /cygdrive/c/px4_cygwin/home/Firmware/build/cubepilot_cubeorange_default/external/Build/bootloader_firmware && /usr/bin/cmake.exe --build .
ninja: build stopped: subcommand failed.
Is this normal? In command window, firmware build faced error.
but hardware setup showed firmware build successful...
I tried next step test connection - upload firmware, but it didn't work
What should I do??

Accepted Answer

MathWorks Embedded Coder Team
If you are seeing the cube orange build failure with above error message, note that this issue is coming because of the limitation of length of filenames in Windows. cdcacm_main.cygdrive.c.px4_cygwin.home.Firmware.build.cubepilot_cubeorange_default.external.Build.bootloader_firmware.NuttX.apps.system.cdcacm.o has more characters in the filename than the maximum allowed number of characters in Windows. You can work around this problem by reducing the path length of the PX4 firmware. To workaround the issue
  • Option 1: Uninstall current Cygwin toolchain and install the Cygwin Toolchain to a shorter path such as C:/px4 instead of C:/px4_cygwin. Run hardware setup screens in MATLAB again with new Cygwin path
  • Option 2: You can also consider cloning the PX4 firmware to a shorter path like C:/mypx4 instead of cloning the px4 to C:/px4_cygwin/home

More Answers (0)

Products


Release

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!