Skip to main content
Hossein Haji
Associate III
November 12, 2023
Solved

How to replace stm32F4 library with STM32L4 in CubeIDE

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.
Tesla DeLorean
Tesla DeLoreanBest answer
Guru
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.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..

5 replies

STTwo-32
ST 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 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Hossein Haji
Associate III
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.

Pavel A.
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.

Tesla DeLorean
Tesla DeLoreanBest answer
Guru
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.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Pavel A.
November 13, 2023

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