cancel
Showing results for 
Search instead for 
Did you mean: 

Implicit declaration of MX_SPI3_Init after CubeMX migration

po221
Senior

Hello

I'm using STM32cubeIDE with an L431RC

CubeMX invited me to migrate my .ioc from 6.2 to 6.4 and FW_L4 from 1.17 to 1.17.1

After that I have a warning Implicit declaration of MX_SPI3_Init in main.c

This is only in cubeMX generated code

For information cubeMX asked me to enable USE_NEWLIB_REENTRANT in freertos0693W00000JNo2YQAT.jpg 

What could I have done wrong?

How to fix this error of cubeMX, which does not include spi.h in main.c?

0693W00000JNo1zQAD.jpg0693W00000JNo1pQAD.jpgThanks in advance

PS : I specify that I have for the moment avoided the problem by adding :

/* USER CODE BEGIN Includes */

#include "spi.h"

/* USER CODE END Includes */

Here I want to correct the original problem that forces me to do this.

1 ACCEPTED SOLUTION

Accepted Solutions
Sara BEN HADJ YAHYA
ST Employee

Hello @po221​ ,

Thanks for your feedback,

This is a known issue and it is already raised to the dev team. For more details, please check my answer in this thread https://community.st.com/s/question/0D53W00001K3a7JSAR/missing-include-spih-in-stm32cubemx-v-640-hal-191-stm32h7

Sorry for any inconvenience that this may cause.

If you issue is solved, please close this post by clicking the "Select as Best" button. This will help other members of the community find this response more quickly :)

Sara.

View solution in original post

6 REPLIES 6
TDK
Guru

Probably a migration or cube generation bug if it persists after generating code. Can you include the IOC?

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

here is

TDK
Guru

I could duplicate the issue. Definitely a bug.

Perhaps @Khouloud OTHMAN​ can look.

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

hello

Regarding to your question and as i understood from that about CubeMX code generation here i can give you the following piece. try it

revert the sourceEntries to this in .cproject file

<sourceEntries>

<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>

</sourceEntries>

po221
Senior

I'm not sure I understand what this should change but I just tested and it doesn't change the absence of #include "spi.h" in main.c

Sara BEN HADJ YAHYA
ST Employee

Hello @po221​ ,

Thanks for your feedback,

This is a known issue and it is already raised to the dev team. For more details, please check my answer in this thread https://community.st.com/s/question/0D53W00001K3a7JSAR/missing-include-spih-in-stm32cubemx-v-640-hal-191-stm32h7

Sorry for any inconvenience that this may cause.

If you issue is solved, please close this post by clicking the "Select as Best" button. This will help other members of the community find this response more quickly :)

Sara.