2024-08-27 07:29 AM
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.
2024-08-27 08:17 AM
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.
2024-08-27 08:25 AM
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.
2024-08-27 08:35 AM
@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:
2024-08-27 08:55 AM
I will try and keep you posted. Thank you.