Hacker News new | ask | show | jobs
by lochsh 2265 days ago
I don't have experience with this, but from talking to people who do, there are indeed open source implementations. They say the documentation is a bit confusing, but it does describe everything.

This Rust library is an abstract USB library that can implement CDC serial https://docs.rs/usb-device/0.2.5/usb_device/, and this library connects it to the STM32 USB peripheral https://github.com/stm32-rs/stm32-usbd

Examples here: https://github.com/stm32-rs/stm32-usbd-examples

1 comments

those open source libs use undocumented regs documented and thus are based on STM lib. License in question thus
That's what "clean room reverse engineering" is for. If you document what the code does, then code written based only on those docs wouldn't need to be under the same license.
Is clean-room reverse engineering even viable? That is, would anyone agree that an independent discovery of what bit does what is even possible, and this is not lifted from known drivers?
Clean-room reverse engineering doesn't require that. If someone were to read the existing drivers and write documentation explaining how the hardware appears to work, that documentation would be unencumbered, and a freely licensed driver could be written based on that documentation. The only methodology that would be questionable would be a developer writing a new driver while referring directly to the vendor driver.

To put it another way -- the IP protections on the current library are a matter of copyright law, and the protections are on the code itself. The facts of which bits do what -- which are embodied in that code -- are not protected (or protectable!), and can be reused freely.

>The facts of which bits do what -- which are embodied in that code -- are not protected (or protectable!), and can be reused freely.

Though given Oracle's current legal proceedings that might change...