5 ms·
NuttX RTOS for PinePhone: Framebuffer
- als0 4y agoWhat is the NuttX community like compared to Zephyr? Seems like they have similar goals and I noticed that the latter has ten times the number of open pull requests.
- snovv_crash 4y agoNuttX was the project of a single guy, over 20 years, which only recently got picked up by bigger players (eg. Xiaomi) when the project was moved to Apache Foundation governance. Before that it was very, very quirky, and while it was possible to do a lot, it was also very effort intensive. I would choose Zephyr just because it has less technical debt.
- dark_star 4y agoMaybe choose it if your embedded board, system on a chip, or CPU is supported. NuttX has a lot of supported boards, SoCs, and CPUs, and they differ from Zephyr's supported hardware. [1] NuttX supported platforms: https://nuttx.apache.org/docs/latest/platforms/index.html https://nuttx.apache.org/docs/latest/platforms/index.html [2] Zephyr supported platforms: https://docs.zephyrproject.org/3.2.0/boards/index.html https://docs.zephyrproject.org/3.2.0/boards/index.html
- nanch 4y agoLup has such detailed and well-thought-out posts. I used his guides when developing for the PineTime and everything worked perfectly. I would have been completely lost without his information. Thank you Lup!
- lupyuen 4y agoThank you so much! :-)
- monocasa 4y ago// Copy the Entire Framebuffer to itself, // to fix the missing pixels. // Not sure why this works. That has big lack of proper cache flushing energy. ARM-A device support tends to be where you need to get really intentional about managing your memory hierarchy. Smaller cores tend to have simple enough (or no) caches that they don't tend to get in your way much except for knife edge bugs. Bigger systems like x86 just tend to push the cache coherency out even to IO devices. ARM-A class SoCs are that sweet spot of a ton of caches between the CPU and main memory, but simple enough peripherals and fabric that only the CPU cores are coherent.
- pixelfarmer 4y agoExactly. The artifacts shown are stereotypical caching issues: Always same length (cache line size) and earlier written entries are more likely to be fully committed than later written ones but it is (seemingly) random in overall.
- jancsika 4y agoSo is copying the thing to itself the only solution in the interim in order to force the thing to copy itself correctly into the thing?
- Veserv 4y agoYou manually flush the addresses of the framebuffer via a cache maintenance instruction. The internet tells me the phone has a A53 which should be ARMv8, so probably a loop of DC CIVAC (Data Cache Clean and Invalidate by Virtual Address to Coherency) instructions over the framebuffer. Though the buffer might be large enough to not even fit in the cache, so it might be more efficient to just flush the entire cache.
- aidenn0 4y agoOr just map the FB as WT.
- ajross 4y agoNo, ARM has cache management hardware (and a memory ordering model which you need to understand on the OOO cores). You just have to use it.
- snvzz 4y agoAs cool as this is, Genode is much farther ahead[0] and has a much stronger security model (microkernel multiserver with capabilities). AIUI they're planning to provide user-installable images by next release (2023-02). It was gonna be 2022-11, but they chose to delay so that end users only see it polished. It is possible to try it by building it yourself, and it's pretty cool. 0. (grep for Pine) https://genodians.org/ https://genodians.org/
- dark_star 4y agoPractically speaking, "farther ahead" may mean different things to different people. I tried to find a list of boards, systems on a chip (SoCs), or CPUs that Genode supports. There's no master list [1] but you can go digging through the handful of architecture-specific github repos. [2] The number of actually supported SoCs and boards is very limited. NuttX and Zephyr both support a large number of SoCs and boards [3][4], and they each have a single git repo with a configuration system that lets you build different boards from that single repo. In terms of practical ease of use for hobby and commercial projects, I would say these projects are both far ahead of Genode if your hardware is not supported by Genode and is supported by either NuttX or Zephyr. [1] https://genode.org/documentation/platforms/index https://genode.org/documentation/platforms/index [2] https://github.com/orgs/genodelabs/repositories https://github.com/orgs/genodelabs/repositories [3] NuttX supported platforms: https://nuttx.apache.org/docs/latest/platforms/index.html https://nuttx.apache.org/docs/latest/platforms/index.html [4] Zephyr supported platforms: https://docs.zephyrproject.org/3.2.0/boards/index.html https://docs.zephyrproject.org/3.2.0/boards/index.html
- snvzz 4y ago>Practically speaking, "farther ahead" may mean different things to different people. I completely agree, yet in this case what is meant is pretty clear: Pinephone support. And Genode is far ahead in Pinephone support.
- m463 4y agoI haven't heard of NuttX before. How did it come about? Was it developed from scratch or released from an existing project?
- als0 4y agoIt’s quite old, developed from scratch by a single guy 20 years ago. It never reached mainstream popularity.
- dark_star 4y agoIn my opinion NuttX is like a secret weapon. RTOS, good hardware support for many boards and CPUs, and a very high performance TCP/IP stack that can be interrupted by hard realtime tasks. It's also growing in popularity now– I would say it hasn't reached mainstream popularity yet. :)