Skip to main content
Vitaliy Chernobay
Senior
May 23, 2018
Solved

CubeMX 4.25 + STemWin + FREERTOS = bug

  • May 23, 2018
  • 8 replies
  • 2174 views
Posted on May 23, 2018 at 03:12

I made a project for CubeMX 4.25 + STemWin with 746Discovery (default config setting from CubeMX).

Everythingis well. (Keil 5.25 compiler)

I add FREERTOS to project (1 task with default setting)

After compiling I have error

linking...

746\7axf: Error: L6218E: Undefined symbol OS_TimeMS (referred from stemwin_wrapper.o).

Searching for 'OS_TimeMS'...

H:\!STM32\!_F0_F1_F2_F3_F4_F7\F7\746_NG\STemWin_Cube_4_25\746_new_win_2layer_free\STemWin\Target\STemwin_wrapper.c(85) : extern volatile GUI_TIMER_TIME OS_TimeMS;

H:\!STM32\!_F0_F1_F2_F3_F4_F7\F7\746_NG\STemWin_Cube_4_25\746_new_win_2layer_free\STemWin\Target\STemwin_wrapper.c(876) : OS_TimeMS++;

Lines matched: 2 Files matched: 1 Total files searched: 148

A similar situation for F4..

#freertos #cubemx #stemwin

Note: this post was migrated and contained many threaded conversations, some content may be missing.
This topic has been closed for replies.
Best answer by Vitaliy Chernobay
Posted on May 26, 2018 at 01:19

solution of bug

in file ..........STemWin\Target\STemwin_wrapper.c comment

line (85):

//extern volatile GUI_TIMER_TIME OS_TimeMS;

line (876) :

// OS_TimeMS++;

It is work OK.

OS_TimeMS it is variable from GUI_X.c

You use GUI_X_OS.c

In attach working example

________________

Attachments :

746.ioc.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HxYM&d=%2Fa%2F0X0000000azn%2FE.VNbg2aQCfE2tFELkcHQKTlMIImuKbBRoeusv9eSeM&asPdf=false

8 replies

ST Technical Moderator
May 23, 2018
Posted on May 23, 2018 at 09:34

Hello

Chernobay.Vitali.002

,

Please, make sure that your project contains all the required library source files.

Have you copiedthe

fileGUI_X.c?

You should copy the

GUI_X.c file

$Library_path\STM32Cube_FW_F7_V1.0\Middlewares\ST\STemWin\OS\GUI_X.c

to folder

‘\Src’

in root of your project.

Hope this helps you.

With Regards,

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
Vitaliy Chernobay
Senior
May 24, 2018
Posted on May 24, 2018 at 00:47

Imen,

Thank you for attention.

CubeMX have to add GUI_X_OS.c to project with FREERTOS and delete GUI_X.c from a project

It is my no RTOS project

0690X0000060KufQAE.png

IT is FREERTOS project

0690X0000060KukQAE.png

For no RTOS project

Searching for 'OS_TimeMS'...

H:\!STM32\!_F0_F1_F2_F3_F4_F7\F7\746_NG\STemWin_Cube_4_25\746_new_win_2layer\STemWin\Target\STemwin_wrapper.c(85) : extern volatile GUI_TIMER_TIME OS_TimeMS;

H:\!STM32\!_F0_F1_F2_F3_F4_F7\F7\746_NG\STemWin_Cube_4_25\746_new_win_2layer\STemWin\Target\STemwin_wrapper.c(876) : OS_TimeMS++;

H:\!STM32\!_F0_F1_F2_F3_F4_F7\F7\746_NG\STemWin_Cube_4_25\746_new_win_2layer\Middlewares\ST\STemWin\OS\GUI_X.c(59) : volatile GUI_TIMER_TIME OS_TimeMS;

H:\!STM32\!_F0_F1_F2_F3_F4_F7\F7\746_NG\STemWin_Cube_4_25\746_new_win_2layer\Middlewares\ST\STemWin\OS\GUI_X.c(73) : return OS_TimeMS;

H:\!STM32\!_F0_F1_F2_F3_F4_F7\F7\746_NG\STemWin_Cube_4_25\746_new_win_2layer\Middlewares\ST\STemWin\OS\GUI_X.c(77) : int tEnd = OS_TimeMS + ms;

H:\!STM32\!_F0_F1_F2_F3_F4_F7\F7\746_NG\STemWin_Cube_4_25\746_new_win_2layer\Middlewares\ST\STemWin\OS\GUI_X.c(78) : while ((tEnd - OS_TimeMS) > 0);

Lines matched: 6 Files matched: 2 Total files searched: 120

For FREERTOS project

Searching for 'OS_TimeMS'...

H:\!STM32\!_F0_F1_F2_F3_F4_F7\F7\746_NG\STemWin_Cube_4_25\746_new_win_2layer_free\STemWin\Target\STemwin_wrapper.c(85) : extern volatile GUI_TIMER_TIME OS_TimeMS;

H:\!STM32\!_F0_F1_F2_F3_F4_F7\F7\746_NG\STemWin_Cube_4_25\746_new_win_2layer_free\STemWin\Target\STemwin_wrapper.c(876) : // OS_TimeMS++;

Lines matched: 2 Files matched: 1 Total files searched: 148

Probably the OS_TimeMS generated by CubeMX needs to be removed from FREERTOS project?

With Regards,

Vitaliy

Vitaliy Chernobay
Vitaliy ChernobayAuthorBest answer
Senior
May 26, 2018
Posted on May 26, 2018 at 01:19

solution of bug

in file ..........STemWin\Target\STemwin_wrapper.c comment

line (85):

//extern volatile GUI_TIMER_TIME OS_TimeMS;

line (876) :

// OS_TimeMS++;

It is work OK.

OS_TimeMS it is variable from GUI_X.c

You use GUI_X_OS.c

In attach working example

________________

Attachments :

746.ioc.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HxYM&d=%2Fa%2F0X0000000azn%2FE.VNbg2aQCfE2tFELkcHQKTlMIImuKbBRoeusv9eSeM&asPdf=false