Skip to content

Commit

Permalink
docs: 📝 Add note about permissions on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioGasquez authored and jessebraham committed Apr 25, 2023
1 parent f262403 commit b50f90a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cargo-espflash/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ Options:
-V, --version Print version information
```

> **Note**
>
> #### Permissions on Linux
> In Linux, when using any of the commands that requires using a serial port, the current user may not have access to serial ports and a “Permission Denied” or “Port doesn’t exist” errors may appear. On most Linux distributions, the solution is to add the user to the `dialout` group (check e.g. `ls -l /dev/ttyUSB0` to find the group) with a command like `sudo usermod -a -G dialout $USER`. You can call `su - $USER` to enable read and write permissions for the serial port without having to log out and back in again. Check your Linux distribution’s documentation for more information.
## Bootloader and Partition Table

`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.
Expand Down
5 changes: 5 additions & 0 deletions espflash/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ Options:
-V, --version Print version
```

> **Note**
>
> #### Permissions on Linux
> In Linux, when using any of the commands that requires using a serial port, the current user may not have access to serial ports and a “Permission Denied” or “Port doesn’t exist” errors may appear. On most Linux distributions, the solution is to add the user to the `dialout` group (check e.g. `ls -l /dev/ttyUSB0` to find the group) with a command like `sudo usermod -a -G dialout $USER`. You can call `su - $USER` to enable read and write permissions for the serial port without having to log out and back in again. Check your Linux distribution’s documentation for more information.
### Cargo Runner

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

0 comments on commit b50f90a

Please sign in to comment.