Skip to content

STM HAL drivers are out of dateΒ #439

@dingyifei

Description

@dingyifei

I found framework-stm32cube\f4\Drivers\STM32F4xx_HAL_Driver haven't get updated for a year. This leads to some incompatability with code generated by STM32CubeMx using the newest framework from https://github.com/STMicroelectronics/STM32CubeF4. For example, htim2.Init.AutoReloadPreload is not defined in the old framework package and had to comment out manually.

I tried to manually include the newest driver but it wasn't working.
Here are the edits I made to my ini file:

build_flags =
  +  -I Drivers/STM32F4xx_HAL_Driver/Inc
lib_extra_dirs = 
 +   Drivers/STM32F4xx_HAL_Driver

They didn't work and I believe it was firmware package related because I got the following error (I only copied a section of it):

"C:\Users\13676\.platformio\packages\framework-stm32cube\f4\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pcd.c: In function 'HAL_PCD_ActivateRemoteWakeup':
Drivers\STM32F4xx_HAL_Driver\Inc/stm32f4xx_ll_usb.h:397:52: error: 'USBx_BASE' undeclared (first use in this function);
did you mean 'SCB_BASE'?
 #define USBx_DEVICE     ((USB_OTG_DeviceTypeDef *)(USBx_BASE + USB_OTG_DEVICE_BASE))"

Is there any way to partially replace FRAMEWORK_DIR in the python script stm32cube.py or update the framework package?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions