Skip to main content
Graduate
November 12, 2023
Solved

How to replace stm32F4 library with STM32L4 in CubeIDE

  • November 12, 2023
  • 4 replies
  • 1888 views

Hello everyone, I hope you are doing well.

We downloaded STSW-ST25R017 library to use ST25R95 in our new product.
The projects in this library are based on STM32L476RG-Nucleo board.

Our MCU is STM32F405RG, Is there a straightforward way we can replace STM32F405RG library with STM32L476RG library or we have to generate new CubeIDE project?

Thanks in advance.

Best regards.

 

    This topic has been closed for replies.
    Best answer by Tesla DeLorean

    Realistically the "easiest" way would be to create a shell project, or use the template. Check and build that, and then merge in the functionality from the donor project. CubeL4 and CubeF4 are very similar at a functional level, but you're likely going to need to do some coding relating to specific pin and peripheral usage.

    4 replies

    Technical Moderator
    November 12, 2023

    Hello @Hossein Haji 

    You should migrate your project from the STM32L476RG to the STM32F405RG using both MCUs reference manuals and datasheets. This should be so easy because F4 and L4 are very simular.

    Best regards.

    STTwo-32 

    Graduate
    November 13, 2023

    I replaced all files related to L4 with F4 files in CubeIDE but there are some weird errors like "uint32_t is undefined".

    I think I have to change makefile in CubeIDE project.

    Super User
    November 12, 2023

     ST25R95 communicates with the host over SPI, so it should not be hard to port to another STM32. But it can be hard for someone who is new to STM32 and ST tools. Here you can find help with porting the STM32 code.

    Graduate II
    November 12, 2023

    Realistically the "easiest" way would be to create a shell project, or use the template. Check and build that, and then merge in the functionality from the donor project. CubeL4 and CubeF4 are very similar at a functional level, but you're likely going to need to do some coding relating to specific pin and peripheral usage.

    Super User
    November 13, 2023

    Yes this is what I've meant. Not quite intuitive. Somebody should help, to avoid loss of productivity and frustration ((