Solved: Upload via bootloader fails

Hi,
on my self made board with a 328P-AU (TQFP) there is an ISP interface and a socket to connect a FOCA USB to serial converter. The intention is first to burn the bootloader via ISP and then to use FOCA interface to upload sketches via the bootloader and test them with the Serial Monitor.

Burning a bootloader and also sketches via ISP works fine. But uploading sketches via the bootloader does not work.
Burning the bootloader with an USBasp is confirmed by "Done burning bootloader".
After that I connected the FOCA and tried to upload a sketch with following errors:

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 "C:\Users\Klaus\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

         Using Port                    : COM16
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x38
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x38
...
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x38

avrdude done.  Thank you.

Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

Then I tested the FOCA interface with a very simple sketch loaded via ISP:

void setup() {
  Serial.begin(115200);
  while (!Serial);
}

void loop {
  if (serial.available()) 
    Serial.print(char(Serial.read()));
}

The FOCA interface works fine. Every time when I typed a character into the Serial Monitor it was echoed on the display. So serial input and serial output are ok.
A 100nF capacitor is connected between DTR pin of FOCA (pin 5) and the reset pin of the controller, see the attached image.
ResetDTR
The schematic is the same as in several example schematics of Arduino boards.
This FOCA interface works with other Arduino boards.

What is wrong? What can I try further?

I don’t understand “uploading a program via the bootloader “- doesn’t make sense.

If you upload the bootloader via the ICSP connection , then that’s fine . If you then upload a program via this connection it over writes the bootloader .
After uploading a bootloader you can upload via the serial connection ( Tx ,Rx pins) with a capacitor between DTR and the processor reset pin and some form of USB/UART convertor. This doesn’t overwrite the bootloader .
Without the bootloader you cannot upload via the Tx, Rx pins.

So , to do this , on the Arduino IDE you should be uploading using the “arrow” at the top

Googling minimal Arduino is worthwhile

Hi,
saying “uploading a program via the bootloader “ means upload via the serial connection. Because this method only works after the bootloader has been burnt I called it “uploading a program via the bootloader “.

After several trials now it works. I don't understand why it took several trials but in the end I got what I wanted: simple editing sketches, testing with Serial Monitor, within the IDE.