Skip to main content
COSEBE
Senior
November 15, 2019
Question

CubeMX 5.4 TouchGFX 4.12.3 linking error on IAR 8.32

  • November 15, 2019
  • 7 replies
  • 1151 views

With CubeMX 5.4 TouchGFX 4.12.3

I create a project from scratch on 32F746DISCO.

Generate code for IAR 8.32

And I have an linking error :

Error[Li005]: no definition for "MX_FREERTOS_Init()" [referenced from .......

Is it a bug or I miss something ?

This topic has been closed for replies.

7 replies

Martin KJELDSEN
Principal III
November 18, 2019

Can you post the complete error log?

MX_* are methods created by CubeMX. Can you show me your main.cpp ? You shouldn't be missing something here, in my oppinion.

MX_FREERTOS_Init() is what creates the default task handle with the touchgfx main-event loop. It would appear that, for some reason, Core/src/freertos.c is not a part of your project. Can you confirm?

Did you enable the FreeRTOS IP in CubeMX?

/Martin

leeo
Visitor II
November 18, 2019

you shuild add "extern "c" " before MX_FREERTOS_Init().

Martin KJELDSEN
Principal III
November 18, 2019

The idea here is that the user shouldn't be required to do anything in order to achieve a compiling project - If extern "C" is missing and freertos.c is actually being compiled then we may have found an issue.

/Martin

COSEBE
COSEBEAuthor
Senior
November 18, 2019

I think I found why :

You can reproduce it by validate "Generate peripheral initialization as a pair of '.c/.h' files per peripheral in generated files in project manager of STM32CubeMX project.

Is I devalidate this option, I have mo more this error

Let me know if you can reproduce it

CKauf
Associate II
November 18, 2019

I can reproduce the problem in CubeIDE 1.1.0 The project was created using the integrated CubeMX-tool.

I found the problem only occurs when I activate the GRAPHICS Middleware in the setup tool and the "Generate peripheral initialization as a pair of '.c/.h' files per peripheral". If either is deactivated everything seems fine.

I also tried adding "extern "c" before MX_FREERTOS_Init() but this just leads to more errors inside freertos.c.

Best regards

Christoph

COSEBE
COSEBEAuthor
Senior
November 21, 2019

Hi,

Martin, are you able to reproduce it and do you find the bug ?

Thanks

Sébastien

COSEBE
COSEBEAuthor
Senior
November 24, 2019

Please any feedback about this.

Is it a bug a I made something wrong ?