ChibiOS/HAL in FreeRTOS project

Discussions and support about ChibiOS/HAL, the MCU Hardware Abstraction Layer.
Post Reply
radekk
Posts: 2
Joined: Thu Jul 12, 2018 10:06 am

ChibiOS/HAL in FreeRTOS project

Post by radekk »

Hi,

I have a small problem. I would like to use ChibiOS/HAL in FreeRTOS, I found this solution viewtopic.php?t=2564, but when I move ChibiOS files to my project and I try to bulid it I get a hundreds errors related with ChibiOS files. Someone has similar problem or know solution?


Regards,
Radek
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: ChibiOS/HAL in FreeRTOS project

Post by Giovanni »

Hi,

It was created on top of an old ChibiOS version, things have changed in 3 years and probably something has be be adjusted.

Your best option is to get in touch with the author.

Giovanni
radekk
Posts: 2
Joined: Thu Jul 12, 2018 10:06 am

Re: ChibiOS/HAL in FreeRTOS project

Post by radekk »

Ok, I will try to get in touch with him.

But what with include ChibiOS/HAL files to FreeRTOS? Errors in build may be caused by too old version osal?


Regards,
Radek
tdwebste
Posts: 35
Joined: Mon Jan 14, 2013 2:01 pm

Re: ChibiOS/HAL in FreeRTOS project

Post by tdwebste »

Hi Radek,

Were you able to use ChibiOS/HAL in FreeRTOS project?

regards
Tim
aport
Posts: 36
Joined: Sat May 10, 2014 7:35 pm
Has thanked: 2 times
Been thanked: 4 times

Re: ChibiOS/HAL in FreeRTOS project

Post by aport »

Hello,

I took another stab at making the OSAL for FreeRTOS. There are still some things unimplemented but for the most part it seems to work well. Compared to the last one, it doesn't use thread events so you can use those in your application. It also has the threads queue implemented.

It was made for ARM Cortex-M, so if you are using a different arch you need to adjust some things.

I have only tested with the SD, GPT, and ICU drivers.

Make sure configUSE_TICK_HOOK is set to 1 in your FreeRTOSConfig.h, the osal defines vApplicationTickHook to clock virtual timers.


osal.zip
(8.39 KiB) Downloaded 1605 times
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: ChibiOS/HAL in FreeRTOS project

Post by Giovanni »

Hi,

Thanks for the code.

Do you have some kind of demo application for STM32? potential users would appreciate a starting point.

Giovanni
aport
Posts: 36
Joined: Sat May 10, 2014 7:35 pm
Has thanked: 2 times
Been thanked: 4 times

Re: ChibiOS/HAL in FreeRTOS project

Post by aport »

Actually I used the CMSIS wrapper for FreeRTOS found here. So the demo in STM32/CMSIS-STM32F407-DISCOVERY will work as is. But the wrapper is not very efficient... it adds a lot to the text segment. I will try to get a demo going using only the FreeRTOS API.
Post Reply