Skip to content

Commit e1b881a

Browse files
Add Win32 Long Path info to P.IO docs (#1321)
1 parent 869ea4c commit e1b881a

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

docs/images/longpath.png

6.99 KB
Loading

docs/platformio.rst

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,46 @@ Especially useful is the `Getting started with VSCode + PlatformIO <https://docs
2323

2424
Hereafter it is assumed that you have a basic understanding of PlatformIO in regards to project creation, project file structure and building and uploading PlatformIO projects, through reading the above pages.
2525

26+
Important steps for Windows users, before installing
27+
----------------------------------------------------
28+
29+
By default, Windows has a limited path length that is not long enough to fully clone the ``Pico-SDK``'s ``tinyusb`` repository, resulting in error messages like the one below while attempting to fetch the repository.
30+
31+
.. code::
32+
33+
error: unable to create file '.....' : Filename too long
34+
35+
To work around this requires performing two steps and rebooting Windows once. These steps will enable longer file paths at the Windows OS and the ``git`` level.
36+
37+
Step 1: Enabling long paths in git
38+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
39+
40+
Open up a Windows ``cmd`` or ``terminal`` window and execute the following command
41+
42+
.. code::
43+
44+
git config --system core.longpaths true
45+
46+
Step 2: Enabling long paths in the Windows OS
47+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
48+
49+
(taken from https://www.microfocus.com/documentation/filr/filr-4/filr-desktop/t47bx2ogpfz7.html)
50+
51+
1. Click Window key and type gpedit.msc, then press the Enter key. This launches the Local Group Policy Editor.
52+
53+
2. Navigate to Local Computer Policy > Computer Configuration > Administrative Templates > System > Filesystem.
54+
55+
3. Double click Enable NTFS/Win32 long paths and close the dialog.
56+
57+
.. image:: images/longpath.png
58+
59+
60+
Step 3: Reboot the computer
61+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
62+
63+
Once the two prior stages are complete, please do a full reboot or power cycle so that the new settings will take effect.
64+
65+
2666
Current state of development
2767
----------------------------
2868

0 commit comments

Comments
 (0)