Skip to content

Commit 49def72

Browse files
committed
Forward port changes from v0.6 release branch
Merge minor fixes from release-0.6 branch.
2 parents 988c322 + 78f8c13 commit 49def72

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

doc/src/atomvm-tooling.md

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ remote: Total 17 (delta 6), reused 16 (delta 6), pack-reused 0
304304
origin/HEAD set to main
305305
```
306306

307-
You can now use the `atomvm.packbeam` target to create a packbeam (ending in `.avm`) file:
307+
You can now use the `mix atomvm.packbeam` task to create a packbeam (ending in `.avm`) file:
308308

309309
```shell
310310
$ mix atomvm.packbeam
@@ -328,7 +328,7 @@ $ ls -l HelloWorld.avm
328328

329329
```{seealso}
330330
See the [`ExAtomVM`](https://github.com/atomvm/ExAtomVM) page for more detailed instructions about how to use the
331-
`atomvm.packbeam` target.
331+
`mix atomvm.packbeam` task.
332332
```
333333

334334
### Running on the `generic_unix` platform
@@ -349,10 +349,10 @@ The [`ExAtomVM`](https://github.com/atomvm/ExAtomVM) plugin supports flash targe
349349

350350
#### ESP32 flash task
351351

352-
To flash AtomVM packbeam file to an ESP32 device, use the `mix.esp32.flash` target. Users will typically specify the device port and baud rate as command-line options to this target.
352+
To flash AtomVM packbeam file to an ESP32 device, use the `mix atomvm.esp32.flash` task. Users will typically specify the device port and baud rate as command-line options to this target.
353353

354354
```{important}
355-
In order to use the `mix.esp32.flash` target, you will need to install the [`esptool`](https://github.com/espressif/esptool) program.
355+
In order to use the `mix atomvm.esp32.flash` task, you will need to install the [`esptool`](https://github.com/espressif/esptool) program.
356356
```
357357

358358
For example:
@@ -362,14 +362,10 @@ $ mix atomvm.esp32.flash --port /dev/ttyUSB0 --baud 921600
362362
```
363363

364364
```{tip}
365-
A baud rate of 921600 works well for most ESP32 devices, some can work reliably at higher rates of 1500000, or even
366-
2000000, but some devices (especially those with a 26Mhz crystal frequency, rather than the more common 40 Mhz
367-
crystal) may need to use a slower baud rate such as 115200.
365+
A baud rate of 921600 works well for most ESP32 devices, some can work reliably at higher rates of 1500000, or even 2000000, but some devices (especially those with a 26Mhz crystal frequency, rather than the more common 40 Mhz crystal) may need to use a slower baud rate such as 115200.
368366
```
369367

370-
> Note. A baud rate of 921600 works well for most ESP32 devices, some can work reliably at higher rates of 1500000, or even 2000000, but some devices (especially those with a 26Mhz crystal frequency, rather than the more common 40 Mhz crystal) may need to use a slower baud rate such as 115200.
371-
372-
See the [`ExAtomVM`](https://github.com/atomvm/ExAtomVM) page for more detailed instructions about how to use the `mix.esp32.flash` target.
368+
See the [`ExAtomVM`](https://github.com/atomvm/ExAtomVM) page for more detailed instructions about how to use the `mix atomvm.esp32.flash` task.
373369

374370
You can now use a serial console program such as [minicom](https://en.wikipedia.org/wiki/Minicom) or [screen](https://en.wikipedia.org/wiki/GNU_Screen) to view console output from a device.
375371

@@ -404,10 +400,10 @@ You can now use a serial console program such as [minicom](https://en.wikipedia.
404400

405401
#### STM32 flash task
406402

407-
To flash AtomVM packbeam file to an STM32 device, use the `atomvm.stm32.flash` mix target.
403+
To flash AtomVM packbeam file to an STM32 device, use the `mix atomvm.stm32.flash` task.
408404

409405
```{important}
410-
In order to use the `mix.stm32.flash` target, you will need to install the `st-flash` tool from the open source
406+
In order to use the `mix atomvm.stm32.flash` task, you will need to install the `st-flash` tool from the open source
411407
(bsd-3 licensed) [stlink](https://github.com/stlink-org/stlink) suite of stm32 utilities.
412408
```
413409

doc/src/build-instructions.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -650,8 +650,8 @@ documentation.
650650

651651
The instructions for adding custom Nifs and ports differ in slight detail, but are otherwise quite similar. In general, they involve:
652652

653-
1. Adding the custom Nif or Port to the `components` directory of the AtomVM source tree;
654-
1. Adding the component to the corresponding `main/component_nifs.txt` or `main/component_ports.txt` files;
653+
1. Adding the custom Nif or Port to the `components` directory of the AtomVM source tree.
654+
1. Run `idf.py reconfigure` to pick up any menuconfig options, many extra drivers have an option to disable them (they are enabled by default). Optionally use `idf.py menuconfig` and confirm the driver is enabled and save when quitting.
655655
1. Building the AtomVM binary.
656656

657657
```{attention}
@@ -685,10 +685,12 @@ To add support for a new peripheral or protocol using custom AtomVM Nif, you nee
685685
Instructions for implementing Nifs is outside of the scope of this document.
686686
```
687687

688-
* Add your `<moniker>` to the `main/component_nifs.txt` file in the `src/platforms/esp32` directory.
689-
```{attention}
690-
The `main/component_nifs.txt` file will not exist until after the first clean build.
691-
```
688+
* Add the `REGISTER_NIF_COLLECTION` using the parameters `NAME`, `INIT_CB`, `DESTROY_CB`, `RESOLVE_NIF_CB` macro to the end of your nif code. Example:
689+
690+
```c
691+
REGISTER_NIF_COLLECTION(my_nif, NULL, NULL, my_nif_get_nif);
692+
```
693+
692694

693695
#### Adding a custom AtomVM Port
694696

@@ -711,10 +713,12 @@ To add support for a new peripheral or protocol using an AtomVM port, you need t
711713
Instructions for implementing Ports is outside of the scope of this document.
712714
```
713715

714-
* Add your `<moniker>` to the `main/component_ports.txt` file in the `src/platforms/esp32` directory.
715-
```{attention}
716-
The `main/component_ports.txt` file will not exist until after the first clean build.
717-
```
716+
* Add the `REGISTER_PORT_COLLECTION` using the parameters `NAME`, `INIT_CB`, `DESTROY_CB`, `RESOLVE_NIF_CB` macro to the end of your nif code. Example:
717+
718+
```c
719+
REGISTER_PORT_COLLECTION(my_port, my_port_init, NULL, my_port_create_port);
720+
```
721+
718722

719723
## Building for STM32
720724

0 commit comments

Comments
 (0)