cancel
Showing results for 
Search instead for 
Did you mean: 

Code generated from CubeMX for a ThreadX design creates a [projectName]/ThreadX path but no ThreadX directory

GGree.1
Associate III

CubeMX Version: 1.8.0

Build: 11526_20211125_0815 (UTC)

When selecting ThreadX from the software pack, CubeMX creates a [projectName]/ThreadX path but no ThreadX directory in the project tree or in the project folder matching the name in the Project Properties Path thus causing a warning. Since it is only a warning it is easily corrected by deleting the path, however it is a little annoying to have to clear out the path everytime you regen the code. To the best of my searching I am unable to locate a control in CubeMX to stop it from generating the Path in Properties.

Anyway to permanently fix this?

1 ACCEPTED SOLUTION

Accepted Solutions
Sara BEN HADJ YAHYA
ST Employee

Hello @Community member​ ,

The Warning message is not supposed to be generated, there is no ThreadX folder except for the one generated in Middlewares folder. This message does not impact the generated code and only generated when "Generate Under Root" option is checked in Project Manager in CubeMX.

Unchecking the "Generate Under Root" option and regenerating the project will not remove this warning. It has to be unchecked from the start or you can do the following two steps on your current project:

  1. Open the .cproject with a text Editor (Notepad for example) and delete <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="ThreadX"/>, (Please refer to the attachment). then save the file.
  2. Open your ioc file and uncheck "Generate Under Root" option then regenerate your project

0693W00000JPkoDQAT.png0693W00000JPkoIQAT.png0693W00000JPkohQAD.pngAfter doing these two steps, the warning message will no longer be displayed.

With this being said, I've raised this issue internally to be fixed as soon as possible. I'll keep you posted with the updates.

Internal ticket number: 122674 (This is an internal tracking number and is not accessible or usable by customers).

Sorry for any inconvenience that this may cause.

If your issue is solved, please close this post by clicking the "Select as Best" button. This will help other members of the community find this response more quickly :)

Sara.

View solution in original post

9 REPLIES 9

Assuming that ThreadX behaves like TouchGFX, there is a permanent fix.

Do not use CubeMXIDE to generate code. It has no idea of how to put code into a TouchGFX program structure and leaves half of it out.

Use CubeMX to generate the init code (and if ThreadX needs it, do not check Generate Under Root. GFX doesn't like that and CubeMXIDE doesn't offer the option (project manager settings);

TouchGFX can generate its own projects from the setups, and will produce code.

IF (and perhaps only if) ThreadX is like TouchGFX, then this may help.

GFX is set up to have a structure (I think) to work with all the compilers (mostly at once). Thus: doesn't fit with CubeMXIDE.

0693W00000JOixBQAT.png

Sara BEN HADJ YAHYA
ST Employee

Hello @Community member​ ,

Thanks for your feedback,

I am not sure if I reproduced the same scenario that caused an issue in your side, all I did is enabling ThreadX core and generating a CubeIDE project and I didn't face any issue. The ThreadX folder and the files are generated correctly and the build is fine.

0693W00000JPQMJQA5.pngCould you please share your ioc file or provide us with the exact scenario to reproduce the issue?

Thanks,

Sara.

GGree.1
Associate III

I can do even better. Here is a screen shot first of all showing that the threadx files are in the Middlewares folder as expected and they compile fine. However if you look down and to the right you can also see the warning of a missing project folder and if you go back to the project tree you can see that the folder is not there.

I have also attached the ioc file.

0693W00000JPWPOQA5.png

Sara BEN HADJ YAHYA
ST Employee

Hello @Community member​ ,

The Warning message is not supposed to be generated, there is no ThreadX folder except for the one generated in Middlewares folder. This message does not impact the generated code and only generated when "Generate Under Root" option is checked in Project Manager in CubeMX.

Unchecking the "Generate Under Root" option and regenerating the project will not remove this warning. It has to be unchecked from the start or you can do the following two steps on your current project:

  1. Open the .cproject with a text Editor (Notepad for example) and delete <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="ThreadX"/>, (Please refer to the attachment). then save the file.
  2. Open your ioc file and uncheck "Generate Under Root" option then regenerate your project

0693W00000JPkoDQAT.png0693W00000JPkoIQAT.png0693W00000JPkohQAD.pngAfter doing these two steps, the warning message will no longer be displayed.

With this being said, I've raised this issue internally to be fixed as soon as possible. I'll keep you posted with the updates.

Internal ticket number: 122674 (This is an internal tracking number and is not accessible or usable by customers).

Sorry for any inconvenience that this may cause.

If your issue is solved, please close this post by clicking the "Select as Best" button. This will help other members of the community find this response more quickly :)

Sara.

Please note that while CubeMX has an option to "generate under root", CubeMXIDE seems to have this option permanently checked with no way to change it.

GGree.1
Associate III

Just to confirm what Harvey stated, CubeMX (standalone) allows the "generate under root" option to be unchecked, but the MX perspective in the the STM32CubeIDE does not allow "generate under root" option to be unchecked. Also I am not sure one would want to uncheck this feature as it would then not conform the placement of the project files in a way that supports the Eclipse methods for archiving and copying projects.

It is also verified that this is just a nuisance alert and has no impact on the design.

It comes into effect when working with TouchGFX, where the instructions for creating a project indicate that the project is not to be generated under root.

However, the structure required for TouchGFX projects is not really compatible with CubeMXIDE anyway. That's a separate issue. Instructions for TouchGFX say to generate the project with CubeMX (not IDE), uncheck the box, and then go from there.

While it's perhaps not as much of an issue here, in other cases, it can be.

Hello @Community member​ ,

Yes, The CubeMX plugin in CubeIDE does not include the "Generate Under Root" option. But once this issue is fixed in CubeMX standalone version, it will be also fixed in CubeIDE.

Don't worry the warning message does not impact the project in any way possible, so it is safe to keep it and leave the "Generate Under Root" option checked.

Sara.