Skip to content

Request release #35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
David-OConnor opened this issue Feb 24, 2024 · 10 comments · Fixed by #36
Closed

Request release #35

David-OConnor opened this issue Feb 24, 2024 · 10 comments · Fixed by #36

Comments

@David-OConnor
Copy link

David-OConnor commented Feb 24, 2024

So deps can release on Crates.io. Thx! #33

@tomioe
Copy link

tomioe commented Mar 14, 2024

+1

The examples linked in this repo's README to the HAL Examples are no longer compiling, since stm32-usbd on crates.io (v 0.6.0) has an old dependency for usb-device (0.2.X, needs to be bumped as per #33).

For those struggling with getting it to compile, here's what I did:

cd /opt
git clone https://github.com/stm32-rs/stm32f3xx-hal
git clone https://github.com/stm32-rs/stm32-usbd

Modify Cargo.toml in stm32f3xx-hal from stm32-usbd = { version = "0.6.0", optional = true } to stm32-usbd = { version = "0.6.0", optional = true, path="../stm32-usbd" }.

And in your project utilizing stm32f3xx-hal, modify Cargo.toml to e.g. stm32f3xx-hal = { version = "0.10.0", features = ["stm32f303xc", "usb", "rt" ], path="/opt/stm32f3xx-hal/Cargo.toml" }

Since usb-device changed the way it builds as per v0.3.0, you also need to change your code to:

use usb_device::LangID;
use usb_device::device::StringDescriptors;

let mut usb_dev = UsbDeviceBuilder::new(&usb_bus, UsbVidPid(0x1234, 0x1234))
        .strings(&[StringDescriptors::default()
            .manufacturer("Test")
            .product("Test")
            .serial_number("Test")])
        .unwrap()
        .self_powered(false)
        .max_power(250)
        .unwrap()
        .build();

@dlaw
Copy link

dlaw commented Mar 29, 2024

I am successfully using this version of stm32-usbd on real hardware (STM32G473CCT6) with the following Cargo.toml override:

[patch.crates-io]
stm32-usbd = { git = "https://github.com/stm32-rs/stm32-usbd.git" }

as well as the change to use StringDescriptors as described by tomioe.

@funbiscuit
Copy link

I confirm current version from master is working properly on blue pill (STM32F103C8T6) with changes from comments above. Tested as virtual com port. Should we expect new version released any time soon?

@David-OConnor
Copy link
Author

What's the word? Should I fork and release this as a new crate?

@David-OConnor
Copy link
Author

I published a fork; same as current master, but on crates.io. This allows you to use it as a dependency of a different released crate. https://crates.io/crates/stm32-usbd2

stm32-usbd = { package = "stm32-usbd2", version = "^0.7.0" }

@sunsided
Copy link

Just stumbled over the same issue, @dlaw's solution here also helped me for the time being.

@sunsided
Copy link

I published a fork; same as current master, but on crates.io. This allows you to use it as a dependency of a different released crate. https://crates.io/crates/stm32-usbd2

stm32-usbd = { package = "stm32-usbd2", version = "^0.7.0" }

@David-OConnor Make it a pull request! 😬

@David-OConnor
Copy link
Author

David-OConnor commented Jun 29, 2024

I published a fork; same as current master, but on crates.io. This allows you to use it as a dependency of a different released crate. https://crates.io/crates/stm32-usbd2

stm32-usbd = { package = "stm32-usbd2", version = "^0.7.0" }

@David-OConnor Make it a pull request! 😬

What do you mean?

@sunsided
Copy link

@David-OConnor Might be easier to get a release here if all it takes is merging the version bump. I'm just hoping.

@David-OConnor
Copy link
Author

David-OConnor commented Jun 30, 2024

It doesn't take any merge - whoever owns the crate just needs to do it by running cargo publish

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants