Project path in idf.py
Posted: Mon Feb 05, 2024 6:02 am
Hi,
I'm using VSCode with extension Espressif IDF v1.6.4 and ESP-IDF v5.0.2 on Windows 10.
In my case, I set up a virtual drive the project path to prevent paths that may cause problems, such as spaces at project path.
For example, when creating and using a project called Blink,
Real path is D:\User\Test\ESP32\Projects\Blink, I set D:\User\Test\ESP32\Projects as P driver path and use abs path as P:\Blink.
However, after checking the message when building, it was confirmed that the path was referenced as a real path.
As a result of analyzing the cause, the following function was identified in the source code of idf.py.
Q1. Why does idf.py use realpath rather than abspath?
Q2. Is it okay to use abspath instead of the _safe_relpath function?
Thanks.
I'm using VSCode with extension Espressif IDF v1.6.4 and ESP-IDF v5.0.2 on Windows 10.
In my case, I set up a virtual drive the project path to prevent paths that may cause problems, such as spaces at project path.
For example, when creating and using a project called Blink,
Real path is D:\User\Test\ESP32\Projects\Blink, I set D:\User\Test\ESP32\Projects as P driver path and use abs path as P:\Blink.
However, after checking the message when building, it was confirmed that the path was referenced as a real path.
As a result of analyzing the cause, the following function was identified in the source code of idf.py.
Q1. Why does idf.py use realpath rather than abspath?
Q2. Is it okay to use abspath instead of the _safe_relpath function?
Thanks.