Example model overflows board's flash memory, which is the same reported to be used in the example

4 Ansichten (letzte 30 Tage)
Hi all,
I am trying to run HITL simulation as in the example ( https://it.mathworks.com/help/uav/px4/ref/px4-hitl-simulation-visualization-vtol.html ) .
I'm using a Cube orange board; the example uses a Cubeorange+, both boards have the same flash memory(2MB). Despite this, the region "flash" keeps being overflowed while trying to build and deploy the model.
No modifications were made in the control model from the example.
Here i post the build summary:
Error:Generating ELF failed for command /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/fil_bk/mypx4/PX4-Autopilot/boards/cubepilot/cubeorange/nuttx-config/scripts/script.ld -Wl,-Map=cubepilot_cubeorange_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/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/imu/analog_devices/adis16448/libdrivers__imu__analog_devices__adis16448.a src/drivers/imu/invensense/icm20602/libdrivers__imu__invensense__icm20602.a src/drivers/imu/invensense/icm20649/libdrivers__imu__invensense__icm20649.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/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/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/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/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/transponder/sagetech_mxs/libdrivers__transponder__sagetech_mxs.a src/drivers/uavcan/libdrivers__uavcan.a src/modules/airspeed_selector/libmodules__airspeed_selector.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/gyro_fft/libmodules__gyro_fft.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/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/sensors/libmodules__sensors.a src/modules/temperature_compensation/libmodules__temperature_compensation.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/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/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 ROMFS/libromfs.a platforms/nuttx/src/px4/stm/stm32h7/adc/libarch_adc.a platforms/nuttx/src/px4/stm/stm32h7/dshot/libarch_dshot.a platforms/nuttx/src/px4/stm/stm32h7/px4io_serial/libarch_px4io_serial.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/stm32h7/tone_alarm/libarch_tone_alarm.a src/lib/drivers/rangefinder/libdrivers_rangefinder.a src/lib/mixer_module/libmixer_module.a src/lib/led/libled.a src/lib/button/libbutton_publisher.a src/drivers/uavcan/libuavcan_drivers/libuavcan_stm32h7_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/lib/drivers/accelerometer/libdrivers_accelerometer.a src/lib/drivers/gyroscope/libdrivers_gyroscope.a src/lib/drivers/magnetometer/libdrivers_magnetometer.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/modules/mc_pos_control/PositionControl/libPositionControl.a src/modules/mc_pos_control/Takeoff/libTakeoff.a src/lib/controllib/libcontrollib.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/adsb/libadsb.a src/lib/motion_planning/libmotion_planning.a src/modules/navigator/GeofenceBreachAvoidance/libgeofence_breach_avoidance.a src/modules/dataman/libmodules__dataman.a src/lib/hysteresis/libhysteresis.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/lib/geo/libgeo.a src/modules/sensors/vehicle_magnetometer/libvehicle_magnetometer.a src/lib/sensor_calibration/libsensor_calibration.a src/lib/conversion/libconversion.a src/modules/sensors/data_validator/libdata_validator.a src/modules/sensors/vehicle_optical_flow/libvehicle_optical_flow.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/cubepilot/cubeorange/src/libdrivers_board.a platforms/nuttx/src/px4/stm/stm32h7/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/stm32h7/io_pins/libarch_io_pins.a platforms/nuttx/src/px4/stm/stm32h7/spi/libarch_spi.a src/lib/drivers/led/libdrivers__led.a NuttX/nuttx/arch/arm/src/libarch.a boards/cubepilot/cubeorange/src/libdrivers_board.a platforms/nuttx/src/px4/stm/stm32h7/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/stm32h7/io_pins/libarch_io_pins.a platforms/nuttx/src/px4/stm/stm32h7/spi/libarch_spi.a src/lib/drivers/led/libdrivers__led.a platforms/nuttx/src/px4/stm/stm32h7/hrt/libarch_hrt.a platforms/common/libpx4_platform.a platforms/common/px4_work_queue/libpx4_work_queue.a platforms/nuttx/src/px4/stm/stm32h7/board_critmon/libarch_board_critmon.a platforms/nuttx/src/px4/stm/stm32h7/version/libarch_version.a platforms/common/uORB/libuORB.a NuttX/nuttx/mm/libmm.a src/lib/cdev/libcdev.a NuttX/nuttx/fs/libfs.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 -lgcc msg/libuorb_msgs.a -lm -o cubepilot_cubeorange_default.elf with error
Memory region Used Size Region Size %age Used
ITCM_RAM: 0 GB 64 KB 0.00%
FLASH: 2018144 B 1920 KB102.65%
DTCM1_RAM: 0 GB 64 KB 0.00%
DTCM2_RAM: 0 GB 64 KB 0.00%
AXI_SRAM: 54656 B 512 KB 10.42%
SRAM1: 0 GB 128 KB 0.00%
SRAM2: 0 GB 128 KB 0.00%
SRAM3: 0 GB 32 KB 0.00%
SRAM4: 0 GB 64 KB 0.00%
BKPRAM: 0 GB 4 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: cubepilot_cubeorange_default.elf section `.text' will not fit in region `FLASH'
/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' overflowed by 52064 bytes
collect2: error: ld returned 1 exit status
What can i possibly be getting wrong?
I suspect this is linked to the modules added in PX4v1.14 from previous versions which the example was(probably) made with. Errors in HITL are also reported in gazebo environment eventually for this reason ( https://discuss.px4.io/t/sih-is-disabled-with-the-cube-orange-plus-is-it-a-good-idea-to-enable-it/36593 ).
Thanks.

Antworten (1)

Ankur Bose
Ankur Bose am 14 Mai 2024
Can you try using the cubepilot_cubeorange_multicopter build configuration in hardware setup screens instead of the default one?
  1 Kommentar
Fil_Bk
Fil_Bk am 16 Mai 2024
Bearbeitet: Fil_Bk am 16 Mai 2024
I was able to solve the problem by disactivataing some modules in the default.px4board ;
Unfortunatelly some modules which are necessary for hitl simulation as hil_actuators are by default disactivated on the cubeorange configurations in recent releases of px4 in rder to save memory, according to some posts in the PX4 community.
I was able to start the simulation by adding back:CONFIG_MODULES_SIMULATION_PWM_OUT_SIM=y
Currently i'm still not able to run correctly the example.
Since i can't access( am i missing something?) any documentation explaining on which topic the module simulink app is pubblishing or reading it's pretty hard to understand what's going on.

Melden Sie sich an, um zu kommentieren.

Produkte


Version

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by