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
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:
308
308
309
309
```shell
310
310
$ mix atomvm.packbeam
@@ -328,7 +328,7 @@ $ ls -l HelloWorld.avm
328
328
329
329
```{seealso}
330
330
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.
332
332
```
333
333
334
334
### Running on the `generic_unix` platform
@@ -349,10 +349,10 @@ The [`ExAtomVM`](https://github.com/atomvm/ExAtomVM) plugin supports flash targe
349
349
350
350
#### ESP32 flash task
351
351
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.
353
353
354
354
```{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.
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.
368
366
```
369
367
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.
373
369
374
370
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.
375
371
@@ -404,10 +400,10 @@ You can now use a serial console program such as [minicom](https://en.wikipedia.
404
400
405
401
#### STM32 flash task
406
402
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.
408
404
409
405
```{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
411
407
(bsd-3 licensed) [stlink](https://github.com/stlink-org/stlink) suite of stm32 utilities.
Copy file name to clipboardExpand all lines: doc/src/build-instructions.md
+14-10Lines changed: 14 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -650,8 +650,8 @@ documentation.
650
650
651
651
The instructions for adding custom Nifs and ports differ in slight detail, but are otherwise quite similar. In general, they involve:
652
652
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.
655
655
1. Building the AtomVM binary.
656
656
657
657
```{attention}
@@ -685,10 +685,12 @@ To add support for a new peripheral or protocol using custom AtomVM Nif, you nee
685
685
Instructions for implementing Nifs is outside of the scope of this document.
686
686
```
687
687
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:
@@ -711,10 +713,12 @@ To add support for a new peripheral or protocol using an AtomVM port, you need t
711
713
Instructions for implementing Ports is outside of the scope of this document.
712
714
```
713
715
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:
0 commit comments