Skip to main content
Visitor II
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
  • 974 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

    Super User
    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.

    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

    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

     

    AnnieLLLAuthor
    Visitor II
    August 27, 2024

    I will try and keep you posted. Thank you.