cancel
Showing results for 
Search instead for 
Did you mean: 

How to replace stm32F4 library with STM32L4 in CubeIDE

Hossein Haji
Associate III

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.

 

1 ACCEPTED SOLUTION

Accepted Solutions

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
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

5 REPLIES 5
STTwo-32
ST Employee

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.

Pavel A.
Evangelist III

 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.

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
Up vote any posts that you find helpful, it shows what's working..

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.
Evangelist III

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