Skip to main content
MStre.1
Associate II
July 12, 2023
Solved

Invalid Input: Must be project's active .ioc file.

  • July 12, 2023
  • 5 replies
  • 17187 views

Hi,

i want to clone my project. I did the following steps:

1) Edit > Copy.

2) Edit > Paste.

3) Rename the ioc files.

4) Delete the Debug.launch file.

5) Project > Clean.

the next step is to generate the CubeMX. But when I try to open the .ioc file this error message occurs:

Invalid Input: Must be project's active .ioc file.

can anybody help me please?

    This topic has been closed for replies.
    Best answer by Peter BENSCH

    The name of the project is also in the IOC itself (a normal text file) under the item ProjectManager.ProjectFileName and must also be changed. However, since the IOC should not actually be changed manually, care must be taken not to damage the IOC structure.

    Hope that helps?

    Regards
    /Peter

    5 replies

    Peter BENSCH
    Peter BENSCHBest answer
    Technical Moderator
    July 12, 2023

    The name of the project is also in the IOC itself (a normal text file) under the item ProjectManager.ProjectFileName and must also be changed. However, since the IOC should not actually be changed manually, care must be taken not to damage the IOC structure.

    Hope that helps?

    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.
    MStre.1
    MStre.1Author
    Associate II
    July 12, 2023

    Do you know how to fix that problem.I tried to chance the item ProjectManager.ProjectFileName  in the .ioc file but it didnt work.

    Peter BENSCH
    Technical Moderator
    July 12, 2023

    Unfortunately, your description was not precise enough, but I think I have found your problem.
    First of all the summary of my investigation:

    • you have created a project with STM32CubeIDE
    • in this project you copied the IOC with Ctrl-C and Ctrl-V
    • then you've tried to open the copied (and renamed) IOC, which is in the same project folder, with CubeMX, which then leads to the described error message

    However, the error message is completely correct because there can only be one IOC within a project. If another IOC were allowed, you would otherwise create a completely different directory structure with different parameters, which would mercilessly overwrite your existing structure and thus destroy it - including your own code in the USER CODE segments.

    If you want to clone a project, then not only the IOC, but please the entire project, which can also be done in the STM32CubeIDE.

    Hope that helps?

    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.
    MStre.1
    MStre.1Author
    Associate II
    July 13, 2023

    Yes I want to clone the project. I copy and paste the entire project folder in STM32CubeIDE. I renamed the project folder and the .ioc file to the same name. After this I deleted the Debug.launch file and cleaned my project. For the next step to clone the project I have to generate the CubeMX. For this step I have to open the .ioc file but this error message occurs:

    Invalid Input: Must be project's active .ioc file.

    2023-07-13_08h15_21.png

    Peter BENSCH
    Technical Moderator
    July 13, 2023

    Well, I have unsuccessfully tried to recreate the problem with a test project and the current CubeIDE version. Copying the project TEST0 to TEST1 and renaming the IOC to TEST1.ioc worked without problems with the CubeIDE, also CubeMX was able to open the new TEST1.ioc without any difficulties.

    If you attach your IOC here, could I try it with your IOC?

    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.
    MStre.1
    MStre.1Author
    Associate II
    July 13, 2023

    Hi Peter,

    I am not able to attach the .ioc file (see the attached error message)

    2023-07-13_11h51_57.png

    Peter BENSCH
    Technical Moderator
    July 13, 2023

    OK, we need to check again why IOC files are blocked. As an interim measure, could you please try renaming the IOC file to *.IOC.TXT?

    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.
    Peter BENSCH
    Technical Moderator
    July 13, 2023

    Your project is still based on CubeMX 6.8.0, 6.9.0 has been available for a few days, additonally you are using the old L4 firmware 1.7.2.

    But OK, that probably doesn't matter much at the moment. So I have:

    • created the directory Test_L476RG in the workspace, put IOC there
    • imported the IOC into STM32CubeIDE 1.3.0, not migrating to the latest firmware
    • opened IOC and made a temporary change to the IOC with CubeMX, saved, undid, finally saved = IOC is saved in current CubeMX structure
    • CubeMX window closed
    • in the Project Explorer on the left, copy the project and paste it as a copy
    • IOC of the copy renamed to name of the copied project
    • then open this copied IOC

    Everything is fine and as expected.

    Please try to install the latest STM32CubeIDE (can be installed parallel to the old one, but of course in a separate directory) and try again.

    If it still doesn't work, you should send me your complete project directory as a ZIP via PM, after you have deleted the redundant and bulky data and directories (Drivers, Ddebug and Release if applicable).

    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.
    MStre.1
    MStre.1Author
    Associate II
    July 14, 2023

    Hi Peter,

    I opened the project with the newest STM32CubeIDE and migrated it to the newest firmware.

    It works and I can open the .IOC file now after copy and paste the project.

    Thanks for your help Peter!

    Peter BENSCH
    Technical Moderator
    July 14, 2023

    Great!

    If the problem is solved, please mark this thread as answered by selecting Accept as Solution, as also explained here. This will help other users find that answer faster.

    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.