RFC: RTOS for Calypso

l--putt ichgeh at l--putt.de
Mon May 16 11:08:51 UTC 2011

On 14.05.2011 18:46, Harald Welte wrote:
> Hi all,
> I'd like to re-vitalize the RTOS discussions.
> I've now spend some hours reviewing the Nuttx documentation, source
> code, change logs and other information, and I'm impressed!

I would argue that this might be the biggest drawback of Nuttx. 
Documentation and source comments are quite coarse. This might be fine 
if you have basically a single developer who knows the stuff by heart.

I don't like to rely on guesses for the parameters of RTOS calls. For 
example, "context" of irq_dispatch seems to be the saved user space 
context. It also seems to be ignored anyway but who knows!?

Doxygen documentation of NutOS etc. at the other extreme might be 
excessive. Thus, maybe not a major problem.

>> From all that I've seen, it really seems like a good fit.
> * it tries to stay as close to POSIX and other Unix APIs as possible
> * you can actually have executable programs in the file system
> * it contains a small interactive shell
> * the changelog is verbose and releases are frequent
> * there's a test suite
> * there are already ports to other ARM7TDMI microcontrollers

Indeed. The TI C5471 DSP/ARM chip seems to be virtually a predecessor of 
the Calypso.

> * there is a small UI framework and the notion of drivers for SPI-
>    attached LCDs (with 1/2/4 bpp)
> * it has tasks and threads, pre-emptive and with priorities
> * it has posix message queues, which we could use for passing around
>    primitives between elements in the stack
> * it can be used on Unix-like and Windows/Cygwin host OS
> * it has its own scripts to generate toolchains, which means we
>    could possibly standardize on one of those toolchains
> Of course, not everything is perfect
> * there seems to be no writeable FS we can put in NOR flash

There is nxffs but with its limitations you are probably right...

> * it has no scripting language integration (like lua) yet
> * i didn't find any memory allocator optimized for pools of objects
>    of the same size (like 'struct msgb' or the like).  Something with
>    an API [not implementation!] of the SLAB/SLUB in Linux would probably
>    be a good start.
> I've done some example compile runs for arm7, including the shell and
> the graphics support (nx example). I end up with an object code size of
> something like 70 kilobytes, which is pretty good!
> So unless anyone raises major objections, I think we should move ahead
> with Nuttx.  Who is interested in working on the calypso port?

I'm already working on the IRQ subsystem and took a look at the UART. 
But there are open questions, see above...

> Let's use this list for coordinating the effort.
> As for where to put the code: I already have a git-svn clone of Nuttx,
> and will push that to a soon-to-be-created nuttx.git repository on
> git.osmocom.org.  The core calypso support (irq, uart, spi, etc.) should
> all go in that tree.  Meanwhile we will figure out how it would be
> possibel to keep the gsm related 'application' code out-of-tree from
> the nuttx code base.
> Regards,
> 	Harald

More information about the baseband-devel mailing list