Upload stuck on avrdude

Good day everyone. I have been encountering a somewhat weird issue with an Arduino Mega2560 Board. Upon trying to upload a known working codebase via platformio, the upload proceeds through the build fine, but gets stuck on the following bit:

At this point, the board reboots, so something is clearly happening, but it then simply resumes its previous program. I have tried the loopback test, so presumably the connection is fine. The platformio.ini file is also part of the known working codebase.
Any help would be much appreciated.