Load complied sketch

Platform IO cannot locate “ upload_port” . In configuration.h do l simply add
#define_ upload_port com xxxx . Is there a numbered line to add it to or simply any where ? Have spent many hours trying to upload VS CODE . To MKS GEN L board. Cheers

Per PlatformIO documentation, this is a configuration option of the platformio.ini file.

If you open Marlin’s platformio.ini file, there should be a default_envs = .. at the top. Take that name and search for the corresponding [env:<name>] section in the file. There you can put the option.