cancel
Showing results for 
Search instead for 
Did you mean: 

After CubeMx 6.2.0 upgrade and firmware to STM32F373VCTx also updated, my project presents error message after generating the code

AFerr.1
Associate II

After CubeMx 6.2.0 upgrade and firmware to STM32F373VCTx also updated, the CODE GENERATION of my project presents the message:

"The Code is successfully generated under : (...)     but TrueSTUDIOproject generation have a problem."

Compiling de project in Atollic TueStudio generates linking error.

The reason is than CubeMX included two versions of the "system_stm32f3xx.c" in the project that definitely did not occur with previous versions.

Deleting one of the files allows linking, but this must be done manualy.

It is really annoying and impairs firmware development cycle.

11 REPLIES 11

Hi @AFerr.1​ ,

Thanks for your feedback, happy that the problem is resolved :smiling_face_with_smiling_eyes:

For your second point :

> The not-so-good side of migration is that everything looks much slower in this IDE, specially rebuilding a project.

It will be better to create a new post in STM32CubeIDE topic detailing the issue, so it can be reviewed by our STM32CubeIDE experts.

Hope you'll get the information you need.

Khouloud.

ARahm.5
Associate

@AFerr.1​ , I have the same problem.

I cannot port my project to a new environment.

But I wrote a script that cleans up the erroneous `system_stm32fxx.c` file declaration from the project file.

Here is my script:

import os
import sys
 
for_searching = """<File><FileName>system_stm32f3xx.c</FileName><FileType>1</FileType><FilePath>..//Src/system_stm32f3xx.c</FilePath></File>"""
 
 
file_name_for_searching = 'TrailerSharingStationSTM32_F303.uvprojx'
 
 
entre_file = open(file_name_for_searching, 'r')
output_file = open(file_name_for_searching + '.DRAFT', 'w')
 
for line in entre_file:
    output_file.write(line.replace(for_searching, ""))
 
 
entre_file.close()
output_file.close()
 
os.remove(os.path.join(os.path.abspath(os.path.dirname(__file__)),
                       file_name_for_searching))
 
os.rename(file_name_for_searching + '.DRAFT', file_name_for_searching)