Page 1 of 1

ChibiOS 19.2 and stm32 standard peripheral lib

Posted: Sat Jun 29, 2019 1:41 am
by Guillaume227
I just upgraded to the latest ChibiStudio version and I am in the process of updating my project to ChibiOS 19.2.0 that comes with it (from ChibiOS version 17.6). I am using F4 boards (F407 and F446).
I am having trouble compiling the stm32 standard library code.
Header stm32f4xx.h (no longer in os/common/ext/CMSIS/ST/STM32F4xx and now in os/common/ext/ST/STM32F4xx, I am not sure why)
refers to version 2.6.2 in its header:

Code: Select all

  * @file    stm32f4xx.h
  * @author  MCD Application Team
  * @version V2.6.1
  * @date    14-February-2017
  * @brief   CMSIS STM32F4xx Device Peripheral Access Layer Header File.


I tried keeping the stm32 peripheral library the same (in my project I located it in ext/stdperiph_stm32f4).
From the header I see I had been using version 1.8:

Code: Select all

  * @file    stm32f4xx_rcc.h
  * @author  MCD Application Team
  * @version V1.8.0
  * @date    04-November-2016
 


However there seem to have been significant changes and I get a compilation error like:

Code: Select all

  ChibiOS_4/ext/stdperiph_stm32f4/src/stm32f4xx_rcc.c: In function 'RCC_WaitForHSEStartUp':
ChibiOS_4/ext/stdperiph_stm32f4/src/stm32f4xx_rcc.c:318:30: error: 'HSE_STARTUP_TIMEOUT' undeclared (first use in this function)

And indeed,

Code: Select all

HSE_STARTUP_TIMEOUT
used to be declared in stm32f4xx.h but is no longer there in version 2.6.1

So I have looked on the stm32 website and searched around on the internet but can't find a more recent version than 1.8 for the standard peripheral library (STM id: STSW-STM32065)
https://www.st.com/en/embedded-software ... 32065.html

Do you know where to find a more recent stdperiph_stm32f4 version? Or do you have any other recommendation?

Re: ChibiOS 19.2 and stm32 standard peripheral lib

Posted: Sun Jun 30, 2019 7:56 pm
by Giovanni
The problem is in evolving ST headers, newer ChibiOS version include the most recent headers in order to support the new devices. You need to understand where the differences are and what replaced those macros.

Note that the headers and libraries are available as part of Cube MX packages, you will not find standalone downloads.

Giovanni

Re: ChibiOS 19.2 and stm32 standard peripheral lib

Posted: Sat Jul 06, 2019 4:44 pm
by Guillaume227
Thank you Giovanni, I am starting to go through some Cube MX tutorials.
I see there is a FreeRTOS option in the Cube MX project wizard.
Has there been talks about doing the same for ChibiOS ?

Re: ChibiOS 19.2 and stm32 standard peripheral lib

Posted: Sat Jul 06, 2019 5:49 pm
by Giovanni
Hi,

There is a little background :)

I am an ST employee (another division, not involved in STM32) so the conflict of interest potential would be off scale. They are aware of ChibiOS and we discussed friendly about technical topics, I know for sure they appreciate it.

Giovanni