File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -380,8 +380,6 @@ struct LoadFileElf : public Commands<T> {
380380 }
381381 }
382382
383- this ->flash .wait_not_busy ();
384-
385383 // Then, load the segment data from the file.
386384 auto loaded = 0 ;
387385 auto load_progress = ProgressBar (load_size, 50 , " Loading" ).with_throughput ();
@@ -398,6 +396,8 @@ struct LoadFileElf : public Commands<T> {
398396 auto n = std::min (to_next, data.size ());
399397 std::vector<uint8_t > page (data.first (n).begin (), data.first (n).end ());
400398
399+ this ->flash .wait_not_busy ();
400+
401401 if (addr4b) {
402402 res = this ->flash .template single_page_program_non_blocking <4 >(addr, page);
403403 } else if (quad) {
@@ -410,8 +410,6 @@ struct LoadFileElf : public Commands<T> {
410410 return 0 ;
411411 }
412412
413- this ->flash .wait_not_busy ();
414-
415413 addr += n;
416414 loaded += n;
417415 data = data.subspan (n);
You can’t perform that action at this time.
0 commit comments