From 14783eadc22b419b2f87c80aa7eba0062d4862db Mon Sep 17 00:00:00 2001 From: Michal Moskal Date: Wed, 26 Jul 2017 19:14:12 +0100 Subject: [PATCH] Workaround UF2 driver problems by repeating the file 3 times --- editor/extension.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/editor/extension.ts b/editor/extension.ts index e00cd2d4..6c475c3a 100644 --- a/editor/extension.ts +++ b/editor/extension.ts @@ -72,7 +72,8 @@ namespace pxt.editor { let r = UF2.concatFiles([elfUF2, mkFile(".rbf", rbfBIN)]) let data = UF2.serializeFile(r) - resp.outfiles[pxtc.BINARY_UF2] = btoa(data) + // we repeat the file three times to minimze problems with failed writes + resp.outfiles[pxtc.BINARY_UF2] = btoa(data + data + data) let saveUF2Async = () => { if (isCli || !pxt.commands.saveOnlyAsync) {