Skip to main content
Explorer
July 13, 2021
Solved

Different version of libarm_cortexM4lf_math.a for STM32F4 and STM32L4

  • July 13, 2021
  • 2 replies
  • 2054 views

In the latest firmware for STM32F4 (STM32Cube_FW_F4_V1.26.1) the libarm_cortexM4lf_math.a file is 3025kB.

In the latest firmware for STM32L4 (STM32Cube_FW_L4_V1.17.0) the libarm_cortexM4lf_math.a file is 5235kB.

I found that in the version for STM32L4 arm_rfft_fast_init_f32() returns an error if the FFT length is 128, whereas the version for STM32F4 does not. So I replaced the STM32L4 version with the STM32F4 version, and it seems to work fine.

I'm confused:

Why there are different version for F4 and L4 in the first place?

And is it safe to use the F4 version with a L4 MCU?

And where would I report that bug with the 128 point FFT?

    This topic has been closed for replies.
    Best answer by SFahr

    Okay, thank you.

    It appears to be a bug in CMSIS 5.6.0 which has already been reported and fixed in newer versions.

    https://github.com/ARM-software/CMSIS_5/issues/658

    STM32Cube_FW_F4_V1.26.1 still uses CMSIS 5.4.0 which does not have that bug, either.

    2 replies

    Technical Moderator
    July 13, 2021

    Two folder levels above the math libs you will find e.g. a README.md containing information about CMSIS. STMicroelectronics uses this CMSIS library as is from ARM, so any bug report should be reported to ARM.

    Both families use the same Cortex-M4 core, so you can safely use the F4 lib for the L4.

    Good luck!

    /Peter

    SFahrAuthorAnswer
    Explorer
    July 13, 2021

    Okay, thank you.

    It appears to be a bug in CMSIS 5.6.0 which has already been reported and fixed in newer versions.

    https://github.com/ARM-software/CMSIS_5/issues/658

    STM32Cube_FW_F4_V1.26.1 still uses CMSIS 5.4.0 which does not have that bug, either.