|
I've seen this sentiment a bit and while I don't dispute that you can get a better SBC for cheaper, there are still a lot of issues and it tends to be around software support primarily that allows it to occupy a very sweet spot. It's a significant factor in deciding to use them.
There are a lot of embedded use cases that can be solved by hooking up to an ESP32 but there are a bunch that need a little bit more than that. If you want to run a web server for example, you do have options on the ESP32 but also writing C/C++ for a web backend is both a little fraught and kinda miserable compared to Python or Go or something. I mean it's certainly doable, but it certainly isn't the first language I'd reach for. If you want to work a little bit with streaming video, same deal So this is the embedded Linux usecase. And... the embedded Linux ecosystem seems kinda... hacked together? You a lot of the times get Yocto Linux which is its own can of worms because you tend to invariably get meta-vendor packages that patch everything from U-Boot to the kernel to random userspace utilities. There are better cases and it depends on how much the vendor works upstream. Sometimes the vendor doesn't even bother with maintaining the meta layer and it ends up getting into a "maintained mostly by one guy in Nebraska" scenario Some other vendors seem to take U-Boot and a copy of the Ubuntu LTS sources from 10 years ago and hacked it until it was possible to get a root shell without the thing going into a kernel panic then put the resulting image on a Google Drive or FTP server somewhere but didn't go much further than that What ends up being is that there is like a U-Boot and Linux kernel variant for either each different SBC (or sometimes vendor thereof) duck taped together. Support, even for the peripherals included, can be spotty at best, and there are many times where you have to patch the kernel or userspace to get it to work right. I've seen boards which run the weirdest stuff, ones whose kernel patches run into the megabytes with poor (if any) documentation, boards which apparently don't want to run anything but Android, etc. There are certainly vendors that work well and upstream and make everything nice and easy but they tend to be rarer and/or more expensive Compared that with the Pis and the difference is night and day enough that the raw specs matter less. Yes RasPi has their own kernel fork, but iirc they do work a bit upstream and the versions maintained are like 6.12 and not like 5 (which I've seen). They are also relatively easy to procure where more specialized vendors tend to be... less so. Flashing them is pretty simple and if you want to create your own image you can do that as well easily without Yocto or whatever. The HAT ecosystem is a nice way to add extensibility, the headers basically allow you to do a lot of ESPy type things as well (since Linux has native specific userspace support for GPIO, I2C, SPI, PWM, LED, hwmon, etc). And so on and so forth. And it all just kinda works This in of itself, makes it a pretty decent option for industry, especially if it's like either n <= 1000 units or a relatively small part of the BOM itself. It often is very much the economically sensible option to stick a Pi in it rather than put many man hours into fixing problems that really shouldn't require me to open up menuconfig or apply a kernel patch again. People like Geerling tend to come at it from the hobbyist or maker side of things but it does apply to the industrial side too. Yes in many cases knowing part XYZ will still be manufactured in 30 years is more important than the dev experience or some other factor is at play (power draw being another) but in a lot of cases its not (e.g. more portable code, stuff not requiring recertification) and the Pis also do have a relatively reasonable time guarantee too. It shouldn't be a bad experience to develop on these boards! But regardless, there are a lot of times that it is, and that's why I think the RasPi continues to do as well as it does. This is also why I think, despite the price, it continues to do well in the hobbyist community. I can hook it up using the headers to anything SPI, I2C, etc, and start making it do things with very little software trouble and regardless if I want to do it in C or if I want to do it in Python |