Author Topic: nuttx - "linux" on a microcontroller  (Read 26567 times)

0 Members and 2 Guests are viewing this topic.

Offline farsiTopic starter

  • Regular Contributor
  • *
  • Posts: 66
nuttx - "linux" on a microcontroller
« on: September 17, 2015, 12:11:04 pm »
I recently saw this: https://acassis.wordpress.com/2015/09/12/testing-an-rgb-led-in-the-nuttx/ - nuttix is
a RTOS (not sure how exactly).

The build process is described here (google translate to get a feeling for it): http://www.bubuko.com/infodetail-1092724.html

I was trying the build on an Ubuntu machine, but I get stuck somewhere near the pass2deps Makefile task. I'll retry later.

Maybe someone here has already experiences with Nuttx ? What do you think?



 

Offline codeboy2k

  • Super Contributor
  • ***
  • Posts: 1836
  • Country: ca
Re: nuttx - "linux" on a microcontroller
« Reply #1 on: September 17, 2015, 03:17:12 pm »
I've never used it, but apparently it works on the Z8 Encore , and I happen to have one of those lying around from the early 2000s :)

So I'll have to give it a try myself too !

 

Offline farsiTopic starter

  • Regular Contributor
  • *
  • Posts: 66
Re: nuttx - "linux" on a microcontroller
« Reply #2 on: September 17, 2015, 03:23:23 pm »
that is a nice board   :)

so, I had to refresh about what happened to zilog after the z80 https://en.wikipedia.org/wiki/Zilog
 

Offline codeboy2k

  • Super Contributor
  • ***
  • Posts: 1836
  • Country: ca
Re: nuttx - "linux" on a microcontroller
« Reply #3 on: September 17, 2015, 05:06:30 pm »
so, I had to refresh about what happened to zilog after the z80 https://en.wikipedia.org/wiki/Zilog

Re: Zilog Z8 Encore:

I have long thought these micros were discontinued or obsoleted, but it turns out you can still buy them from Digikey, and the Zilog site still lists them as active.  They might have a niche market still, but they are not going to be competitive anymore, compared to more recent micros.
 

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3958
  • Country: de
Re: nuttx - "linux" on a microcontroller
« Reply #4 on: September 17, 2015, 09:43:43 pm »
linux isNotEqualTo RTOS

NuttX != Linux neither.  Those quotes were fairly justified. Nothing to do with Linux whatsoever. And yes, it is an RTOS.

http://nuttx.org/
 

Offline codeboy2k

  • Super Contributor
  • ***
  • Posts: 1836
  • Country: ca
Re: nuttx - "linux" on a microcontroller
« Reply #5 on: September 18, 2015, 01:16:42 am »
Yes, it is an independently developed RTOS, not Linux.. I'll still fire it up on the dev board in the picture and see if it flies :)

The dev tools are over 13-14 yrs old now, so I'll save myself some hassle and just start out trying to load it up in an XP virtual machine.

... yeah, it needs XP and Cygwin.... and a serial port to download it :)

Code: [Select]
configs/z8encore000zco
  z8Encore! Microcontroller.  This port use the Zilog z8encore000zco
  development kit, Z8F6403 part, and the Zilog ZDS-II Windows command line
  tools.  The development environment is Cygwin under WinXP.

I hope it doesn't need a specific version of Cygwin from the early 2000's.  Since I recall Cygwin installs by pulling packages from a server online, it might be hard to get a specific version from the early 2000's running -- if so I'll need to find an already installed snapshot somewhere.  I don't mind running the build and letting it install while I am doing other things, but I don't really want to spend time to port the build system to a modern Cygwin. 


 

Offline farsiTopic starter

  • Regular Contributor
  • *
  • Posts: 66
Re: nuttx - "linux" on a microcontroller
« Reply #6 on: September 18, 2015, 08:37:51 am »
From http://www.nuttx.org/Documentation/NuttX.html

NON-GOALS: (1) It is not a goal to provide the level of OS features like those provided by Linux. In order to work with smaller MCUs, small footprint must be more important than an extensive feature set. But standard compliance is more important than small footprint.Surely a smaller RTOS could be produced by ignoring standards.  Think of NuttX is a tiny Linux work-alike with a much reduced feature set. (2) There is no MMU-based support for processes. At present, NuttX assumes a flat address space.
 

Offline farsiTopic starter

  • Regular Contributor
  • *
  • Posts: 66
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3671
  • Country: gb
Re: nuttx - "linux" on a microcontroller
« Reply #8 on: September 18, 2015, 10:06:32 am »
From http://www.nuttx.org/Documentation/NuttX.html

NON-GOALS: (1) It is not a goal to provide the level of OS features like those provided by Linux. In order to work with smaller MCUs, small footprint must be more important than an extensive feature set. But standard compliance is more important than small footprint.Surely a smaller RTOS could be produced by ignoring standards.  Think of NuttX is a tiny Linux work-alike with a much reduced feature set. (2) There is no MMU-based support for processes. At present, NuttX assumes a flat address space.

The phrase "Linux work-alike" is used to describe the concept of this RTOS, it does not mean it's actually a tiny version of Linux.  It implements POSIX standards for task control, file systems, semaphores etc. like Linux does, but it's absolutely NOT Linux.
 

Offline donotdespisethesnake

  • Super Contributor
  • ***
  • Posts: 1093
  • Country: gb
  • Embedded stuff
Re: nuttx - "linux" on a microcontroller
« Reply #9 on: September 18, 2015, 03:57:56 pm »
Well, I think we all agree Nuttx is an RTOS :)

I would say "it's a bit like an old Unix". But even old Unix had separate process space.

After looking at many RTOS offerings all with pretty idiosyncratic APIs, the POSIX aspect looks interesting. Certainly it should make porting code from vanilla Unix a bit easier, and perhaps moving from Nuttx to Linux (or other embedded Unix).

I think NuttX could nicely fill the gap between a very light RTOS like FreeRTOS, and an actual Linux/ucLinux.
Bob
"All you said is just a bunch of opinions."
 

Offline acassis

  • Newbie
  • Posts: 3
  • Country: br
Re: nuttx - "linux" on a microcontroller
« Reply #10 on: September 29, 2016, 08:01:42 pm »
I created some video tutorials explaining how to get started to NuttX, see it here:

https://www.youtube.com/channel/UC0QciIlcUnjJkL5yJJBmluw

All you need is a low cost board (less than U$2.00) :
https://aliexpress.com/item/Free-Shipping-STM32F103C8T6-ARM-STM32-Minimum-System-Development-Board-Module-Forarduino/32525208361.html

An ARM SWD Programmer (about U$2.25) :
https://aliexpress.com/item/ST-Link-V2-stlink-mini-STM8STM32-STLINK-simulator-download-programming-With-Cover/32277220832.html

And a USB/UART 3.3V adapter (less than U$ 1.50) :
https://aliexpress.com/item/CP2102-USB-2-0-to-TTL-UART-Module-6Pin-Serial-Converter-STC-Replace-FT232-Module/32534146426.html

The NuttX RTOS is very powerful, but it is similar Linux in 1992: very few people knows about it.
« Last Edit: September 29, 2016, 08:10:01 pm by acassis »
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 10091
  • Country: us
Re: nuttx - "linux" on a microcontroller
« Reply #11 on: September 29, 2016, 08:42:16 pm »
That's a nice set of videos!  Thanks for sharing...
 
The following users thanked this post: acassis

Offline bingo600

  • Super Contributor
  • ***
  • Posts: 2316
  • Country: dk
Re: nuttx - "linux" on a microcontroller
« Reply #12 on: September 30, 2016, 11:13:14 am »
I wonder why i should chose nuttx , instead of ie. FreeRtos

Isn't it just another Rtos

/Bingo
 
The following users thanked this post: Frank

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3958
  • Country: de
Re: nuttx - "linux" on a microcontroller
« Reply #13 on: September 30, 2016, 11:55:39 am »
I wonder why i should chose nuttx , instead of ie. FreeRtos

Isn't it just another Rtos

/Bingo

Why don't you actually read the documentation and see for yourself? Compared to FreeRtos, Nuttx is a lot more advanced (e.g. supports SMP), has more ready-to-go drivers and subsystems, such as displays, terminal, networking, even a basic shell. It is targeting the more powerful micros with plenty of RAM, but a cut down version runs even on very small devices (like an AVR).

Whether or not is that relevant for your application is up to you to decide. FreeRtos is only the minimal RTOS "kernel", everything else is up to the user to implement (or to get from elsewhere). Nuttx is more comparable with VxWorks than FreeRtos.

« Last Edit: September 30, 2016, 12:00:01 pm by janoc »
 

Offline Sal Ammoniac

  • Super Contributor
  • ***
  • Posts: 1811
  • Country: us
Re: nuttx - "linux" on a microcontroller
« Reply #14 on: September 30, 2016, 02:45:54 pm »
Whether or not is that relevant for your application is up to you to decide. FreeRtos is only the minimal RTOS "kernel", everything else is up to the user to implement (or to get from elsewhere). Nuttx is more comparable with VxWorks than FreeRtos.

Looks like another typical open-source project with minimal documentation and forum-style support. Why would anyone use this in a commercial product rather than VxWorks or ThreadX unless they're a start-up with no funding?
"That's not even wrong" -- Wolfgang Pauli
 

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3958
  • Country: de
Re: nuttx - "linux" on a microcontroller
« Reply #15 on: September 30, 2016, 07:20:09 pm »
Quote from: Sal Ammoniac link=topic=55303.msg1038304#msg1038304
Looks like another typical open-source project with minimal documentation and forum-style support. Why would anyone use this in a commercial product rather than VxWorks or ThreadX unless they're a start-up with no funding?

What gives you the idea it is targetting commercial products? It certainly can be used commercially (it is BSD licensed) but I don't think that is its main objective. I was comparing it to VxWorks only because someone asked about FreeRTOS - which really isn't in the same league, functionality-wise.

Re documentation - ehm, don't get me started on some commercial projects' documentation ...
BTW, the Nuttx documentation is fairly extensive, certainly way more detailed than a "typical open source project":
http://nuttx.org/doku.php?id=documentation:userguide
The subsystems have their own doc.

There is also this: https://github.com/engehcall/technology/blob/master/NuttX/nuttx-overview.pdf  (the file is a part of the Nuttx distribution)

Doesn't really seem to me like "minimal documentation"  :-//
« Last Edit: September 30, 2016, 07:24:22 pm by janoc »
 

Offline Sal Ammoniac

  • Super Contributor
  • ***
  • Posts: 1811
  • Country: us
Re: nuttx - "linux" on a microcontroller
« Reply #16 on: September 30, 2016, 07:55:39 pm »
What gives you the idea it is targetting commercial products? It certainly can be used commercially (it is BSD licensed) but I don't think that is its main objective. I was comparing it to VxWorks only because someone asked about FreeRTOS - which really isn't in the same league, functionality-wise.

I'm not sure what they're targeting. It's not clear from reading their website. VxWorks is mentioned on their website, so I assumed they were at least partially targeting VxWorks users, who are almost entirely commercial.

Quote
Doesn't really seem to me like "minimal documentation"  :-//

It's all relative. It appears minimal to me. Perhaps people are becoming used to the open-source model of documentation (i.e. little to none) and don't find this an issue.
"That's not even wrong" -- Wolfgang Pauli
 

Offline donotdespisethesnake

  • Super Contributor
  • ***
  • Posts: 1093
  • Country: gb
  • Embedded stuff
Re: nuttx - "linux" on a microcontroller
« Reply #17 on: October 01, 2016, 10:09:11 am »
Looks like another typical open-source project with minimal documentation and forum-style support. Why would anyone use this in a commercial product rather than VxWorks or ThreadX unless they're a start-up with no funding?

I guess you have never worked for a large company!

A lot of companies use Open Source software, the idea that software is worthless unless you pay a hefty license fee is frankly naive and outdated.

As for open source projects "targeting" markets, more silliness. Clearly you have no idea about Open Source, sales and markets are irrelevant.

It is strange and disappointing that people are so indoctrinated by corporate propaganda that says the "profit motive" is the only way to organise socitey, that they struggle to conceive of organisations that are not profit motivated.
Bob
"All you said is just a bunch of opinions."
 

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3958
  • Country: de
Re: nuttx - "linux" on a microcontroller
« Reply #18 on: October 01, 2016, 06:38:24 pm »
I'm not sure what they're targeting. It's not clear from reading their website. VxWorks is mentioned on their website, so I assumed they were at least partially targeting VxWorks users, who are almost entirely commercial.

Can't really speak for the project, but VxWorks is mentioned in line with other things (such as POSIX) as something they are trying to implement features/APIs from, not necessarily as trying to compete with them. I think you have read too much into that statement.

It's all relative. It appears minimal to me. Perhaps people are becoming used to the open-source model of documentation (i.e. little to none) and don't find this an issue.

Sal, with all due respect, this is complete BS. Only a few months ago I have got a $3000 piece of commercial equipment in my hand where the entire "documentation" was a poorly translated Japanese PDF document explaining how to hack a Windows .inf file provided by Google, because the manufacturer couldn't be bothered to even ship their proper one. Not even an example application or some actually working demo was shipped with it. The manufacturer is a $6.2 Billion company, btw.

And this is by far not an exceptional case.  We have several other pieces of equipment in the $10-20k range at the office and software that is on annual subscription which is barely better than that.

Have you seen documentation for something like Unity3d or Unreal Engine? Those are big buck commercial 3D engines used by many of the "AAA" video games these days. The documentation is a bunch of tutorials mostly for the artists, API reference and a (self-help) forum. Unreal doesn't even have a complete API reference (not even autogenerated Doxygen-style), actually - use the source, Luke! A lot of open source projects have much better documentation than that.

So I am glad for you that you live in some wonderful world where perfect and complete documentation is standard, but the rest of us is not so fortunate. So stop knocking a project only because you have beef with open source for some reason.


« Last Edit: October 01, 2016, 06:46:14 pm by janoc »
 

Offline Sal Ammoniac

  • Super Contributor
  • ***
  • Posts: 1811
  • Country: us
Re: nuttx - "linux" on a microcontroller
« Reply #19 on: October 02, 2016, 04:57:43 am »
I guess you have never worked for a large company!

I've worked for companies with from 12 to 100,000 employees, so I'd say that I have worked for a large company.

Quote
A lot of companies use Open Source software, the idea that software is worthless unless you pay a hefty license fee is frankly naive and outdated.

I never said that OSS is worthless. The primary issues I've had with OSS over the years is documentation and support. Most (but by no means all) examples of OSS that I've seen have poor documentation and marginal support. In a commercial environment, with tight deadlines, you need good documentation and support. If I could find an OSS project that did have good documentation and support, then I wouldn't hesitate to use it in a commercial environment. But if I have a problem and I need immediate support, I don't want to have to post a question to a forum and hope to get a quick response. I want to call someone on the phone and get immediate support. Not all commercial software offers this either, and I choose not to use it.

Quote
It is strange and disappointing that people are so indoctrinated by corporate propaganda that says the "profit motive" is the only way to organise socitey, that they struggle to conceive of organisations that are not profit motivated.

That's not my view. I'm more pragmatic. I choose software that fulfills my needs, and good documentation and support are two very important criteria, regardless of whether it's commercial software or OSS. In my experience, I've been disappointed by OSS too often to blindly choose it without thorough research just because it's free.
"That's not even wrong" -- Wolfgang Pauli
 

Offline Sal Ammoniac

  • Super Contributor
  • ***
  • Posts: 1811
  • Country: us
Re: nuttx - "linux" on a microcontroller
« Reply #20 on: October 02, 2016, 05:06:51 am »
Sal, with all due respect, this is complete BS. Only a few months ago I have got a $3000 piece of commercial equipment in my hand where the entire "documentation" was a poorly translated Japanese PDF document explaining how to hack a Windows .inf file provided by Google, because the manufacturer couldn't be bothered to even ship their proper one. Not even an example application or some actually working demo was shipped with it. The manufacturer is a $6.2 Billion company, btw.

Sounds to me like you need to do better research before buying expensive equipment. Just because you can offer commercial counter examples of products that have poor documentation doesn't imply anything about open-source products.

There are tens of thousands of OSS projects out there. The vast majority of them have poor or nonexistent documentation. Sure, there are examples of OSS with excellent documentation (e.g. Linux), but the majority do not.
"That's not even wrong" -- Wolfgang Pauli
 

Offline ruffy91

  • Regular Contributor
  • *
  • Posts: 240
  • Country: ch
Re: nuttx - "linux" on a microcontroller
« Reply #21 on: October 02, 2016, 05:49:02 am »


There are tens of thousands of OSS projects out there. The vast majority of them have poor or nonexistent documentation. Sure, there are examples of OSS with excellent documentation (e.g. Linux), but the majority do not.
IMHO Linux is very poorly documented.
I occassionally write a kernel mode driver and I find it easier to use the source as reference than the documentation (which is mostly just autogenerated from source). Not to get started with most 3rd party libraries.

I think from the documentation point of view NuttX seems to be at least on the same level if not better.

 

Offline amspire

  • Super Contributor
  • ***
  • Posts: 3810
  • Country: au
Re: nuttx - "linux" on a microcontroller
« Reply #22 on: October 02, 2016, 06:56:17 am »
the idea that software is worthless unless you pay a hefty license fee is frankly naive and outdated.

well …  of course you can believe whatever you want to believe

Have to agree with donotdespisethesnake here. If you look at the key people in many open source projects, they are often employees of big companies and the companies are paying them to be involved in the open source project. Rather then having an external company that has experts in the software, they have their own staff who are experts and those staff can freely talk to all the other experts in that software as they are in regular contact anyway. They can push the development of the open source software in the directions the company needs. There is nothing more frustrating then a closed source licensed solution that almost does exactly what you need.
 

Offline rob77

  • Super Contributor
  • ***
  • Posts: 2100
  • Country: sk
Re: nuttx - "linux" on a microcontroller
« Reply #23 on: October 02, 2016, 12:44:51 pm »
it's far far from linux so even quoted "linux" in the topic is extremely incorrect, but actually it looks really good ! i like it and i will definitely give it a try in one of my projects :) i like the POSIX compatibility, BSD sockets, memory management, wide variety of supported micros and hardware... and actually it has a very good documentation on porting, so porting to other (or slightly different) micros is not a big problem. i have a small project currently in planning/design phase with ATSAM3S, so definitely will give it a try.
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 7760
  • Country: nl
Re: nuttx - "linux" on a microcontroller
« Reply #24 on: October 02, 2016, 01:24:21 pm »
can I also say that VxWorks can be used in Avionics under DO178B level A whereas linux is rejected ?

Windows isn't certified either. Cause it would be silly. You'd just have some real time kernel underneath with real time drivers, with a desktop OS on top as a ridiculously overweight GUI library.

uC/OS-II which is restrictively licensed open source is though.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->