[Solved] Can't Upload Program To Board After Flashing Bootloader

I made an Arduino compatible board based around the ATMEGA32U4. I flashed the Leonardo bootloader and am able to upload code by using the Uno as a programmer. I wanted to try and upload code directly over USB now but when I try to, I get this error:

Found programmer: Id = "-------"; type = -
Software Version = -.-; Hardware Version = -.-
avrdude: error: buffered memory access not supported. Maybe it isn't
a butterfly/AVR109 but a AVR910 device?
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

avrdude: error: programmer did not respond to command: leave prog mode
avrdude: error: programmer did not respond to command: exit bootloader

I'm able to connect to the board through the serial port though which tells me that the hardware side of things has been working. Does anyone have an idea as to what I could try to fix this issue? I tried using "AVR ISP", "USBasp", and "Arduino as ISP" for programmers and no luck.

When you did that you erased the bootloader. After doing an "Upload Using Programmer", you must do another "Burn Bootloader" in order to be able to start doing a normal upload over USB.

The Tools > Programmer menu selection is only used when you are doing Tools > Burn Bootloader or "Upload Using Programmer". When you're doing a standard "Upload", the Tools > Programmer menu selection is completely ignored. So it makes no difference at all what you have selected from the Tools > Programmer menu.

Oh okay that makes a lot of sense that the bootloader would be deleted after uploading through a programmer. But now after I do another "Burn Bootloader" and try to program straight through USB, I get the following errors. My best guess is the first error is causing a ripple effect for all the others. Could it be something with my file structure? I'm using Arduino 1.8.13 with Teensyduino 1.53.

Unfortunately, I don't know the cause of this error. Maybe one of the other forum members has an idea?

I found my problem! I was still running on MacOS 10.15.1 which had a common bug with ATMEGA32U4. After updating my OS problem solved!