Skip to content

Commit

Permalink
Add note about merging files (#298)
Browse files Browse the repository at this point in the history
* Add note about merging files

* Update index.html

* Update index.html

* Update index.html

* Updates

* Updates

* More tweaks
  • Loading branch information
balloob authored Dec 11, 2022
1 parent 55d6bdd commit 554d1a8
Showing 1 changed file with 37 additions and 4 deletions.
41 changes: 37 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,42 @@ <h2 id="add-website">Adding ESP Web Tools to your website</h2>
ESP Web Tools can also be integrated in your projects by installing it
<a href="https://www.npmjs.com/package/esp-web-tools">via NPM</a>.
</p>
<h3 id="preparing-firmware">Preparing your firmware</h3>
<p>
If you have ESP32 firmware and are using ESP-IDF framework v4 or later,
you will need to create a merged version of your firmware before being
able to use it with ESP Web Tools. If you use ESP8266 or ESP32 with
ESP-IDF v3 or earlier, you can skip this section.
</p>
<p>
ESP32 firmware is split into 4 different files. When these files are
installed using the command-line tool <code>esptool</code>, it will
patch flash frequency, flash size and flash mode to match the target
device. ESP Web Tools is not able to do this on the fly, so you will
need to use <code>esptool</code> to create the single binary file and
use that with ESP Web Tools.
</p>
<p>
Create a single binary using <code>esptool</code> with the following
command:
</p>
<pre>
esptool --chip esp32 merge_bin \
-o merged-firmware.bin \
--flash_mode dio \
--flash_freq 40m \
--flash_size 4MB \
0x1000 bootloader.bin \
0x8000 partitions.bin \
0xe000 boot.bin \
0x10000 your_app.bin</pre
>
<p>
If your memory type is <code>opi_opi</code> or <code>opi_qspi</code>,
set your flash mode to be <code>dout</code>. Else, if your flash mode is
<code>qio</code> or <code>qout</code>, override your flash mode to be
<code>dio</code>.
</p>
<h3 id="manifest">Creating your manifest</h3>
<p>
Manifests describe the firmware that you want to offer the user to
Expand All @@ -372,10 +408,7 @@ <h3 id="manifest">Creating your manifest</h3>
{
"chipFamily": "ESP32",
"parts": [
{ "path": "bootloader.bin", "offset": 4096 },
{ "path": "partitions.bin", "offset": 32768 },
{ "path": "ota.bin", "offset": 57344 },
{ "path": "firmware.bin", "offset": 65536 }
{ "path": "merged-firmware.bin", "offset": 0 },
]
},
{
Expand Down

0 comments on commit 554d1a8

Please sign in to comment.