You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -93,7 +96,7 @@ Check your Linux distribution’s documentation for more information.
93
96
94
97
### Windows Subsystem for Linux
95
98
96
-
It is _not_ currently possible to use `cargo-espflash` from within WSL1. There are no plans to add support for WSL1 at this time.
99
+
It is _not_ currently possible to use `espflash` from within WSL1. There are no plans to add support for WSL1 at this time.
97
100
98
101
It is also _not_ possible to flash chips using the built-in `USB_SERIAL_JTAG` peripheral when using WSL2, because resetting also resets `USB_SERIAL_JTAG` peripheral, which then disconnects the chip from WSL2. Chips _can_ be flashed via UART using WSL2, however.
With this configuration you can flash and monitor you application using `cargo run`.
110
113
114
+
## Using `espflash` as a Library
115
+
116
+
`espflash` can be used as a library in other applications:
117
+
```toml
118
+
espflash = { version = "2.1", default-features = false }
119
+
```
120
+
or `cargo add espflash --no-default-features`
121
+
122
+
> **Warning**
123
+
> Note that the `cli` module does not provide SemVer guarantees.
124
+
125
+
We disable the `default-features` to opt-out the `cli` feature, which is enabled by default; you likely will not need any of these types or functions in your application so there’s no use pulling in the extra dependencies.
126
+
127
+
Just like when using `espflash` as an application, you can enable the raspberry feature to allow your dependent application to use the Raspberry Pi’s built-in UART:
128
+
129
+
```toml
130
+
espflash = { version = "2.1", default-features = false, features = ["raspberry"] }
131
+
```
132
+
111
133
## Configuration File
112
134
113
135
It's possible to specify a serial port and/or USB VID/PID values by setting them in a configuration file. The location of this file differs based on your operating system:
0 commit comments