2019-10-28 07:35 AM
Hello,
I have a problem running "Validation on Target" because many of the source files cannot be found (see log below). I use the MDK-ARM toolchain. When I generate the code and open the project in Keil uVison most of the project files cannot be found because the include directories are wrong! This shouldn't be the case. Fixing this manually is a big pain.
Is anybody using the MDK-ARM Toolchain without this problem?
Building project
Generating project
Temporary project loaded
Temporary AI configuration done
Generating temporary project code
Building project
Build target 'mxAI762925399611'
assembling startup_stm32l476xx.s...
compiling network.c...
"no source": Error: #5: cannot open source input file "Src/network.c": No such file or directory
Src/network.c: 0 warnings, 1 error
compiling network_data.c...
"no source": Error: #5: cannot open source input file "Src/network_data.c": No such file or directory
Src/network_data.c: 0 warnings, 1 error
compiling main.c...
../Inc/app_x-cube-ai.h(56): error: #5: cannot open source input file "ai_platform.h": No such file or directory
#include "ai_platform.h"
../Src/main.c: 0 warnings, 1 error
compiling app_x-cube-ai.c...
../Inc/app_x-cube-ai.h(56): error: #5: cannot open source input file "ai_platform.h": No such file or directory
#include "ai_platform.h"
../Src/app_x-cube-ai.c: 0 warnings, 1 error
compiling stm32l4xx_it.c...
compiling stm32l4xx_hal_msp.c...
compiling system_stm32l4xx.c...
compiling arm_dot_prod_f32.c...
"no source": Error: #5: cannot open source input file "Drivers/CMSIS/DSP/Source/BasicMathFunctions/arm_dot_prod_f32.c": No such file or directory
Drivers/CMSIS/DSP/Source/BasicMathFunctions/arm_dot_prod_f32.c: 0 warnings, 1 error
compiling arm_shift_q15.c...
"no source": Error: #5: cannot open source input file "Drivers/CMSIS/DSP/Source/BasicMathFunctions/arm_shift_q15.c": No such file or directory
Drivers/CMSIS/DSP/Source/BasicMathFunctions/arm_shift_q15.c: 0 warnings, 1 error
compiling arm_shift_q7.c...
"no source": Error: #5: cannot open source input file "Drivers/CMSIS/DSP/Source/BasicMathFunctions/arm_shift_q7.c": No such file or directory
Drivers/CMSIS/DSP/Source/BasicMathFunctions/arm_shift_q7.c: 0 warnings, 1 error
compiling arm_float_to_q7.c...
"no source": Error: #5: cannot open source input file "Drivers/CMSIS/DSP/Source/SupportFunctions/arm_float_to_q7.c": No such file or directory
Drivers/CMSIS/DSP/Source/SupportFunctions/arm_float_to_q7.c: 0 warnings, 1 error
compiling arm_float_to_q15.c...
"no source": Error: #5: cannot open source input file "Drivers/CMSIS/DSP/Source/SupportFunctions/arm_float_to_q15.c": No such file or directory
Drivers/CMSIS/DSP/Source/SupportFunctions/arm_float_to_q15.c: 0 warnings, 1 error
compiling arm_q7_to_float.c...
"no source": Error: #5: cannot open source input file "Drivers/CMSIS/DSP/Source/SupportFunctions/arm_q7_to_float.c": No such file or directory
Drivers/CMSIS/DSP/Source/SupportFunctions/arm_q7_to_float.c: 0 warnings, 1 error
compiling arm_q15_to_float.c...
"no source": Error: #5: cannot open source input file "Drivers/CMSIS/DSP/Source/SupportFunctions/arm_q15_to_float.c": No such file or directory
Drivers/CMSIS/DSP/Source/SupportFunctions/arm_q15_to_float.c: 0 warnings, 1 error
compiling arm_q7_to_q15.c...
"no source": Error: #5: cannot open source input file "Drivers/CMSIS/DSP/Source/SupportFunctions/arm_q7_to_q15.c": No such file or directory
Drivers/CMSIS/DSP/Source/SupportFunctions/arm_q7_to_q15.c: 0 warnings, 1 error
compiling arm_q15_to_q7.c...
"no source": Error: #5: cannot open source input file "Drivers/CMSIS/DSP/Source/SupportFunctions/arm_q15_to_q7.c": No such file or directory
Drivers/CMSIS/DSP/Source/SupportFunctions/arm_q15_to_q7.c: 0 warnings, 1 error
compiling arm_copy_q15.c...
"no source": Error: #5: cannot open source input file "Drivers/CMSIS/DSP/Source/SupportFunctions/arm_copy_q15.c": No such file or directory
Drivers/CMSIS/DSP/Source/SupportFunctions/arm_copy_q15.c: 0 warnings, 1 error
compiling arm_copy_q7.c...
"no source": Error: #5: cannot open source input file "Drivers/CMSIS/DSP/Source/SupportFunctions/arm_copy_q7.c": No such file or directory
Drivers/CMSIS/DSP/Source/SupportFunctions/arm_copy_q7.c: 0 warnings, 1 error
compiling arm_fill_q15.c...
"no source": Error: #5: cannot open source input file "Drivers/CMSIS/DSP/Source/SupportFunctions/arm_fill_q15.c": No such file or directory
Drivers/CMSIS/DSP/Source/SupportFunctions/arm_fill_q15.c: 0 warnings, 1 error
compiling arm_fill_q7.c...
"no source": Error: #5: cannot open source input file "Drivers/CMSIS/DSP/Source/SupportFunctions/arm_fill_q7.c": No such file or directory
Drivers/CMSIS/DSP/Source/SupportFunctions/arm_fill_q7.c: 0 warnings, 1 error
compiling arm_mat_init_f32.c...
"no source": Error: #5: cannot open source input file "Drivers/CMSIS/DSP/Source/MatrixFunctions/arm_mat_init_f32.c": No such file or directory
Drivers/CMSIS/DSP/Source/MatrixFunctions/arm_mat_init_f32.c: 0 warnings, 1 error
compiling stm32l4xx_hal_crc.c...
compiling stm32l4xx_hal_crc_ex.c...
compiling stm32l4xx_hal.c...
compiling stm32l4xx_hal_i2c.c...
compiling stm32l4xx_hal_i2c_ex.c...
compiling stm32l4xx_hal_rcc.c...
compiling stm32l4xx_hal_rcc_ex.c...
compiling stm32l4xx_hal_flash.c...
compiling stm32l4xx_hal_flash_ex.c...
compiling stm32l4xx_hal_flash_ramfunc.c...
compiling stm32l4xx_hal_gpio.c...
compiling stm32l4xx_hal_dma.c...
compiling stm32l4xx_hal_dma_ex.c...
compiling stm32l4xx_hal_pwr.c...
compiling stm32l4xx_hal_pwr_ex.c...
compiling stm32l4xx_hal_cortex.c...
compiling stm32l4xx_hal_exti.c...
compiling stm32l4xx_hal_tim.c...
compiling stm32l4xx_hal_tim_ex.c...
compiling stm32l4xx_hal_uart.c...
compiling stm32l4xx_hal_uart_ex.c...
compiling aiPbMgr.c...
../Middlewares/ST/Application/Validation/Inc/aiTestUtility.h(24): error: #5: cannot open source input file "ai_platform.h": No such file or directory
#include <ai_platform.h>
../Middlewares/ST/Application/Validation/Src/aiPbMgr.c: 0 warnings, 1 error
compiling aiTestUtility.c...
../Middlewares/ST/Application/Validation/Inc/aiTestUtility.h(24): error: #5: cannot open source input file "ai_platform.h": No such file or directory
#include <ai_platform.h>
../Middlewares/ST/Application/Validation/Src/aiTestUtility.c: 0 warnings, 1 error
compiling aiValidation.c...
../Middlewares/ST/Application/Validation/Inc/aiTestUtility.h(24): error: #5: cannot open source input file "ai_platform.h": No such file or directory
#include <ai_platform.h>
../Middlewares/ST/Application/Validation/Src/aiValidation.c: 0 warnings, 1 error
compiling pb_common.c...
compiling pb_decode.c...
compiling pb_encode.c...
compiling stm32msg.pb.c...
"mxAI762925399611\mxAI762925399611.axf" - 5 Error(s), 0 Warning(s).
Target not created.
Automatic build and run failed
2019-12-27 04:22 AM
I also meet this problem. I think that the wrong project location wil cause this problem, especially when you move your project location after generating code. I solve this by rebuilding the CubeMX project:face_with_tears_of_joy: .