Go to https://rustup.rs/ and follow the instructions.
### GDB
Go to http://www.mingw.org/, download and install MinGW. In the MinGW Installation Manager select ```All Packages``` then mark for installation:
- mingw32-gcc-g++
- mingw32-gdb (bin)
- mingw32-gdb (doc)
- mingw32-gdb (info)
- mingw32-gdb (lic)
- mingw32-gdb (man)
then in the Installation menu choose ```Apply Changes```, you should see at the bottom of the window that there is going to be several packages in ```new/upgraded packages will be installed``` if so then click ```Apply```.
If everything went as expected then you should have the ```gdb.exe``` file is your MinGW install folder under /bin. However to effectivly use gdb you need to set the environment variable.
Go to the Control panel -> System and Security -> System -> Advanced system settings, click the ```Environment Variables...``` button. In this window in the System variables view click ```Edit...``` then ```New``` and type in the path to the gdb.exe file (should be something like ```C:\MinGW\bin```). Then click OK in all the windows.
To check that everything went as expected open a new terminal with ```CTRL+r``` and type cmd then ```ENTER```.
If you now type ```gdb`` you should be promted with a text saying something like "GNU gdb (GDB) 7.6.1", gdb is now installed!
### OpenOCD
Go to http://gnutoolchains.com/arm-eabi/openocd/ and download the latest OpenOCD package.
Extract the package somewhere where it is easy to find (i.e C:).
## Windows Subsystem for Linux (WSL) - Windows 10 ONLY
To install WSL check out: https://docs.microsoft.com/en-us/windows/wsl/install-win10. We recommend the Ubuntu distro.
To open a distro terminal: Ctrl+r and write ```cmd``` and run. In the terminal type ```bash```, this will spawn a ubuntu terminal.
Using the terminal, update the distro:
```sudo apt update```
```sudo apt install build-essential```
```sudo apt install gdb```
```sudo apt upgrade```
The ordinary C: drive will be found under /mnt/c
### Rust
Continue in the terminal and write:
```curl https://sh.rustup.rs -sSf | sh```
### GDB
### OpenOCD
Is the same as for native Windows as OpenOCD doesn't work under WSL