Slashdot Mirror


Meet Linux's Little Brother Zephyr, a Tiny Open Source IoT RTOS (linuxgizmos.com)

DeviceGuru writes: The Linux Foundation has launched the Zephyr Project, to foster an open source, small footprint, modular, scalable, connected, real-time OS for IoT devices. The Zephyr Project's RTOS implements both a small footpoint microkernel and an even tinier nanokernel, and is the result of Wind River contributing its Rocket RTOS kernel to the Zephyr Project. (Wind's Rocket RTOS will now become a downstream commercial distribution based on Zephyr sources.) To get a sense of Zephyr's benefit, its nanokernel is said to be able to run in as little as 10KB of RAM on 32-bit microcontrollers, whereas a minimalistic Linux implementation like uClinux needs upwards of 200KB. The Linux Foundation hopes to see cross-project collaboration between the Zephyr and Linux communities. Technical details are at the Zephyr site.

26 of 130 comments (clear)

  1. IoT by Anonymous Coward · · Score: 2

    So, it's a tiny computer. What makes a device an IoT device? Does it just need to be a network connected device? Is a Raspberry Pi an IoT device? Is a smart phone? An IP phone? A smart TV? A desktop computer? A laptop? A netbook? A tablet? I need a solid definition so I wont be annoyed when I see "IoT".

    1. Re:IoT by buchner.johannes · · Score: 5, Informative

      I guess the definition for IoT devices is something that is "a device not primarily used for computation that can be controlled/accessed through the Internet". For example a washing machine, a watch, a fridge, heat controllers, windows (the physical ones that you can open), smart meters.
      IoT then also refers to a time where these would become extremely commonplace, in the sense that many types of devices are connected to the internet in everyones home/work/public areas.

      --
      NB: The message above might reflect my opinion right now, but not necessarily tomorrow or next year.
    2. Re:IoT by Sax+Russell+5449D29A · · Score: 5, Funny

      What makes a device an IoT device?

      If it floats on a cloud, runs off the willpower of app developers and is a security and privacy nightmare. Then it's IoT.

      --
      -SR
    3. Re:IoT by Anonymous Coward · · Score: 3, Insightful

      Don't know why some idiot modded you down. It's a legitimate question.

      IMHO it's pretty hard to define IoT in any way that doesn't include smartphones, unless the definition contains words like, "..but isn't a phone."

      Or maybe it's cost. If it costs over $50, then it's not a thing: it almost certainly has a more specific name, like "phone" or "tablet" so that it doesn't have to fall back to using its general class of "thing."

      (I used to think it might be defined by whether or not the device does any I/O directly with humans, but you don't want to rule out devices that have a keypad (e.g. a home alarm system), or a nice bright VFD (e.g. for a music player), or whatever. So it ain't about human I/O.)

      Perhaps the ultimate wisdom, though, would be to not fight it. Maybe smartphones (and desktop PCs and RPis and TVs) are IoT. Think about all the topics and concerns (I mean complaints, of course) you hear about many IoTs today...

      • They're insecure
      • They try to lock you into some company's "ecosystem" by not using standards
      • The shitty software that comes with it (that you have to use) does horrible things, like unconditionally send data out to somewhere on The Internet and can't be made to just talk to your own server

      ...it's pretty similar to list of reasons we tend to hate today's smartphones. And someone will come along and say "Oh yeah, this IoT device doesn't suck. I built it out of an Arduino" and you'll come back with "Yes, and Nokia made the N900 showing that smartphones don't have to suck either," but you might notice that here we are with the shit instead of the good stuff. You pretty much have to build something that doesn't suck: you can't buy anything good.

      So when you advocate for better IoT, maybe you're fighting a better fight than you realized: to take back the phone from those clueless/evil (which is it?) motherfuckers in California and China.

    4. Re:IoT by drwho · · Score: 2

      IoT refers to an object that has no really good reason to be connected to the Internet, and a few reasons why it shouldn't, but will be anyhow. This is all in an attempt to use up all of the IPv6 IP address space.

  2. OS for the new "Microcontroller" by Anonymous Coward · · Score: 4, Informative

    I've been seeing piles and piles of new chips that come with integrated 32bit arm cores, flash, and ram. And they're dirt cheap. Nowadays it seems pretty much all non-trivial chips include an ARM core with enough storage and ram to run circles around any desktop computer found in the 80s or even early 90s.

    About 9 dollars shipped for a hacker-friendly breakout board based on the NRF51822.. And that's not just a processor. It's a Bluetooth 4.0 radio that supports bluetooth LE and all the other bells and whistles. 15kb ram, 256k flash, and whole mess of features to get data in and out. Seems right in the footprint for this little OS.

    Add bluetooth and a fairly powerful "micro" to any project for less than 10 bucks.

    http://www.ebay.com/itm/-/400970594571

    Development board for the above module:

    http://www.ebay.com/itm/-/400967553827

    Browse that seller of the above items and be amazed at the absolutely insane amount of dirt cheap hacker friendly electronics you can get shipped from china for just a few bucks. Granted specs may be exaggerated and you'll want to do a little poking and testing on your own.. But that's half the fun, isnt it? :)

    1. Re:OS for the new "Microcontroller" by MouseTheLuckyDog · · Score: 4, Informative

      Raspberry Pi's are mode in Wales.

      Olimux devices are made in Bulgaria.

    2. Re:OS for the new "Microcontroller" by Anonymous Coward · · Score: 4, Informative

      The issue is that the cheap gizmos are the weak link in the chain. That, and the "hidden third shift". In Europe, if I spec something, I will get what is specced, every time, from now, to whenever production stops. I have read over and over again about companies encountering "quality fade" in China. They might get a 500GB flash drive the first few months... but then the drive becomes an 8gb drive with a controller lying about the rest and overwriting data soon after that. Or the titanium alloy needed for strength is replaced by some pot metal lying around the factory.

      If I want it made well, the US, Europe, Germany, Japan, and Russia can make stuff to be proud of. Cheap? China is your go to party.

    3. Re:OS for the new "Microcontroller" by DarkTempes · · Score: 2

      And SoCs aren't even really made in China, are they? China isn't a big player in semiconductor manufacturing unless one counts Taiwan as China.

      China assembles a lot of electronic stuff but I don't believe they are a big player in actually manufacturing it. USA/South Korea/Europe/Japan/Taiwan are.

      Global economy and all...

  3. The obvious question. by MouseTheLuckyDog · · Score: 2, Funny

    Is systemD part of the OS?

    1. Re:The obvious question. by F.Ultra · · Score: 3, Insightful

      Unfortunately not since it's not Linux, Zephyr RTOS is a completely different kernel, it's Wind Rivers old Rocket RTOS that has been renamed.

  4. Technical detail by fustakrakich · · Score: 3, Interesting

    How fast does it power up? This is one area of computers that makes absolutely no sense. If something can be stored, why can't it be stored in a ready-to-run state? Why aren't drivers on ROM inside each device? My radio comes on instantly, so should the damn computer. We're back to the days of having to wait for the TV to warm up, shouldn't be that way.

    --
    “He’s not deformed, he’s just drunk!”
  5. Just a multi-threading library by monkeyxpress · · Score: 3, Interesting

    This is really an 'OS' in the loosest sense. The processors it targets (mostly ARM Cortex M) do not have a memory manager, so all these things really do is provide a basic multi-threading system, which is actually pretty trivial to implement on a micro-controller if you can be bothered. I mean, a decent embedded unicode handling library or buddy allocator is a more complicated endeavour, but not as media worthy as saying your wrote a whole 'OS'.

    For what it's worth, FreeRTOS has been providing a lightweight and portable kernel that basically does what this does for about a decade now. Like windriver, they also try to leverage the exposure they get from the free code to sell their commercial version.

    The interesting thing though is that embedded processing power is really jumping along at an incredible pace now. To be honest, I think in another five year anything that requires connectivity or has a screen will just be using a Linux derivative (or QNX). Memory and processors are becoming ridiculously cheap, and in many cases the few dollars saved by using a resourced constrained chip are not worth the effort of having to port a graphics library, driver etc etc.

    1. Re:Just a multi-threading library by joelsherrill · · Score: 2

      RTEMS.org already exists as a single process, multi-threaded RTOS with robust POSIX API support. Includes SMP, networking, filesystems, USB, high test coverage, etc. No dual licensing for commercial use. Used heavil by NASA, ESA, high energy physics community, and many industrial users.

  6. Re:Does it really matter? by asherh · · Score: 4, Insightful

    IoT devices will typically only have a few kB of RAM, so yes, it does matter. As a data point, I'm working with an ARM Cortex-M0 processor at the moment and it has a grand total of 128kB program memory (flash, so you can't use it for read/write data storage) and 16kB RAM. This is an entirely typical processor for this sort of IoT application.

  7. Re:Does it really matter? by Anonymous Coward · · Score: 4, Informative

    Take a look at the specs on most microcontroller boards out there and you'll feel very differently about saving 190KB. In some cases that's more memory than the board comes with.

    * TI Tiva Launchpad - 32 KB - http://www.ti.com/tool/ek-tm4c123gxl
    * ST Discovery Board - 190 KB - http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/PF252419
    * Olimex STM32E407 - 192 KB - https://www.olimex.com/Products/ARM/ST/STM32-E407/open-source-hardware
    * Arduino 101 - 24 KB - https://www.arduino.cc/en/Main/ArduinoBoard101
    * Intel Galileo - 512 KB - http://www.intel.com/newsroom/kits/quark/galileo/pdfs/Intel_Galileo_Datasheet.pdf

    I could go on, but you get the point.

  8. Dont need an OS. by Lumpy · · Score: 2

    Running the application on the bare metal is just fine.

    Sorry but very rarely do you need a full blown OS. my weather station does not need an OS, it just needs it's program to run and loop over and over and over again running directly on the hardware.

    I can see things like Amazon Echo using an OS, but then it's processing power and capacity can easily run a full blown linux. no need for anything that is super tiny.

    --
    Do not look at laser with remaining good eye.
    1. Re:Dont need an OS. by Lumpy · · Score: 2

      If it's cheaper than an 8 bit MCU? yes. I don't care if it has a 256bit MCU... it will never need an OS.

      --
      Do not look at laser with remaining good eye.
    2. Re:Dont need an OS. by Lumpy · · Score: 2

      I already have access to network devices, it's coded in the software, it has a wifi chip inside (ESP8266) and does perfectly without an OS or any drivers.

      Not needed.

      --
      Do not look at laser with remaining good eye.
    3. Re:Dont need an OS. by slashping · · Score: 2

      Multi threading is very useful when you have different tasks that need to block on external events, such as arrival of network data for a web server, and you don't want to resort to ugly state machines.

  9. Re:Does it really matter? by fbobraga · · Score: 2

    most microcontrollers have tiny amounts of RAM ( 1MB)

    1MiB is huge in this subject (we are talking here in some KiBs)

  10. Re:use non volatile memory by slashping · · Score: 2

    Non-volatile memory is slow, uses a lot of power, and has limits on number of erase/rewrite cycles. Also, many microcontrollers can't execute code from flash memory while programming it.

  11. Re:10kB would had been great 30 years ago by Marginal+Coward · · Score: 2

    What is the difference between 10kB and 1MB in price or volume?
    The advantage of a minimal OS is it has less things in it therefore less things will break, so is more reliable but I don't see Linux as losing the reliability argument.

    In my experience, it mostly comes down to what the difference is between on-chip memory and off-chip memory. I assume that nearly all basic IoT entities like your washing machine would use on-chip memory for reasons of both cost and size. And on-chip memory should be minimized to optimize cost and power. So, less is more, regardless of any sort of "less things will break" consideration. If I were a washing machine manufacturer, I wouldn't want to spend more than 50 cents on the whole thing.

  12. Re:use non volatile memory by Darinbob · · Score: 2

    At times we were considering using parts of Flash for temporary storage but that sucks up power too. 20-40mA while writing.

    The scrimping is done for several reasons. It's all internal memory on the same chip as the CPU and that in itself limits the amount due to physical space of cramming everything in. External memory has it's own extra power needs with no capability of being put into low power standby, plus requires a lot more pins for interconnectivity, and adds to cost which is very important if you eventually want to sell a few million of them.

  13. license prevents drone use by drwho · · Score: 2

    look in the 'about' page, in the 'export compliance' section: "(c) for use in connection with the design, development or production of nuclear, chemical or biological weapons, or rocket systems, space launch vehicles, or sounding rockets, or unmanned air vehicle systems."

    More reason to develop software ex-US, so crazy export compliance doesn't hobble you.

  14. better alternatives by Gravis+Zero · · Score: 3, Informative

    "The Zephyr Project's RTOS" is limited to x86 and ARMv7. x86 isn't for anything small and just using ARMv7 doesn't leave you with many options for chips.

    Contiki and ChibiOS/RT have already been ported to run on damn near anything and yes, only still only require 10KB of RAM.

    --
    Anons need not reply. Questions end with a question mark.