cancel
Showing results for 
Search instead for 
Did you mean: 

Source File Initialization Errror

AE104
Senior

Hello,

I am trying to control an AD5940 with STM32F4 SPI. I placed the AD5940.h and AD5940.c files in the main file but after debugging I got these errors. Do you have any idea how I can solve it?

12:37:26 **** Incremental Build of configuration Debug for project AD5940TestV1 ****

make -j16 all 

arm-none-eabi-gcc "../Core/Src/main.c" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F407xx -c -I../Core/Inc -I"C:/Users/ALP/STM32CubeIDE/workspace_1.10.1/AD5940TestV1" -I../Drivers/STM32F4xx_HAL_Driver/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Core/Src/main.d" -MT"Core/Src/main.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Core/Src/main.o"

arm-none-eabi-gcc -o "AD5940TestV1.elf" @"objects.list"  -mcpu=cortex-m4 -T"C:\Users\ALP\STM32CubeIDE\workspace_1.10.1\AD5940TestV1\STM32F407IEHX_FLASH.ld" --specs=nosys.specs -Wl,-Map="AD5940TestV1.map" -Wl,--gc-sections -static --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group

c:\st\stm32cubeide_1.10.1\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.10.3-2021.10.win32_1.0.0.202111181127\tools\arm-none-eabi\bin\ld.exe: ./Core/Src/main.o: in function `main':

C:/Users/ALP/STM32CubeIDE/workspace_1.10.1/AD5940TestV1/Debug/../Core/Src/main.c:79: undefined reference to `AD5940_Initialize'

c:\st\stm32cubeide_1.10.1\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.10.3-2021.10.win32_1.0.0.202111181127\tools\arm-none-eabi\bin\ld.exe: C:/Users/ALP/STM32CubeIDE/workspace_1.10.1/AD5940TestV1/Debug/../Core/Src/main.c:96: undefined reference to `AD5940_ReadReg'

collect2.exe: error: ld returned 1 exit status

make: *** [makefile:64: AD5940TestV1.elf] Error 1

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

12:37:26 Build Failed. 4 errors, 0 warnings. (took 669ms)
_legacyfs_online_stmicro_images_0693W00000dJqbcQAC.png

0 REPLIES 0