Skip to main content
Richard Bene¨
Associate
January 31, 2018
Solved

CubeMX 4.24 generates uncompilable code for TrueStudio

  • January 31, 2018
  • 12 replies
  • 2747 views
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?

    This topic has been closed for replies.
    Best answer by Radek RIPA
    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

    12 replies

    Mark Bersalona
    Explorer
    February 1, 2018
    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
    Radek RIPABest answer
    ST Employee
    February 7, 2018
    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

    Richard Bene¨
    Associate
    February 7, 2018
    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
    February 12, 2018
    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
    Amel NASRI
    ST Technical Moderator
    February 22, 2018
    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 "Best Answer" on the reply which solved your issue or answered your question.
    Amel NASRI
    ST Technical Moderator
    February 22, 2018
    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 "Best Answer" on the reply which solved your issue or answered your question.
    Ryan Damsgaard
    Visitor II
    February 22, 2018
    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

    Mikhail Lipatov
    Associate II
    February 26, 2018
    Posted on February 26, 2018 at 10:00

    Hello, Amel N

    share the .io 

    https://yadi.sk/d/qtW9II1j3SmtfQ

     
    Jeanne Joly
    Associate
    March 20, 2018
    Posted on March 20, 2018 at 17:31

    Hello all, 

    This issue is now fixed in the current CubeMX release.

    Please, upgrade with CubeMX4.25 if not already done.

    BR. Jeanne

    feuerwolf
    Associate III
    March 8, 2019

    Here is my workaround:

    create a project with cubeMx and the uC of your choice. Then only change in "project Manager" toolchain, directory and project location. Dont assign any pins or make a configuration! Just genereate the project , open it in atollic and it should be compileable.

    When i assigned Pins and did some configuration, the generated project was not compilable in Atolloc

    Using Cube 5.01 and Atollic 9.1