2026-01-14 9:45 PM
When I open the official example using the example selector, CubeMX cannot display the graphical configuration of that example. I would like to know if it is possible to display the graphical configuration of the example in CubeMX. Thank you very much, because that would make learning much easier.
2026-01-16 2:01 AM
Thank you very much. I found that although GPIO_IOToggle and GPIO_EXIT for NUCLEO-C031C6 show that they contain IOC files, these two example files are corrupted, making the configuration unviewable in cubeMX. All other examples are working correctly.
Thanks.
2026-01-16 2:13 AM
@stm64 wrote:these two example files are corrupted.
Please give more details of that?
2026-01-16 2:35 AM
I just discovered that the GPIO_IOToggle and GPIO_EXIT examples for the G0, U0, and C0 series don't show graphical configuration when opened in CubeMX. After careful examination, I found that it's not corrupted, but rather that these example codes weren't configured using CubeMX; the configuration code was written directly in main.c.Although these examples all show files containing IoC files.
2026-01-16 2:40 AM
I just compared them in detail and found that these two sample codes are not broken. They weren't written using cubeMX; instead, the configurations were written directly in the code. I found this to be the case for the U0, C0, G0, and similar series. I suspect the GPIO examples were too simple, so the developers wrote their configurations manually.
2026-01-16 7:34 AM - edited 2026-01-16 7:34 AM
Didn't I say that about 5 replies ago?
> Configuration of the pin is done in user code within the example, not from within STM32CubeMX.
2026-01-16 7:44 AM
@stm64 wrote:the configuration code was written directly in main.c. Although these examples all show files containing IoC files.
So some of the configuration is done in the .ioc file, and some is done in user code?
@stm64 wrote:I suspect the GPIO examples were too simple, so the developers wrote their configurations manually
I wouldn't be sure about that.
The fact is that both are possible: some examples illustrate one way; others illustrate the other.
And the two can be mixed in one project.
2026-01-17 8:07 AM
I didn't fully realize it at the time, but now that you mention it, I realize it's true.