I have a standalone breadboard with an atmega328 (rather than 328p) on it.
I am using an USBtinyISP to upload to it.
I have configured the IDE in boards.txt to add a new kind of board, with the appropriate fuse bits.
I have added a device called atmega328 to avrdude.conf which is a copy of the 328p, except with a signature of 0x1e 0x95 0x14 instead of 0x1e 0x95 0x0F.
However, I can't figure out how to make the system compile like a 328p, but upload like a 328.
Here's my snippet from board.txt:
##############################################################
standalone328.name=Standalone 328 USBtinyISP
standalone328.upload.using=usbtinyisp
standalone328.upload.maximum_size=32768
standalone328.build.mcu=atmega328p
standalone328.build.f_cpu=16000000L
standalone328.build.core=arduino
standalone328.build.variant=standard
standalone328.bootloader.low_fuses=0xE2
standalone328.bootloader.high_fuses=0xD9
standalone328.bootloader.extended_fuses=0xF5
standalone328.bootloader.path=optiboot
standalone328.bootloader.file=optiboot_atmega328.hex
standalone328.bootloader.unlock_bits=0x3F
standalone328.bootloader.lock_bits=0x0F
The problem is the build.mcu field. When I set it to atmega328p, it tries to call AVRdude with atmega328p, which has the wrong signature bit.
When I change it to atmega328, the compiler complains that it doesn't know about that chip.
I think what I want to do is compile as atmega328p, but upload as atmega328. However, i can't find the right combination of configuration options to make that happen.
Because I'm using the USBtinyISP, is there a configuration option for upload.*** that lets me set the device type to pass to AVRdude?