Once in a while

Once in a while, I get this error:

C:/.../Local/Arduino15/packages/proffieboard/tools/arm-none-eabi-gcc/14-2-rel1-xpack/bin/../lib/gcc/arm-none-eabi/14.2.1/../../../../arm-none-eabi/bin/ld.exe:C:\...\Local\Arduino15\packages\proffieboard\hardware\stm32l4\4.6\variants\STM32L452RE-ProffieboardV3/linker_scripts/STM32L452RE_FLASH.ld:224: warning: memory region `SRAM2' not declared
lto-wrapper.exe: warning: using serial compilation of 10 LTRANS jobs
lto-wrapper.exe: note: see the '-flto' option documentation for more information
C:/.../Local/Arduino15/packages/proffieboard/tools/arm-none-eabi-gcc/14-2-rel1-xpack/bin/../lib/gcc/arm-none-eabi/14.2.1/../../../../arm-none-eabi/bin/ld.exe: warning: start of section .bss changed by 16
Sketch uses 306096 bytes (60%) of program storage space. Maximum is 507904 bytes.
dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

Cannot open DFU device 0483:df11
No DFU capable USB device available
Failed uploading: uploading error: exit status 74

when I try to upload to my board from Arduino v2.3.5. It’s not a problem, all I need to do is click upload again and after recompiling again, it will upload.

I don’t even need to click reset and boot on my board. It is almost as if Arduino doesn’t wait long enough after sending the “restart board in DFU bootloader” command. It happens systematically when my config is very big (95 to 98% full on my v3.9 ProffieBoard) and it happens once in a while with this config 60% full.

Is there anything to do to avoid having to upload twice and wait twice (other than pressing reset and boot, to extend the life of those tiny buttons) to start DFU bootloader earlier ?

So, this is definitely the case for some setups.
I don’t know why, but for some people, the USB detection takes a really long time.
I don’t think it should matter how big the program is though…

With my config 98% full, it is a bit annoying because it takes a really long time to compile. I even had that by the time the config was compiled a second time, Arduino showed “Proffieboard V3 on COM3” before the second upload had a chance to start. But I am suspecting that the usb port on the board is getting a bit loose from all the plugging/un-plugging the cable in the last month.

Maybe it is a coincidence but from what I have noticed the bigger the config the more often it fails to start uploading on the first try. Once it uploads, it is fine (except once where I moved my test bed while uploading, that was the only time where the upload didn’t go to 100%)