PX4 / PX4-user_guide

PX4 User Guide
https://docs.px4.io/main/en/index.html
Other
327 stars 1.7k forks source link

Crazyflie2.0 how to config "make bitcraze_crazyflie_default qconfig" #576

Closed waytry closed 5 years ago

waytry commented 5 years ago

Crazyflie 2.0 · PX4 User Guide has the following

If QGroundControl does not connect with the vehicle, ensure that in nuttx-config for crazyflie # CONFIG_DEV_LOWCONSOLE is not set is replaced by CONFIG_DEV_LOWCONSOLE=y. This should be done using menuconfig:

make bitcraze_crazyflie_default menuconfig or qconfig (Check Low-level console support under Serial Driver Support in GUI):

make bitcraze_crazyflie_default qconfig

Everything worked fine and "make bitcraze_crazyflie_default upload" was successful initially. But after I

Check Low-level console support under Serial Driver Support in GUI

and "make bitcraze_crazyflie_default upload" again, I received the following error message:

pan@pan-VB:~/src/Firmware$ make bitcraze_crazyflie_default upload -- PX4 version: v1.10.0-beta1-87-g78bf12f0db -- PX4 config file: /home/pan/src/Firmware/boards/bitcraze/crazyflie/default.cmake -- PX4 config: bitcraze_crazyflie_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: /home/pan/gcc-arm-none-eabi-7-2017-q4-major/bin/arm-none-eabi-gcc -- Check for working CXX compiler: /home/pan/gcc-arm-none-eabi-7-2017-q4-major/bin/arm-none-eabi-g++ -- Check for working CXX compiler: /home/pan/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: /home/pan/gcc-arm-none-eabi-7-2017-q4-major/bin/arm-none-eabi-gcc -- Check for working C compiler: /home/pan/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 -- Found PythonInterp: /usr/bin/python (found version "2.7.15") -- Found PY_jinja2: /usr/local/lib/python2.7/dist-packages/jinja2
-- PX4 ECL: Very lightweight Estimation & Control Library v1.9.0-rc1-30-g3b32ee4 -- ROMFS: px4fmu_common -- ROMFS: Adding rc.board_defaults -- ROMFS: Adding rc.board_sensors -- Configuring done -- Generating done -- Build files have been written to: /home/pan/src/Firmware/build/bitcraze_crazyflie_default [0/689] git submodule platforms/nuttx/NuttX/nuttx [1/689] git submodule platforms/nuttx/NuttX/apps [2/689] git submodule src/lib/ecl [7/689] git submodule src/drivers/gps/devices [8/689] git submodule mavlink/include/mavlink/v2.0 [686/689] Linking CXX executable bitcraze_crazyflie_default.elf FAILED: bitcraze_crazyflie_default.elf : && /home/pan/gcc-arm-none-eabi-7-2017-q4-major/bin/arm-none-eabi-g++ -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -Os -DNDEBUG --specs=nosys.specs platforms/nuttx/CMakeFiles/px4.dir//common/empty.c.obj -o bitcraze_crazyflie_default.elf -L/home/pan/src/Firmware/build/bitcraze_crazyflie_default/external/Install/lib -nostartfiles -nodefaultlibs -nostdlib -nostdinc++ -fno-exceptions -fno-rtti -Wl,--script=/home/pan/src/Firmware/build/bitcraze_crazyflie_default/NuttX/nuttx-config/scripts/script.ld -Wl,-Map=bitcraze_crazyflie_default.map -Wl,--warn-common -Wl,--gc-sections -Wl,--start-group src/drivers/boards/common/stm32/libdrivers_boards_common_arch.a NuttX/apps/libapps.a NuttX/nuttx/arch/arm/src/libarch.a NuttX/nuttx/binfmt/libbinfmt.a NuttX/nuttx/libs/libc/libc.a NuttX/nuttx/configs/libconfigs.a NuttX/nuttx/libs/libxx/libxx.a NuttX/nuttx/drivers/libdrivers.a NuttX/nuttx/fs/libfs.a NuttX/nuttx/mm/libmm.a NuttX/nuttx/sched/libsched.a -Wl,--end-group -lm -lgcc src/modules/uORB/libmodulesuORB.a boards/bitcraze/crazyflie/syslink/libmodulessyslink.a src/drivers/barometer/lps25h/libdrivers__lps25h.a src/drivers/distance_sensor/vl53lxx/libdriversvl53lxx.a src/drivers/gps/libdriversgps.a src/drivers/imu/mpu9250/libdriversmpu9250.a src/drivers/optical_flow/pmw3901/libdriversoptical_flowpmw3901.a src/drivers/px4fmu/libdriverspx4fmu.a src/modules/attitude_estimator_q/libmodules__attitude_estimator_q.a src/modules/camera_feedback/libmodulescamera_feedback.a src/modules/commander/libmodulescommander.a src/modules/dataman/libmodulesdataman.a src/modules/ekf2/libmodulesekf2.a src/modules/events/libmodulesevents.a src/modules/land_detector/libmodulesland_detector.a src/modules/landing_target_estimator/libmodules__landing_target_estimator.a src/modules/load_mon/libmodulesload_mon.a src/modules/local_position_estimator/libmoduleslocal_position_estimator.a src/modules/logger/libmoduleslogger.a src/modules/mavlink/libmodulesmavlink.a src/modules/mc_att_control/libmodulesmc_att_control.a src/modules/mc_pos_control/libmodulesmc_pos_control.a src/modules/navigator/libmodulesnavigator.a src/modules/sensors/libmodulessensors.a src/modules/sih/libmodulessih.a src/modules/airspeed_selector/libmodulesairspeed_selector.a src/systemcmds/bl_update/libsystemcmdsbl_update.a src/systemcmds/config/libsystemcmdsconfig.a src/systemcmds/dumpfile/libsystemcmdsdumpfile.a src/systemcmds/esc_calib/libsystemcmdsesc_calib.a src/systemcmds/hardfault_log/libsystemcmdshardfault_log.a src/systemcmds/i2cdetect/libsystemcmdsi2cdetect.a src/systemcmds/led_control/libsystemcmds__led_control.a src/systemcmds/mixer/libsystemcmdsmixer.a src/systemcmds/motor_ramp/libsystemcmdsmotor_ramp.a src/systemcmds/motor_test/libsystemcmdsmotor_test.a src/systemcmds/mtd/libsystemcmdsmtd.a src/systemcmds/nshterm/libsystemcmdsnshterm.a src/systemcmds/param/libsystemcmdsparam.a src/systemcmds/perf/libsystemcmdsperf.a src/systemcmds/pwm/libsystemcmdspwm.a src/systemcmds/reboot/libsystemcmdsreboot.a src/systemcmds/reflect/libsystemcmdsreflect.a src/systemcmds/sd_bench/libsystemcmds__sd_bench.a src/systemcmds/shutdown/libsystemcmdsshutdown.a src/systemcmds/top/libsystemcmdstop.a src/systemcmds/topic_listener/libsystemcmdstopic_listener.a src/systemcmds/tune_control/libsystemcmdstune_control.a src/systemcmds/usb_connected/libsystemcmds__usb_connected.a src/systemcmds/ver/libsystemcmdsver.a ROMFS/libromfs.a platforms/nuttx/src/px4/stm/stm32f4/io_pins/libarch_io_pins.a src/lib/mixer_module/libmixer_module.a src/lib/output_limit/liboutput_limit.a src/lib/DriverFramework/framework/src/libdf_driver_framework.a src/modules/commander/failure_detector/libfailure_detector.a src/lib/ecl/EKF/libecl_EKF.a src/lib/ecl/geo_lookup/libecl_geo_lookup.a src/lib/circuit_breaker/libcircuit_breaker.a src/modules/mc_att_control/AttitudeControl/libAttitudeControl.a src/lib/controllib/libcontrollib.a src/lib/FlightTasks/libFlightTasks.a src/lib/FlightTasks/tasks/ManualAltitudeSmoothVel/libFlightTaskManualAltitudeSmoothVel.a src/lib/FlightTasks/tasks/ManualPositionSmooth/libFlightTaskManualPositionSmooth.a src/lib/FlightTasks/tasks/ManualPositionSmoothVel/libFlightTaskManualPositionSmoothVel.a src/lib/FlightTasks/tasks/ManualPosition/libFlightTaskManualPosition.a src/lib/FlightTasks/tasks/AutoLine/libFlightTaskAutoLine.a src/lib/FlightTasks/tasks/AutoMapper/libFlightTaskAutoMapper.a src/lib/FlightTasks/tasks/AutoLineSmoothVel/libFlightTaskAutoLineSmoothVel.a src/lib/FlightTasks/tasks/AutoMapper2/libFlightTaskAutoMapper2.a src/lib/FlightTasks/tasks/AutoFollowMe/libFlightTaskAutoFollowMe.a src/lib/FlightTasks/tasks/Auto/libFlightTaskAuto.a src/lib/FlightTasks/tasks/Offboard/libFlightTaskOffboard.a src/lib/FlightTasks/tasks/Failsafe/libFlightTaskFailsafe.a src/lib/FlightTasks/tasks/Transition/libFlightTaskTransition.a src/lib/FlightTasks/tasks/Orbit/libFlightTaskOrbit.a src/lib/FlightTasks/tasks/ManualAltitudeSmooth/libFlightTaskManualAltitudeSmooth.a src/lib/FlightTasks/tasks/ManualAltitude/libFlightTaskManualAltitude.a src/lib/FlightTasks/tasks/Manual/libFlightTaskManual.a src/lib/FlightTasks/tasks/Utility/libFlightTaskUtility.a src/lib/hysteresis/libhysteresis.a src/lib/FlightTasks/tasks/FlightTask/libFlightTask.a src/lib/WeatherVane/libWeatherVane.a src/lib/CollisionPrevention/libCollisionPrevention.a src/modules/mc_pos_control/Takeoff/libTakeoff.a src/lib/ecl/geo/libecl_geo.a src/lib/landing_slope/liblanding_slope.a src/lib/airspeed/libairspeed.a src/lib/conversion/libconversion.a src/lib/battery/libbattery.a src/lib/ecl/validation/libecl_validation.a src/modules/sensors/vehicle_acceleration/libsensorsvehicle_acceleration.a src/modules/sensors/vehicle_angular_velocity/libsensorsvehicle_angular_velocity.a src/lib/drivers/accelerometer/libdrivers_accelerometer.a src/lib/drivers/gyroscope/libdrivers_gyroscope.a src/lib/drivers/magnetometer/libdrivers_magnetometer.a src/lib/mathlib/libmathlib.a src/lib/drivers/barometer/libdrivers_barometer.a src/lib/AirspeedValidator/libAirspeedValidator.a src/lib/ecl/airdata/libecl_airdata.a src/lib/mixer/libmixer.a src/lib/tunes/libtunes.a src/lib/version/libversion.a src/drivers/boards/common/stm32/libdrivers_boards_common_arch.a NuttX/nuttx/arch/arm/src/libarch.a src/modules/uORB/libmodulesuORB.a boards/bitcraze/crazyflie/src/libdrivers_board.a src/drivers/boards/common/libdrivers_boards_common.a platforms/nuttx/src/px4/stm/stm32f4/hrt/libarch_hrt.a platforms/nuttx/src/px4/common/libpx4_layer.a platforms/common/libpx4_platform.a src/lib/systemlib/libsystemlib.a src/lib/cdev/libcdev.a platforms/common/px4_work_queue/libpx4_work_queue.a src/lib/drivers/device/libdriversdevice.a src/lib/drivers/led/libdriversled.a src/lib/parameters/libparameters.a src/lib/parameters/flashparams/libflashparams.a src/drivers/boards/common/stm32/libdrivers_boards_common_arch.a NuttX/nuttx/arch/arm/src/libarch.a src/modules/uORB/libmodulesuORB.a boards/bitcraze/crazyflie/src/libdrivers_board.a src/drivers/boards/common/libdrivers_boards_common.a platforms/nuttx/src/px4/stm/stm32f4/hrt/libarch_hrt.a platforms/nuttx/src/px4/common/libpx4_layer.a platforms/common/libpx4_platform.a src/lib/systemlib/libsystemlib.a src/lib/cdev/libcdev.a platforms/common/px4_work_queue/libpx4_work_queue.a src/lib/drivers/device/libdriversdevice.a src/lib/drivers/led/libdriversled.a src/lib/parameters/libparameters.a src/lib/parameters/flashparams/libflashparams.a NuttX/apps/libapps.a NuttX/nuttx/libs/libxx/libxx.a NuttX/nuttx/libs/libc/libc.a NuttX/nuttx/drivers/libdrivers.a NuttX/nuttx/fs/libfs.a NuttX/nuttx/mm/libmm.a NuttX/nuttx/sched/libsched.a -lm -lgcc msg/libuorb_msgs.a src/lib/perf/libperf.a src/lib/parameters/tinybson/libtinybson.a && : boards/bitcraze/crazyflie/src/libdrivers_board.a(init.c.obj): In function board_app_initialize': /home/pan/src/Firmware/build/bitcraze_crazyflie_default/../../boards/bitcraze/crazyflie/src/init.c:173: undefined reference tostm32_serial_dma_poll' collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed. Makefile:193: recipe for target 'bitcraze_crazyflie_default' failed make: *** [bitcraze_crazyflie_default] Error 1

It seems like it's something related to the _undefined reference to `stm32_serial_dmapoll', can anyone help me with this? Thanks!

To reproduce: platform: Ubuntu 18.04

git clone https://github.com/PX4/Firmware.git

make bitcraze_crazyflie_default qconfig

Check Low-level console support under Serial Driver Support in GUI

make bitcraze_crazyflie_default upload
hamishwillee commented 5 years ago

This sounds like a bug. Can you please post in https://github.com/PX4/Firmware/issues/.

Note that there other other bugs that might be relevant

hamishwillee commented 5 years ago

(and cross link to this!)

waytry commented 5 years ago

@hamishwillee Thanks for the reply. The issue is posed here.