Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

subst is not a solution for the long path names on Windows #125

Merged
merged 2 commits into from
Oct 30, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions src/misc/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,17 @@ For more information on toolchain overriding, see the [Overrides chapter][overri

### Long Path Names

When using Windows, you may encounter issues building a new project if using long path names. Follow these steps to substitute the path of your project:
```powershell
subst r: <pathToYourProject>
cd r:\
```
When using Windows, you may encounter issues building a new project if using long path names.
Moreover - and if you are trying to build a `std` application - the build will fail with a hard error if your project path
is longer than ~ 10 characters.

To workaround the problem, you need to shorten your project name, and move it to the drive root, as in e.g. `C:\myproj`.
Note also that while using the Windows `subst` utility (as in e.g. `subst r: <pathToYourProject>`) might look like an easy
solution for using short paths during build while still keeping your project location intact,
it simply *does not work*, as the short, substitued paths are expanded to their actual (long) locations by the Windows APIs.
ivmarkov marked this conversation as resolved.
Show resolved Hide resolved

Another alternative is to install Windows Subsystem for Linux (WSL), move your project(s) inside the native Linux file partition,
build inside WSL and only flash the compiled MCU ELF file from outside of WSL.

### Missing ABI

Expand Down