cancel
Showing results for 
Search instead for 
Did you mean: 

How to generate code from an .ioc file, generate code grayed out?

PLane.1
Associate II

CubeIDE version 1.2.0

Cloning a git repo with a .ioc file in it, how to generate code?

When right clicking the "Generate code" is grayed out. The only method that has worked seems to be opening the .ioc file, toggling a checkbox to generate a change and then saving to cause code generation.

Is there a way to generate code when ever I want? or force the code generation even if there are no changes detected?

6 REPLIES 6
Cartu38 OpenDev
Lead II

Sounds weird. Fact is code generation is only enable if Device Configuration Editor is opened (.ioc file edition on going in other words). But if Device Configuration Editor is active no need to get any change to get access and run code generation.

Sounds you're able to rely on Device Configuration Tool so ... ? Could you share some snapshot and/or your .ioc file ?

Daniel.Ribeiro
Associate II

It doesn't matter if there is a need to do it or not. If customer wants, it must be provided. Just that simple.

I would like to carefully point out that this thread is already three years old and nothing has happened here since then, nor had the TO given any additional information.

In the meantime we are many, many versions further along with CubeIDE and such problems seem to have been eliminated.

Regards /Peter

In order 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.
divmstr
Associate III

The problem still persists in Cube IDE v18.1. After importing a project from the file system, that does not contain the auto-generated folders that would there after an IOC build, the generate code menu item is greyed out. The only way to get it to work is to open the IOC, and change something to force the need for a write, then save it. This will trigger a build if enabled, or the menu item if not.

What is needed is a 'rebuild IOC' menu item that will force a rebuild whether the IOC has been changed or not.

 

After opening the IOC file,  can you not click Project>Generate Code? Or are you saying that is grayed out?

I've yet to see an issue importing a project or just an IOC file and seeing Project>Generate Code grayed out.

Is this project downloadable from a repository?

Don't worry, I won't byte.
TimerCallback tutorial! | UART and DMA Idle tutorial!

If you find my solution useful, please click the Accept as Solution so others see the solution.
divmstr
Associate III

This occurs when a project has been imported from a repository, such as GitHub. Usually the Drivers and Middleware folders are not included, as they can be regenerated from the IDE. However, you cannot start a regeneration until you have opened the IOC editor and actually changed something. 

Attached are some instructions that I gave a colleague on how to import and build such a project. I had to add an instruction to change something innocuous such as an unused pin to be an input in order to get the IOC to generate.

On a Linux system at least we have the 'touch' command, but not on Windows.