cancel
Showing results for 
Search instead for 
Did you mean: 

Switching STM32C011F4U6TR to STM32C071G8U6 - many errors

kzsd
Associate II

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?

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Super User

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".

View solution in original post

10 REPLIES 10
TDK
Super User

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".
kzsd
Associate II

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

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".
kzsd
Associate II

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

 

kzsd
Associate II

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?

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".
kzsd
Associate II

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

Does for me. Are you looking in the right directory (STM32CubeIDE)?

TDK_0-1754952312882.png

 

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

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.