First of all, let’s create new project from Visual Studio Start Page: Start > New Project or using Menu: File > New > Project , then select project with Makefile type ( Visual C++ > General > Makefile Project ), fill Project name , Solution name , Location fields and press OK button.

Secondly, we need to configure project with PlatformIO Build System:

If we want to use native AVR programming, we have to specify additional preprocessor symbol (“Preprocessor definitions” field) about your MCU. For example, an Arduino Uno is based on the ATmega328 MCU. In this case We will add new definition __AVR_ATmega328__ .

Release Configuration is the same as Debug, so on the next step we check “Same as Debug Configuration” and click “Finish” button.

Thirdly, we need to add directories with header files using project properties (right click on the project name or Alt-Enter shortcut) and add two directories to Configuration Properties > NMake > Include Search Path :