Workaround UF2 driver problems by repeating the file 3 times

This commit is contained in:
Michal Moskal 2017-07-26 19:14:12 +01:00
parent 5e7754b436
commit 14783eadc2

View File

@ -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) {