Using PlatformIO on a Copilot device
/I’m liking my Copilot laptop. Today I loaded it with Visual Studio Code and then tried to do some embedded stuff with PlatformIO. And I hit a snag. The problem is that PlatformIO notices that the computer is powered by an ARM processor and then tries to use ARM versions of all the software it brings in. This does not end well. The compilers I want to use for the ESP processors are only available for Intel X86 processors. The solution to this is to tell PlatformIO to use Intel/AMD for everything by creating the following environment variable.
PLATFORMIO_SYSTEM_TYPE=windows_amd64
Search for “Edit Environment variables” and then open the Systems Properties dialogue to do this. Then add the environment variable above, reboot your machine just to be sure everything can see it and then everything works. This means that PlatformIO will run slightly more slowly because it is now running on an emulated processor, but it still seems pretty sprightly to me.