From 08367f5162160a277ca90a493928184c79e98e4a Mon Sep 17 00:00:00 2001 From: ivmarkov Date: Sat, 28 Oct 2023 18:53:20 +0000 Subject: [PATCH 1/2] subst is not a solution for the long path names on Windows --- src/misc/troubleshooting.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/misc/troubleshooting.md b/src/misc/troubleshooting.md index 8ef56d7..d84a4f2 100644 --- a/src/misc/troubleshooting.md +++ b/src/misc/troubleshooting.md @@ -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: -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: `) 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. + +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 From 9caa88774dd82549f21296a00ca573b39b568422 Mon Sep 17 00:00:00 2001 From: ivmarkov Date: Mon, 30 Oct 2023 10:05:33 +0200 Subject: [PATCH 2/2] Update src/misc/troubleshooting.md Co-authored-by: Sergio Gasquez Arcos --- src/misc/troubleshooting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/misc/troubleshooting.md b/src/misc/troubleshooting.md index d84a4f2..436af74 100644 --- a/src/misc/troubleshooting.md +++ b/src/misc/troubleshooting.md @@ -73,7 +73,7 @@ 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: `) 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. +it simply *does not work*, as the short, substituted paths are expanded to their actual (long) locations by the Windows APIs. 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.