Giter Club home page Giter Club logo

atomvm_adc's Introduction

AtomVM

Brings Erlang, Elixir and other functional languages to really small systems.

AtomVM implements from scratch a minimal Erlang VM that supports a subset of ErlangVM features and that is able to run unmodified BEAM binaries on really small systems like MCUs.

Supported Platforms

AtomVM aims to be easily portable to new platforms with a minimum effort, so additional platforms might be supported in a near future.

Getting Started

There is much more information, including a more complete "Getting Started Guide", extensive documentation, examples, detailed build instructions, and contact information available on the AtomVM project website.

Don't forget to check out the examples repository to help get you started on your next IoT project.

Please, use v0.6.x releases, main branch is for development purposes and it might be unstable.

Dependencies

Required for building:

Documentation and Coverage:

  • gcov and lcov are optionally required to generate coverage report (make coverage).
  • For documentation build requirements consult the Documentation README.

Step-by-Step Build Instructions (generic unix platform)

$ mkdir build
$ cd build
$ cmake ..
$ make
$ ./src/AtomVM ./examples/erlang/hello_world.avm

Run tests within build directory with:

$ ./tests/test-erlang
$ ./tests/test-enif
$ ./tests/test-mailbox
$ ./tests/test-structs
$ ./src/AtomVM ./tests/libs/estdlib/test_estdlib.avm
$ ./src/AtomVM ./tests/libs/eavmlib/test_eavmlib.avm
$ ./src/AtomVM ./tests/libs/alisp/test_alisp.avm

Complete Build Instructions are available in the documentation for Generic UNIX (Linux, MacOS, FreeBSD, DragonFly), ESP32, STM32, Raspberry Pi Pico (rp2040), and WASM (NodeJS/Web).

Project Status

Build and Test

AtomVM is still in its early stages, but it can run simple applications similar to those available in examples and tests.

AtomVM might crash with a similar message:

Undecoded opcode: 15
Aborted (core dumped)

This basically means that an instruction has not been implemented yet, or that an outdated version has been used. Please, make sure to always run AtomVM using latest version.

Known Limitations

This project is a work in progress, so there are several known limitations, that will prevent to run unmodified software, some of them are:

  • There is a minimal standard library, so several standard functions are missing.
  • Several instructions are not yet implemented.

All of these limitations are going to be fixed in a reasonable amount of time.

About This Project

This project has been created by Davide Bettio, and now is developed from a growing number of contributors.

How to Contribute

Any kind of contribution is welcome, you can either contribute to this repository by improving the virtual machine, the core libraries or the documentation or by contributing to any of the organization repositories.

License

This project is under the terms of the Apache 2.0 license.

atomvm_adc's People

Contributors

fadushin avatar unclegrumpy avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

unclegrumpy

atomvm_adc's Issues

atomvm_adc driver can't work with esp-idf 4.x

I built AtomVM image including ADC on ubuntu 22.04 (Erlang OTP 25, esp-idf 4.4, latest AtomVM, latest atomvm_adc), then I flashed this image to ESP32 successfully, thenI flashed the .avm application to ESP32, after this I see in minicom the error as below:
image

FYI, I am now using AtomVM 0.5.0 official release and an old atomvm_adc version (around Mar 2022), ubuntu18.04, esp-idf 3.2, Erlang OTP 21, I can see that adc is working well.

proper way to include a nif in AtomVM build

So I am trying to use this extension, but I am not quite sure how to include the nif(s).

I downloaded the AtomVM repo and then I've put my atomvm_adc folder to src/platforms/esp32 but when I run
idf.py set-target esp32
I get this error:

CMake Error at /Users/mihai/esp/esp-idf/tools/cmake/build.cmake:268 (message):
  Failed to resolve component 'esp_adc_cal'.
Call Stack (most recent call first):
  /Users/mihai/esp/esp-idf/tools/cmake/build.cmake:310 (__build_resolve_and_add_req)
  /Users/mihai/esp/esp-idf/tools/cmake/build.cmake:599 (__build_expand_requirements)
  /Users/mihai/esp/esp-idf/tools/cmake/project.cmake:548 (idf_build_process)
  CMakeLists.txt:32 (project)


-- Configuring incomplete, errors occurred!
HINT: The component esp_adc_cal could not be found. This could be because: component name was misspelled, the component was not added to the build, the component has been moved to the IDF component manager or has been removed and refactored into some other component.
Please look out for component in 'https://components.espressif.com' and add using 'idf.py add-dependency' command.
Refer to the migration guide for more details about moved components.
Refer to the build-system guide for more details about how components are found and included in the build.

I tried to put the component manually in same src/platforms/esp32 folder but then I get another component missing...and so one until I get a dependency that is deprecated.
I guess that it should be another way to automatically solve those dependencies?
or can you suggest any other solution?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.