cancel
Showing results for 
Search instead for 
Did you mean: 

Bug: IOC generates code that does not compile

Update: Complete bad generated project attached, picture of build failure added.

Note this problem is produced with the CubeMX plug-in inside the IDE, not the stand-alone CubeMX.

F439, latest CubeIDE, included RubeMX 5.4.0, and HAL/LL stuff all downloaded in last couple days.

Attached IOC generates code with many bugs:

  1. Does not compile. Completely hopelessly wrong include paths.
  2. Include paths are generated trying to guess number of "../" required by source in multiple directory depths, and getting it wrong.
  3. Generated include paths should be workspace/project relative but are not
  4. No less than 3 copies of cmsis_os.h are generated, etc, etc.
  5. Multiple copies of 3rd party middleware sources (for both lwip and freertos) are emitted, for example under both Middlewares\FreeRTOS and Middlewares\Middlewares\Third_Party\FreeRTOS, with differing directory structures!!!

This is absolutely, absurdly, and completely broken.

Has anybody ever tested any of this software?

STM, Please confirm you have reproduced the above problems and filed at least 150 tickets,

Thanks,

Best Regards, Dave

Build results:

0690X00000ArVpfQAF.png

9 REPLIES 9
Cartu38 OpenDev
Lead II

Dave,

I'm pleased to say relying on your shared .ioc file all is just working nice. I've got a try relying on latest STM released material (MX 5.4.0 & CubeIDE 1.1.0 pair).

1) I've generated CubeIDE project starting from CubeMX (just doing "File>Load" then "Generate Code")

2) I've imported then such project within CubeIDE

3) I've just build it …. leading to compile process success !!!

Process sounds to me quite obvious & functional.

More details about your usage …. may help to dig into issue you may face … then maybe STM may have some ticket to log

Br.

0690X00000ArTxSQAV.png

@Cartu38 OpenDev​ - Thanks for taking the time to try this and delighted it worked for you.

Can you tell me precisely what steps you used from the IOC file?

I have the STMCubeIDE v1.1.0, with the included 5.4.0 CubeMX plug-in.

I do not have a stand-alone version of CubeMX installed; is that what you used???

I do not see how to start a new project inside the IDE starting with an IOC.

Thanks,

Best Regards, Dave

@Markus GIRDLAND​, @Amel NASRI​ - Anybody have any idea why this has gone off the rails? Or how to generate a working project from the IOC?

Thanks,

Best Regards, Dave

Cartu38 OpenDev
Lead II

Dave,

Yes I've used CubeMX standalone to get success playing with your .ioc file.

Trick is according your file content no choice … CubeIDE is not able to generate a project from because some specific project mode requirement Inside.

Your project once generated will be fully supported by CubeIDE but CubeIDE not able to generate it by itself.

Magic parameter within your .ioc fiel is : ProjectManager.UnderRoot=false

If you really want to rely only on CubeIDE and if such parameter is not so important to you please have try to hack your .ioc file doing: ProjectManager.UnderRoot=true

Now let's play with CubeIDE ONLY:

1) Create a brand new common Eclipse project/ File > New Project then General Project type

2) Mandatory to set as project name the same you have within your .ioc file (not your .ioc file name … takes care): F439_Nucleo_LCD

3) Let's copy your .ioc file within such project setting same file name as your project name: F439_Nucleo_LCD.ioc

0690X00000ArW2jQAF.png

4) Double click on such .ioc file … .ioc editor should open

5) Let's request code generation then ...

0690X00000ArW3DQAV.png

6) You're done … let's compile …. on my side leading back to compile success

Enjoy !

PS: I would let STM guys commenting about ProjectManager.UnderRoot=true/false stuff ….

@Markus GIRDLAND​, @Amel NASRI​, @Cartu38 OpenDev​ - I confirm that if the standalone version of CubeMX 5.4.0 is used to generate the project, it compiles AOK as @Cartu38 OpenDev​ mentions above. Unfortunately, the CubeMX 5.4.0 plug-in within the STM32CubeIDE generates the non-working project as above. So work-around for now is use the standalone version.

STM, Please confirm you have reproduced and ticketed the issues above,

Thanks,

Best Regards, Dave

PS: When run, generated code crashes immediately inside  MX_LWIP_Init(); but that's yet a different problem...

@Cartu38 OpenDev​ - Do you know the exact meaning of the IOC parameter ProjectManager.UnderRoot ???

Cartu38 OpenDev
Lead II

Would say rely on CubeMX documentation for. Such parameter in sync with checkbox MX UI is promoting close to project manager toolchain selection combobox.

Related to some project structure option ...

Cartu38 OpenDev
Lead II

From my understanding is under root set to true or false will look like the same within IDE but file system organization about your project material will not be same.

If non under root (sounds stands for non under "project" root) some files (.ioc, .c / .h files managed by CubeMX) will be set at same level as your IDE project repository.

If under root (sounds stands for under "project" root) all project files are children of your project repository.

Up to you then ...

Cartu38 OpenDev
Lead II

STM32CubeIDE 1.2.0 is now supporting from .ioc project creation feature !