Stk500v1 Failure to upload

Hi, I have an ATMega328 hooked up to an Arduino Uno (over serial) as an ISP, but when we upload some basic code to it, it fails to upload with the error “avrdude error: unable to open programmer stk500v1 on port /dev/cu.usbmodem21401”. Here is our platformio.ini file:

platform = atmelavr
framework = arduino
board = atmega328
build_flags = -D VERBOSE
upload_protocol = arduino
upload_speed = 19200
upload_flags =
upload_command = avrdude $UPLOAD_FLAGS -U flash:w:$SOURCE:i

Thanks in advance for any help!

Edit: It seems like this is possibly an issue related to us connecting over serial.

Should this not be upload_protocol = custom if you’re giving it a custom upload_command per docs?

How exactly did you hook up the Arduino-as-ISP with the ATMeg328P chip? Do you have that capacitor between reset and GND to prevent it from resetting?