cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX not generating #defines for GPIOs on STM32MP1 CM4

Mario Luzeiro
Senior

Hello all,

I am used to the regular MCUs STM32Fx families where I'm used that the main.h has all the #defines of the GPIOs and other peripherals.

I'm now using STM32MP1 generating code for CM4 and noticed it is generate any #define information.

also, it is not initializing GPIOs state.

Why is it generating no initialization of GPIOs or other user label #defines?

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

GPIO pin context is assigned at the pin level.

Right click the pin in pinout view -> Pin Reservation -> Cortex M4

0693W00000LwAofQAF.png

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

View solution in original post

7 REPLIES 7
TDK
Guru

Are they assigned to the CM4 core? Attach your IOC.

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

IOC Attached.

I can't find any configuration to assign it to each core, where should I look for it?

It gives me no option to select the target for GPIOs:

0693W00000LwAk9QAF.png

TDK
Guru

GPIO pin context is assigned at the pin level.

Right click the pin in pinout view -> Pin Reservation -> Cortex M4

0693W00000LwAofQAF.png

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

Thanks, that was a new (hidden) option for me!

Joerg Wagner
Senior III

But there are still no #defines in main.h or anywhere

but now there is code generation for GPIO.

I tried with and without RESMGR_UTILITY.

I agree, I still have the same issue using the latest version of CubeMX. I working on a project using STM32MP157C-DK2 and the user labels are not correctly generated, except for a few of them (~30 % are correctly generated in main.h).