cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX 4.25 + STemWin + FREERTOS = bug

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.
1 ACCEPTED SOLUTION

Accepted Solutions
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

View solution in original post

8 REPLIES 8
Imen.D
ST Employee
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

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
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

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
Posted on June 09, 2018 at 22:11

The fault still remains for CubeMX 4.26

Posted on July 13, 2018 at 05:02

I solution for FreeRTOS doesn't work on CubeMX 4.26

:(

Posted on July 13, 2018 at 07:35

What exactly does not work?

Publish your project.
Posted on July 13, 2018 at 18:20

I did like the instruction in this topic: 

https://community.st.com/0D50X00009XkXi3SAF

 

The screen was black with a bar full of multiple colors, the project link is here:

https://drive.google.com/file/d/1GMxg0x5Jsgs2SXEdpn8GlKR5G6jG6kGj/view?usp=sharing

 

Thank you very much

Posted on July 13, 2018 at 21:26

Try inrease stack size in CubeMX (example from 0x400 to 0x4000)

and correct file   STewin_wrapper.c

void GRAPHICS_Init(void)

{

/* Initialize the GUI */

GUI_Init()

WM_MULTIBUF_Enable(1)

/* Enable the multi-buffering functionality */

/* Activate the use of memory device feature */

/* USER CODE BEGIN WM_SetCreateFlags */

HAL_LTDC_ProgramLineEvent(&amphltdc, 0) //!!!!!!!!!!!!!!!!!!!!!!!!MULTIBUF

WM_SetCreateFlags(WM_CF_MEMDEV)

/* USER CODE END WM_SetCreateFlags */

}