I've stumbled upon what I've later found it's quite common error, but there seems not to be simple troubleshooting way and solution (people often try various things, sometimes they succeed, sometimes not).
Later on I've plugged RedBot wheel encoders sensor and write some simplistic program to check whether it works at all. I've summarized the steps in a github issue, so that it's easy to reference it.
When I tried to upload the sketch I've receiced
stk500_initialize(): (a) protocol error, expect=0x14, resp=0x42,
stk500_getparm(): (a) protocol error, expect=0x14, resp=0x41. The full log is included in comment on that github issue.
The D13 diode is making series of 3-blink bursts - 8 bursts after start. More diagnostic I did in the github issue as well.
My question (apart from obvious 'how to fix it!?!' ;) ) is whether there is some kind of documentation for this protocol? On the various topics I've found people seem to have somewhat different problems (the numbers and messages were different). I just want to know why the first few messages are exchanged OK (avrdude receives some basic info from the chip), but later ones (namely
Send: A  .  ) are producing protocol errors.