File tree 2 files changed +9
-8
lines changed
2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 14
14
15
15
3) In the IDE select: Sketch -> Export compiled Binary
16
16
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
19
19
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.
22
22
*/
23
23
24
24
/*
27
27
This will add some code to the sketch before setup() is called
28
28
to check if UPDATE.bin is present on the flash chip of the MKRMEM
29
29
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.
31
31
*/
32
+
32
33
#include < SFU.h>
33
34
34
35
void setup () {
35
36
Serial.begin (9600 );
37
+ while (!Serial) { }
36
38
37
39
// wait a bit
38
40
delay (1000 );
@@ -50,4 +52,3 @@ void setup() {
50
52
void loop () {
51
53
// add you own code here
52
54
}
53
-
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ int main()
78
78
int file_size = file.lseek (0 , END);
79
79
if (file_size > SFU_SIZE)
80
80
{
81
- /* Skip the SDU section */
81
+ /* Skip the SFU section */
82
82
file.lseek (SFU_SIZE, START);
83
83
file_size -= SFU_SIZE;
84
84
@@ -101,7 +101,7 @@ int main()
101
101
filesystem.unmount ();
102
102
}
103
103
}
104
-
104
+
105
105
/* Jump to the sketch */
106
106
__set_MSP (*SKETCH_START);
107
107
You can’t perform that action at this time.
0 commit comments