2020-06-03 11:12 AM
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?
2020-06-14 12:37 PM
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 ?
2023-07-16 1:32 PM
It doesn't matter if there is a need to do it or not. If customer wants, it must be provided. Just that simple.
2023-07-16 2:21 PM
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
2025-05-19 11:27 AM
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.
2025-05-19 11:52 AM
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?
2025-05-19 11:59 AM
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.