Can't burn boot loader to atmega328p-pu on a custom pcb

I have tried to burn the boot loader to an atmega328p-pu on a custom pcb I made, but I get the following error message.

Arduino: 1.8.13 (Mac OS X), Board: "Arduino Uno"

/Users/NAME/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/bin/avrdude -C/Users/NAME/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf -v -patmega328p -cstk500v1 -P/dev/cu.usbmodem145401 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xDE:m -Ulfuse:w:0xFF:m 

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/Users/NAME/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf"
         User configuration file is "/Users/joshuahatcher/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/cu.usbmodem145401
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
avrdude: ser_open(): can't open device "/dev/cu.usbmodem145401": Resource busy

avrdude done.  Thank you.

Error while burning bootloader.


This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

I sm using a freenove uno and I uploaded the ArduinoISP code to it, which went fine, then I tried burn boot loader which failed. I used the SPI header on the uno, and connected it as follows:
AtMega328P-PU Uno
Pin 11 MOSI
Pin 12 MISO
Pin 13 SCK
RST Pin 10
and then connected up 5V and GND. the uno works when I uploaded a blink program, and all my pcb does is connects the at mega to the 16MHz crystal and capacitors, and the RST to VCC with a resistor. In the IDE I set the board to an UNO, the programmer to Arduino as ISP and selected the right port, the jumper wires are new, and I have 10 of the PCB's and atmegas, as I'm making these for a club I run, and I've tried with a variety of each.
Sorry if this is a very simple problem but I've never burnt the boot loader and I'm still a bit new to arduino

Someone else is using the serial port...

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.