New project wizard fails to initialize project

Do you have any Xilinx-related extensions installed in VSCode?

Not intentionally, and not that I am aware of!
I did not push an “install” button in VSCode for something even remotely related to Xilinx.

Do you see if the installation did any modifications, e.g. for $PATH,
in ~/.profile, ~/.bashrc or related files?

Assuming that “the installation” refers to the installation of the Xilinx tools some years ago
(as opposed to the installation of VSCode some days ago): yes, definitely!
.profile ans .bashrc are not affected by the Xilinx installation, but $PATH is.

echo $PATH
/home/ej/.local/bin:/home/ej/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/Xilinx/14.7/ISE_DS/ISE/bin/lin64:/opt/Xilinx/14.7/ISE_DS/EDK/bin/lin64:/opt/Xilinx/14.7/ISE_DS/ISE/sysgen/bin/lin64:/opt/Xilinx/14.7/ISE_DS/ISE/sysgen/util:/opt/Xilinx/14.7/ISE_DS/PlanAhead/bin

Well, PlatformIO should use its own isolated environment, so in theory it should not matter what the user’s previous $PATH is. ESP-IDF may however be an exception because PlatformIO just calls into ESP-IDFs CMake build system – if it sources some file that the Xilinx installation modified, then that might be the culprit.

When you temporarily deactivate / uninstall the PlatformIO extension and install the ESP-IDF extension instead through https://docs.espressif.com/projects/esp-idf/en/stable/esp32/get-started/vscode-setup.html, does it throw the same error?

OK, I uninstalled PlatformIO, which happened almost immediate.
Then, from within VSC, I installed the Espressif IDF extension.
As a good boy, I followed the advice to make sure the ESP-IDF Prerequisites for Linux
are done. This required me to install some packages, most of which were already there,
but some not:

sudo apt-get install git wget flex bison gperf python3 python3-venv cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0

some of the output was:

libssl-dev is already the newest version (3.0.2-0ubuntu1.6).
libusb-1.0-0 is already the newest version (2:1.0.25-1ubuntu2).
libusb-1.0-0 set to manually installed.
python3 is already the newest version (3.10.6-1~22.04).
The following additional packages will be installed:
libhiredis0.14 python3-pip-whl python3-setuptools-whl python3.10-venv
Suggested packages:
distcc | icecc
The following NEW packages will be installed:
ccache gperf libhiredis0.14 python3-pip-whl python3-setuptools-whl
python3-venv python3.10-venv
0 upgraded, 7 newly installed, 0 to remove and 12 not upgraded.
Need to get 3,105 kB of archives.
After this operation, 4,627 kB of additional disk space will be used.
Do you want to continue? [Y/n]

And of course I did want to continue, and the additional packages installed without problem.
After that, I chose the express installation for the espressif tools, and just hit the “install” button.
This resulted in an error:

“/usr/bin/python3 -m pip” is not valid. (ERROR_INVALID_PIP)

When I try to run the command in a terminal, I get:

$ /usr/bin/python3 -m pip
/usr/bin/python3: No module named pip

so, next would be to install pip!

$ sudo apt install python3-pip #python 3

This installation is succesful, and the command “/usr/bin/python3 -m pip” now works.
Sooo… Back to the installation of Espressif!

Hmmm… The page where the linux prerequisites are prescribed is gone.
Uninstalling and reinstalling the espressif IDF doesn’t bring it back. I guess the installer
has checked and observed the required packages to be present and accounted for?
At least, I guess I do not need to do anyhting else.

Next step: remove the blink application, and persuade the new project wizard to create it!
And the wizard trips up again, in precisely the same way…

So, it seems that installing pip needs to be added to the prerequisites page?
(or perhaps I missed it, as I could not get back to that page anymore)
Or did I do something wrong or omitted a step?

On the off-chance, tried uninstalling both extensions, and reinstalling them
(first the Espressif IDF and then PlatformIO), removing the blink app,
and using the wizard to create it: no change, same failure, same error message.

vscode-esp-idf-extension/install.md at master · espressif/vscode-esp-idf-extension · GitHub doesn’t work?

Don’t know… Should I have tried that at some point? What did I miss?

Ah, i should not install the espressif idf from VSC, but first install the esp tools by hand
according to the espressif page:
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/linux-macos-setup.html

and only then install the espressif idf from VSC?
Please confirm if this is the right way to proceed!

I have not tried this myself with the extension, but I guess it doesn’t hurt to install it regularly and have the extension pick it up.

If this is too involved, just rename the Xilinx stdc++ file out of the way when working with ESP-IDF, and move it back when you need to use the Xilinx tool.

Hi Max,

Given that the cli always works, even without cloaking the Xilinx std lib,
I think I will try to use that route for now. (Famous last words… :slight_smile: )

Having said that, of course I am willing to put in some more effort in resolving this issue,
because I suspect that the failure is not specific to Xilinx, so it could affect other people in other ways.

On that note, also for analysis I would suggest to start with the cli vs. gui difference.
Those two would seem to be the closest and stable paths resulting in consistently opposing results.
So the chances of figuring out the essential difference should be optimal.

One additional advantage of not installing the espressif tool chain by hand is that
we can keep the failing path alive for further investigation! :smiley:

In case you agree with the above, please let me know how I can help to narrow down
the differences between the cli and the gui paths. I may not be available every day
(regular work and family life also need attention :slight_smile: ), but I’ll do what I can!

Cheers,

EJ

Hey Max, I booked some significant progress just now:
installation of the entire tool set and the extension via the gui succeeded!

And the difference is simple: I selected a particular version to install,
in stead of the default “search for the tool chain on my system” (or something to that effect).

So, it is seems that the search is where something goes wrong,
and that it thinks it has found something in the Xilinx tool chain…

Could that be the case?

Nope… Sorry!
I did not run the new project wizard yet…
It still fails, in exactly the same way!

The failure is much quicker now, as it does not need to set up the tool chain.
So I guess that some progress still has been made,
as the possible location of the fault has been reduced.
Apparently, the issue is independent of the espressif tools presence or absence.

Soooo… Is there a command I can enter in the PlatformIO terminal
that would have the same (or similar) effect as the new project wizard?