cancel
Showing results for 
Search instead for 
Did you mean: 

Missing GPIO pin defs after migrating from F4 to H7 dual-core

bramble
Associate II

Hi,

I have a project that was started on STM32F439 which I'm now migrating to STM32H755.

In my original project I had a number of GPIO assignments for which the code generator was creating definitions in main.h, such as below:

 

#define LCD_RST_Pin GPIO_PIN_2
#define LCD_RST_GPIO_Port GPIOF

 

In the above example I've assigned user label LCD_RST to the pin.

Following the same approach on the H7, for the C7 .ioc file I've similarly made my GPIO assignments, however I can't find any generated code relating to them. In this case main.h is much shorter, lacking any #defines relating to GPIOs. I've searched also for the GPIO pin name (such as PB2) but the only instances I can find are in the ioc file.

Any advice would be much appreciated, my ioc is attached.

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

You need to assign them to a core in the GPIO tab. Once you do that, they'll appear in the initialization code for that core.

TDK_0-1736301955056.png

 

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

3 REPLIES 3
TDK
Guru

You need to assign them to a core in the GPIO tab. Once you do that, they'll appear in the initialization code for that core.

TDK_0-1736301955056.png

 

If you feel a post has answered your question, please click "Accept as Solution".
bramble
Associate II

Many thanks, that's very helpful.

Given that I was configuring the GPIOs in the C7's ioc file it seems strange that I also need to select the core assignment there. Is this to allow a GPIO to be potentially used from either core, with the user then responsible for writing the required GPIO initialisation code, and basically generating the code that MX creates when the assignment is not "free"?

The IOC file you attached controls both cores, doesn't it? It does when I load it. I don't think there is a separate one per core.

If you feel a post has answered your question, please click "Accept as Solution".