Maimilian very likely you have only 16MB of memory, and if you don't compress the firmware (bootlaoder.flash(progress, pipeline, compress=True)
) it will fail. Try the following:
(ok, err) = bootloader.flash(progress, pipeline)
print(f"Flashing success: {ok}, error: {err}")
And then change to:
(ok, err) = bootloader.flash(progress, pipeline, compress=True)