Live data from Hacker News

Run Erlang/Elixir on Microcontrollers and Embedded Linux

grisp.org

51–55 of 55 posts

Re: Run Erlang/Elixir on Microcontrollers and Embedded Linux

#51
post #6

Earlier quoted context omitted.

RAM on MCUs is getting cheaper by the minute. A couple of years ago it was measured in bytes. Before the RP2040 is was measured in dozens of KiB now it's measured in MiB While I agree that 16 MiB is on the larger side for now, it will only be a couple of years for mainstream MCUs having that amount on board

Also curious what MCUs you're working with to give you this impression? RP2040 is 264k, RP2350 is 520k. I use NXP's rt1060 and rt1170 for work, and they have 1M and 2M respectively, still quite far away from 16M and those are quite beefy running at 500MHz - 1GHz.

> NXP's rt1060 and rt1170 for work

These both have FlexSPI controllers capable of interfacing with $3-5 in PSRAM at 8M or 16M.

Re: Run Erlang/Elixir on Microcontrollers and Embedded Linux

#52
post #47
post #32

Earlier quoted context omitted.

For me its the complete opposite of simple. I am a fan of BEAM and OTP but im a horrible programmer. I have constant fear of having picked the wrong restart strategy in a supervisor. Or about ghost processes or whatever. I have no mentors and learn everything myself. I have no way of actually checking whether my implementations are good. With my skills id manage to make an Elixir system brittle because its not clear…

> With my skills id manage to make an Elixir system brittle because its not clear to me what happens at all times. What's so cool about BEAM is you can connect a repl and debug the program as it's running. It's probably the best possible system for discovering what's happening as things are happening.

Yea IEx is pretty cool, that's how I test while programming as I do not write tests for everything.

Re: Run Erlang/Elixir on Microcontrollers and Embedded Linux

#53
post #38
post #5

> MCU-class footprint (fits in 16 MB RAM) That is absolutely not an MCU class footprint. Anything with an "M" when talking about memory isn't really an MCU. For evidence I cite the ST page on all their micros: https://www.st.com/en/microcontrollers-microprocessors/stm32... Only the very very high performance ones are >1MB of RAM.

Espressif calls the ESP32 an MCU, and at least 1/3 of ESP32 models have >1MiB of onboard PS ("pseudo-static") RAM (i.e. DRAM with its own refresh circuit.) At least 20 of the ESP32 models do have 16MiB. (And I would argue that the ESP32 is an MCU even in this configuration — mostly because it satisfies ultra-low-power-on-idle requirements that most people expect for "pick up, use, put down, holds a charge until you p…

MCU generally refers to self contained microcontrollers without any external memory. Once you add external memory, there are basically no limits anymore, but if you are going that route a LicheeRV Nano would get you a full Linux system with 256MiB for $16 so why bother targeting "MCU-class" chips?

Re: Run Erlang/Elixir on Microcontrollers and Embedded Linux

#54
post #4

Pretty cool. I am a fan of everything Erlang. Managing large clusters of IOT devices running Beam sounds like a good idea not just because of fault tolerance but for hot swapping code.

Is this something you do regularly?

Not sure why I'm downvoted, I'd like to know some good practices when using OTP for IOT, its not an area I know about.
Post reply on HN