4 ms·
The real strength of the Arduino tooling is that they have hidden all the complexity in setting up the toolchain needed to produce a binary. You install the Ar
by bborud 4y ago
The real strength of the Arduino tooling is that they have hidden all the complexity in setting up the toolchain needed to produce a binary. You install the Arduino IDE. You edit code, you compile it, upload it to the device, it works. End of story. Well for the most part, but compared to the rest of the embedded software world, it is a pretty smooth ride.
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/ 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.
- fest 4y agoI think the root cause is misaligned incentives for the involved parties. 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)
- bborud 4y agoI think it is more about inertia than trying to accomplish vendor lock-in. Software is much more important for embedded applications than it used to be. I regularly see people choose MCUs that are many times more expensive than what they might have chosen -- simply because they can't afford the software development costs on MUCs that have poor SDKs. 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".
- pantalaimon 4y agoIf you find Zephyr too complex, maybe give RIOT a try. It also supports all the ESP32 family members (with WiFi and BLE) and generally has a simpler API and build system. 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_toolchain_installation https://doc.riot-os.org/group__cpu__esp32.html#esp32_local_t...
- fest 4y agoWell, for the two smallish projects where I did use zephyr, I didn't find it too bad. But I must have suffered enough fiddling with the real devicetree before :)