Skip to content

Commit

Permalink
Clean up Elixir examples and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
fadushin committed Oct 11, 2023
1 parent 2260f6e commit 7ad6361
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 16 deletions.
1 change: 0 additions & 1 deletion elixir/Blinky/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ defmodule Blinky.MixProject do
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:exavmlib, "~> 0.1.0"},
{:exatomvm, git: "https://github.com/atomvm/ExAtomVM/"}
]
end
Expand Down
1 change: 0 additions & 1 deletion elixir/HelloWorld/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ defmodule HelloWorld.MixProject do
# Run "mix help deps" to learn about dependencies.
defp deps do
[
#{:exavmlib, "~> 0.1.0"},
{:exatomvm, git: "https://github.com/atomvm/ExAtomVM/"}
]
end
Expand Down
21 changes: 11 additions & 10 deletions elixir/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,21 @@ To build and run an example in this directory, change your working directory to

The following generic instructions apply to the Elixir tests in this repository. Special notes about building and running the example programs that deviate from these instructions are noted in the README file for the particular example program.

### Preparation
### Preparation (Optional)

Create a directory called `avm_deps` in the top level of this project directory:
In order to avoid warnings from the Elixir compiler, you can make all of the symbols used from AtomVM libraries available to your application at build time. This has the advantage of making the compiler less noisy. However, it has the side effect of making your application files larger than they need to be, which can increase the time to deploy your applications to flash storage, for example, on a device.

If you want to take this path, create a directory called `avm_deps` in the top level of this project directory:

shell$ mkdir avm_deps

Download a copy of the AtomVM-libs from the AtomVM Gitbub [release repository](https://github.com/atomvm/AtomVM/releases/). Extract the contents of this archive and copy the enclosed AVM files into the `avm_deps` directory.
Download a copy of the AtomVM library (`atomvmlib-<version>.img`) from the AtomVM Github [release repository](https://github.com/atomvm/AtomVM/releases/). Copy this file into the `avm_deps` directory.

Afterwards, you should see something like:

shell$ ls -l avm_deps
total 264
-rw-rw-r-- 1 frege wheel 11380 May 8 16:32 alisp.avm
-rw-rw-r-- 1 frege wheel 48956 May 8 16:32 atomvmlib.avm
-rw-rw-r-- 1 frege wheel 23540 May 8 16:32 eavmlib.avm
-rw-rw-r-- 1 frege wheel 25456 May 8 16:32 estdlib.avm
-rw-rw-r-- 1 frege wheel 1052 May 8 16:32 etest.avm
-rw-rw-r-- 1 frege wheel 16356 May 8 16:32 exavmlib.avm
-rw-rw-r-- 1 frege wheel 11380 May 8 16:32 atomvmlib-v0.6.0.avm

### Building

Expand All @@ -46,7 +43,7 @@ To build and package this application into an AtomVM AVM file, use the `packbeam
shell$ mix deps.get
shell$ mix atomvm.packbeam

This target will create the `Blinky.avm` file in the `./_build/default/lib/` directory.
This target will create an AVM file (e.g., `Blinky.avm`) file in the top-level directory.

### Running on the ESP32 platform

Expand All @@ -68,6 +65,10 @@ Use a serial console program, such as `minicom`, to attach to the device over US

TODO

### Running on the Raspberry Pico platform

TODO

### Running on Generic Unix platforms

To run this application on a generic UNIX platform, supply the path to the generated AVM file, together with the AtomVM core library
Expand Down
4 changes: 4 additions & 0 deletions erlang/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ Use a serial console program, such as `minicom`, to attach to the device over US

TODO

### Running on the Raspberry Pico platform

TODO

### Running on Generic Unix platforms

To run this application on a generic UNIX platform, supply the path to the generated AVM file, together with the AtomVM core library
Expand Down
4 changes: 0 additions & 4 deletions erlang/template/.gitignore

This file was deleted.

0 comments on commit 7ad6361

Please sign in to comment.