Skip to content

Commit b7df92c

Browse files
committed
More README updates
1 parent 0bc9ec5 commit b7df92c

File tree

5 files changed

+15
-39
lines changed

5 files changed

+15
-39
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ public class EnumerateDevices {
7474
- [Bulk Transfer](examples/bulk_transfer/) demonstrates how to find a USB device, open it and communicate using bulk transfer.
7575
- [Enumeration](examples/enumerate/) lists all connected USB devices and displays information about interfaces and endpoints.
7676
- [Monitor](examples/monitor/) lists the connected USB devices and then monitors for USB devices being connected and disconnnected.
77+
- [Device Firmware Upload (DFU) for STM32](examples/stm_dfu) uploads firmware to STM32 microcontrollers supporting the built-in DFU mode.
7778

7879

7980
## Prerequisite

examples/bulk_transfer/README.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,6 @@ $ mvn -version
3131

3232
If it is not present, install it, typically using package manager like *Homebrew* on macOS, *Chocolately* on Windows and *apt* on Linux.
3333

34-
### Create the *java-does-usb* library
35-
36-
Since the *java-does-usb* library is not yet available on Maven Central, it must be built locally:
37-
38-
```shell
39-
$ cd JavaDoesUSB/java-does-usb
40-
$ mvn install
41-
```
42-
43-
The result will be put in your local Maven repository.
44-
4534
### Run the sample
4635

4736
```shell

examples/enumerate/README.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,6 @@ $ mvn -version
3030

3131
If it is not present, install it, typically using package manager like *Homebrew* on macOS, *Chocolately* on Windows and *apt* on Linux.
3232

33-
### Create the *java-does-usb* library
34-
35-
Since the *java-does-usb* library is not yet available on Maven Central, it must be built locally:
36-
37-
```shell
38-
$ cd JavaDoesUSB/java-does-usb
39-
$ mvn install
40-
```
41-
42-
The result will be put in your local Maven repository.
43-
4433
### Run the sample
4534

4635
```shell

examples/monitor/README.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,6 @@ $ mvn -version
3030

3131
If it is not present, install it, typically using package manager like *Homebrew* on macOS, *Chocolately* on Windows and *apt* on Linux.
3232

33-
### Create the *java-does-usb* library
34-
35-
Since the *java-does-usb* library is not yet available on Maven Central, it must be built locally:
36-
37-
```shell
38-
$ cd JavaDoesUSB/java-does-usb
39-
$ mvn install
40-
```
41-
42-
The result will be put in your local Maven repository.
43-
4433
### Run the sample
4534

4635
```shell

examples/stm_dfu/README.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,27 @@ If it is not present, install it, typically using package manager like *Homebrew
3434

3535
### Build the application
3636

37-
Since the *java-does-usb* library is not yet available on Maven Central, it must be built locally:
38-
3937
```shell
4038
$ mvn clean package
4139
```
4240

43-
The result will be put in your local Maven repository.
44-
45-
### Run the application
41+
### Put the STM32 development board in DFU mode
4642

4743
- Connect an STM32 development board (like a BlackPill board) to your computer while pressing the *Boot* button.
4844
- Ensure that it is DFU mode by checking macOS *System Information* or Windows *Device Manager*. The device should appear as "STM32 BOOTLOADER".
49-
- Run the command below (adapting the file path depending on your specific board).
45+
46+
On Windows, the *WinUSB* driver must be installed. See https://github.com/manuelbl/JavaDoesUSB/wiki/DFU-on-Windows for additional information.
47+
48+
On many Linux distributions, the default permissions of USB devices do not allow access. To change it, create a file `/etc/udev/rules.d/50-stm-dfu.rules` with the below content:
49+
50+
```text
51+
SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE="0666"
52+
```
53+
54+
55+
### Run the application
56+
57+
Run the command below (adapting the file path depending on your specific board):
5058

5159
```shell
5260
$ java --enable-preview --enable-native-access=ALL-UNNAMED -jar target/stm_dfu-0.4.0.jar ../../test-devices/loopback-stm32/bin/blackpill-f401cc.bin

0 commit comments

Comments
 (0)