- Windows 10
- MATLAB R2024a
- Pixhawk 4
- PX4 v1.14.0
```
Error:Generating ELF failed for command source /mnt/c/ProgramData/MATLAB/SupportPackages/R2024a/toolbox/target/supportpackages/px4/lib/scripts/executeCommandFromText.sh /home/xing/PX4-Autopilot/build/px4_fmu-v5_default/generateElf.txt with error '\\wsl.localhost\ubuntu\home\xing\PX4-Autopilot\build\px4_fmu-v5_default' CMD.EXE was started with the above path as the current directory. UNC paths are not supported. Defaulting to Windows directory. /opt/gcc-arm-none-eabi-9-2020-q2-update/bin/arm-none-eabi-g++ -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard -Os -DNDEBUG --specs=nosys.specs -nostartfiles -nodefaultlibs -nostdlib -nostdinc++ -fno-exceptions -fno-rtti -Wl,--script=/home/xing/PX4-Autopilot/boards/px4/fmu-v5/nuttx-config/scripts/script.ld -Wl,-Map=px4_fmu-v5_default.map -Wl,--warn-common -Wl,--gc-sections -Wl,--start-group NuttX/nuttx/boards/libboards.a NuttX/nuttx/drivers/libdrivers.a NuttX/nuttx/fs/libfs.a NuttX/nuttx/sched/libsched.a NuttX/nuttx/crypto/libcrypto.a NuttX/nuttx/binfmt/libbinfmt.a NuttX/nuttx/libs/libxx/libxx.a NuttX/apps/libapps.a NuttX/nuttx/arch/arm/src/libarch.a NuttX/nuttx/mm/libmm.a NuttX/nuttx/libs/libc/libc.a -Wl,--end-group -lm -lgcc -Wl,--print-memory-usage src/drivers/adc/ads1115/libdrivers__ads1115.a src/drivers/adc/board_adc/libdrivers__board_adc.a src/drivers/barometer/bmp280/libdrivers__barometer__bmp280.a src/drivers/barometer/bmp388/libdrivers__barometer__bmp388.a src/drivers/barometer/dps310/libdrivers__barometer__dps310.a src/drivers/barometer/goertek/spl06/libdrivers__barometer__spl06.a src/drivers/barometer/invensense/icp101xx/libdrivers__invensense__icp101xx.a src/drivers/barometer/invensense/icp201xx/libdrivers__invensense__icp201xx.a src/drivers/barometer/lps22hb/libdrivers__barometer__lps22hb.a src/drivers/barometer/lps33hw/libdrivers__barometer__lps33hw.a src/drivers/barometer/maiertek/mpc2520/libdrivers__maiertek__mpc2520.a src/drivers/barometer/ms5611/libdrivers__barometer__ms5611.a src/drivers/batt_smbus/libdrivers__batt_smbus.a src/drivers/camera_capture/libdrivers__camera_capture.a src/drivers/camera_trigger/libdrivers__camera_trigger.a src/drivers/differential_pressure/ms4525do/libdrivers__differential_pressure__ms4525do.a src/drivers/differential_pressure/ms5525dso/libdrivers__differential_pressure__ms5525dso.a src/drivers/differential_pressure/sdp3x/libdrivers__differential_pressure__sdp3x.a src/drivers/distance_sensor/cm8jl65/libdrivers__cm8jl65.a src/drivers/distance_sensor/gy_us42/libdrivers__distance_sensor__gy_us42.a src/drivers/distance_sensor/leddar_one/libdrivers__distance_sensor__leddar_one.a src/drivers/distance_sensor/lightware_laser_i2c/libdrivers__distance_sensor__lightware_laser_i2c.a src/drivers/distance_sensor/lightware_laser_serial/libdrivers__distance_sensor__lightware_laser_serial.a src/drivers/distance_sensor/ll40ls/libdrivers__ll40ls.a src/drivers/distance_sensor/ll40ls_pwm/libdrivers__ll40ls_pwm.a src/drivers/distance_sensor/mappydot/libdrivers__mappydot.a src/drivers/distance_sensor/mb12xx/libdrivers__mb12xx.a src/drivers/distance_sensor/pga460/libdrivers__pga460.a src/drivers/distance_sensor/srf02/libdrivers__distance_sensor__srf02.a src/drivers/distance_sensor/teraranger/libdrivers__distance_sensor__teraranger.a src/drivers/distance_sensor/tf02pro/libdrivers__distance_sensor__tf02pro.a src/drivers/distance_sensor/tfmini/libdrivers__tfmini.a src/drivers/distance_sensor/ulanding_radar/libdrivers__distance_sensor__ulanding_radar.a src/drivers/distance_sensor/vl53l0x/libdrivers__distance_sensor__vl53l0x.a src/drivers/distance_sensor/vl53l1x/libdrivers__distance_sensor__vl53l1x.a src/drivers/dshot/libdrivers__dshot.a src/drivers/gps/libdrivers__gps.a src/drivers/heater/libdrivers__heater.a src/drivers/hygrometer/sht3x/libdrivers__hygrometer__sht3x.a src/drivers/imu/analog_devices/adis16448/libdrivers__imu__analog_devices__adis16448.a src/drivers/imu/bosch/bmi055/libdrivers__imu__bosch__bmi055.a src/drivers/imu/invensense/icm20602/libdrivers__imu__invensense__icm20602.a src/drivers/imu/invensense/icm20689/libdrivers__imu__invensense__icm20689.a src/drivers/imu/invensense/icm20948/libdrivers__imu__invensense__icm20948.a src/drivers/imu/invensense/icm20948/libdrivers__imu__invensense__icm20948_i2c_passthrough.a src/drivers/imu/invensense/icm42688p/libdrivers__imu__invensense__icm42688p.a src/drivers/irlock/libdrivers__irlock.a src/drivers/lights/rgbled/libdrivers__rgbled.a src/drivers/lights/rgbled_is31fl3195/libdrivers__rgbled_is31fl3195.a src/drivers/lights/rgbled_lp5562/libdrivers__rgbled_lp5562.a src/drivers/lights/rgbled_ncp5623c/libdrivers__rgbled_ncp5623c.a src/drivers/lights/rgbled_pwm/libdrivers__rgbled_pwm.a src/drivers/magnetometer/akm/ak09916/libdrivers__magnetometer__akm__ak09916.a src/drivers/magnetometer/akm/ak8963/libdrivers__magnetometer__akm__ak8963.a src/drivers/magnetometer/bosch/bmm150/libdrivers__magnetometer__bosch__bmm150.a src/drivers/magnetometer/hmc5883/libdrivers__hmc5883.a src/drivers/magnetometer/isentek/ist8308/libdrivers__magnetometer__isentek__ist8308.a src/drivers/magnetometer/isentek/ist8310/libdrivers__magnetometer__isentek__ist8310.a src/drivers/magnetometer/lis2mdl/libdrivers__lis2mdl.a src/drivers/magnetometer/lis3mdl/libdrivers__magnetometer__lis3mdl.a src/drivers/magnetometer/lsm303agr/libdrivers__magnetometer__lsm303agr.a src/drivers/magnetometer/qmc5883l/libdrivers__magnetometer__qmc5883l.a src/drivers/magnetometer/rm3100/libdrivers__rm3100.a src/drivers/magnetometer/vtrantech/vcm1193l/libdrivers__magnetometer__vcm1193l.a src/drivers/optical_flow/paa3905/libdrivers__optical_flow__paa3905.a src/drivers/optical_flow/paw3902/libdrivers__optical_flow__paw3902.a src/drivers/optical_flow/pmw3901/libdrivers__optical_flow__pmw3901.a src/drivers/optical_flow/px4flow/libdrivers__px4flow.a src/drivers/optical_flow/thoneflow/libdrivers__thoneflow.a src/drivers/osd/atxxxx/libdrivers__atxxxx.a src/drivers/osd/msp_osd/libdrivers__osd__msp_osd.a src/drivers/pca9685_pwm_out/libdrivers__pca9685_pwm_out.a src/drivers/power_monitor/ina226/libdrivers__ina226.a src/drivers/pwm_input/libdrivers__pwm_input.a src/drivers/pwm_out/libdrivers__pwm_out.a src/drivers/px4io/libdrivers__px4io.a src/drivers/rc/crsf_rc/libdrivers__rc__crsf_rc.a src/drivers/rc_input/libdrivers__rc_input.a src/drivers/safety_button/libdrivers__safety_button.a src/drivers/smart_battery/batmon/libdrivers__batmon.a src/drivers/telemetry/bst/libdrivers__bst.a src/drivers/telemetry/frsky_telemetry/libdrivers__frsky_telemetry.a src/drivers/telemetry/hott/hott_sensors/libdrivers__hott__hott_sensors.a src/drivers/telemetry/hott/hott_telemetry/libdrivers__hott__hott_telemetry.a src/drivers/tone_alarm/libdrivers__tone_alarm.a src/drivers/uavcan/libdrivers__uavcan.a src/modules/airspeed_selector/libmodules__airspeed_selector.a src/modules/attitude_estimator_q/libmodules__attitude_estimator_q.a src/modules/battery_status/libmodules__battery_status.a src/modules/camera_feedback/libmodules__camera_feedback.a src/modules/commander/libmodules__commander.a src/modules/control_allocator/libmodules__control_allocator.a src/modules/dataman/libmodules__dataman.a src/modules/ekf2/libmodules__ekf2.a src/modules/esc_battery/libmodules__esc_battery.a src/modules/events/libmodules__events.a src/modules/flight_mode_manager/libmodules__flight_mode_manager.a src/modules/fw_att_control/libmodules__fw_att_control.a src/modules/fw_autotune_attitude_control/libfw_autotune_attitude_control.a src/modules/fw_pos_control/libmodules__fw_pos_control.a src/modules/fw_rate_control/libmodules__fw_rate_control.a src/modules/gimbal/libdrivers__gimbal.a src/modules/gyro_calibration/libmodules__gyro_calibration.a src/modules/land_detector/libmodules__land_detector.a src/modules/landing_target_estimator/libmodules__landing_target_estimator.a src/modules/load_mon/libmodules__load_mon.a src/modules/local_position_estimator/libmodules__local_position_estimator.a src/modules/logger/libmodules__logger.a src/modules/mag_bias_estimator/libmodules__mag_bias_estimator.a src/modules/manual_control/libmodule__manual_control.a src/modules/mavlink/libmodules__mavlink.a src/modules/mc_att_control/libmodules__mc_att_control.a src/modules/mc_autotune_attitude_control/libmc_autotune_attitude_control.a src/modules/mc_hover_thrust_estimator/libmodules__mc_hover_thrust_estimator.a src/modules/mc_pos_control/libmodules__mc_pos_control.a src/modules/mc_rate_control/libmodules__mc_rate_control.a src/modules/navigator/libmodules__navigator.a src/modules/px4_simulink_app/libmodules__px4_simulink_app.a src/modules/rc_update/libmodules__rc_update.a src/modules/rover_pos_control/libmodules__rover_pos_control.a src/modules/sensors/libmodules__sensors.a src/modules/simulation/pwm_out_sim/libmodules__simulation__pwm_out_sim.a src/modules/simulation/sensor_baro_sim/libmodules__simulation__sensor_baro_sim.a src/modules/simulation/sensor_gps_sim/libmodules__simulation__sensor_gps_sim.a src/modules/simulation/sensor_mag_sim/libmodules__simulation__senosr_mag_sim.a src/modules/simulation/simulator_sih/libmodules__simulation__simulator_sih.a src/modules/temperature_compensation/libmodules__temperature_compensation.a src/modules/uuv_att_control/libmodules__uuv_att_control.a src/modules/uuv_pos_control/libmodules__uuv_pos_control.a src/modules/uxrce_dds_client/libmodules__uxrce_dds_client.a src/modules/vtol_att_control/libmodules__vtol_att_control.a src/systemcmds/actuator_test/libsystemcmds__actuator_test.a src/systemcmds/bl_update/libsystemcmds__bl_update.a src/systemcmds/bsondump/libsystemcmds__bsondump.a src/systemcmds/dmesg/libsystemcmds__dmesg.a src/systemcmds/dumpfile/libsystemcmds__dumpfile.a src/systemcmds/gpio/libsystemcmds__gpio.a src/systemcmds/hardfault_log/libsystemcmds__hardfault_log.a src/systemcmds/i2cdetect/libsystemcmds__i2cdetect.a src/systemcmds/led_control/libsystemcmds__led_control.a src/systemcmds/mft/libsystemcmds__mft.a src/systemcmds/mtd/libsystemcmds__mtd.a src/systemcmds/nshterm/libsystemcmds__nshterm.a src/systemcmds/param/libsystemcmds__param.a src/systemcmds/perf/libsystemcmds__perf.a src/systemcmds/reboot/libsystemcmds__reboot.a src/systemcmds/reflect/libsystemcmds__reflect.a src/systemcmds/sd_bench/libsystemcmds__sd_bench.a src/systemcmds/sd_stress/libsystemcmds__sd_stress.a src/systemcmds/serial_test/libsystemcmds__serial_test.a src/systemcmds/system_time/libsystemcmds__system_time.a src/systemcmds/top/libsystemcmds__top.a src/systemcmds/topic_listener/libsystemcmds__topic_listener.a src/systemcmds/tune_control/libsystemcmds__tune_control.a src/systemcmds/uorb/libsystemcmds__uorb.a src/systemcmds/usb_connected/libsystemcmds__usb_connected.a src/systemcmds/ver/libsystemcmds__ver.a src/systemcmds/work_queue/libsystemcmds__work_queue.a src/examples/fake_gps/libmodules__fake_gps.a ROMFS/libromfs.a platforms/nuttx/src/px4/stm/stm32f7/dshot/libarch_dshot.a platforms/nuttx/src/px4/stm/stm32f7/led_pwm/libarch_led_pwm.a src/drivers/osd/msp_osd/MessageDisplay/libmessage_display.a platforms/nuttx/src/px4/stm/stm32f7/px4io_serial/libarch_px4io_serial.a src/lib/rc/librc.a src/lib/drivers/smbus/libdrivers__smbus.a src/lib/drivers/smbus_sbs/libdrivers__smbus_sbs.a src/drivers/telemetry/hott/libdrivers__hott.a platforms/nuttx/src/px4/stm/stm32f7/tone_alarm/libarch_tone_alarm.a src/lib/drivers/rangefinder/libdrivers_rangefinder.a src/lib/led/libled.a src/lib/button/libbutton_publisher.a src/drivers/uavcan/libuavcan_drivers/libuavcan_stm32_driver.a src/drivers/uavcan/libuavcan/libuavcan/libuavcan.a src/lib/wind_estimator/libwind_estimator.a src/modules/commander/failure_detector/libfailure_detector.a src/modules/commander/Arming/ArmAuthorization/libArmAuthorization.a src/modules/commander/Arming/ArmStateMachine/libArmStateMachine.a src/modules/commander/HealthAndArmingChecks/libhealth_and_arming_checks.a src/modules/commander/ModeUtil/libmode_util.a src/modules/commander/failsafe/libfailsafe.a src/modules/control_allocator/ActuatorEffectiveness/libActuatorEffectiveness.a src/modules/control_allocator/ControlAllocation/libControlAllocation.a src/lib/world_magnetic_model/libworld_magnetic_model.a src/modules/ekf2/Utility/libEKF2Utility.a src/lib/battery/libbattery.a src/modules/flight_mode_manager/tasks/Descend/libFlightTaskDescend.a src/modules/flight_mode_manager/tasks/Failsafe/libFlightTaskFailsafe.a src/modules/flight_mode_manager/tasks/ManualAcceleration/libFlightTaskManualAcceleration.a src/modules/flight_mode_manager/tasks/ManualPositionSmoothVel/libFlightTaskManualPositionSmoothVel.a src/modules/flight_mode_manager/tasks/ManualPosition/libFlightTaskManualPosition.a src/lib/collision_prevention/libCollisionPrevention.a src/modules/flight_mode_manager/tasks/Transition/libFlightTaskTransition.a src/modules/flight_mode_manager/tasks/AutoFollowTarget/libFlightTaskAutoFollowTarget.a src/modules/flight_mode_manager/tasks/Auto/libFlightTaskAuto.a src/lib/weather_vane/libWeatherVane.a src/lib/avoidance/libavoidance.a src/modules/flight_mode_manager/tasks/AutoFollowTarget/follow_target_estimator/libfollow_target_estimator.a src/modules/flight_mode_manager/tasks/Orbit/libFlightTaskOrbit.a src/modules/flight_mode_manager/tasks/ManualAltitudeSmoothVel/libFlightTaskManualAltitudeSmoothVel.a src/modules/flight_mode_manager/tasks/ManualAltitude/libFlightTaskManualAltitude.a src/modules/flight_mode_manager/tasks/Utility/libFlightTaskUtility.a src/modules/flight_mode_manager/tasks/FlightTask/libFlightTask.a src/lib/bezier/libbezier.a src/modules/fw_pos_control/launchdetection/liblaunchdetection.a src/lib/npfg/libnpfg.a src/modules/fw_pos_control/runway_takeoff/librunway_takeoff.a src/lib/tecs/libtecs.a src/modules/mc_att_control/AttitudeControl/libAttitudeControl.a src/lib/system_identification/libSystemIdentification.a src/modules/mc_hover_thrust_estimator/libzero_order_hover_thrust_ekf.a src/lib/slew_rate/libSlewRate.a src/lib/controllib/libcontrollib.a src/modules/mc_pos_control/PositionControl/libPositionControl.a src/modules/mc_pos_control/Takeoff/libTakeoff.a src/lib/rate_control/libRateControl.a src/modules/navigator/MissionFeasibility/libmission_feasibility_checker.a src/modules/navigator/libmodules__navigator.a src/modules/navigator/MissionFeasibility/libmission_feasibility_checker.a src/lib/motion_planning/libmotion_planning.a src/lib/adsb/libadsb.a src/modules/navigator/GeofenceBreachAvoidance/libgeofence_breach_avoidance.a src/modules/dataman/libmodules__dataman.a src/lib/hysteresis/libhysteresis.a src/lib/l1/libl1.a src/lib/pid/libpid.a src/lib/airspeed/libairspeed.a src/modules/sensors/vehicle_imu/libvehicle_imu.a src/modules/sensors/vehicle_acceleration/libvehicle_acceleration.a src/modules/sensors/vehicle_air_data/libvehicle_air_data.a src/modules/sensors/vehicle_angular_velocity/libvehicle_angular_velocity.a src/modules/sensors/vehicle_gps_position/libvehicle_gps_position.a src/modules/sensors/vehicle_magnetometer/libvehicle_magnetometer.a src/lib/sensor_calibration/libsensor_calibration.a src/modules/sensors/data_validator/libdata_validator.a src/modules/sensors/vehicle_optical_flow/libvehicle_optical_flow.a src/lib/mixer_module/libmixer_module.a src/lib/drivers/magnetometer/libdrivers_magnetometer.a src/lib/geo/libgeo.a src/lib/drivers/accelerometer/libdrivers_accelerometer.a src/lib/drivers/gyroscope/libdrivers_gyroscope.a src/lib/conversion/libconversion.a src/lib/mathlib/libmathlib.a src/lib/timesync/libtimesync.a src/modules/uxrce_dds_client/lib/libmicroxrcedds_client.a src/modules/uxrce_dds_client/lib/libmicrocdr.a src/lib/tunes/libtunes.a src/lib/circuit_breaker/libcircuit_breaker.a src/lib/version/libversion.a src/lib/systemlib/libsystemlib.a src/lib/parameters/libparameters.a src/lib/perf/libperf.a src/lib/tinybson/libtinybson.a src/lib/parameters/flashparams/libflashparams.a NuttX/nuttx/arch/arm/src/libarch.a boards/px4/fmu-v5/src/libdrivers_board.a platforms/nuttx/src/px4/stm/stm32f7/board_reset/libarch_board_reset.a platforms/nuttx/src/px4/common/libpx4_layer.a src/lib/drivers/device/libdrivers__device.a platforms/nuttx/src/px4/stm/stm32f7/io_pins/libarch_io_pins.a platforms/nuttx/src/px4/stm/stm32f7/spi/libarch_spi.a src/lib/drivers/led/libdrivers__led.a NuttX/nuttx/arch/arm/src/libarch.a boards/px4/fmu-v5/src/libdrivers_board.a platforms/nuttx/src/px4/stm/stm32f7/board_reset/libarch_board_reset.a platforms/nuttx/src/px4/common/libpx4_layer.a src/lib/drivers/device/libdrivers__device.a platforms/nuttx/src/px4/stm/stm32f7/io_pins/libarch_io_pins.a platforms/nuttx/src/px4/stm/stm32f7/spi/libarch_spi.a src/lib/drivers/led/libdrivers__led.a platforms/nuttx/src/px4/stm/stm32f7/hrt/libarch_hrt.a platforms/nuttx/src/px4/stm/stm32f7/board_hw_info/libarch_board_hw_info.a platforms/nuttx/src/px4/stm/stm32f7/adc/libarch_adc.a src/lib/crc/libcrc.a boards/px4/fmu-v5/src/libboard_bus_info.a platforms/common/libpx4_platform.a platforms/nuttx/src/px4/stm/stm32f7/board_critmon/libarch_board_critmon.a platforms/nuttx/src/px4/stm/stm32f7/version/libarch_version.a platforms/common/uORB/libuORB.a NuttX/nuttx/mm/libmm.a src/lib/cdev/libcdev.a NuttX/nuttx/fs/libfs.a msg/libuorb_msgs.a platforms/common/px4_work_queue/libpx4_work_queue.a NuttX/nuttx/libs/libxx/libxx.a NuttX/nuttx/drivers/libdrivers.a NuttX/nuttx/libs/libc/libc.a NuttX/nuttx/drivers/libdrivers.a NuttX/nuttx/libs/libc/libc.a NuttX/nuttx/sched/libsched.a -lm -lgcc -o px4_fmu-v5_default.elf Memory region Used Size Region Size %age Used FLASH_ITCM: 0 GB 2016 KB 0.00% FLASH_AXIM: 2064841 B 2016 KB100.02% ITCM_RAM: 0 GB 16 KB 0.00% DTCM_RAM: 0 GB 128 KB 0.00% SRAM1: 48472 B 368 KB 12.86% SRAM2: 0 GB 16 KB 0.00/opt/gcc-arm-none-eabi-9-2020-q2-update/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: px4_fmu-v5_default.elf section `.data' will not fit in region `FLASH_AXIM' /opt/gcc-arm-none-eabi-9-2020-q2-update/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: region `FLASH_AXIM' overflowed by 457 bytes collect2: error: ld returned 1 exit status %
```
In WSL2, after typing "arm-none-eabi-g++ --version", I have
```
arm-none-eabi-g++ (GNU Arm Embedded Toolchain 9-2020-q2-update) 9.3.1 20200408 (release)
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
```
How should I resolve this problem? Thanks.