Open ThatKalle opened 2 days ago
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.
Related to Windows support, I built the tft-gui-work branch on Windows with PlatformIO but was getting this error:
lto-wrapper.exe: fatal error: CreateProcess: No such file or directory
As a workaround I removed the -flto
compile flag from my local and this resolved the problem.
Will this PR address lto-wrapper.exe
missing?
Related to Windows support, I built the tft-gui-work branch on Windows with PlatformIO but was getting this error:
lto-wrapper.exe: fatal error: CreateProcess: No such file or directory
As a workaround I removed the
-flto
compile flag from my local and this resolved the problem. Will this PR addresslto-wrapper.exe
missing?
The error message looks very familiar.
This PR will not resolve the fact that lto-wrapper.exe
is missing, can't be found, or can't find what it's looking for.
However, it does allow Windows users to do the building and uploading using a devcontainer with some setup, rather than locally. The devcontainer does not experience the lto-wrapper.exe
ralated error during my testing, most likely due to it being a more supported Linux box, rather than a Windows one.
Is this the same that was already added to the device-ui repo?
Ths PR aims to extend the support for Windows users by leveraging the devcontainer feature.
It's targeted towards the tft-gui-work branch as I've used a T-Deck Plus to test and validate, that said, the changes are not really tft-gui specific persay, so maybe it would be better suited somewhere else.
The two issues with developing using Windows is that Trunk.io and Platformio is not fully supported.
Trunk.io
Trunk.io works nicely within the devcontainer simply by installing the vscode extension during build.
It finds and uses the configuration within
/.trunk/
.Installing the same extension on Windows natively results in all kinds of errors.
PlatformIO
PlatformIO does have very much the same sort of issue as Trunk.io, it does not play nicely on Windows native, but does work from within the devcontainer.
A feature that needs a bit of a helping hand however is the ability to Upload the built firmware to the device using the serial connection (in the case of T-Deck Plus).
Due to how the forwarding of devices work from Windows to WSL2 to Devcontainer not only do we need to make some changes to the container itself, but also to Windows and WSL.
Windows
Using usbipd-win we're able to send a connected device down WSL2.
WSL2
Within WSL2 we'll see the device
But, we also need to setup udev rules for PlatformIO supported boards/devices. ref
The
ttyACM0
device should now be ready to be sent over to the devcontainer to be used by Platformio from within VSCode.devcontainer
The
"runArgs": ["--device=/dev/ttyACM0"],
needs to be adjusted to match your system. On my machine it ended up being/dev/ttyACM0
, It's probably not the case for every system, hence commented out.The same udev rules for PlatformIO is also added to the devcontainer via Dockerfile.
GPG
The devcontainer needs the
gpg
andgnupg2
packages to allow for GPG signed commits to be created.