From 3c2255311cdb2e017ac881f117fd5e1e72a0fa2e Mon Sep 17 00:00:00 2001 From: R Date: Tue, 23 Apr 2024 16:58:39 +0100 Subject: [PATCH] Add another note on another optimization --- bootloader.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bootloader.c b/bootloader.c index dbd0083..0cf1eb2 100644 --- a/bootloader.c +++ b/bootloader.c @@ -230,6 +230,8 @@ extern uint32_t USB_SECTOR_STASH[128]; // Files larger than this won't cause an auto-reboot // (there is not enough USBD RAM to mark which blocks have been received) +// The last bit (MSB) of the last halfword is used to mark +// "has received the first valid UF2 block which contains a valid block count" #define AUTO_BOOT_BITMAP_NUM_HWORDS 36 #define MAX_AUTO_BOOT_BLOCKS (AUTO_BOOT_BITMAP_NUM_HWORDS * 16 - 1) extern uint32_t UF2_GOT_BLOCKS[AUTO_BOOT_BITMAP_NUM_HWORDS];