cancel
Showing results for 
Search instead for 
Did you mean: 

Error in build about MX_Init gpio and icache

hela
Visitor

Hello!

When I build my project, I get these errors. I should note that the header files are in the driver folder, and I have added all the necessary include paths.

"C:/Users/helat/STM32CubeIDE/workspace_1.18.1/PFA-SecureM/Core/Src/main.c:90:(.text.main+0xc): undefined reference to `MX_GPIO_Init'

C:/ST/STM32CubeIDE_1.18.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Users/helat/STM32CubeIDE/workspace_1.18.1/PFA-SecureM/Core/Src/main.c:91:(.text.main+0x10): undefined reference to `MX_ICACHE_Init'

collect2.exe: error: ld returned 1 exit status

make: *** [makefile:70: PFA-SecureM.elf] Error 1

"make -j20 all" terminated with exit code 2. Build might be incomplete."

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

> undefined reference to `MX_ICACHE_Init'

This means that MX_ICACHE_Init has been used prior to its definition. Ensure it is being defined before used.

If this code is directly generated from an IOC, please include that IOC. Otherwise please include your project code files.

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

View solution in original post

2 REPLIES 2
KnarfB
Principal III

those are linker errors. check the source folders/files that will be linked. C++ issues?

When I build my project, 

Nobody here knows your project. 

How to write your question to maximize your chance... - STMicroelectronics Community

hth

KnarfB

TDK
Guru

> undefined reference to `MX_ICACHE_Init'

This means that MX_ICACHE_Init has been used prior to its definition. Ensure it is being defined before used.

If this code is directly generated from an IOC, please include that IOC. Otherwise please include your project code files.

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