In the (deep) past I was able to get the "-PU" working in the IDE by hacking the avrdude.conf file and changing the signature from 0x1E 0x95 0x0F to 0x1E 0x95 0x14, restarting the IDE and uploading via a debugger.
Recently, I needed to upgrade the firmware for an old board and updated the IDE to 1.8.18. The hacks I've used don't seem to work anymore.
I get the dreaded:
An error occurred while uploading the sketch
avrdude: Expected signature for ATmega328P is 1E 95 0F
Double check chip, or use -F to override this check.
How do I get the IDE to work with my board? It runs the Arduino Uno environment flawlessly, except that it has a "-PU" and is programmed via a programmer.
I installed the package and select the ATMega328 style boards and still get the dreaded:
An error occurred while uploading the sketch
avrdude: Expected signature for ATmega328P is 1E 95 0F
Double check chip, or use -F to override this check.
Looking at the documentation, I don't see the "-PU" listed. I see P,PA,PB.
-PU is just the IC package code. The important thing to understand is that you have an ATmega328 (not an ATmega328P, not an ATmega328PA, not an ATmega328PB, just ATmega328).
So you need to select Tools > Board > MiniCore > ATmega328 and then Tools > Variant > 328 / 328A.
Make sure you also select the appropriate Tools > Clock configuration for your board.
Sketch uses 17080 bytes (52%) of program storage space. Maximum is 32256 bytes.
Global variables use 937 bytes (45%) of dynamic memory, leaving 1111 bytes for local variables. Maximum is 2048 bytes.
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Problem uploading to board. See https://support.arduino.cc/hc/en-us/sections/360003198300 for suggestions.