Skip to content

Conversation

Ekrynox
Copy link

@Ekrynox Ekrynox commented Aug 6, 2025

Hello,

I made a new fix for the Windows path/command length problem. This one keeps the PlatformIO install inside Temp folder.
Instead, it replaces the install directory with an environment variable.
should partially fix #62

Tested on Windows 11 and an Hyper-V Debian virtual machine

Works in this folder:
image
oat_fw_gui_2025-08-06-18-54-46.log

@julianneswinoga
Copy link
Member

👍 for adding oae-fw, makes sense that it's released now. I was hoping we'd get a simultaneous merge into the firmware repo but this works for now.

I'm not quite sure what the actual fix is though? I see INSTALL_DIR being set but I don't see anything in the platformio documentation about what that affects. Could you explain that a bit more?

@Ekrynox
Copy link
Author

Ekrynox commented Aug 9, 2025

Hello, the objective of INSTALL_DIR is not to target a specific function inside PlatformIO, but to replace a longer path with %INSTALL_DIR% on windows to shorten internal commands.

@julianneswinoga
Copy link
Member

Sorry, still not quite understanding it... If platformio isn't using INSTALL_DIR where is it being used? The root problem is the esp32 toolchain having many duplicated -i include paths, but if it's not using INSTALL_DIR then I don't understand how setting it affects that.

@Ekrynox
Copy link
Author

Ekrynox commented Aug 9, 2025

No problem :)
Instead of storing the full Path to logic_state.fw_dir, i only give it "%INSTALL_DIR%" on windows. So QProcess retrieves a shortened path.
It is true that in the log, the full path appears, but under the hood, the command is run with "%INTALL_DIR%" and only the full path is printed when logging/displaying.
But, I may be entirely wrong...
At the moment, on my mount, I used a firmware successfully compiled with it (wouldn't compile without it).
If you'd like, I can see if others can test on their system.

@julianneswinoga
Copy link
Member

Ok sorry for the delayed response but I did some digging on this. Unfortunately I don't think setting the INSTALL_DIR environment variable is doing anything ☹️

I believe what is happening is that you're using a dev version of OATFWGUI, which sets the PLATFORMIO_CORE_DIR directory to C:/Users/user/AppData/Local/Temp/.pioOATFWGUI2.0.4. During the release process, the version gets stamped with a suffix of -release+<hash> for a PLATFORMIO_CORE_DIR directory of C:/Users/user/AppData/Local/Temp/.pioOATFWGUI2.0.4-release+<hash>. The .pio directory is used ~200 times each time the compiler in invoked, so 200 * 15 chars = an extra 3000 chars.

So I'm happy to be proven wrong, but I don't think INSTALL_DIR is doing anything here... If you want to test for yourself you can put a suffix of -release+a37019 in the __version__ of the OATFWGUI/_version.py file and see if your fix still works (it didn't for me ☹️)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

xtensa-esp32-elf-g++: error: CreateProcess: No such file or directory
2 participants