cancel
Showing results for 
Search instead for 
Did you mean: 

Hi, I am new to stm32. I downloded the source code of a stm32 project, but I don't have the configuration file .ioc and I can't create it. Can I create a stm32 project (and the configuration file too) starting from the source code?

SSpad.1
Associate II
 
11 REPLIES 11
TDK
Guru

You cannot create an IOC file from source code.

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

Ok. There's another solution? Can I set the IOC file in other way (observing the code, for example), and after upload the c code in my project?

You can create a new IOC file and copy the code over. If the original project was generated from an IOC file, this should be quite manageable.
If you feel a post has answered your question, please click "Accept as Solution".
KnarfB
Principal III

The .ioc is only needed (once) for code generation by STM32CubeMX. There can be valid projects without .ioc. If the project was once generated from an .ioc that is now missing - I'm not aware of a reverse tool re-generating that .ioc from source code.

How can I copy the code in the IOC file?

No, you create an empty project for your chip, configure the .ioc accordingly and the copy the existing source files (after a careful review!) into that new project.

Ok, I've tried to do as you said. I've created an empty project in this way:

0693W000004J0r9QAC.jpg

After, for the code, I clicked File -> Import -> Archive file. I can see correctly the code in the project explorer, but, when I build the project, I receive 10 errors. What am I wrong?

I don't know your code, I don't know the error messages, so I cannot anser your question, sorry.

Amel NASRI
ST Employee

Hi @SSpad.1​ ,

Examples with .ioc files are already available for STM32G4 and STM32G0. You will find them in the STM32CubeG4 and STM32CubeG0 packages.

-Amel

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.