ChibiOS 19.2 and stm32 standard peripheral lib

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

Moderator: RoccoMarco

Post Reply
Guillaume227
Posts: 15
Joined: Tue Apr 18, 2017 6:52 pm
Has thanked: 10 times

ChibiOS 19.2 and stm32 standard peripheral lib

Post 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?
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 19.2 and stm32 standard peripheral lib

Post 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
Guillaume227
Posts: 15
Joined: Tue Apr 18, 2017 6:52 pm
Has thanked: 10 times

Re: ChibiOS 19.2 and stm32 standard peripheral lib

Post 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 ?
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 19.2 and stm32 standard peripheral lib

Post 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
Post Reply