Skip to main content
RPasc.2
Associate II
December 24, 2020
Solved

Re-run STM32CubeMX after generating code ?

  • December 24, 2020
  • 6 replies
  • 1940 views

After creating a new project STM32CubeMX it automatically generates code. If I want to change any setting using STM32CubeMX how can it be restarted from within STM32CubeIDE ?

I ran STM32CubeMX by double-clicking the .ioc file, but STM32CubeMX does not show the configuration tabs. What is the proper way to rerun and reconfigure STM32CubeMX ?

This topic has been closed for replies.
Best answer by TDK

There is still another vertical bar there. Drag it right.

6 replies

TDK
December 24, 2020

It should show up when you double click the IOC. Maybe the panel is hidden or something. Show a screenshot.

If you generated it in standalone mode, you could just redo it there as well.

"If you feel a post has answered your question, please click ""Accept as Solution""."
RPasc.2
RPasc.2Author
Associate II
December 24, 2020

If I redo it in stand-alone mode MX will wipe out all changes I made in the main.c file.

Here's a screenshot of MX (opened by d-clicking the .ioc file). Same screen shot also attached to this reply.

Note that many of the configuartion tabs and subcatagories are missing.

TDK
December 24, 2020

The tabs aren't missing, they're just collapsed. Drag the vertical bars away from each other to expand.

0693W000006Gp8gQAC.png 

User code is preserved on regeneration as long as you have the checkbox marked. I'd back everything up beforehand if it were my project, however.

"If you feel a post has answered your question, please click ""Accept as Solution""."
RPasc.2
RPasc.2Author
Associate II
December 24, 2020

Yes, I have already done this. There are still no tabs for, say, changing the USART2 baud rate, etc.

Where have all the prvious tabs and catagories gone ? (See new attached screenshot)

TDK
TDKBest answer
December 24, 2020

There is still another vertical bar there. Drag it right.

"If you feel a post has answered your question, please click ""Accept as Solution""."
RPasc.2
RPasc.2Author
Associate II
January 13, 2021

Thanks for the help. It's a shame that the panel is completely collapsed.

On the original "no interrupts" topic I have come to the concrete conclusion that STM32CubeMX does not generate the correct code for enabling interrupts, at least for the STM32F1xx products. I have tested a handful of other similar projects that have interrupts working, supposedly. All of them are unlikely to be wrong which means that some previous versions of CubeMX worked propery at some time in the past.

It seems someone at ST had the good idea of creating a function definition in code main.c named HAL_TIM_PeriodElapsedCallback(). It's far worse than "too bad" that no call to this function is made anywhere in the generated interrupt code. This is entirely unacceptable to me for what is supposed to be a supported, though free, product.