Project and build path in idf.py

jhlee1
Posts: 8
Joined: Mon Sep 11, 2023 7:03 am

Project and build path in idf.py

Postby jhlee1 » Wed Mar 20, 2024 7:31 am

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 1501 times
debug log.png
debug log.png (21.21 KiB) Viewed 1501 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.

liaifat85
Posts: 200
Joined: Wed Dec 06, 2023 2:46 pm

Re: Project and build path in idf.py

Postby liaifat85 » Wed Mar 20, 2024 3:58 pm

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.

jhlee1
Posts: 8
Joined: Mon Sep 11, 2023 7:03 am

Re: Project and build path in idf.py

Postby jhlee1 » Mon Mar 25, 2024 9:12 am

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.

Who is online

Users browsing this forum: Majestic-12 [Bot] and 220 guests