Giter Site home page Giter Site logo

Comments (8)

UncleGrumpy avatar UncleGrumpy commented on May 20, 2024

Did you check out the section on tooling in the documentation? The 0.6.0-beta.0 and earlier release images for the pico have some quirks that make flashing a bit of a pain and serial console impossible to use. There should be a 0.6.0-beta.1 released soon that makes it much easier to work with, in the mean time you can build a binary from the release-0.6 branch, which includes these fixes.

Following the Getting Started and AtomVM Tooling sections of the documentation should get you going on esp32-s3 with no troubles at all. If you have problems with the instructions at any point, would you please let us know where things are not explained well enough, and we will do our best to improve it, and help you get set up.

from atomvm.

jkbbwr avatar jkbbwr commented on May 20, 2024

Thanks for taking time to reply

So the issue I had with the esp32-S3 might be due to using a WROOM variant. Not sure if that factors into things.

I saw the tooling page but it seems to split the behaviour between the elixir mix plugin and rebar. And when executing the commands it would seemingly generate bad files, or I couldn't build valid uf2 files.

I was also unsure if I needed the .avm standardlib files and when I went looking for them i coudln't find them.

If the beam -> avm process and avm -> output process was documented I could make an attempt at this myself and report back?

from atomvm.

UncleGrumpy avatar UncleGrumpy commented on May 20, 2024

I have the ESP32-S3-DevKitC-1 which also uses a WROOM module, so that is not a problem. Not sure when you checked last, but the documentation was very recently updated to include the correct offset to flash the atomvm image. We have also just discovered a problem with the network_driver that only seems to affect the S3, so that could be part of your problem.

As far as uf2 files for the pico, using a v0.6.0-beta.1 version of AtomVM-pico_w-v0.6.0-beta.1.uf2 and atomvmlib-v0.6.0-beta.1.uf2 will help the atomvm_rebar3_plugin to work correctly. I believe for mix development using the ExAtomVM you might need a copy of atomvmlib.avm in a directory named avm_deps in you mix project's top level directory to keep the compiler happy, but I way be wrong on that point, I haven't done very much in Elixir. I will look into this and try to update the documentation if that is the case. Unfortunately the mix plugin doesn't have uf2/pico support yet, only stm32 and esp32 devices.

As you pointed out we don't yet have a "standalone" tool for converting *.avm files to pico uf2 files (which could at least for now convert mix created avm files to uf2 manually), but we do have such a tool included in the AtomVM repository. It is built when doing a generic_unix build (which must be done first for all platforms to build the standard libraries). It can be found in build/tools/uf2tool and is called uf2tool. If you are going to develop Elixir applications this way using picotool mentioned in the tooling section is easier than messing with the BOOTSEL button and power cycling the device to put it into BOOTSEL. (picotool reboot -f) then you can just cp the uf2 file the the mounted partition that is presented by the pico.

Hopefully we can get uf2 support added to ExAtomVM for better Elixir support soon, and this helps point out the need for a standalone distribution of the AtomVM uf2tool.

from atomvm.

UncleGrumpy avatar UncleGrumpy commented on May 20, 2024

If you are using Erlang and the atomvm_rebar3_plugin then the pico_flash task will generate the uf2 files (first compiling, and generating the packbeam file if necessary) and reset the device into BOOTSEL automatically and copy the uf2 files to the appropriate location. None of this worked correctly in v0.6.0-beta.0 and prior. Several fixes were just merged and are included in the v0.6.0-beta.1 that allow it all to work together, as well as implementing a 20 second timeout, to let you connect a serial monitor before the application starts. Also a quirk in the v0.6.0-beta.0 release was hello_world (or any other short application) would finish and hang the CPU before you had a chance of connecting to the console.

from atomvm.

Related Issues (20)

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.