Arduino MINI : avrdude: stk500_recv() - during upload for big sketches

Hello,

Uploading on Arduino (5V) mini works well with my serial adapter.
But when I'm trying to upload bigger sketches, upload stops with given error. In fact, above 87.5% flash upload stops.

Here are logs for a successfull upload and for another failing case :

AVR Memory Usage
----------------
Device: atmega328p

Program:   28630 bytes (87.4% Full)
(.text + .data + .bootloader)

Data:       1262 bytes (61.6% Full)
(.data + .bss + .noinit)
avrdude -patmega328p -carduino -P/dev/ttyUSB0 -b115200 -D -Uflash:w:./ATMEGA_328P_MINI_DEBUG/container_node.hex:i 

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f
avrdude: reading input file "./ATMEGA_328P_MINI_DEBUG/container_node.hex"
avrdude: writing flash (28630 bytes):

Writing | ################################################## | 100% 4.03s

avrdude: 28630 bytes of flash written
avrdude: verifying flash memory against ./ATMEGA_328P_MINI_DEBUG/container_node.hex:
avrdude: load data flash data from input file ./ATMEGA_328P_MINI_DEBUG/container_node.hex:
avrdude: input file ./ATMEGA_328P_MINI_DEBUG/container_node.hex contains 28630 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 2.91s

avrdude: verifying ...
avrdude: 28630 bytes of flash verified

avrdude: safemode: Fuses OK (E:00, H:00, L:00)

avrdude done.  Thank you.

And when it fails for bigger sketches :

AVR Memory Usage
----------------
Device: atmega328p

Program:   28694 bytes (87.6% Full)
(.text + .data + .bootloader)

Data:       1262 bytes (61.6% Full)
(.data + .bss + .noinit)


Finished building: sizedummy
avrdude -patmega328p -carduino -P/dev/ttyUSB0 -b115200 -D -Uflash:w:./ATMEGA_328P_MINI_DEBUG/container_node.hex:i 

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f
avrdude: reading input file "./ATMEGA_328P_MINI_DEBUG/container_node.hex"
avrdude: writing flash (28694 bytes):

Writing | ################################################## | 99% 4.01savrdude: stk500_recv(): programmer is not responding

These 2 cases are successfully uploaded on Arduino UNO.
Maybe bootloader bigger on mini than on UNO? Such a big difference in bootloader seems strange.

Any other ideas?

Regards

UNO specs per products data page:
Flash Memory32 KB (ATmega328) of which 0.5 KB used by bootloader

MINI specs per products data page:
Flash Memory32 KB (of which 2 KB used by bootloader)

Hi,

In given case, upload fails for sketch of 28694 bytes. Arduino has 32768 bytes flash.
Bootloader. There are still 2K missing according to 2K bootloader size!

Here is a post about difference of bootloader size between Uno and Mini

Here is bootloader source address : https://github.com/arduino/Arduino/tree/master/hardware/arduino/bootloaders

I think I will recompile bootloader and flash it in order to understand why 2K are missing.

Regards