IC vendors have a lot of incentive to lock you in their ecosystem. Embedded developers are paid to produce firmware for widgets- their priority is shipping a firmware binary to manufacturer.
Besides, I don't find Arduino IDE that reliable- I still have to figure out which board definition to use (is this a micro or nano? Perhaps nano pro? Why doesn't this blink code not work on RP2040 board? Oh right, I selected adafruit rp2040 board when I was using pico, which uses board pin numbers vs rp2040 gpio numbers)
The industry is starting to understand this, but it takes time to fix. And the industry still needs to shed a lot of managers that lack a basic understanding of engineering software ecosystems and tooling.
Figuring out what board definition to use is a luxuriously simple problem to have. :-) Try to figure out how to configure a bunch of sensors hooked up to anything running Zephyr. It seems to have been put toghether under the motto "there is no problem so complex that we can't make it even more complex".
e.g. you can build and flash any application and open a debug shell with
make BOARD=esp32s3-devkit flash term
The ESP32 toolchain is installed with an easy to use script: https://doc.riot-os.org/group__cpu__esp32.html#esp32_local_t...Well, that's stings. Can you elaborate on your trouble with getting Zephyr working on ESP32? My memory is it's actually one of our simpler platforms, though it's true Zephyr isn't itself an IDE. It's an RTOS with a C API; you're expected to build at the command line with a wrapper tool (west), and to have downloaded and unpack an SDK tarball. But really there's not much more to it than that.
One other frustration is how obtuse the error messages can be. If west encounters a situation it doesn't like, it will often dump stack traces rather than print an error message. If you have something in the wrong directory or a typo etc, the magic in the build system often just fails and prints a generic error message or nothing at all. Maybe you screwed up the DT, maybe you named something incorrectly, maybe it's in the wrong directory, or maybe you typo'd. All of these can produce the same error messages at build time, which gets annoying.
With that said, the zephyr experience is remarkably pain-free and Linux-like compared to some vendor toolchains and generally good enough that I advocate for it internally.
I think both criticisms are reasonable but they aren't from the same perspective. In this case, yes, Espressif (who I'm not affiliated with and don't want to speak for, though I have worked on the ESP32 -- it was actually Zephyr's launch hardware for SMP, as it happens) doesn't quite have everything wired up yet. And that's unfortunate, but not so much a ding at Zephyr as with this particular integration (other chip vendors, Nordic especially, tend to be farther along).
And as for doing devicetree work... yeah, I don't like it either and try to stick to the kernel. But it's a ton cleaner than the kind of cut/paste you see with other solutions (and especially with whole-board IDE/SDKs!). In Zephyr, if you have a part that has an instance of some existing hardware integrated on another platform (a Synopsys DMA controller, some third-party I2C accelerometer, whatever), the configuration is usually/hopefully as simple as a three-line block of DTS with the addresses and interrupts filled in. For platform integrators, it's probably our single most attractive feature.
There are definitely amazing features in the ecosystem. E.g. the fact that you can run a live debugger on this tiny chip is mind blowing.
Use VSCode. It's not great, but it's SOOOO much better than everything else in the embedded space (that doesn't cost $100K+) that it's ridiculous.
As for programmers, any programmer of talent decamped from the embedded world to anything else. As long as semiconductor companies refuse to pay real salaries, this will continue.
> Write tooling in a portable language that can produce proper binaries. Preferably statically linked binaries so that at least you do not have to waste time wondering why your tooling doesn't work. Write tooling in Rust or Go.
No. Just no. Installing random crap in any language on my computer is where things fail.
Use a bloody container. To contain the mess, it's what I have to do anyway. For the love of all that is holy and unholy, distribute a container. This is the kind of scenario that containers were MADE for--lots of random tools that need to be version locked and only upgraded as a single unit.
It isn't so much that the programming model is less complicated. Sure that's an advantage if you are just noodling around. The Wiring framework has introduced a lot of developers to embedded development. But once you start to do projects that are a bit more than just a demo of something it actually is a bit easier to write software using, for instance ESP-IDF (FreeRTOS port for ESP32). You don't have to reinvent concurrency, for one. And it makes it easier to make use of more of what the ESP32 chips can offer.
The bane of embedded development is awful tooling and people who aren't very good programmers inventing abstractions that do more harm than good. Setting up the ESP-IDF toolchain correctly is much harder than it needs to be. If you haven't done it before, it is going to cost you a weekend to set up. You can probably make something work half-way in a few hours, but to get all the gremlins out...that can take a while. I recently spent on the order of 3 hours getting things to work properly again after upgrading to a newer version of ESP-IDF and it is slightly infuriating how bad the tooling is.
And as if the tooling wasn't bad in itself, the embedded world is in love with Python - which adds yet another dimension of problems. Python isn't a language that lends itself to producing software that behaves predictably on random computers. Please stop using it for tooling. Write tooling in a portable language that can produce proper binaries. Preferably statically linked binaries so that at least you do not have to waste time wondering why your tooling doesn't work. Write tooling in Rust or Go.
(And if you think ESP-IDF is a handful, good lord, pray that you never have to deal with Zephyr.)
I used to hope that Platformio (https://platformio.org/) would help solve problems, but it seems that none of the MCU vendors really give a shit about figuring out a good solution. Everyone wants to make their own mess. (Yeah, it is Python, but not at the amateur software engineer level as the nonsense you see in vendor toolchains)
Yeah, Arduino (or rather Wiring) is limiting. But the "professional" embedded world can sit down and shut up until they can demonstrate something that is even half way as reliable as the Arduino IDE.