ChibiOS and ST's sample code coexistence

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
settuz
Posts: 2
Joined: Sun Jul 20, 2014 3:56 pm

ChibiOS and ST's sample code coexistence

Post by settuz »

Hi everybody,

my name is Valerio and this is the first topic on this forum. I'm writing this message because I'm currently working on my first project with an ARM microcrontroller (STM32F407), and I would like to ask you some questions about the coexistence of ChibiOS and the example code given from ST (STM32cube in particular).
I'm not totally new with microcontrollers: I've already worked with 8 bit PIC microcontrollers in the past, however working with ARM MCUs is a little more challenging. At first I though of using ChibiOS, cause I saw it offers a simple interface to configure and interact with the hardware.
However, after a few tests, I found that it's would be easier for me to have full access to the internal registers. I know that this increases the amount of code I'll need to write, but in this way I can directly refer to the ST's "User Guide" while writing the code.

In my opinion there are two ways to solve this issue:

1) Use the complete ChibiOS's project template and add the ST's drivers as a support for the built-in ones. In this case, of course, I would not use the built-in drivers, but I would use my own. I think this should be the easiest way, so I don't expect it to be too difficult. What do you think? Is there anyone who has tried this before?

2) Write the code using ST's drivers and then add ChibiOS's kernel part (without HAL) on top of that. I think this won't be very straightforward, because I suspect that the kernel might have some sort of dependency on the HAL (for example the scheduler might depend on some internal timer). Is that correct? I mean, is this really that difficult, or not? Is there anyone who has tried this before?

Thanks a lot for your support! :)
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: ChibiOS and ST's sample code coexistence

Post by Giovanni »

There are no dependencies between kernel and HAL, just remove the HAL/platform/board from the makefile.

Of course you are on your own for initializations, including the system tick.

Giovanni
settuz
Posts: 2
Joined: Sun Jul 20, 2014 3:56 pm

Re: ChibiOS and ST's sample code coexistence

Post by settuz »

Hi Giovanni,

thanks a lot for your answer!
Googling a while yesterday, I found also other web pages taking care of this topic:

1) http://www.chibios.org/dokuwiki/doku.ph ... tion_guide
2) viewtopic.php?f=2&t=1571

I apologyze for the silly question: I should have read those documents before... :(
Thanks again for the support.
I'll let you know how things proceed.

Valerio
Post Reply