Skip to main content
PLane.1
Associate II
June 3, 2020
Question

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

  • June 3, 2020
  • 4 replies
  • 6472 views

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?

4 replies

Cartu38 OpenDev
Graduate II
June 14, 2020

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
July 16, 2023

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

Peter BENSCH
Technical Moderator
July 16, 2023

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

Associate III
May 19, 2025

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.

 

Karl Yamashita
Principal
May 19, 2025

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?

If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.CAN Jammer an open source CAN bus hacking toolCANableV3 Open Source
Associate III
May 19, 2025

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.