News for hackers. Stuff that matters.

Ask HN: RTOS Recommendations for new projects?

I'm working on some embedded programming projects at work, starting with Arduino and Arduino clones. We've reached the point of needing to switch to an RTOS, but there are dozens of projects with not much to separate many of them. Suggestions? I've looked into Zephyr, FreeRTOS, and RTEMS [1], [2], [3].

1: https://www.zephyrproject.org/ 2: http://www.freertos.org/ 3: https://www.rtems.org/

( 7 comments | 6 points | on HN )
Re:Ask HN: RTOS Recommendations for new projects? by davelnewton on Tuesday January 03, 2017 @02:35PM (#13312264)
You're using Arduinos at the "bare-metal" level, I assume?

I'm not sure that rtems is really a non-MMU OS--it's really designed for multiprocessor systems w/ bigger support than an Arduino offers, AFAIK.

FreeRTOS has strong Arduino and Arduino IDE support. If you're sure you actually need this, and want to stay within the Arduino ecosystem, I'd start there.

Re:Ask HN: RTOS Recommendations for new projects? by elcritch on Tuesday January 03, 2017 @03:00PM (#13312486)
Yes, bare metal. However, the libraries and tooling are somewhat limited once you start moving into more professional/commercial applications.

MMU vs non-MMU turns out to be one of the limiting factors. I've experimented some with Cortex M0 boards. But fullscale Arm boards (e.g. NanoPi, OrangePis, RPi Zero) are approaching the cost points of small atmel and most non-mmu chips. So Ideally something that supports MMU and non-MMU as well could be interesting.

Do you have any recommendations for chips which might support RTEMS or microkernels like Lk / sel4?

Re:Ask HN: RTOS Recommendations for new projects? by davelnewton on Tuesday January 03, 2017 @03:26PM (#13312721)
IIRC most of the ARM chips can support it, but you'd need something w/ a full BSP unless you want to roll your own (ew).

The cost factors have become pretty interesting. I've moved to ARM-based boards, but in general I've used a standard gcc toolchain along with FreeRTOS-like OSes and for anything beyond "oh you pushed a button" I skip the Arduino IDEs.

Re:Ask HN: RTOS Recommendations for new projects? by elcritch on Tuesday January 03, 2017 @06:05PM (#13314117)
BSP? Ah, gotcha. Yes, I was looking into RPi hardware since it's common enough that I figured there would be BSP support. It appears Lk micro-kernel supports RPi's.

Otherwise, Beaglebone has a bit more open hardware board and one or two micro-kernel projects supported it. Not sure what the status of FreeRTOS or Zephyr is on any of the ARM boards.

I'd look into setting up BSP for a good ARM chip as it'd make some of the hardware designs easier long term. Any recommendations board recommendations?

Re:Ask HN: RTOS Recommendations for new projects? by davelnewton on Wednesday January 04, 2017 @08:33AM (#13318076)
No board recommendations--there are soooo many now I have zero clue about "best" or if it even matters. I'm a little wary of the RPi 3 because of the heat issues; there are very competitive boards available at more or less the same price point, often with features I need (like actual SATA instead of via USB).
Re:Ask HN: RTOS Recommendations for new projects? by ionut_popa on Tuesday January 03, 2017 @02:35PM (#13312268)
I vote for zephyr. Seems to be the newest and might get some momentum
Re:Ask HN: RTOS Recommendations for new projects? by elcritch on Tuesday January 03, 2017 @03:02PM (#13312517)
That's what I'm leaning towards. It actually appears to be a rebranded VxWorks (Rocket kernel) which Intel acquired the rights to open source/rebrand it [1]. It does also have the support of the Linux foundation too! [2]

1: http://blogs.windriver.com/wind_river_blog/2016/02/wind-rive... 2: https://news.ycombinator.com/item?id=11128426