Skip to main content
p.walker
Visitor II
August 8, 2018
Question

STM32CubeMX not preserving my user code

  • August 8, 2018
  • 2 replies
  • 795 views

I'm running v1.26.1 of CubeMX and any code that I add between the /* USER CODE BEGIN.. and /* USER CODE END.. comments gets deleted every time I (re)generate the project. I have the 'Keep User Code when re-generating' option ticked. What am I missing?

    This topic has been closed for replies.

    2 replies

    Khouloud GARSI
    ST Employee
    August 9, 2018

    Hi @p.walker​ ,

    I assume you're using CubeMX version 4.26.1 (Please feel free to correct me if I'm wrong).

    I couldn't reproduce your issue (I have generated a project and my user code was kept after regenerating it). Thus, could you share your ioc file for further debug.

    Khouloud.

    Vincent HUE
    Visitor II
    October 16, 2018

    I am experiencing similar issues with 4.26.1. today... :(

    All my code is wiped out.

    Vincent