Trouble installing nerves_uart

I’m trying to use the Nerves.UART module. I followed the installation instructions on github:

When I issued mix compile it seemed to build successfully:

Jims-MacBook-Pro-6:rp4n2 jim$ mix deps.get
Resolving Hex dependencies…
Dependency resolution completed:
elixir_make 0.4.0
nerves_uart 0.1.2

  • Getting nerves_uart (Hex package)
    Checking package (
    Fetched package
  • Getting elixir_make (Hex package)
    Checking package (
    Fetched package
    Jims-MacBook-Pro-6:rp4n2 jim$ mix compile
    ==> elixir_make
    Compiling 1 file (.ex)
    Generated elixir_make app
    ==> nerves_uart
    mkdir -p priv
    cc -c -I"/usr/local/Cellar/erlang/20.1.5/lib/erlang/usr/include" -O2 -Wall -Wextra -Wno-unused-parameter -std=c99 -D_GNU_SOURCE -o src/debug_tests.o src/debug_tests.c
    cc -c -I"/usr/local/Cellar/erlang/20.1.5/lib/erlang/usr/include" -O2 -Wall -Wextra -Wno-unused-parameter -std=c99 -D_GNU_SOURCE -o src/erlcmd.o src/erlcmd.c
    cc -c -I"/usr/local/Cellar/erlang/20.1.5/lib/erlang/usr/include" -O2 -Wall -Wextra -Wno-unused-parameter -std=c99 -D_GNU_SOURCE -o src/nerves_uart.o src/nerves_uart.c
    cc -c -I"/usr/local/Cellar/erlang/20.1.5/lib/erlang/usr/include" -O2 -Wall -Wextra -Wno-unused-parameter -std=c99 -D_GNU_SOURCE -o src/uart_comm.o src/uart_comm.c
    cc -c -I"/usr/local/Cellar/erlang/20.1.5/lib/erlang/usr/include" -O2 -Wall -Wextra -Wno-unused-parameter -std=c99 -D_GNU_SOURCE -o src/uart_comm_unix.o src/uart_comm_unix.c
    cc -c -I"/usr/local/Cellar/erlang/20.1.5/lib/erlang/usr/include" -O2 -Wall -Wextra -Wno-unused-parameter -std=c99 -D_GNU_SOURCE -o src/uart_comm_win.o src/uart_comm_win.c
    cc -c -I"/usr/local/Cellar/erlang/20.1.5/lib/erlang/usr/include" -O2 -Wall -Wextra -Wno-unused-parameter -std=c99 -D_GNU_SOURCE -o src/uart_enum.o src/uart_enum.c
    cc -c -I"/usr/local/Cellar/erlang/20.1.5/lib/erlang/usr/include" -O2 -Wall -Wextra -Wno-unused-parameter -std=c99 -D_GNU_SOURCE -o src/uart_enum_linux.o src/uart_enum_linux.c
    cc -c -I"/usr/local/Cellar/erlang/20.1.5/lib/erlang/usr/include" -O2 -Wall -Wextra -Wno-unused-parameter -std=c99 -D_GNU_SOURCE -o src/uart_enum_osx.o src/uart_enum_osx.c
    cc -c -I"/usr/local/Cellar/erlang/20.1.5/lib/erlang/usr/include" -O2 -Wall -Wextra -Wno-unused-parameter -std=c99 -D_GNU_SOURCE -o src/uart_enum_win.o src/uart_enum_win.c
    cc -c -I"/usr/local/Cellar/erlang/20.1.5/lib/erlang/usr/include" -O2 -Wall -Wextra -Wno-unused-parameter -std=c99 -D_GNU_SOURCE -o src/util.o src/util.c
    cc src/debug_tests.o src/erlcmd.o src/nerves_uart.o src/uart_comm.o src/uart_comm_unix.o src/uart_comm_win.o src/uart_enum.o src/uart_enum_linux.o src/uart_enum_osx.o src/uart_enum_win.o src/util.o -L"/usr/local/Cellar/erlang/20.1.5/lib/erlang/usr/lib" -lei -framework CoreFoundation -framework IOKit -o priv/nerves_uart
    Compiling 5 files (.ex)
    Generated nerves_uart app
    ==> rp4n2
    Compiling 1 file (.ex)
    Generated rp4n2 app
    Jims-MacBook-Pro-6:rp4n2 jimarcher$ iex
    Erlang/OTP 20 [erts-9.1.4] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]

When I try to use it from iex, though, I get this:

iex(2)> alias Nerves.UART
iex(3)> UART.enumerate
** (UndefinedFunctionError) function Nerves.UART.enumerate/0 is undefined (module Nerves.UART is not available)

Is there a way to verify that the library is available?


Oops… Never mind… It all works if I start iex like this:

$ iex -S mix

1 Like