I have an integrated Arduino “circuit” on a custom designed PCB. I am able to flash the ATmega328P with the bootloader without any problem. When I upload the example “blink” sketch to the board, it always works the first time. If I try again, I don’t get a response from the board. I found that the bootloader is gone every time. If I reflash the bootloader, a sketch loads fine, the first time. I can repeat the problem every time. Obviously the bootloader is being overwritten or possibly corrupted by the sketch load.
Just a little more info. I based this on a 5V/16 MHz Pro Mini schematic, so I used that for my bootloader and target “board”. I noticed that there is not an option for the “328P”, just the “328”. Could this be the issue?