cancel
Showing results for 
Search instead for 
Did you mean: 

updating CubeMX project if loops lost

gross
Associate II
Posted on May 12, 2015 at 16:10

Hey,

after I updated a CubeMX generated project again with CubeMX, all my if loops in the while loop were lost. Other loops outside of the main() are untouched. Where is the problem?

Can anybody help me please?

Thanks :)
4 REPLIES 4
Posted on May 12, 2015 at 16:48

Don't you need to explicitly mark USER code within the file so it's left untouched?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
gross
Associate II
Posted on May 13, 2015 at 12:23

Thanks for reply.

This is my code for example:

  /* USER CODE BEGIN WHILE */

       while (1) {

  /* USER CODE END WHILE */

  /* USER CODE BEGIN 3 */

             if (condition) {

                    syntx

             }

             else {

                    syntax

             }

       }

  /* USER CODE END 3 */

}

After updateing the code with CubeMX it looks like this:

  /* USER CODE BEGIN WHILE */

       while (1) {

  /* USER CODE END WHILE */

  /* USER CODE BEGIN 3 */

                    syntx

             }

                    syntax

             }

       }

  /* USER CODE END 3 */

}

All other loops outside of the main() are untouched and inside of the User code lines. What is the matter?

Thanks :)

Amel NASRI
ST Employee
Posted on May 15, 2015 at 18:44

Hi Marcel,

Are you using CubeMX 4.7.0? If yes, please switch to 4.7.1 release that you may download from web.

-Mayla-

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.

gross
Associate II
Posted on May 18, 2015 at 09:01

seems to work. Thanks :)