Ok, so I just tried compiling an NRF52832DK firmware both with and without the bootloader. The bootloader does appear to add a significant delay (time between when you release the RST button and LED1 flashes) and I just checked the delay comes from a check nrf_dfu_app_is_valid inside Nordic's bootloader code, which is performing a CRC on the code in flash memory.
I discovered that was being done twice when it wasn't required, and I have just pushed some changes to avoid that - but it's still pretty slow and costly, and even to get my changes would require re-updating the bootloader.
However the code itself checks first to see if there's a valid CRC, and if the CRC is set to 0 it doesn't bother checking.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Ok, so I just tried compiling an NRF52832DK firmware both with and without the bootloader. The bootloader does appear to add a significant delay (time between when you release the RST button and LED1 flashes) and I just checked the delay comes from a check
nrf_dfu_app_is_valid
inside Nordic's bootloader code, which is performing a CRC on the code in flash memory.I discovered that was being done twice when it wasn't required, and I have just pushed some changes to avoid that - but it's still pretty slow and costly, and even to get my changes would require re-updating the bootloader.
However the code itself checks first to see if there's a valid CRC, and if the CRC is set to 0 it doesn't bother checking.
So try running this code in Espruino:
It should remove the bootloader delay pretty much completely by stopping it from performing the CRC.