2022-01-29 03:07 AM
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 freertos
What could I have done wrong?
How to fix this error of cubeMX, which does not include spi.h in main.c?
Thanks 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.
Solved! Go to Solution.
2022-01-30 11:55 PM
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.
2022-01-29 07:18 AM
Probably a migration or cube generation bug if it persists after generating code. Can you include the IOC?
2022-01-29 09:21 AM
2022-01-30 07:55 AM
I could duplicate the issue. Definitely a bug.
Perhaps @Khouloud OTHMAN can look.
2022-01-30 09:22 AM
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>
2022-01-30 09:54 AM
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
2022-01-30 11:55 PM
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.