logoalt Hacker News

antireztoday at 5:41 AM3 repliesview on HN

Background for folks that are not into MicroPython. This release is so important because MicroPython is almost completely able to replace lower level languages like C for many embedded use cases on the RP20[45]0 and ESP32 and other MCUs at this point, being very solid, fast enough (and thanks to Viper and inline assembly abilities even super fast for critical code paths), portable across MPUs (super important: you can change MCU without rewriting everything), has very good support for SPI and other protocols, and so forth. But... the problem is, before this release MicroPython suffered not the CPU shortage, but RAM shortage: the bytecode needed to stay in memory, and once the program becomes big enough, memory is the bottleneck that limits the project size. To avoid that, you could build your own MicroPython binary with your frozen bytecode inside, in the device flash part, but... if I need to rebuild MicroPython part of the advantage of using it is gone (super fast development cycle is one of those). Well, now, with ROMFS, this is no longer true, MP itself is able to store bytecode in the device flash and execute from there. This makes MP a lot more practical for large embedded projects.


Replies

pjmlptoday at 8:24 AM

I see it as another take on BASIC for microcontrollers, like BASIC Stamp or mikroBasic, with a language that is more appealing to current generations.

We were able to already do so much on home computers back in the day, in an interactive development enviroment, no need to reach out for C in hardware that is x times better than those home computers.

aero-glide2today at 5:55 AM

Is there still any point in learning Rust then

show 2 replies
anotherpaultoday at 6:17 AM

Thank you for explaining and giving context.