Skip to content

Commit d02f94f

Browse files
committed
Updated README.md with binary merge instructions
1 parent 46b37e8 commit d02f94f

File tree

1 file changed

+35
-7
lines changed

1 file changed

+35
-7
lines changed

README.md

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,46 @@
11
# Artemis Watch Firmware
22

33
# Building
4-
To build the Artemis base firmware, you'll need the ESP-IDF. You can find the getting started
5-
guide [here](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/). The
6-
production firmware is built using IDF version 5.1, commit [3a45d4e](https://github.com/espressif/esp-idf/tree/3a45d4e949a174e8829a2e4c86c421b030ceac5a).
4+
5+
To build the Artemis base firmware, you'll need the ESP-IDF. You can find the getting started
6+
guide [here](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/). The
7+
production firmware is built using IDF version 5.1,
8+
commit [3a45d4e](https://github.com/espressif/esp-idf/tree/3a45d4e949a174e8829a2e4c86c421b030ceac5a).
79

810
### ESP-IDF patching
11+
912
Contained in the repository is [ESP-IDF.patch](ESP-IDF.patch).
1013
The patch addresses [issues](https://github.com/espressif/esp-idf/issues/11690) in IDF v5.1
1114
related to FPU registers during context switching.
1215

1316
For proper code functioning, apply this patch onto your ESP-IDF installation path using:
17+
1418
```shell
1519
cd /esp-idf-path/
1620
git apply ESP-IDF.patch
1721
```
1822

1923
Clone all submodules from the project root
24+
2025
```shell
2126
git submodule update --init --recursive
2227
```
2328

2429
### JPEGDEC patching
30+
2531
Contained in the repository is [JPEGDEC.patch](JPEGDEC.patch).
2632
Apply it onto the cloned JPEGDEC submodule:
33+
2734
```shell
2835
cd components/JPEGDEC
2936
git apply ../../JPEGDEC.patch
3037
```
3138

3239
### LovyanGFX patching
40+
3341
Contained in the repository is [LovyanGFX.patch](LovyanGFX.patch).
3442
Apply it onto the cloned LovyanGFX submodule:
43+
3544
```shell
3645
cd components/LovyanGFX
3746
git apply ../../LovyanGFX.patch
@@ -41,16 +50,35 @@ After patching everything, in the root directory of the project:
4150

4251
**To build the firmware** run ```idf.py build```
4352

44-
**To upload the firmware to the device** run ```idf.py -p <PORT> flash```. Replace `<PORT>` with
53+
**To upload the firmware to the device** run ```idf.py -p <PORT> flash```. Replace `<PORT>` with
4554
the port Artemis is attached to, for ex. ```COM6``` or ```/dev/ttyACM0```.
4655

56+
### Merging a single binary file
57+
58+
After building (or flashing) the firmware, you can merge the resulting files into a single
59+
binary file. This is useful for sharing a build or flashing it directly onto the board.
60+
61+
The necessary tool for this is [esptool](https://github.com/espressif/esptool), which comes
62+
preinstalled with ESP-IDF
63+
64+
From the project root go into your build folder (usually just /build):
65+
66+
```shell
67+
cd build
68+
esptool --chip esp32s3 merge_bin --fill-flash-size 4MB -o ../Artemis.bin --flash_mode dio
69+
--flash_freq 80m --flash_size 4MB 0x0 bootloader/bootloader.bin 0x10000 Artemis-Firmware.bin 0x8000 partition_table/partition-table.bin 0x2f6000 storage.bin
70+
```
71+
4772
# Restoring the stock firmware
48-
To restore the stock firmware, you can download the prebuilt binary on the [releases page](https://github.com/CircuitMess/GC_Artemis-Firmware/releases) of this repository
73+
74+
To restore the stock firmware, you can download the prebuilt binary on
75+
the [releases page](https://github.com/CircuitMess/GC_Artemis-Firmware/releases) of this repository
4976
and flash it manually using esptool:
77+
5078
```shell
5179
esptool -c esp32s3 -b 921600 -p <PORT> write_flash 0 Artemis-Firmware.bin
5280
```
5381

54-
Alternatively, you can also do so using [CircuitBlocks](https://code.circuitmess.com/) by
55-
logging in, clicking the "Restore Firmware" button in the top-right corner, and following the
82+
Alternatively, you can also do so using [CircuitBlocks](https://code.circuitmess.com/) by
83+
logging in, clicking the "Restore Firmware" button in the top-right corner, and following the
5684
on-screen instructions.

0 commit comments

Comments
 (0)