You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `offset` for the beam application partition is now read from the partition table on the attached
esp32 device. When a custom partition table is used that does not use `main.avm` for the beam app
partition name the `app_partition` parameter should be used to specify the application partition
to be flashed. Valid application partition sub-types (the type is `data`) are `phy` or `0xAA`.
If the `offset` parameter is specified it will be used to verify that the offset address of the
application partition matched the expected value. This may be used to prevent flashing to a
standard build of AtomMV for application that require a custom partition table.
The `port` that the ESP32 is attached to is now auto discovered by default. When more than one
ESP32 device is plugged into USB the port should be specified to control which device is flashed.
Error reporting has been improved with descriptive error messages.
Dialyzer warnings for the esp32_flash task have been fixed when analyzing atomvm_rebar3_plugin.
Signed-off-by: Winford <winford@object.stream>
Copy file name to clipboardExpand all lines: README.md
+34-15Lines changed: 34 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -260,24 +260,30 @@ Running this AVM file will boot the `myapp` application automatically, without h
260
260
261
261
You may use the `esp32_flash` task to flash the generated AtomVM packbeam application to the flash storage on an ESP32 device connected over a serial connection.
262
262
263
-
shell$ rebar3 help atomvm esp32_flash
264
-
265
-
Use this plugin to flash an AtomVM packbeam file to an ESP32 device.
-o, --offset Offset (default read from device) *old behavior
277
+
deprecated, use app_partition. When given, verifies
278
+
expected offset to actual
279
+
-a, --app_partition Application partition name (default main.avm)
280
+
```
275
281
276
282
The `esp32_flash` task will use the `esptool.py` command to flash the ESP32 device. This tool is available via the <ahref="https://docs.espressif.com/projects/esp-idf/en/latest/esp32/">IDF SDK</a>, or directly via <ahref="https://github.com/espressif/esptool">github</a>. The `esptool.py` command is also available via many package managers (e.g., MacOS Homebrew).
277
283
278
-
By default, the `esp32_flash` task will assume the `esptool.py` command is available on the user's executable path. Alternatively, you may specify the full path to the `esptool.py` command via the `-e` (or `--esptool`) option
284
+
By default, the `esp32_flash` task will assume the `esptool.py` command is available on the user's executable path. Alternatively, you may specify the full path to the `esptool.py` command via the `-e` (or `--esptool`) option.
279
285
280
-
By default, the `esp32_flash` task will write to port `/dev/ttyUSB0` at a baud rate of `115200`. You may control the port and baud settings for connecting to your ESP device via the `-port` and `-baud` options to the `esp32_flash` task, e.g.,
286
+
By default, the `esp32_flash` task uses port auto discovery at a baud rate of `115200`. You may control the port and baud settings for connecting to your ESP device via the `-port` and `-baud` options to the `esp32_flash` task, e.g.,
@@ -306,7 +312,8 @@ The following table enumerates the properties that may be defined in your projec
306
312
|`chip`|`string()`| ESP32 chip type |
307
313
|`port`|`string()`| Device port on which the ESP32 can be located |
308
314
|`baud`|`integer()`| Device BAUD rate |
309
-
|`offset`|`string()`| Offset into which to write AtomVM application |
315
+
|`offset`|`string()`| Optionally verify offset on flash matches expected value. Original behavior deprecated: use `app_partition` for custom images or to target a different partition |
316
+
|`app_partition`|`string()`| Name of application partition to write AtomVM application for custom partition tables |
310
317
311
318
Example:
312
319
@@ -319,9 +326,21 @@ Alternatively, the following environment variables may be used to control the ab
319
326
*`ATOMVM_REBAR3_PLUGIN_ESP32_FLASH_PORT`
320
327
*`ATOMVM_REBAR3_PLUGIN_ESP32_FLASH_BAUD`
321
328
*`ATOMVM_REBAR3_PLUGIN_ESP32_FLASH_OFFSET`
329
+
*`ATOMVM_REBAR3_PLUGIN_ESP32_APP_PARTITION`
322
330
323
331
Any setting specified on the command line take precedence over settings in `rebar.config`, which in turn take precedence over environment variable settings, which in turn take precedence over the default values specified above.
324
332
333
+
```note
334
+
The behavior of the `offset` configuration option has changed, the correct offset for standard
335
+
AtomVM builds are determined by the partition table flashed to the device. Elixir supported builds
336
+
are recognized and the correct offset will be used. When using a custom partition table it is
337
+
necessary to supply the `app_partition` name. If an offset is given it will be compared to the
338
+
address of the discovered `app_partition` and an error will be raised if they do not match. The
339
+
partition name of the application partition for standard AtomVM partition tables is `main.avm`, but
340
+
it is not necessary to supply the name when using a release image or one of the standard partition
341
+
tables.
342
+
```
343
+
325
344
The `esp32_flash` task depends on the `packbeam` task, so the packbeam file will get automatically built if any changes have been made to its dependencies.
Copy file name to clipboardExpand all lines: UPDATING.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,17 @@
6
6
7
7
# `atomvm_rebar3_plugin` Update Instructions
8
8
9
+
## (unreleased)
10
+
11
+
- The `esp32_flash` task now reads the application `offset` from the partition table on the device.
12
+
If you are using a custom partition table that does not use `main.avm` for the application partition
13
+
name you should supply the name used with the `app_partition` parameter. An `offset` may optionally
14
+
be supplied to assure the offset of the application partition matches the expected offset, this may
15
+
be helpful to assure that specific applications are only flashed to devices with a custom build of
16
+
AtomVM.
17
+
- Pico 2 (RP2350) devices are recognized and now work with default parameters. Specifying device
18
+
path and uf2 flavor for these chipsets is no longer necessary.
19
+
9
20
## 0.6.* -> 0.7.*
10
21
11
22
- The `atomvm_rebar3_plugin` tasks have been moved into the `atomvm` namespace (from the [`rebar3`](https://rebar3.org)`default` namespace). The "legacy" tasks in the `default` namespace are deprecated, and users will be issued a warning when used. Be sure to use the `atomvm` namespace in any future usage of this plugin, as the deprecated tasks may be removed without warning. E.g., `rebar3 atomvm packbeam ...`
0 commit comments