Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [Click here to return to readme.md](../../README.md)
- Atualizado em 27-05-2024
- ### Desinstalando o WSL Existente
- ```bash
- wsl --list # Mostra instalações atuais
- wsl --unregister Ubuntu # Desinstala o "Ubuntu"
- ```
- ### Instalando WSL e PlatformIO
- ```bash
- wsl --install Ubuntu24.04
- sudo apt update
- sudo apt upgrade
- sudo apt install curl
- cd ~
- curl -fsSL -o get-platformio.py https://raw.githubusercontent.com/platformio/platformio-core-installer/master/get-platformio.py
- sudo apt-get install python3.12-venv
- python3 get-platformio.py
- ```
- ### Exportando PlatformIO para o PATH
- ```bash
- mkdir -p ~/.local/bin
- export PATH=$PATH:$HOME/.local/bin
- ln -s ~/.platformio/penv/bin/platformio ~/.local/bin/platformio
- ln -s ~/.platformio/penv/bin/pio ~/.local/bin/pio
- ln -s ~/.platformio/penv/bin/piodebuggdb ~/.local/bin/piodebuggdb
- source ~/.profile
- ```
- ### Instalando Git (instale o git-all mesmo se o git ja estiver no sistema)
- ```bash
- sudo apt-get install git-all
- ```
- ### Configurando Git Credential Manager
- Siga o guia e instale o Git Credential Manager no Windows: [Guia de Instalação](https://dev.to/equiman/sharing-git-credentials-between-windows-and-wsl-5a2a)
- - Link para download: https://github.com/git-for-windows/git/releases/download/v2.45.2.windows.1/Git-2.45.2-64-bit.exe
- #### No Terminal do Windows:
- ```bash
- git config --global credential.helper wincred
- ```
- #### No Terminal do WSL:
- ```bash
- git config --global credential.helper "/mnt/c/Program\ Files/Git/mingw64/bin/git-credential-manager.exe"
- ```
- ### Verificando a Instalação do Git
- ```bash
- git --version
- ```
- ### Configurando Git e clonando o repositório
- ```bash
- git config --global user.email "[email protected]"
- git config --global user.name "Your Name"
- cd ~
- git clone https://github.com/italocjs/simova_smvtrack
- ```
- ### Instalando o doxygen e g++
- ```bash
- sudo apt-get install doxygen
- sudo apt-get install doxygen-gui
- sudo apt-get install g++
- ```
- ### Sharing USB Port with WSL
- I HIGHLY recommend using the program: https://gitlab.com/alelec/wsl-usb-gui/-/releases, an working copy is available on /docs/others/WSL-USB-5.5.0.msi
- It makes the process much easier and has a visual interface. The USBShare scripts have the same functionality but do not have a GUI and you will need to mount the device everytime.
- - Resolving Mounting Issues in the usbidpGUI program
- If you encounter the error `error: Mounting 'C:\Program Files\usbipd-win\WSL' within WSL failed` after rebooting the system, follow these instructions:
- ```bash
- sudo mount -t drvfs -o "ro,umask=222" "C:\Program Files\usbipd-win\WSL" "/var/run/usbipd-win"
- ```
- How to make this change persistent
- The issue is that the `/etc/fstab` file does not recognize the Windows-style path directly. Instead, you should use the WSL-specific syntax for mounting Windows paths. Here’s the correct way to add it:
- 1. Open the `/etc/fstab` file in a text editor with root privileges:
- ```bash
- sudo nano /etc/fstab
- ```
- 2. Add the following line to the end of the file:
- ```plaintext
- C:\\Program\040Files\\usbipd-win\\WSL /var/run/usbipd-win drvfs ro,umask=222 0 0
- ```
- Please note that \040 is an escape sequence for a space. and is required, the path is not wrong. You can find it on windows under "C:\Program Files\WSL USB"
- 3. Save the file and exit the editor (in nano, you can do this by pressing `Ctrl+X`, then `Y`, and `Enter`).
- 4. To apply the changes without rebooting, you can run:
- ```bash
- sudo systemctl daemon-reload
- sudo mount -a
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement