HomeCommunityEmbedded and Microcontrollers blog
January 1, 2015

TNeo: stable open source real-time kernel with well-formed code and detailed tests (for Cortex-M0/M0+/M3/M4/M4F)

I'd like to present real-time kernel: TNeo.TNeo was born as a thorough review and re-implementation of TNKernel. The new kernel has well-formed code, inherited bugs are fixed as well as new features being added, it is well documented and tested c...

By Dmitry Frank

Share
Reading time 1 minute

I'd like to present real-time kernel: TNeo.

TNeo was born as a thorough review and re-implementation of TNKernel. The new kernel has well-formed code, inherited bugs are fixed as well as new features being added, it is well documented and tested carefully with unit-tests.

Currently it is available for the following architectures:

  • ARM Cortex-M cores: Cortex-M0/M0+/M1/M3/M4/M4F (supported toolchains: GCC, Keil RealView, clang, IAR)
  • Microchip: PIC32/PIC24/dsPIC

Comprehensive documentation is available in two forms:

Short list of features can be found here.


This project was initially a fork of PIC32 TNKernel port by Anders Montonen. I don't like several design decisions of original TNKernel, as well as many of the implementation details, but Anders wants to keep his port as close to original TNKernel as possible. So I decided to fork it and have fun implementing what I want.

The more I get into how TNKernel works, the less I like its code. It appears as a very hastily-written project: there is a lot of code duplication and a lot of inconsistency, all of this leads to bugs. More, TNKernel is not documented well enough and there are totally no unit tests for it, so I decided to reimplement it almost completely. Refer to the page Why reimplement TNKernel for details.

I really don't like several API decisions of original TNKernel, so it's not 100%-compatible. Refer to the page Differences from TNKernel API for details.

Together with almost totally re-writing TNKernel, I've implemented detailed unit tests for it, to make sure I didn't break anything, and of course I've found several bugs in original TNKernel 2.7: refer to the section Bugs of TNKernel 2.7. Unit tests are, or course, a "must-have" for the project like this; it's so strange but original TNKernel seems untested.

I presented the kernel at Microchip Masters 2014 seminar, and received an offer from the head of research of car alarm company to implement Cortex-M port. Of course I accepted, and so I'm happy to present it here.

For comprehensive information, refer to the documentation (see links at the top)


2Log in to like this post
Share

Article text

Re-use is only permitted for informational and non-commercial or personal use only.

placeholder