【px4编译】make px4fmu-v3_default upload 不能使用

今天遇到编译pixhawk2代固件无法upload的问题,出现TypeError: a bytes-like object is required, not ‘str’,在1代中是可以make upload的

【px4编译】make px4fmu-v3_default upload 不能使用_第1张图片

ninja: Entering directory `/home/cigit-sjj/Study/InterNav/Firmware/build/nuttx_px4fmu-v3_default’
[1/1] uploading px4
Loaded firmware for 9,0, size: 1595536 bytes, waiting for the bootloader…
Found board 9,0 bootloader rev 5 on /dev/serial/by-id/usb-3D_Robotics_PX4_BL_FMU_v2.x_0-if00
ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff type: ÿÿÿÿ
idtype: =FF
vid: ffffffff
pid: ffffffff
coa: //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8=

sn: 003600303036511135323931
chip: 20016419
Traceback (most recent call last):
File “/home/cigit-sjj/Study/InterNav/Firmware/Tools/px_uploader.py”, line 766, in
main()
File “/home/cigit-sjj/Study/InterNav/Firmware/Tools/px_uploader.py”, line 740, in main
up.upload(fw, force=args.force, boot_delay=args.boot_delay)
File “/home/cigit-sjj/Study/InterNav/Firmware/Tools/px_uploader.py”, line 529, in upload
des = self.__getCHIPDes()
File “/home/cigit-sjj/Study/InterNav/Firmware/Tools/px_uploader.py”, line 327, in __getCHIPDes
peices = value.split(",")
TypeError: a bytes-like object is required, not ‘str’
FAILED: cd /home/cigit-sjj/Study/InterNav/Firmware/build/nuttx_px4fmu-v3_default/platforms/nuttx && /usr/bin/python /home/cigit-sjj/Study/InterNav/Firmware/Tools/px_uploader.py --port “/dev/serial/by-id/PX4,/dev/serial/by-id/usb-3D_Robotics*,/dev/serial/by-id/usb-The_Autopilot*,/dev/serial/by-id/usb-Bitcraze*,/dev/serial/by-id/pci-3D_Robotics*,/dev/serial/by-id/pci-Bitcraze*,/dev/serial/by-id/usb-Gumstix*” /home/cigit-sjj/Study/InterNav/Firmware/build/nuttx_px4fmu-v3_default/px4fmu-v3_default.px4
ninja: build stopped: subcommand failed.
Makefile:154: recipe for target ‘px4fmu-v3_default’ failed
make: *** [px4fmu-v3_default] Error 1

将python 版本 ln -s 为python2即可,如你也遇到此问题,欢迎留言交流。

你可能感兴趣的:(PX4编译)