TNeo RTOS

TNeo is a well-formed and carefully tested preemptive real-time kernel for 16- and 32-bits MCUs. It is compact and fast.

TNeo was born as a thorough review and re-implementation of TNKernel v2.7. 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.

You can read the article about it: How I ended up writing a new real-time kernel.

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: PIC32MX/PIC24/dsPIC

It is hosted at GitHub.

Comprehensive documentation is available in two forms: html and pdf.


Donate

Discussion

Adrian, 2015/10/07 14:40

Excellent work !

Any pic32/cortex starter kit recommendation for someone willing to test the TNeo RTOS ?

Dmitry Frank, 2015/10/25 07:51

Thanks for the comment. I have no particular recommendations: on Microchip platforms, I haven't used any development boards (used our company's devices), and for Cortex-M3, I've used STM32-Discovery board.

Tony Liu, 2015/11/22 07:56

Hello Frank, I bought an PIC32MZ Ethernet and USB Starter Kit. It's really not cheap for me :). I will use it to get started PIC32 development. I have big interest in your TNeo. But I can't get its documents since I can't access these links. Would you send these html and pdf documents to me by email? My email address is tony.jx.liu@foxmail.com. Thanks very much!Bold Text

Dmitry Frank, 2015/11/22 08:51

Hello Tony,

I've sent docs at your address, however:

Sorry to say, but at the moment TNeo supports only PIC32MX. I have some broad plans to add PIC32MZ support, but I can't say for sure when I'll be able to get some time for this.

cy tan, 2016/02/19 00:59

Hello Dmitry,

I just started to learn RTOS, can I know the minimun ram requirement to implement TNEO, for example: Preemptive scheduler - ram requirement? and Cooperative scheduler - ram requirement?

I planning to use pic24 (8k ram).

Dmitry Frank, 2016/02/19 11:05

Hello,

Not sure what you mean by “implement TNeo”, it is already implemented :) And it does not have a “Cooperative scheduler” option, it is preemptive only.

Preemptive OS consumes much more RAM, of course. “how much” - depends on application. The main thing to keep in mind is that in preemptive OS each task should have its own stack space, which is, obviously, allocated from RAM. So, for example, if the application has 5 tasks, each of which uses 1KB of stack, it would result in 5K of RAM only for stacks.

On the other hand, preemptive scheduler provides much more convenience and much faster reaction on events than the cooperative one.

I don't know anything about your particular application that you're going to implement on PIC24 with 8KB of RAM, so it's hard to say how much RAM would you need. But as a general note, I'd say that PIC24 platform is powerful enough to run preemptive OS. I wouldn't use cooperative scheduler there.

nv, 2017/04/04 11:19

Did you measure the Context Switch Time in the cycles?

Dmitry Frank, 2017/04/06 19:45

I did actually, but I totally forgot the numbers. :) I'll let you know once I measure it again (or find old records).

And also keep in mind that it depends on the enabled features, of course. Profiler and software stack control consume a bit of cycles.

Anyway, will let you know the numbers as long as I obtain them.

ivan, 2017/09/09 15:06

Hello. Very often tests can help understand the API work more clearly than documentation. Is it possible to download projects with unit tests? Best regards, Ivan

Ilya, 2017/10/26 09:40

Hello. I want use the pic32mz. TNeo not ported for this mcu. Will Planning make port to pic32mz? Thanks.

Dmitry Frank, 2017/10/26 09:44

Hello. Sadly, I don't think it's going to happen any time soon.

Mark Oudshoorn, 2017/12/19 13:04

Are there any special requirements you need to take before entering EM2 on a ARM M3 core. Currently I stop SysTick Set a RTC interrupt enter EM2, then a WFI instruction, then restart SysTick. Is this the correct order?Bold Text

Alexey, 2018/08/31 09:10

I downloaded and compiled the TNeo code with IAR EWARM 8 and … I get an error in _round_robin_manage():

Error[Pe167]: argument of type “struct TN_ListItem volatile *” is incompatible with parameter of type “struct TN_ListItem *”.

Why is “volatile” used here?

Paul Chan, 2022/05/20 13:08

Dear Sir, I am interest in your TNeo kernel. However, when I click on the document teno.pdf, it shows “Repository not found”.

Could you put your document to GitHub ?

Thanks a lot.

Best regards, Paul Chan

Dmitry Frank, 2022/05/21 08:47

Hello Paul, yeah Bitbucket discontinued this kind of hosting a long time ago. I just moved those docs to github and updated the links above. For convenience, pasting them here too:

Enter your comment (please, English only). Wiki syntax is allowed:
   ____   ____   __    ____   _  __
  /  _/  / __/  / /   /  _/  | |/_/
 _/ /   / _/   / /__ _/ /   _>  <  
/___/  /_/    /____//___/  /_/|_|
 
projects/tneo.txt · Last modified: 2022/05/21 08:46 by dfrank
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0