2025-08-11 9:56 AM
Hi
I am trying to switch a project from one MCU to the another. I made a new IOC file in MX and then replaced the existing IOC file in my IDE project with my fresh file. The overall configuration is identical except for the pinout, and I use a mix of HAL and LL libraries. The Drivers folder is giving me a boat-load of errors, but all of my user code seems to be fine.
I have tried cleaning/rebuilding the project, starting fresh with just the new IOC file, deleting the Drivers folder, saving and regenerating code, and more. The errors won't go away. I have attached the output.
What can I do to fix this? Are there any common mistakes or recommended fixes for this situation?
Solved! Go to Solution.
2025-08-12 9:45 AM
It sounds like you have the EWARM toolchain selected, not STM32CubeIDE.
In the IOC file you provided, STM32CubeIDE is selected. Perhaps you are using some other file.
2025-08-11 10:15 AM
Can you include the IOC file?
Generally, the "*_template.c" files shouldn't be compiled as-is and aren't included in CubeMX output.
2025-08-11 10:41 AM
2025-08-11 11:31 AM
I had no problems generating code and compiling the project from the IOC. The template files mentioned above were not included in the generated files.
Are you copying files manually or something?
2025-08-11 11:35 AM
I haven't changed anything else since my previous IOC file. How can I exclude these extra files?
I'm also getting errors in:
Drivers/CMSIS/NN/Source/SoftmaxFunctions (all files)
Drivers/CMSIS/NN/Source/SVDFunctions (all files)
Drivers/CMSIS/ROTS2 (all source files)
../Drivers/CMSIS/NN/Source/SoftmaxFunctions/arm_softmax_s8.c:31:10: fatal error: arm_nnfunctions.h: No such file or directory
31 | #include "arm_nnfunctions.h"
| ^~~~~~~~~~~~~~~~~~~
../Drivers/CMSIS/NN/Source/SVDFunctions/arm_svdf_s8.c:31:10: fatal error: arm_nnfunctions.h: No such file or directory
31 | #include "arm_nnfunctions.h"
| ^~~~~~~~~~~~~~~~~~~
../Drivers/CMSIS/NN/Source/SoftmaxFunctions/arm_softmax_s16.c:31:10: fatal error: arm_nnfunctions.h: No such file or directory
31 | #include "arm_nnfunctions.h"
| ^~~~~~~~~~~~~~~~~~~
../Drivers/CMSIS/NN/Source/SoftmaxFunctions/arm_softmax_q7.c:31:10: fatal error: arm_nnfunctions.h: No such file or directory
31 | #include "arm_nnfunctions.h"
| ^~~~~~~~~~~~~~~~~~~
../Drivers/CMSIS/NN/Source/SVDFunctions/arm_svdf_state_s16_s8.c:31:10: fatal error: arm_nnfunctions.h: No such file or directory
31 | #include "arm_nnfunctions.h"
| ^~~~~~~~~~~~~~~~~~~
../Drivers/CMSIS/NN/Source/SoftmaxFunctions/arm_softmax_q15.c:31:10: fatal error: arm_nnfunctions.h: No such file or directory
31 | #include "arm_nnfunctions.h"
| ^~~~~~~~~~~~~~~~~~~
../Drivers/CMSIS/RTOS2/Source/os_systick.c:25:10: fatal error: os_tick.h: No such file or directory
25 | #include "os_tick.h"
| ^~~~~~~~~~~
../Drivers/CMSIS/NN/Source/SoftmaxFunctions/arm_softmax_s8_s16.c:31:10: fatal error: arm_nnfunctions.h: No such file or directory
31 | #include "arm_nnfunctions.h"
| ^~~~~~~~~~~~~~~~~~~
../Drivers/CMSIS/RTOS2/Source/os_tick_ptim.c:25:10: fatal error: RTE_Components.h: No such file or directory
25 | #include "RTE_Components.h"
| ^~~~~~~~~~~~~~~~~~
../Drivers/CMSIS/RTOS2/Source/os_tick_gtim.c:25:10: fatal error: os_tick.h: No such file or directory
25 | #include "os_tick.h"
| ^~~~~~~~~~~
../Drivers/CMSIS/NN/Source/SoftmaxFunctions/arm_softmax_u8.c:31:10: fatal error: arm_nnfunctions.h: No such file or directory
31 | #include "arm_nnfunctions.h"
| ^~~~~~~~~~~~~~~~~~~
../Drivers/CMSIS/NN/Source/SoftmaxFunctions/arm_softmax_with_batch_q7.c:31:10: fatal error: arm_nnfunctions.h: No such file or directory
31 | #include "arm_nnfunctions.h"
| ^~~~~~~~~~~~~~~~~~~
../Drivers/CMSIS/NN/Source/SoftmaxFunctions/arm_nn_softmax_common_s8.c:30:10: fatal error: arm_nnsupportfunctions.h: No such file or directory
30 | #include "arm_nnsupportfunctions.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
2025-08-11 12:04 PM
I switched to "Copy only the necessary library files" in the IOC file, which helped. But I think my remaining issues are because the .cproject file doesn't reflect the new MCU. What's the best way to change this?
2025-08-11 1:59 PM
Delete everything except the IOC and let it regenerate new metafiles. Back up files first. Once that works, copy over source files that you modified.
2025-08-11 2:06 PM
This process does not generate a new .project or .cproject file.
2025-08-11 3:45 PM
Does for me. Are you looking in the right directory (STM32CubeIDE)?
2025-08-12 8:26 AM
No, I do not see that directory appear after following your steps. It creates folders for Core, Drivers, and EWAM. The top level also has a here is a .mxproject file. Inside EWARM, there is a "project.eww" file but it is not complete at all.