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
Update build documentation for nif or port inclusion
Updates "Build Instructions" documentation for including custom nifs and ports into esp32 builds.
Closes#1599
Signed-off-by: Winford <winford@object.stream>
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
@@ -569,8 +569,8 @@ documentation.
569
569
570
570
The instructions for adding custom Nifs and ports differ in slight detail, but are otherwise quite similar. In general, they involve:
571
571
572
-
1. Adding the custom Nif or Port to the `components` directory of the AtomVM source tree;
573
-
1.Adding the component to the corresponding `main/component_nifs.txt` or `main/component_ports.txt` files;
572
+
1. Adding the custom Nif or Port to the `components` directory of the AtomVM source tree.
573
+
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.
574
574
1. Building the AtomVM binary.
575
575
576
576
```{attention}
@@ -604,10 +604,12 @@ To add support for a new peripheral or protocol using custom AtomVM Nif, you nee
604
604
Instructions for implementing Nifs is outside of the scope of this document.
605
605
```
606
606
607
-
* Add your `<moniker>` to the `main/component_nifs.txt` file in the `src/platforms/esp32` directory.
608
-
```{attention}
609
-
The `main/component_nifs.txt` file will not exist until after the first clean build.
610
-
```
607
+
* 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:
@@ -630,10 +632,12 @@ To add support for a new peripheral or protocol using an AtomVM port, you need t
630
632
Instructions for implementing Ports is outside of the scope of this document.
631
633
```
632
634
633
-
* Add your `<moniker>` to the `main/component_ports.txt` file in the `src/platforms/esp32` directory.
634
-
```{attention}
635
-
The `main/component_ports.txt` file will not exist until after the first clean build.
636
-
```
635
+
* 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