cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX 4.24 generates uncompilable code for TrueStudio

Richard Bene¨
Associate II
Posted on January 31, 2018 at 11:17

Hello everyone,

after update of STM32CubeMX it started to generate simply uncompilable code for TrueSTUDIO.

When I select FATFS od FREERTOS and TrueSTUDIO as a IDE, after compilation,

functions like HAL_Init(), osThreadCreate(), osKernelStart(), HAL_RCC_OscConfig(), HAL_SD_ReadBlocks_DMA()

and similar are marked with errors 'Undefined reference'.

However when I choose only SDIO, all HAL functions are compiled without problems.

I've got Atollic TrueSTUDIO® for STM32 v9.0.0, hovewer I don't think that problem is in IDE.

When I generate code in CubeMX code for MDK-ARM v5, everything compiles without problem.

From attached projects, only SAMPLE_SDIO.ioc works.

Does someone have similar problem?

1 ACCEPTED SOLUTION

Accepted Solutions
Radek RIPA
ST Employee
Posted on February 07, 2018 at 09:32

Hello,

Thank you for your report.

I can confirm the behavior.

When the project is created there are for some reason a virtual folders instead of real ones. This cause that the compilation will fail.

As a fast fix I opened the .project and delete this part with virtual folders(names can be different):

<link>
<name>Middlewares</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link><link>
<name>Drivers</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link><link>
<name>Middlewares/FreeRTOS</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link><link>
<name>Application</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link><link>
<name>Drivers/CMSIS</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>

It is located at the end of the file betweenlinkedResouces tag:

<linkedResources>code to delete </linkedResources>

After deleting this it was possible to compile the code.

I'm reporting this issue to the CubeMX team to fix this problem.

Best regards

Radek

View solution in original post

12 REPLIES 12
Mark Bersalona
Associate
Posted on February 01, 2018 at 15:12

I've seen the same behavior when updating to CubeMX 4.24: can't compile a CubeMX-generated project in TrueSTUDIO 9.0.0; same project compiles with MDK-ARM v5. A project generated by CubeMX 4.23 compiled fine under both, so I'm staying with CubeMX 4.23 for now. The projects use FreeRTOS.

Radek RIPA
ST Employee
Posted on February 07, 2018 at 09:32

Hello,

Thank you for your report.

I can confirm the behavior.

When the project is created there are for some reason a virtual folders instead of real ones. This cause that the compilation will fail.

As a fast fix I opened the .project and delete this part with virtual folders(names can be different):

<link>
<name>Middlewares</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link><link>
<name>Drivers</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link><link>
<name>Middlewares/FreeRTOS</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link><link>
<name>Application</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link><link>
<name>Drivers/CMSIS</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>

It is located at the end of the file betweenlinkedResouces tag:

<linkedResources>code to delete </linkedResources>

After deleting this it was possible to compile the code.

I'm reporting this issue to the CubeMX team to fix this problem.

Best regards

Radek

Posted on February 07, 2018 at 13:25

Thank you for fix - I confirm that it works, after removing project from IDE, editing *.project file and opening once again are those folders showed again as real folders and project compiles without errors.

Thank you for reporting this bug!

Hope they fix it soonly - I'm really looking forward to do my work with CubeMX + TrueSTUDIO without these troubles...

Best regards

R. Beneš

Mikhail Lipatov
Associate II
Posted on February 12, 2018 at 09:54

Hello. I do not have this code in the *.project file. Who can help with this problem?

</natures>

<linkedResources>

</linkedResources>

</projectDescription>

After generating a new project, everything works normally.

thanks for the help
Posted on February 17, 2018 at 14:30

Same Problem with 'TrueStudio 9.0.0', 'STM32CubeMX 4.24.0' and 'Nucleo F446RE'

Your fix worked fine.

... for me it was essential to remove the project from the IDE as

R. Beneš

mentioned.

Thank you for your Help

Best regards

Posted on February 21, 2018 at 22:28

Great Job, Radku!!!!

Thank you very much!!! Your fast fix works.

Marek

Amel NASRI
ST Employee
Posted on February 22, 2018 at 10:55

Hello,

Thanks

Ripa.Radek

‌ for the fix you suggested.

I will share the case with our STM32CubeMX team to provide a fix.

-Amel

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.

Posted on February 22, 2018 at 10:54

Hi

lipatov.mikhail

Could you please share the .ioc file of the project having problem?

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.

Ryan Damsgaard
Associate
Posted on February 22, 2018 at 13:27

Hello,

A quick fix I've used is simply to delete det virtual folders within Atollic TrueSTUDIO.

The virtual folders then disappear and reappear as 'normal' folders.

-Ryan