Re: [distortos-development] Newbie getting started
object-oriented C++ RTOS for microcontrollers
Brought to you by:
distortec
|
From: Kamil S. <dis...@di...> - 2018-02-03 17:59:36
|
On Sat, 2018-02-03 at 11:46 -0500, Trampas Stern wrote: > I am new to RTOS and distortos, does someone have some good > documentation on how distortos works and how to get started? Hello Trampas! You can find some documentation on project's website http://distortos.org/ Of special interest are following articles: http://distortos.org/documentation/arm-toolchain-windows/ http://distortos.org/documentation/creating-configuring-project-eclipse/ There's also API reference generated with doxygen http://distortos.org/api-reference/ Some info can also be obtained from the changelog in the repository https://github.com/DISTORTEC/distortos/blob/master/CHANGELOG.md Generally I'm afraid that documentation and guides are not very good at this moment... However if you need some guidance or if you have specific questions I will be more than happy to help you and answer your questions. As to "how distortos works" - it basically works in the same way as any other RTOS. When a context switch is required it is performed in interrrupt (PendSV in case of ARMv6-M and ARMv7-M) - registers of first thread are "pushed" on its stack (1), then its stack pointer is saved in its thread control block (2), next thread control block is marked as active (3), its stack pointer register is restored (4), then the registers of this thread are "popped" from stack (5). This is one of very few pieces of code in distortos which is (partially) written in assembly language, thus not very friendly for a beginner. (1) - https://github.com/DISTORTEC/distortos/blob/7d58c175f4fd4e2150033fbddf662f69ff1dd910/source/architecture/ARM/ARMv6-M-ARMv7-M/ARMv6-M-ARMv7-M-PendSV_Handler.cpp#L149 (2) - https://github.com/DISTORTEC/distortos/blob/7d58c175f4fd4e2150033fbddf662f69ff1dd910/source/scheduler/Scheduler.cpp#L254 (3) - https://github.com/DISTORTEC/distortos/blob/7d58c175f4fd4e2150033fbddf662f69ff1dd910/source/scheduler/Scheduler.cpp#L255 (4) - https://github.com/DISTORTEC/distortos/blob/7d58c175f4fd4e2150033fbddf662f69ff1dd910/source/scheduler/Scheduler.cpp#L257 (5) - https://github.com/DISTORTEC/distortos/blob/7d58c175f4fd4e2150033fbddf662f69ff1dd910/source/architecture/ARM/ARMv6-M-ARMv7-M/ARMv6-M-ARMv7-M-PendSV_Handler.cpp#L162 Regards, Kamil Szczygiel |