cancel
Showing results for 
Search instead for 
Did you mean: 

Undefined reference possibly due to uncompiled file

CKohl.3
Associate II

I'm getting an error when building my code even if I do a Clean build. I *think* the problem is that stm32l4xx_ll_utils.c which contains the LL_mDelay isn't being compiled. Is this correct? Why is the compiler picking up all the other STM32L4xx_HAL_Driver source files but not stm32l4xx_ll_utils.c which is in the same folder? How do I fix this?

Thank you!

Chris

08:43:36 **** Incremental Build of configuration Debug for project ER-TFT1.28-2-Demo ****
make -j9 all 
arm-none-eabi-gcc -o "ER-TFT1.28-2-Demo.elf" @"objects.list"   -mcpu=cortex-m4 -T"/Users/chrisk/Documents/STM32CubeIDE/workspace_1.11.0/ER-TFT1.28-2-Demo/STM32L4A6RGTX_FLASH.ld" --specs=nosys.specs -Wl,-Map="ER-TFT1.28-2-Demo.map" -Wl,--gc-sections -static --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group
/Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.10.3-2021.10.macos64_1.0.200.202301161003/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: ./Core/Src/main.o: in function `GC9A01_LL_mDelay':
/Users/chrisk/Documents/STM32CubeIDE/workspace_1.11.0/ER-TFT1.28-2-Demo/Debug/../Core/Src/main.c:269: undefined reference to `LL_mDelay'
collect2: error: ld returned 1 exit status
make: *** [makefile:64: ER-TFT1.28-2-Demo.elf] Error 1
"make -j9 all" terminated with exit code 2. Build might be incomplete.
 
08:43:36 Build Failed. 3 errors, 0 warnings. (took 345ms)

4 REPLIES 4
Foued_KH
ST Employee

Hello @CKohl.3​ ,

If you check Project Properties -> C/C++ Build -> Settings -> Tool Settings -> MCU GCC Compiler -> Include Paths, you can find every path that the IDE includes.

If your path does not exist there, you can simply add it.

Foued

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

CKohl.3
Associate II

Thanks for the tip. I think I know what happened.

For reasons I still don't understand, sometimes extra Driver files end up being created with " 2" extension. I deleted a bunch of these recently and I seem to have deleted stm32l4xx_ll_utils.c accidentally.

Do you know why these extra " 2" files get created and is that fixable? Do you know how I can get stm32l4xx_ll_utils.c back?

Thanks!

Chris

Thanks for the tip. I think I know what happened. 

For reasons I still don't understand, sometimes extra Driver files end up being created with " 2" extension. I deleted a bunch of these recently and I seem to have deleted stm32l4xx_ll_utils.c accidentally. 

Do you know why these extra " 2" files get created and is that fixable? Do you know how I can get stm32l4xx_ll_utils.c back?

Thanks!

Chris

Most tools you'd add the C source files at the top-level of the project tree.

Not sure why you'd get (2) files unless you'd dropped them in multiple branches.

Sorry #TeamKEIL here..

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..