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

operating system apis #105

Closed grundmanns closed 2 years ago

grundmanns commented 2 years ago

Hello Jean-Luc, in my quest to enable the GetISRID api i checked all that system call functionality. I could enable almost all the API except for the multi core apis (multicore and spinlock) because we have only a single CR7 core ( we have multicore but only one for AUTOSAR).

I saw in api.goilTemplate a reference to a semaphore api. In api.oil it was not listed at all. However in tpl_os_semaphore_kernel.c there is code for semaphore system calls: FUNC(tpl_status, OS_CODE) tpl_sem_wait_service(CONST(SemType, AUTOMATIC) sem_id); FUNC(tpl_status, OS_CODE) tpl_sem_post_service(CONST(SemType, AUTOMATIC) sem_id);

These functions are not mentioned anywhere in the whole system.

Is the semaphore code working and can it be enabled or is it in a different branch. I guess in api.oil there must be some APICONFIG defined for this to work right ?

BR Sven Grundmann

jlbirccyn commented 2 years ago

Hello Sven

Semaphore are for a lab we do with students to learn how to add a service. They can be added easily but are out of scope of AUTOSAR Standard. I think my colleague, Mikaël Briday, has the TP solution available.

Best Regards

Jean-Luc

mbriday commented 2 years ago

Hi Sven, I can make a branch with the semaphores enabled. regards

mbriday commented 2 years ago

Hi, I have created a new branch 'semaphore' that enables semaphore. No documentation at this date, but a working example is available here. It simply show 2 periodic tasks that share access to the serial through a mutex. regards,

grundmanns commented 2 years ago

Hello Mikaël, thank you very much for the code. I appreciate it.

BR Sven Grundmann