OSAL creating threads

Discussions and support about ChibiOS/HAL, the MCU Hardware Abstraction Layer.
faisal
Posts: 203
Joined: Wed Jul 19, 2017 12:44 am
Has thanked: 30 times
Been thanked: 25 times

OSAL creating threads

Postby faisal » Thu Dec 13, 2018 10:03 pm

It seems that an important part of the OSAL API is missing ... creating threads. It seems obvious to be there - so I ask, is there a reason it's not as of 18.2.x?

User avatar
Giovanni
Site Admin
Posts: 11472
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 450 times
Been thanked: 375 times
Contact:

Re: OSAL creating threads

Postby Giovanni » Thu Dec 13, 2018 10:12 pm

Hi,

The main reason is that the OSAL API is not meant to be a full RTOS abstraction, it should be just the minimum required to allow HAL to interface an RTOS. In that perspective threads creation is not necessary, my feeling is that the current OSAL is already too fat for its intended role.

Giovanni

faisal
Posts: 203
Joined: Wed Jul 19, 2017 12:44 am
Has thanked: 30 times
Been thanked: 25 times

Re: OSAL creating threads

Postby faisal » Thu Dec 13, 2018 10:59 pm

I think creating a thread is pretty foundational. I can imagine drivers which require a thread (in the past the USB driver required a thread ..).

I was looking towards using OSAL as an OS abstraction - not necessarily as fully featured as ChibiOS/RT, but at least the basic API to which I can write application and library code against. That way, I can compile the same code for simulation on a PC host, as well as for an embedded target - which is a big benefit of using an OSAL.

faisal
Posts: 203
Joined: Wed Jul 19, 2017 12:44 am
Has thanked: 30 times
Been thanked: 25 times

Re: OSAL creating threads

Postby faisal » Thu Dec 13, 2018 11:03 pm

I have more OSAL comments in light of your opinion that it is 'bloated'. I'm putting those comments in a more appropriate thread:
viewtopic.php?f=3&t=4165


Return to “ChibiOS/HAL”

Who is online

Users browsing this forum: No registered users and 0 guests