TrampolineRTOS / trampoline

Trampoline is a static RTOS for small embedded systems. Its API is aligned with OSEK/VDX OS and AUTOSAR OS 4.2 standards.
GNU General Public License v2.0
600 stars 265 forks source link

Question: Message queues in Trampoline #103

Closed grundmanns closed 2 years ago

grundmanns commented 2 years ago

Hello Jean Luc, we ported our firmware to Trampoline. In that firmware we use Message queues to communicate between Tasks. In FreeRTOS there were native ones that could be used.

Are there native message queues in Trampoline too?

I Checked your Trampoline user manual and there is a chapter: "THE COMMUNICATION LIBRARY n OSEK/COM compliant library is part of Trampoline. This chapter presents the communi- cation configuration and API. Implementation details as well as examples of extension are provided at the end of the chapter."

It is very brief and I cannot find so much about it.

Then there next chapter is:

"THE INTER OS-APPLICATION COMMUNICATION LIBRARY nter OS-application Communication library is an API initially dedicated to communications between tasks from different OS-applications in multicore systems. However, it could also be used for communications between tasks from a same OS-Application."

I am wondering if the Inter OS-Application is the way to go or the communication library. I didn't yet research the source code for it. I wanted to check with you first to understand what would make sense.

We use a single OS implementaton right now. In the future it could happen that we would run the SW on different cores even with different architectures (e.g. aarch64 vs armv7).

Is there something usable implemented in Trampoline ?

Thank you for your help.

BR Sven Grundmann

jlbirccyn commented 2 years ago

Hello Sven,

OSEK/COM has both blackboard messaging and message queue messaging and Trampoline implements it. You can refer to the OSEK/COM standard that I have made available for download since the AUTOSAR consortium abandoned the oser-vdx.org domain.

However, OSEK/COM was not selected for AUTOSAR and was replaced (almost) by IOC which is a mistake from my point of view because IOC is less good. The IOC is actually an addition that was made when the consortium realized that the memory protection as specified by the standard prevented copying data from one OS Application to another. OSEK/COM includes in particular the possibility of hanging a notification on the reception of a message, i.e. the activation of a task or the setting of an event, whereas the IOC is from this point of view more rudimentary (see section 7.10.3.2 of AUTOSAR_SWS_OS). And the IOC does not implement queued communication (see 7.10.3.1).

So if you want to stick with AUTOSAR, use the IOC but you will not get something close to FreeRTOS message queues. If you do not, use OSEK/COM.

Best regards

Jean-Luc Béchennec

grundmanns commented 2 years ago

Hello Jean-Luc,

thank you very much for your answer. I checked with professional AUTOSAR solutions and they define SWC (software components). Between these they define communication ports and abstract the connection between them. They real messaging is then done by the RTE (run tme environment). This sounds quite different to the Trampoline OSEK / COM solution isn't it ?

BR Sven Grundmann

jlbirccyn commented 2 years ago

Hello Sven,

Normally IOC is used for AUTOSAR.

Best regards

Jean-Luc