PlatformIO Community

Ignoring build for native platform

I’ve implemented native testing in PlatformIO inside my .ini file, but now when i press the tick to build, i appear to be building for both the micro-controller and the native environment, which fails to build.

This is my current setup:

; Embedded platform
 platform = teensy
 board = teensy40
 framework = arduino
 monitor_speed = 115200
 build_flags =

; Desktop platforms (Win, Mac, Linux, Raspberry Pi, etc.)
; Used for testing hyperloop system locally
 platform = native
 test_ignore = Mbed_*
 test_build_project_src = true
 build_flags =

How can i change the .ini file so that when i build all, the native environment is not built too?

Just set

default_envs = teensy40

per docs or use the build button for that specific environment in VSCode and not “Build all”.