Skip to content

Commit 529b438

Browse files
authored
Mention WSL2 in READMEs (#775)
* Mention WSL2 in READMEs * reviews
1 parent be1ff81 commit 529b438

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

cargo-espflash/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,21 @@ It is _not_ currently possible to use `cargo-espflash` from within WSL1. There a
9393

9494
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.
9595

96+
To be able to flash within WSL2, [systemd should be enabled](https://learn.microsoft.com/en-us/windows/wsl/wsl-config#systemd-support). To do so, create or edit `/etc/wsl.conf` using `sudo` for admin permissions and add the following:
97+
98+
```
99+
[boot]
100+
systemd=true
101+
```
102+
103+
and then close the WSL distribution on Windows side using PowerShell to restart WSL instances:
104+
105+
```pwsh
106+
wsl.exe --shutdown
107+
```
108+
109+
For more information, please refer [here](https://github.com/esp-rs/espflash/issues/641#issuecomment-2408771592).
110+
96111
## Bootloader and Partition Table
97112

98113
`cargo-espflash` is able to detect if the package being built and flashed depends on [esp-idf-sys]; if it does, then the bootloader and partition table built by the `esp-idf-sys` build script will be used, otherwise the bundled bootloader and partition tables will be used instead.

espflash/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,21 @@ It is _not_ currently possible to use `espflash` from within WSL1. There are no
8989

9090
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.
9191

92+
To be able to flash within WSL2, [systemd should be enabled](https://learn.microsoft.com/en-us/windows/wsl/wsl-config#systemd-support). To do so, create or edit `/etc/wsl.conf` using `sudo` for admin permissions and add the following:
93+
94+
```
95+
[boot]
96+
systemd=true
97+
```
98+
99+
and then close the WSL distribution on Windows side using PowerShell to restart WSL instances:
100+
101+
```pwsh
102+
wsl.exe --shutdown
103+
```
104+
105+
For more information, please refer [here](https://github.com/esp-rs/espflash/issues/641#issuecomment-2408771592).
106+
92107
### Cargo Runner
93108

94109
You can also use `espflash` as a Cargo runner by adding the following to your project's `.cargo/config.toml` file, for example:

0 commit comments

Comments
 (0)