Page 1 of 1

Project and build path in idf.py

Posted: Wed Mar 20, 2024 7:31 am
by jhlee1
Hi,

I set up a virtual drive the project path to prevent wrong path because of unicode.

Below is test directory of 'WrongPath' project.
Real path of project - D:\VSCode\한글경로\WrongPath
Virtual Path of project - P:\WrongPath

I try to menuconfig in virtual path, but idf.py refers to real path.

I checked the idf.py source code and could see that 'global_args' has project path.
In idf.py, the project path is initially received as a virtual path, but after the global action callback is performed, the path is changed to the real path.
debug code.png
debug code.png (30.27 KiB) Viewed 1416 times
debug log.png
debug log.png (21.21 KiB) Viewed 1416 times
I'm having a hard time understanding the tasks running in idf.py anymore.
Can I get any help to use virtual path ?

Thanks.

Re: Project and build path in idf.py

Posted: Wed Mar 20, 2024 3:58 pm
by liaifat85
continue debugging the code to identify the exact point where the path transition occurs. Use print statements or a debugger to track the value of the project path variable (global_args in this case) throughout the execution flow.

Re: Project and build path in idf.py

Posted: Mon Mar 25, 2024 9:12 am
by jhlee1
I found point where paths change!

'validate_root_options' function in <idf path>/tools/idf_py_actions/core_ext.py.
This function use realpath about project_dir and build_dir. need to comment this.