Skip to main content
Associate
August 11, 2025
Solved

Switching STM32C011F4U6TR to STM32C071G8U6 - many errors

  • August 11, 2025
  • 5 replies
  • 771 views

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?

Best answer by TDK

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.

5 replies

TDK
Super User
August 11, 2025

Can you include the IOC file?

 

Generally, the "*_template.c" files shouldn't be compiled as-is and aren't included in CubeMX output.

"If you feel a post has answered your question, please click ""Accept as Solution""."
kzsdAuthor
Associate
August 11, 2025

If the IDE is deciding to include these files, maybe it's a bug then?

TDK
Super User
August 11, 2025

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.

TDK_0-1754937049300.png

 

Are you copying files manually or something?

"If you feel a post has answered your question, please click ""Accept as Solution""."
kzsdAuthor
Associate
August 11, 2025

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"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~

 

kzsdAuthor
Associate
August 11, 2025

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?

TDK
Super User
August 11, 2025

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.

"If you feel a post has answered your question, please click ""Accept as Solution""."
kzsdAuthor
Associate
August 11, 2025

This process does not generate a new .project or .cproject file.

TDK
TDKBest answer
Super User
August 12, 2025

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.

"If you feel a post has answered your question, please click ""Accept as Solution""."