Skip to content

Commit 2a840a4

Browse files
committed
Updating documentation
1 parent 9f56617 commit 2a840a4

File tree

1 file changed

+23
-24
lines changed

1 file changed

+23
-24
lines changed

Diff for: extras/tools/README.md

+23-24
Original file line numberDiff line numberDiff line change
@@ -11,40 +11,39 @@ cd ~/Arduino/libraries/ArduinoIoTCloud/extras/tools
1111
./bin2ota.py [MKR_WIFI_1010 | NANO_33_IOT] sketch.lzss sketch.ota
1212
```
1313

14+
## `lzss.py`
15+
This tool allows to compress a binary file using the LZSS algorithm.
16+
17+
### How-To-Use
18+
* Encoding (Compressing)
19+
```bash
20+
./lzss.py --encode sketch.bin sketch.lzss
21+
```
22+
* Decoding (Extracting)
23+
```bash
24+
./lzss.py --decode sketch.lzss sketch.bin
25+
```
26+
1427
## `bin2ota.py`
1528
This tool can be used to extend (actually prefix) a binary generated with e.g. the Arduino IDE with the required length and crc values required to perform an OTA (Over-The-Air) update of the firmware.
1629

1730
### How-To-Use
1831
```bash
19-
./bin2ota.py [MKR_WIFI_1010 | NANO_33_IOT] sketch.bin sketch.ota
32+
./bin2ota.py [MKR_WIFI_1010 | NANO_33_IOT] sketch.lzss sketch.ota
2033
```
21-
#### `sketch.bin`
34+
#### `sketch.lzss`
2235
```bash
23-
0000000 8000 2000 749D 0000 7485 0000 7485 0000
24-
0000030 0000 0000 0000 0000 7485 0000 74F1 0000
36+
0 80602012 0a0cbe01 0094bfa2 bff7807c
37+
16 bfdd00d9 655fd240 cfc11065 a071e0b2
2538
...
2639
```
27-
* `length(sketch.bin) = 0x0003'A5E0`
28-
* `CRC32(sketch.bin) = 0xA9D1'265B`
29-
* `MAGIC NUMBER(MKR WIFI 1010) = 0x2341'8054`
30-
* `VERSION = 0x0000'0000'0000'0000`
31-
3240
#### `sketch.ota`
3341
```bash
34-
0000000 A5E0 0003 265B A9D1 2341 8054 0000 0000
35-
0000010 0000 0000 8000 2000 749D 0000 7485 0000
42+
0 3bca0100 7e1c3a2b 54804123 00000000
43+
16 00000040 80602012 0a0cbe01 0094bfa2
3644
...
3745
```
38-
39-
## `lzss.py`
40-
This tool allows to compress a binary file using the LZSS algorithm.
41-
42-
### How-To-Use
43-
* Encoding (Compressing)
44-
```bash
45-
./lzss.py --encode sketch.bin sketch.lzss
46-
```
47-
* Decoding (Extracting)
48-
```bash
49-
./lzss.py --decode sketch.lzss sketch.bin
50-
```
46+
* `length(sketch.lzss) = 3bca0100 -> 0x0001'CA3B`
47+
* `CRC32(sketch.lzss + MAGIC NUMBER + VERSION) = 7e1c3a2b -> 0x2B3A'1C7E`
48+
* `MAGIC NUMBER(MKR WIFI 1010) = 54804123 -> 0x2341'8054`
49+
* `VERSION = 00000000 00000040 -> 0x40'00'00'00'00'00'00'00`

0 commit comments

Comments
 (0)