How to create project for windows_x86?

Using PlatfromIO on VS code how can i create windows based C/C++ project ?
In PIOhome->new project->boards, there is no option of windows_x86
Thank you

That’s because the GitHub - platformio/platform-windows_x86: Windows x86: development platform for PlatformIO platform has no boards and is thus not visible in the project creation wizard. To work around that problem, either

  1. create a project with arbitrary config (e.g., Board = Arduino Uno, Framework = Arduino) and then change the platformio.ini to the reference one
  2. or, go through the PIO Home → Platforms → Desktop → Windows x86 → Install → Examples → hello-world → Import to get the basic project.

Altnernatively, if your host machine is already Windows, just use the Native platform and environment. This will generate a project for your native machine through the system’s gcc compiler, see platform-native/examples/hello-world at develop · platformio/platform-native · GitHub as an example.

Then, the x86 comes either as default then if your machine already is Windows x86, or if you’re on a x64 host, use the -m32 option as build_flags in conjunction with a compiler version that supports it to generate 32-bit code.

1 Like