cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX 5.4 TouchGFX 4.12.3 linking error on IAR 8.32

COSEBE
Associate III

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 ?

7 REPLIES 7
Martin KJELDSEN
Chief III

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
Associate

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

Martin KJELDSEN
Chief III

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
Associate III

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 III

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
Associate III

Hi,

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

Thanks

Sébastien

COSEBE
Associate III

Please any feedback about this.

Is it a bug a I made something wrong ?