即使执行了 “Clean build”,编译代码时仍出现如下错误。我猜测问题出在,包含 LL_mDelay 函数的 stm32l4xx_ll_utils.c 文件没有被编译 ?
为什么编译器能识别并编译 STM32L4xx_HAL_Driver 驱动文件夹下的其他所有源文件,却唯独忽略了同目录下的 stm32l4xx_ll_utils.c?该如何解决这个问题?
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-2025.10.macos64_1.0.200.202511161003/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)
|
|