ChibiOS background and history

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: barthess, RoccoMarco, utzig, lbednarz, tfAteba

Posts: 14
Joined: Tue Feb 28, 2012 6:55 pm

ChibiOS background and history

Postby Tinker » Fri Jun 15, 2012 6:34 pm

Hi Geovanni,

I have to say, ChibiOS is one of the most beautiful designs and code bases I have seen. I would like to know more about how it came to be.

Can you tell us a bit more about its history? Are there other projects or books that influenced your decisions in terms of coding style and RTOS design? (For instance, it's very interesting how you go about emulating object inheritance in C)

Thanks a lot!


User avatar
Site Admin
Posts: 9764
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 150 times
Been thanked: 139 times

Re: ChibiOS background and history

Postby Giovanni » Fri Jun 15, 2012 8:11 pm


I am happy you appreciate the codebase, probably it is my reaction to the coding horrors I have to witness and bear in my job :-)

About ChibiOS, it is a loooong story (popcorn recommended).

Everything started when I bought by pure chance this book (still an excellent book):

Operating System Design: The XINU Approach
by Douglas Comer

It was 1988 if I remember well and I immediately got interested in this OS and its design, I decided to test it by porting it from the PDP11 architecture to my Atari ST, I began to work on it. During the port process the thing become more and more interesting, at the end it was not just a port but a whole different thing, an OS posix-like where nothing of Xinu was left, it was self hosting and able to run emacs, binutils, GCC 2.x and all the Unix-like utils, it was able to handle 3 terminals concurrently and 4 virtual terminals on the bitmapped console.

It was a monolithic OS but it had something interesting, the kernel was preemptable and it implemented kernel threads (something unknown at that time, we called them co-processes, processes that shared the same address space of normal Unix-like processes but were faster to create).

It was a complete OS by 1991 named BDP. It was missing a networking stack and didn't handle virtual memory nor protection because the limitations of the 68000, our plan (I worked on that with my friend Isidoro) was to port the whole thing on those new 386 that were becoming affordable. Then Linux happened and we decided to focus on other things.

However I decided to create a spawn from BDP, a challenge with myself: create a whole kernel as small as possible, I pulled code from BDP but again I ended up rewriting it into something entirely new; the MK kernel. Things like MK, I learned several years later, are called RTOSes :-)
That old MK kernel was functional in 1992 (it is on the SF files area if you want to see it, compare with the current ChibiOS) and was the director ancestor of ChibiOS. Too busy with my career, I dropped it for a while with the idea to resurrect it at some point. About 15 years later, it was a boooring Sunday, I was staring at my old Atari ST silently sitting in a corner of my room and I decided to see how MK looked after 15 years, it still looked good, incidentally I needed a RTOS and in the meanwhile I got interested in open source. I decided to refresh the code and make it a FOSS project, it went live in 2007 on SF, then for 2 years nothing happened, zero interest, but I can be stubborn so the project continued, after those first years it began to increase in popularity, in September 2012 it will be the 5th birthday but the whole thing started about 24 years ago.

Do not blame me, you asked for it :-)


Posts: 124
Joined: Sun Aug 28, 2011 5:16 pm

Re: ChibiOS background and history

Postby DrunkenDonkey » Sun Jun 17, 2012 1:34 pm

Heh cool story, I like how you didn't give up after those 2 years of no interest, this speaks highly of the project as a whole, now that is is getting increasingly popular. I'm so happy I picked ChibiOS too rather than one of the more feature complete alternatives I checked before that - chibi does the things right and is indeed a fast learner, the support is more than great too, thanks for that :D

User avatar
Posts: 861
Joined: Wed Dec 08, 2010 7:55 pm
Location: Minsk, Belarus
Been thanked: 7 times

Re: ChibiOS background and history

Postby barthess » Mon Jun 18, 2012 2:00 pm

Really interesting story.

If you ask me "why I am chose ChibiOS" I can not actually answer why. Several years ago I am looking for startup code for my project based on ST32F103. After some googling I decided that I need not just startup code, but the whole OS for MCU. I opened 5 or 7 tabs in browser with different OSes (remember just first tab with FreeRTOS). ChibiOS was on 2-nd or 3-d tab. First reaction when I looked on it "hmm, interesting". After 30 minutes of reading was convinced that this is exactly what I needed. I do not know why, probably because of simple design of homepage, or Eclipse setting up manual, or clean and well commented code. Latter I proposed my help in I2C implementation, asked many nubes questions. But the most important that I learned a lot in many areas of knowledge.

Thanks for you work, Giovanni.

Posts: 334
Joined: Sat Jan 07, 2012 6:22 pm
Location: Brazil
Has thanked: 1 time
Been thanked: 9 times

Re: ChibiOS background and history

Postby utzig » Fri Jun 22, 2012 12:02 am

What barthess said mirrors, kind of, exactly the way I felt when I found this OS and read the documentation for the first time.

I was doing a contracting work developing a firmware for a product with a STM32 and started looking for alternative. I had previous experience with FreeRTOS. In fact that was a reason for not choosing it! The best ones I considered were ChibiOS/RT, Bertos and eCos. eCos is too complex and looking at the source tree really hurts (I'm not talking specifically of code, which is very good). Bertos ( is really cool and has a very professional looking website and good documentation. It also has lots of peripheral drivers. ChibiOS/RT also has a very good homepage with good documentation which got me hooked.

And then I read somewhere that the maintainer works for ST and I thought: "well, this guy must sure know what he's doing!" :-)

Fabio Utzig

User avatar
Posts: 346
Joined: Mon Apr 18, 2011 6:07 pm
Location: Bath, UK

Re: ChibiOS background and history

Postby Badger » Thu Jul 12, 2012 2:19 pm

I bought the book Giovanni recommended (from ebay, first edition, for about £3!). It seems pretty good, I am slowly working through it as my 'light' bed time reading :D

User avatar
Posts: 1223
Joined: Thu May 10, 2012 9:50 am
Location: Switzerland

Re: ChibiOS background and history

Postby Tectu » Thu Jul 12, 2012 2:23 pm

lol, bookshops here in switzerland sell the book for over 150$

~ Tectu

User avatar
Posts: 346
Joined: Mon Apr 18, 2011 6:07 pm
Location: Bath, UK

Re: ChibiOS background and history

Postby Badger » Thu Jul 12, 2012 2:25 pm

it is an old library book, well used, but for £3 I wont complain! It's a shame the kindle edition costs 10x as much, I would've bought that otherwise.

Return to “General Support”

Who is online

Users browsing this forum: No registered users and 1 guest