Unable to compile generated project
Hello all,
I am having severe issues trying to compile and getting to work a blink LED example on Simulink using the STM32-MAT/Target version 5.6.
At first, I was trying the example on the hands on documentation of the STM32-MAT/Target. Which is blinking a LED using Timers 1, 6, and the pushbutton on my Nucleo board (Nucleo-F767ZI). I was using version 1.6.1 of the STM32CubeIDE, version 6.2 of STMCubeMX, MATLAB/Simulink version 2020B and windows 10.
I wasn't able to create a .project file for the IDE until I downloaded Java version 8.45 which correctly linked everything together I assume. However, when it came to building the project, I was getting several errors about undeclared functions and variables that I wasn't able to figure out.
I decided to look deeper into the documentation for the STM32-MAT/Target and looked at the last supported software for it (version 5.6 of CubeMX , 1.3 of CubeIDE, and MATLAB/Simulink 2018B). I rolled back the software to those versions thinking it might solve the issues I was having. It didn't turn out that way as now I am getting errors related to object files not being generated ( .o files).
I also tried this on a separate computer with the same software to see if my PC was the issue. I am successfully building the model but I get this message "Code generation information file does not exist." that I dont get on my PC and the .project file is not being generated at all.
I have really ran out of ideas of things to try and any help or advice would be greatly appreciated. I will reply/edit my post with the error messages that I am getting.
Error Message:
15:47:36 **** Build of configuration Debug for project test ****
make -j16 all
arm-none-eabi-gcc "../test/Src/test.c" -mcpu=cortex-m7 -std=gnu11 -g3 '-DMemUnit_T=uint8_T' -DMEM_UNIT_BYTES -DUSE_HAL_DRIVER -DSTM32F767xx -DARM_MATH_CM7 -DMATLAB_PROJECT -DDEBUG -c -I../Inc -I../Drivers/CMSIS/DSP/Include -I../Drivers/CMSIS/Include -I../Drivers/CMSIS/Device/ST/STM32F7xx/Include -I../Drivers/CMSIS/Core/Include -I../Drivers/STM32F7xx_HAL_Driver/Inc -I../../../Program Files/MATLAB/R2018b/simulink/include -I../Drivers/STM32F7xx_HAL_Driver/Inc/Legacy -I../test/Inc -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"test/Src/test.d" -MT"test/Src/test.o" --specs=nano.specs -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -o "test/Src/test.o"
arm-none-eabi-gcc "../Src/main.c" -mcpu=cortex-m7 -std=gnu11 -g3 '-DMemUnit_T=uint8_T' -DMEM_UNIT_BYTES -DUSE_HAL_DRIVER -DSTM32F767xx -DARM_MATH_CM7 -DMATLAB_PROJECT -DDEBUG -c -I../Inc -I../Drivers/CMSIS/DSP/Include -I../Drivers/CMSIS/Include -I../Drivers/CMSIS/Device/ST/STM32F7xx/Include -I../Drivers/CMSIS/Core/Include -I../Drivers/STM32F7xx_HAL_Driver/Inc -I../../../Program Files/MATLAB/R2018b/simulink/include -I../Drivers/STM32F7xx_HAL_Driver/Inc/Legacy -I../test/Inc -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Src/main.d" -MT"Src/main.o" --specs=nano.specs -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -o "Src/main.o"
arm-none-eabi-gcc "../Src/stm32f7xx_hal_msp.c" -mcpu=cortex-m7 -std=gnu11 -g3 '-DMemUnit_T=uint8_T' -DMEM_UNIT_BYTES -DUSE_HAL_DRIVER -DSTM32F767xx -DARM_MATH_CM7 -DMATLAB_PROJECT -DDEBUG -c -I../Inc -I../Drivers/CMSIS/DSP/Include -I../Drivers/CMSIS/Include -I../Drivers/CMSIS/Device/ST/STM32F7xx/Include -I../Drivers/CMSIS/Core/Include -I../Drivers/STM32F7xx_HAL_Driver/Inc -I../../../Program Files/MATLAB/R2018b/simulink/include -I../Drivers/STM32F7xx_HAL_Driver/Inc/Legacy -I../test/Inc -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Src/stm32f7xx_hal_msp.d" -MT"Src/stm32f7xx_hal_msp.o" --specs=nano.specs -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -o "Src/stm32f7xx_hal_msp.o"
arm-none-eabi-gcc "../Src/stm32f7xx_it.c" -mcpu=cortex-m7 -std=gnu11 -g3 '-DMemUnit_T=uint8_T' -DMEM_UNIT_BYTES -DUSE_HAL_DRIVER -DSTM32F767xx -DARM_MATH_CM7 -DMATLAB_PROJECT -DDEBUG -c -I../Inc -I../Drivers/CMSIS/DSP/Include -I../Drivers/CMSIS/Include -I../Drivers/CMSIS/Device/ST/STM32F7xx/Include -I../Drivers/CMSIS/Core/Include -I../Drivers/STM32F7xx_HAL_Driver/Inc -I../../../Program Files/MATLAB/R2018b/simulink/include -I../Drivers/STM32F7xx_HAL_Driver/Inc/Legacy -I../test/Inc -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Src/stm32f7xx_it.d" -MT"Src/stm32f7xx_it.o" --specs=nano.specs -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -o "Src/stm32f7xx_it.o"
arm-none-eabi-gcc "../Src/syscalls.c" -mcpu=cortex-m7 -std=gnu11 -g3 '-DMemUnit_T=uint8_T' -DMEM_UNIT_BYTES -DUSE_HAL_DRIVER -DSTM32F767xx -DARM_MATH_CM7 -DMATLAB_PROJECT -DDEBUG -c -I../Inc -I../Drivers/CMSIS/DSP/Include -I../Drivers/CMSIS/Include -I../Drivers/CMSIS/Device/ST/STM32F7xx/Include -I../Drivers/CMSIS/Core/Include -I../Drivers/STM32F7xx_HAL_Driver/Inc -I../../../Program Files/MATLAB/R2018b/simulink/include -I../Drivers/STM32F7xx_HAL_Driver/Inc/Legacy -I../test/Inc -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Src/syscalls.d" -MT"Src/syscalls.o" --specs=nano.specs -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -o "Src/syscalls.o"
arm-none-eabi-gcc "../Src/sysmem.c" -mcpu=cortex-m7 -std=gnu11 -g3 '-DMemUnit_T=uint8_T' -DMEM_UNIT_BYTES -DUSE_HAL_DRIVER -DSTM32F767xx -DARM_MATH_CM7 -DMATLAB_PROJECT -DDEBUG -c -I../Inc -I../Drivers/CMSIS/DSP/Include -I../Drivers/CMSIS/Include -I../Drivers/CMSIS/Device/ST/STM32F7xx/Include -I../Drivers/CMSIS/Core/Include -I../Drivers/STM32F7xx_HAL_Driver/Inc -I../../../Program Files/MATLAB/R2018b/simulink/include -I../Drivers/STM32F7xx_HAL_Driver/Inc/Legacy -I../test/Inc -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Src/sysmem.d" -MT"Src/sysmem.o" --specs=nano.specs -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -o "Src/sysmem.o"
arm-none-eabi-gcc "../Src/system_stm32f7xx.c" -mcpu=cortex-m7 -std=gnu11 -g3 '-DMemUnit_T=uint8_T' -DMEM_UNIT_BYTES -DUSE_HAL_DRIVER -DSTM32F767xx -DARM_MATH_CM7 -DMATLAB_PROJECT -DDEBUG -c -I../Inc -I../Drivers/CMSIS/DSP/Include -I../Drivers/CMSIS/Include -I../Drivers/CMSIS/Device/ST/STM32F7xx/Include -I../Drivers/CMSIS/Core/Include -I../Drivers/STM32F7xx_HAL_Driver/Inc -I../../../Program Files/MATLAB/R2018b/simulink/include -I../Drivers/STM32F7xx_HAL_Driver/Inc/Legacy -I../test/Inc -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Src/system_stm32f7xx.d" -MT"Src/system_stm32f7xx.o" --specs=nano.specs -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -o "Src/system_stm32f7xx.o"
arm-none-eabi-gcc: error: Files/MATLAB/R2018b/simulink/include: No such file or directory
arm-none-eabi-gcc "../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal.c" -mcpu=cortex-m7 -std=gnu11 -g3 '-DMemUnit_T=uint8_T' -DMEM_UNIT_BYTES -DUSE_HAL_DRIVER -DSTM32F767xx -DARM_MATH_CM7 -DMATLAB_PROJECT -DDEBUG -c -I../Inc -I../Drivers/CMSIS/DSP/Include -I../Drivers/CMSIS/Include -I../Drivers/CMSIS/Device/ST/STM32F7xx/Include -I../Drivers/CMSIS/Core/Include -I../Drivers/STM32F7xx_HAL_Driver/Inc -I../../../Program Files/MATLAB/R2018b/simulink/include -I../Drivers/STM32F7xx_HAL_Driver/Inc/Legacy -I../test/Inc -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal.d" -MT"Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal.o" --specs=nano.specs -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -o "Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal.o"
arm-none-eabi-gcc: error: Files/MATLAB/R2018b/simulink/include: No such file or directory
make: *** [test/Src/subdir.mk:18: test/Src/test.o] Error 1
make: *** Waiting for unfinished jobs....
arm-none-eabi-gcc: error: Files/MATLAB/R2018b/simulink/include: No such file or directory
make: *** [Src/subdir.mk:33: Src/main.o] Error 1
make: *** [Src/subdir.mk:35: Src/stm32f7xx_hal_msp.o] Error 1
arm-none-eabi-gcc: error: Files/MATLAB/R2018b/simulink/include: No such file or directory
arm-none-eabi-gcc: error: Files/MATLAB/R2018b/simulink/include: No such file or directory
make: *** [Src/subdir.mk:37: Src/stm32f7xx_it.o] Error 1
arm-none-eabi-gcc: error: Files/MATLAB/R2018b/simulink/include: No such file or directory
make: *** [Src/subdir.mk:39: Src/syscalls.o] Error 1
arm-none-eabi-gcc: error: Files/MATLAB/R2018b/simulink/include: No such file or directory
make: *** [Src/subdir.mk:41: Src/sysmem.o] Error 1
arm-none-eabi-gcc: error: Files/MATLAB/R2018b/simulink/include: No such file or directory
make: *** [Src/subdir.mk:43: Src/system_stm32f7xx.o] Error 1
make: *** [Drivers/STM32F7xx_HAL_Driver/Src/subdir.mk:81: Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal.o] Error 1
"make -j16 all" terminated with exit code 2. Build might be incomplete.
15:47:37 Build Failed. 9 errors, 0 warnings. (took 1s.111ms)