Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Arduino Moving from Mbed to Zephyr (arduino.cc)
16 points by hasheddan on July 24, 2024 | hide | past | favorite | 5 comments


I've already run into issues in the past where Arduino libraries and scripts that I wanted to use were written with older architectures in mind and wouldn't compile on newer boards. It was not clear to me from this article but is this going to be another architectural shift/change with similar difficulties for older libraries and scripts?


Depends. Don't you love that answer ;-)

Typically, when your libraries don't compile on newer boards it's because the author used register-level operations and features that aren't portable across processor architectures. The more popular features don't suffer from this because they end up being ported. e.g., PWM is extremely valuable, so PWM implementations exist on all arduino architectures and the AnalogWrite() interface at the Arduino abstraction level is the same, so you never need to deal with it.

But a programmer may have written a library version that's optimized for a particular device such as a MegaAvr variant, maybe using PORT writes instead of the slower digitalWrite() & digitalRead() abstractions. Including that library on a Blackpill will cause compilation problems. I think this problem exists with some libraries that do high-speed ADC capture.

It sounds like they're saying that you don't need to worry about the core Arduino libraries, so 90% of projects are probably fine.


Interesting they chose Zephyr, haven’t heard a lot of good things about it, NuttX seems to be preferred. Never used them myself but that is the sentiment I get.


Is there a rough equivalent to Arduino in the RISC-V ecosystem?


mbed-os was a cool environment but never took off. zephyr is more mature and has an API in C, the learning curve is a bit steeper though.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: