Hi Michal

On Tue, Jul 9, 2024 at 12:08 PM <michal.lyszc...@bofc.pl> wrote:

> On 2024-07-09 09:49:16, Alan C. Assis wrote:
> > I think many people outside our community have a misconception about
> NuttX:
> > They think it is a Linux/Unix RTOS that needs to have a shell integrated
> > into it.
> >
> > Note that all boards are required to have a "nsh" board profile, it was a
> > suggestion/requirement to confirm that the system works correctly. There
> is
> > not wrong with it, but it sends a message that NuttX needs it to exist.
> >
> > How to fix it?
> I think I would be good if nuttx had something like /sbin/init that would
> do some very simple service management. Then you could just tick
> "Start NSH after boot up". Programs would probably be had to added via
> some compile-time header file that would look like that:
>
>
I think what you are proposing is something like SYSV init for NuttX.
Actually Fitbit implemented it and they said they will submit it to
mainline, but maybe Google forbidden them to submit anything to NuttX (I
don't know).


>
> | struct program
> | {
> |     const char *name;
> |     int         priority;
> |     int         stack_size;
> |     main_t      entry_point;
> |     int         pid;
> | };
> |
> | struct program programs[] =
> | {
> | #ifdef CONFIG_EXAMPLES_NSH
> |     { "console", 50, 2048, nsh_consolemain },
> | #endif
>
> | #ifdef CONFIG_SOME_DAEMON
> |     { "some-custom-daemon", 50, 2048, daemon_function },
> | #endif
>
> |     { NULL, 0, 0, NULL }
> | };
>
> And program in its simplest form would do:
>
> | #include <rc/rc.h>
> | int main(int argc, char *argv[]) {
> |     for (int i = 0; programs[i].name != NULL; ++i) {
> |         struct program *p = &programs[i];
> |         printf("starting: %s\n", p->name);
> |         p->pid = task_create(p->name, p->priority, p->stack_size,
> |                 p->entry_point, NULL);
> |     }
> |     for (;;) sleep(UINT_MAX);
> | }
>
> I think such init could also handle all initialization code (so not only
> starting up daemons). It could be more clear than current board
> initialization
> routines which are a little bit confusing (for me at least).
>
> That would solve 2 problems. It would be very clear that NSH is not
> needed, and
> user would have an easy way to start it's own daemons/applications.
>
> > Suggestions about how to proceed to archive it are welcome.
> > Probably we will need collective help to archive it for all boards.
>
> Other problem I've seen is bad (or rather lack thereof) press. Each time
> I propose nuttx for some project it's a lot of hesitance and ultimately
> decision to go with zephyr becuase it "supports more things". Which is
> a lie, because with my experience zephyr has a lot of demos just to show
> off "how many things they support". But it's all demo and nor production
> quality. Nevertheless - this sells. And later when it's clear that zephyr
> was lying - it's too late to go with anything else because months of work
> was already put into zephyr, so noone will start over.
>
>
Exactly!!! They did some ago something similar saying Google and Facebook
are going to adopt Zephyr because it is more secure and has security
certification.

And many companies bought it.

We were promised that after we get accepted into Apache Foundation we will
get more visibility, etc etc.

Apache needs to start really helping us (all GSoC mentors should get paid,
but you guess: the money went to Apache).

I asked them (Gavin McDonald) many times for Travel Assistance for our
speakers (it was not for me because I already had paid my flight ticket),
but they ignored me.

I'm really sorry to say that in public, but enough is enough, people need
to know the truth!

So let's think how to improve the NuttX situation without any help from
Apache...

So nuttx definiately lacks press and exposure. Basically noone I worked with
> heard about nuttx until I mentioned that. A lot of programmers are hyped
> when I explain what and how it does things - but it all ends up with zephyr
> because of "all the supported hardware it has".
>
>
We all can help here, as you can see I'm posting articles at Embedded
Related each month:

https://www.embeddedrelated.com/showarticle/1673.php

I suggest others to do the same, please start to publish in the Elektor,
Embedded.com, CNX Software, Hackaday, Hackster.io, etc


> For ppl to consider nuttx, they first need to hear about it. People
> (especially
> useless managers) will need benchmarks - like how much flash/ram it uses.
> How it performs. Will their hardware be supported.
>
>
Exactly, we need to move!!!


> It would not hurt for things to be more user friendly. I admit,
> initializing
> zephyr is easy. Unpack SDK, west init, compile, flash and you are done.
> And nuttx? Download and put compiler in path. Clone nuttx AND apps in same
> directory. Configure. Compile. Learn your debugger to flash. On zephyr you
> do 'west flash' and it knowns which discovery board is used and it uses
> apropriate tool and arguments. This is good, I will admit it.
>
>
True, but as Martijn Braam said: it downlad more than 5GB of all SDK under
the Sun and it is not so easy as you said:
https://blog.brixit.nl/moving-to-a-rtos-on-the-rp2040/


> So nuttx would need some SDK in my opinion. Package with binary compilers
> and
> flash utilities. "make flash" should just perform flash on specific board
> without user knowing what tools is needed. "make debug" should start GDB
> session.
>
>
I think we could have some script to just download and setup the tools for
arch your are using.


> A lot of beginners will be put off becuase of things like that. If they
> could
> just do "./install-sdk.sh && ./init-nuttx && cd nuttx &&
> ./tools/configure.sh nucleo-whatever && make && make flash" and start
> playing
> around - this would definiately help getting beginners.
>
>
True, it it should be per chip, not like Zephyr is doing. Maybe you never
will use AVR8 with NuttX, why do we should pune you?


> Anegdotal (but still) proof. 10 years ago I was researching RTOSes. I
> really
> wanted to use nuttx on stm32 back then. But I had a lot of problems just
> compiling and running anything on discovery board. I was kinda put off,
> team
> leader decided to screw it and go with another solution. I finally learnt
> it
> at home and love it ever since, but damage was already done and nuttx in
> that
> project was forgotten.
>
>
I'm biased to say! I think as it happened Greg Nutt, NuttX became part of
my life.

I have nightmares because NuttX is way superior than Zephyr and RT-Thread
and they are way better than us in press/marketing.


> Sorry for long post, here's a potato: 🥔
>
>
No problem, let's do French fries!

BR,

Alan

Reply via email to