sourcebox / dfu-buddy Goto Github PK
View Code? Open in Web Editor NEWCross-platform GUI utility for device firmware updates (DFU) via USB.
License: MIT License
Cross-platform GUI utility for device firmware updates (DFU) via USB.
License: MIT License
Hi,
I tried to install dfu-buddy directly with cargo as follows:
cargo install --git https://github.com/sourcebox/dfu-buddy.git
At the end, failed to build! here is the error:
warning: constant is never used: `DFU_DETACH`
--> src/dfudev/mod.rs:38:5
|
38 | pub const DFU_DETACH: (u8, u8) = (0b00100001, 0);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
warning: constant is never used: `DFU_GETSTATE`
--> src/dfudev/mod.rs:53:5
|
53 | pub const DFU_GETSTATE: (u8, u8) = (0b10100001, 5);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: associated function is never used: `detach_request`
--> src/dfudev/mod.rs:177:12
|
177 | pub fn detach_request(&self) -> Result<()> {
| ^^^^^^^^^^^^^^
warning: associated function is never used: `getstate_request`
--> src/dfudev/mod.rs:258:12
|
258 | pub fn getstate_request(&self) -> Result<u8> {
| ^^^^^^^^^^^^^^^^
error: linking with `cc` failed: exit status: 1
|
= note: "cc" "-m64" "/tmp/user/0/cargo-installoNJ4ML/release/deps/dfu_buddy-c3bca0bb5ae2c96b.dfu_buddy.1eea4f16-cgu.4.rcgu.o" "-Wl,--as-needed" "-L" "/tmp/user/0/cargo-installoNJ4ML/release/deps" "-L" "/usr/lib/x86_64-linux-gnu" "-L" "/tmp/user/0/cargo-installoNJ4ML/release/build/libusb1-sys-89a7be1a6cacd997/out" "-L" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/tmp/user/0/rustccP8Jms/liblibusb1_sys-e107512a51785f53.rlib" "-Wl,--start-group" "-Wl,--end-group" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-193639af6eef1fd0.rlib" "-Wl,-Bdynamic" "-lgtk-3" "-lgdk-3" "-lpangocairo-1.0" "-lpango-1.0" "-lharfbuzz" "-latk-1.0" "-lcairo-gobject" "-lcairo" "-lgdk_pixbuf-2.0" "-lgio-2.0" "-lgobject-2.0" "-lglib-2.0" "-lgdk-3" "-lpangocairo-1.0" "-lpango-1.0" "-lharfbuzz" "-lgdk_pixbuf-2.0" "-lcairo-gobject" "-lcairo" "-lgobject-2.0" "-lglib-2.0" "-lpango-1.0" "-lgobject-2.0" "-lglib-2.0" "-lharfbuzz" "-lgdk_pixbuf-2.0" "-lgobject-2.0" "-lglib-2.0" "-lgio-2.0" "-lgobject-2.0" "-lglib-2.0" "-lcairo" "-latk-1.0" "-lgobject-2.0" "-lglib-2.0" "-lgobject-2.0" "-lglib-2.0" "-lgobject-2.0" "-lglib-2.0" "-lxcb" "-lxcb-render" "-lxcb-shape" "-lxcb-xfixes" "-ldl" "-ludev" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/tmp/user/0/cargo-installoNJ4ML/release/deps/dfu_buddy-c3bca0bb5ae2c96b" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-Wl,-O1" "-nodefaultlibs"
= note: /usr/bin/ld: /tmp/user/0/cargo-installoNJ4ML/release/deps/dfu_buddy-c3bca0bb5ae2c96b.dfu_buddy.1eea4f16-cgu.4.rcgu.o: in function `dfu_buddy::dfudev::DfuDevice::find':
dfu_buddy.1eea4f16-cgu.4:(.text._ZN9dfu_buddy6dfudev9DfuDevice4find17hf5fdd9bcc1de1869E+0x7b): undefined reference to `libusb_get_device_list'
/usr/bin/ld: dfu_buddy.1eea4f16-cgu.4:(.text._ZN9dfu_buddy6dfudev9DfuDevice4find17hf5fdd9bcc1de1869E+0xec): undefined reference to `libusb_ref_device'
/usr/bin/ld: dfu_buddy.1eea4f16-cgu.4:(.text._ZN9dfu_buddy6dfudev9DfuDevice4find17hf5fdd9bcc1de1869E+0x100): undefined reference to `libusb_get_device_descriptor'
/usr/bin/ld: dfu_buddy.1eea4f16-cgu.4:(.text._ZN9dfu_buddy6dfudev9DfuDevice4find17hf5fdd9bcc1de1869E+0x10d): undefined reference to `libusb_unref_device'
/usr/bin/ld: dfu_buddy.1eea4f16-cgu.4:(.text._ZN9dfu_buddy6dfudev9DfuDevice4find17hf5fdd9bcc1de1869E+0x130): undefined reference to `libusb_free_config_descriptor'
/usr/bin/ld: dfu_buddy.1eea4f16-cgu.4:(.text._ZN9dfu_buddy6dfudev9DfuDevice4find17hf5fdd9bcc1de1869E+0x15e): undefined reference to `libusb_get_config_descriptor'
/usr/bin/ld: dfu_buddy.1eea4f16-cgu.4:(.text._ZN9dfu_buddy6dfudev9DfuDevice4find17hf5fdd9bcc1de1869E+0x1e2): undefined reference to `libusb_free_config_descriptor'
/usr/bin/ld: dfu_buddy.1eea4f16-cgu.4:(.text._ZN9dfu_buddy6dfudev9DfuDevice4find17hf5fdd9bcc1de1869E+0x1f8): undefined reference to `libusb_open'
/usr/bin/ld: dfu_buddy.1eea4f16-cgu.4:(.text._ZN9dfu_buddy6dfudev9DfuDevice4find17hf5fdd9bcc1de1869E+0x2dc): undefined reference to `libusb_control_transfer'
/usr/bin/ld: dfu_buddy.1eea4f16-cgu.4:(.text._ZN9dfu_buddy6dfudev9DfuDevice4find17hf5fdd9bcc1de1869E+0x32d): undefined reference to `libusb_unref_device'
/usr/bin/ld: dfu_buddy.1eea4f16-cgu.4:(.text._ZN9dfu_buddy6dfudev9DfuDevice4find17hf5fdd9bcc1de1869E+0x54a): undefined reference to `libusb_get_device_descriptor'
/usr/bin/ld: dfu_buddy.1eea4f16-cgu.4:(.text._ZN9dfu_buddy6dfudev9DfuDevice4find17hf5fdd9bcc1de1869E+0x780): undefined reference to `libusb_get_config_descriptor'
/usr/bin/ld: dfu_buddy.1eea4f16-cgu.4:(.text._ZN9dfu_buddy6dfudev9DfuDevice4find17hf5fdd9bcc1de1869E+0x987): undefined reference to `libusb_free_config_descriptor'
/usr/bin/ld: dfu_buddy.1eea4f16-cgu.4:(.text._ZN9dfu_buddy6dfudev9DfuDevice4find17hf5fdd9bcc1de1869E+0xedd): undefined reference to `libusb_free_device_list'
/usr/bin/ld: dfu_buddy.1eea4f16-cgu.4:(.text._ZN9dfu_buddy6dfudev9DfuDevice4find17hf5fdd9bcc1de1869E+0x10d9): undefined reference to `libusb_unref_device'
/usr/bin/ld: dfu_buddy.1eea4f16-cgu.4:(.text._ZN9dfu_buddy6dfudev9DfuDevice4find17hf5fdd9bcc1de1869E+0x10ec): undefined reference to `libusb_free_device_list'
/usr/bin/ld: dfu_buddy.1eea4f16-cgu.4:(.text._ZN9dfu_buddy6dfudev9DfuDevice4find17hf5fdd9bcc1de1869E+0x1182): undefined reference to `libusb_free_config_descriptor'
/usr/bin/ld: /tmp/user/0/cargo-installoNJ4ML/release/deps/dfu_buddy-c3bca0bb5ae2c96b.dfu_buddy.1eea4f16-cgu.4.rcgu.o: in function `core::ptr::drop_in_place<rusb::device_list::DeviceList<rusb::context::GlobalContext>>':
dfu_buddy.1eea4f16-cgu.4:(.text._ZN4core3ptr86drop_in_place$LT$rusb..device_list..DeviceList$LT$rusb..context..GlobalContext$GT$$GT$17hdbeacc76cd645416E+0xa): undefined reference to `libusb_free_device_list'
/usr/bin/ld: /tmp/user/0/cargo-installoNJ4ML/release/deps/dfu_buddy-c3bca0bb5ae2c96b.dfu_buddy.1eea4f16-cgu.4.rcgu.o: in function `core::ptr::drop_in_place<rusb::config_descriptor::ConfigDescriptor>':
dfu_buddy.1eea4f16-cgu.4:(.text._ZN4core3ptr62drop_in_place$LT$rusb..config_descriptor..ConfigDescriptor$GT$17h2d683adbf7ba153cE+0x5): undefined reference to `libusb_free_config_descriptor'
/usr/bin/ld: /tmp/user/0/cargo-installoNJ4ML/release/deps/dfu_buddy-c3bca0bb5ae2c96b.dfu_buddy.1eea4f16-cgu.4.rcgu.o: in function `core::ptr::drop_in_place<dfu_buddy::dfudev::DfuDevice>':
dfu_buddy.1eea4f16-cgu.4:(.text._ZN4core3ptr49drop_in_place$LT$dfu_buddy..dfudev..DfuDevice$GT$17h33b3c14ea33e49a9E+0x19): undefined reference to `libusb_unref_device'
/usr/bin/ld: /tmp/user/0/cargo-installoNJ4ML/release/deps/dfu_buddy-c3bca0bb5ae2c96b.dfu_buddy.1eea4f16-cgu.4.rcgu.o: in function `core::ptr::drop_in_place<rusb::device::Device<rusb::context::GlobalContext>>':
dfu_buddy.1eea4f16-cgu.4:(.text._ZN4core3ptr77drop_in_place$LT$rusb..device..Device$LT$rusb..context..GlobalContext$GT$$GT$17hd40a732401bfb230E+0x5): undefined reference to `libusb_unref_device'
/usr/bin/ld: /tmp/user/0/cargo-installoNJ4ML/release/deps/dfu_buddy-c3bca0bb5ae2c96b.dfu_buddy.1eea4f16-cgu.4.rcgu.o: in function `dfu_buddy::dfudev::DfuDevice::find_by_id':
dfu_buddy.1eea4f16-cgu.4:(.text._ZN9dfu_buddy6dfudev9DfuDevice10find_by_id17hd3f2ee9f724af6f4E+0x170): undefined reference to `libusb_unref_device'
/usr/bin/ld: /tmp/user/0/cargo-installoNJ4ML/release/deps/dfu_buddy-c3bca0bb5ae2c96b.dfu_buddy.1eea4f16-cgu.4.rcgu.o: in function `dfu_buddy::dfudev::DfuDevice::open':
dfu_buddy.1eea4f16-cgu.4:(.text._ZN9dfu_buddy6dfudev9DfuDevice4open17h039cddf21dc1b4f0E+0x13): undefined reference to `libusb_open'
/usr/bin/ld: /tmp/user/0/cargo-installoNJ4ML/release/deps/dfu_buddy-c3bca0bb5ae2c96b.dfu_buddy.1eea4f16-cgu.4.rcgu.o: in function `dfu_buddy::dfudev::DfuDevice::getstatus_request':
dfu_buddy.1eea4f16-cgu.4:(.text._ZN9dfu_buddy6dfudev9DfuDevice17getstatus_request17hb97438e5e9556897E+0x7b): undefined reference to `libusb_control_transfer'
/usr/bin/ld: /tmp/user/0/cargo-installoNJ4ML/release/deps/dfu_buddy-c3bca0bb5ae2c96b.dfu_buddy.1eea4f16-cgu.4.rcgu.o: in function `rusb::device_handle::DeviceHandle<T>::read_string_descriptor':
dfu_buddy.1eea4f16-cgu.4:(.text._ZN4rusb13device_handle21DeviceHandle$LT$T$GT$22read_string_descriptor17h7edfc41ed013f326E+0xbc): undefined reference to `libusb_control_transfer'
/usr/bin/ld: /tmp/user/0/cargo-installoNJ4ML/release/deps/dfu_buddy-c3bca0bb5ae2c96b.dfu_buddy.1eea4f16-cgu.4.rcgu.o: in function `<rusb::device_handle::DeviceHandle<T> as core::ops::drop::Drop>::drop':
dfu_buddy.1eea4f16-cgu.4:(.text._ZN84_$LT$rusb..device_handle..DeviceHandle$LT$T$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h022cb777e1dd6181E+0xcc): undefined reference to `libusb_release_interface'
/usr/bin/ld: dfu_buddy.1eea4f16-cgu.4:(.text._ZN84_$LT$rusb..device_handle..DeviceHandle$LT$T$GT$$u20$as$u20$core..ops..drop..Drop$GT$4drop17h022cb777e1dd6181E+0x13f): undefined reference to `libusb_close'
/usr/bin/ld: /tmp/user/0/cargo-installoNJ4ML/release/deps/dfu_buddy-c3bca0bb5ae2c96b.dfu_buddy.1eea4f16-cgu.4.rcgu.o: in function `<dfu_buddy::App as epi::App>::setup':
dfu_buddy.1eea4f16-cgu.4:(.text._ZN43_$LT$dfu_buddy..App$u20$as$u20$epi..App$GT$5setup17hf5c2b610e47ee783E+0x5ed): undefined reference to `libusb_has_capability'
/usr/bin/ld: /tmp/user/0/cargo-installoNJ4ML/release/deps/dfu_buddy-c3bca0bb5ae2c96b.dfu_buddy.1eea4f16-cgu.4.rcgu.o: in function `std::sys_common::backtrace::__rust_begin_short_backtrace':
dfu_buddy.1eea4f16-cgu.4:(.text._ZN3std10sys_common9backtrace28__rust_begin_short_backtrace17h91006f7c6a1d1156E+0x2cb): undefined reference to `libusb_control_transfer'
/usr/bin/ld: dfu_buddy.1eea4f16-cgu.4:(.text._ZN3std10sys_common9backtrace28__rust_begin_short_backtrace17h91006f7c6a1d1156E+0x387): undefined reference to `libusb_control_transfer'
/usr/bin/ld: dfu_buddy.1eea4f16-cgu.4:(.text._ZN3std10sys_common9backtrace28__rust_begin_short_backtrace17h91006f7c6a1d1156E+0x8d0): undefined reference to `libusb_control_transfer'
/usr/bin/ld: dfu_buddy.1eea4f16-cgu.4:(.text._ZN3std10sys_common9backtrace28__rust_begin_short_backtrace17h91006f7c6a1d1156E+0x963): undefined reference to `libusb_control_transfer'
/usr/bin/ld: dfu_buddy.1eea4f16-cgu.4:(.text._ZN3std10sys_common9backtrace28__rust_begin_short_backtrace17h91006f7c6a1d1156E+0xb10): undefined reference to `libusb_control_transfer'
/usr/bin/ld: /tmp/user/0/cargo-installoNJ4ML/release/deps/dfu_buddy-c3bca0bb5ae2c96b.dfu_buddy.1eea4f16-cgu.4.rcgu.o:dfu_buddy.1eea4f16-cgu.4:(.text._ZN3std10sys_common9backtrace28__rust_begin_short_backtrace17h91006f7c6a1d1156E+0xd18): more undefined references to `libusb_control_transfer' follow
/usr/bin/ld: /tmp/user/0/cargo-installoNJ4ML/release/deps/dfu_buddy-c3bca0bb5ae2c96b.dfu_buddy.1eea4f16-cgu.4.rcgu.o: in function `_ZN4core3ptr49drop_in_place$LT$dfu_buddy..dfudev..DfuDevice$GT$17h33b3c14ea33e49a9E.3714':
dfu_buddy.1eea4f16-cgu.4:(.text._ZN4core3ptr49drop_in_place$LT$dfu_buddy..dfudev..DfuDevice$GT$17h33b3c14ea33e49a9E.3714+0xab): undefined reference to `libusb_unref_device'
/usr/bin/ld: /tmp/user/0/cargo-installoNJ4ML/release/deps/dfu_buddy-c3bca0bb5ae2c96b.dfu_buddy.1eea4f16-cgu.4.rcgu.o: in function `dfu_buddy::dfudev::dfuse::set_address':
dfu_buddy.1eea4f16-cgu.4:(.text._ZN9dfu_buddy6dfudev5dfuse11set_address17h8ecc693460dc0723E+0x7b): undefined reference to `libusb_control_transfer'
/usr/bin/ld: dfu_buddy.1eea4f16-cgu.4:(.text._ZN9dfu_buddy6dfudev5dfuse11set_address17h8ecc693460dc0723E+0x10f): undefined reference to `libusb_control_transfer'
/usr/bin/ld: dfu_buddy.1eea4f16-cgu.4:(.text._ZN9dfu_buddy6dfudev5dfuse11set_address17h8ecc693460dc0723E+0x1eb): undefined reference to `libusb_control_transfer'
/usr/bin/ld: /tmp/user/0/cargo-installoNJ4ML/release/deps/dfu_buddy-c3bca0bb5ae2c96b.dfu_buddy.1eea4f16-cgu.4.rcgu.o: in function `_ZN4core3ptr49drop_in_place$LT$dfu_buddy..dfudev..DfuDevice$GT$17h33b3c14ea33e49a9E.4236':
dfu_buddy.1eea4f16-cgu.4:(.text._ZN4core3ptr49drop_in_place$LT$dfu_buddy..dfudev..DfuDevice$GT$17h33b3c14ea33e49a9E.4236+0xab): undefined reference to `libusb_unref_device'
/usr/bin/ld: /tmp/user/0/cargo-installoNJ4ML/release/deps/dfu_buddy-c3bca0bb5ae2c96b.dfu_buddy.1eea4f16-cgu.4.rcgu.o: in function `core::ops::function::FnOnce::call_once{{vtable.shim}}':
dfu_buddy.1eea4f16-cgu.4:(.text._ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17hdcfa8ae3b9c78157E+0x16): undefined reference to `libusb_init'
/usr/bin/ld: /tmp/user/0/cargo-installoNJ4ML/release/deps/dfu_buddy-c3bca0bb5ae2c96b.dfu_buddy.1eea4f16-cgu.4.rcgu.o: in function `std::sync::once::Once::call_once::{{closure}}':
dfu_buddy.1eea4f16-cgu.4:(.text._ZN3std4sync4once4Once9call_once28_$u7b$$u7b$closure$u7d$$u7d$17h7e8aba066e6b5305E+0x16): undefined reference to `libusb_init'
collect2: error: ld returned 1 exit status
= help: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
= note: use the `-l` flag to specify native libraries to link
= note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)
warning: `dfu-buddy` (bin "dfu-buddy") generated 4 warnings
error: failed to compile `dfu-buddy v0.1.0 (https://github.com/sourcebox/dfu-buddy.git#8adec2e4)`, intermediate artifacts can be found at `/tmp/user/0/cargo-installoNJ4ML`
Caused by:
could not compile `dfu-buddy` due to previous error; 4 warnings emitted
I already installed all prerequisites:
apt install {libxcb-render0,libxcb-shape0,libxcb-xfixes0,libspeechd,libxkbcommon,libusb}-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libspeechd-dev is already the newest version (0.11.0-1).
libusb-dev is already the newest version (2:0.1.12-32).
libxcb-render0-dev is already the newest version (1.14-3).
libxcb-shape0-dev is already the newest version (1.14-3).
libxcb-xfixes0-dev is already the newest version (1.14-3).
libxkbcommon-dev is already the newest version (1.3.1-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
I am quite stumped here, i have ran the dfu buddy appimage on linux both with and without root, and i cannot find my USB-C bluetooth device listed.
As stated here within the readme, it says that i need to set up the udev rules correctly, but as far as i can tell in the documentation no instructions for how to do this are shown.
Any ideas? Thanks.
Plain DFU is not supported yet, only DfuSe devices like STM32.
Hello,
Can you help me to find some references please what is the difference between DFU and DfuSe?
Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.