I found a nasty bug I made that also could make the bootloader hang. This fixes it. I should not have redefined the blocksize variable to make the output look good. It screewed up the flash...