top | item 30349046

(no title)

ktownsend | 4 years ago

The same concept is also used in smaller embedded systems, like Zephyr RTOS: https://docs.zephyrproject.org/latest/guides/dts/index.html

Useful video if you're interested in how DT applies to Zephyr, such as defining I2C sensors available on your board target: https://www.youtube.com/watch?v=sWaxQyIgEBY

discuss

order

koz1000|4 years ago

I wouldn't call it the same concept. Zephyr uses the Devicetree format to create headers and configure the compilation of the kernel, but userspace code has zero visibility into whatever was set up in the devicetree file.

Zephyr is chock full of these creature comforts to make Linux developers feel at home but only deliver 50% of the usability. I went back to FreeRTOS.

blippage|4 years ago

I've downloaded Zephyr, but haven't produced anything useful with it. I was put off by the learning curve. It also suffers from a lot of these OS's do: layer upon layer of abstraction. I also hate everyone's weird and wonderful build tool.

Some stuff looks like it might be implemented well in these OS's, like using DMA, and suchlike. So they could possibly be fast. And yet, I think the way to bet is that they will be slower. Get comfortable with CMSIS, and your results are likely to be substantially faster.

Maybe throw in a bit of FreeRTOS if you feel you need it. I haven't experimented with tinygo yet, but I wonder if that's the way to go if you want concurrency.

I think that the whole notion of abstracting away the machine is an ill-conceived idea anyway, particularly when it comes to microcontrollers. The whole point of mcus is to use their particular features and strengths, which basically the opposite of abstraction.

I dunno, if something is complicated enough to use Zephyr, then maybe it's complicated enough to just ditch it and use a Raspberry Pi.

pantalaimon|4 years ago

I mean on the small ROM of MCUs you don't usually want to keep the device tree around, so it's just sensible that it gets turned into macros and is not accessible at run time.

Given that FreeRTOS does not deal with hardware at all, I don't see how it is a comparison.

dexterhaslem|4 years ago

on the flip side there is u-boot device tree overlays