Skip to main content
Associate
August 27, 2024
Question

Redesign a board with smaller MCU (same family).Want to reuse existing code. Is there a way to update the pinout in

  • August 27, 2024
  • 4 replies
  • 1013 views

Redesign a board with smaller MCU (same family).Want to reuse existing code. Is there a way to update reselect the MCU, update the pinout in iMax, then update the code in the same project? Do not want to start another project for the new MCU. 

This topic has been closed for replies.

4 replies

TDK
August 27, 2024

In standalone STM32CubeMX, you can select Pinout -> List Pinout Compatible MCUs -> choose one -> OK, Import.

You will need to copy over user code, but copying the entire file and then regenerating code will preserve the user code sections while updating the others, so that's pretty easy.

"If you feel a post has answered your question, please click ""Accept as Solution""."
ELABI.1
ST Technical Moderator
August 27, 2024

Hllo @AnnieLLL,

Besides mentioned by @TDK, you can follow the steps shared in this FAQ to export a project configuration to a compatible STM32.

I hope this FAQ can help you.

Thank you.

ELABI.1

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.
Andrew Neil
Super User
August 27, 2024

@AnnieLLL wrote:

Do not want to start another project for the new MCU. 


I think you have to have a separate project for each MCU.

But you can share common code between projects:

https://community.st.com/t5/stm32-mcus-products/same-project-two-different-ioc-files/m-p/694254/highlight/true#M254340

 

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
AnnieLLLAuthor
Associate
August 27, 2024

I will try and keep you posted. Thank you.