Upload and Debug for ATmega328P with Atmel ICE

As said above, with the avr-stub method for example, this just requires a serial port device but in turn you can’t use the hardware UART in the debugged firmware / must disable it (How to debug on Arduino mega 2560 - #2 by maxgerhardt). dwire would be another thing for debugging, unsure if it’s for uploading too. Programming can be done with a multitude of devices, basically everything AVRdude supports, as see per docs Atmel AVR — PlatformIO latest documentation.