File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 1414
1515 3) In the IDE select: Sketch -> Export compiled Binary
1616
17- 4) Write the .bin file from the sketch's folder to the MKRMEM shield using
18- the MKRMEM_WriteUpdate sketch.
17+ 4) Open the location of the sketch and convert the .bin file to a C byte array.
18+ cat SKETCH.bin | xxd --include > Binary.h
1919
20- created 15 April 2020
21- by Alexander Entinger
20+ 5) Copy Binary.h file from the sketch's folder to the SFU_LoadBinary sketch
21+ and load it to the MKRMEM via SFU_LoadBinary sketch.
2222*/
2323
2424/*
2727 This will add some code to the sketch before setup() is called
2828 to check if UPDATE.bin is present on the flash chip of the MKRMEM
2929 shield. If this theck is positive the file is used to update the sketch
30- running on the board. After this UPDATE.bin is deleted from the flash.
30+ running on the board. After this UPDATE.BIN is deleted from the flash.
3131*/
32+
3233#include < SFU.h>
3334
3435void setup () {
3536 Serial.begin (9600 );
37+ while (!Serial) { }
3638
3739 // wait a bit
3840 delay (1000 );
@@ -50,4 +52,3 @@ void setup() {
5052void loop () {
5153 // add you own code here
5254}
53-
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ int main()
7878 int file_size = file.lseek (0 , END);
7979 if (file_size > SFU_SIZE)
8080 {
81- /* Skip the SDU section */
81+ /* Skip the SFU section */
8282 file.lseek (SFU_SIZE, START);
8383 file_size -= SFU_SIZE;
8484
@@ -101,7 +101,7 @@ int main()
101101 filesystem.unmount ();
102102 }
103103 }
104-
104+
105105 /* Jump to the sketch */
106106 __set_MSP (*SKETCH_START);
107107
You can’t perform that action at this time.
0 commit comments