Skip to main content
Jur Div
Associate II
May 17, 2018
Solved

STemWin issues during linkag: undefined reference to `OS_TimeMS' ?

  • May 17, 2018
  • 2 replies
  • 1052 views
Posted on May 17, 2018 at 12:25

I tried to compile the 'Hello World' example provided in stm32cube F7 package, with no success.

I copied all files from STM32Cube_FW_F7_V1.11.0/Projects/STM32746G-Discovery/Applications/STemWin/STemWin_HelloWorld/Core and STemWin/ folders

and tried to compile, with correct link flags.

I get errors:

pio_builds/disco_f746ng/src/stm32f7xx_it.o: In function `SysTick_Handler':

stm32f7xx_it.c:(.text.SysTick_Handler+0x10): undefined reference to `OS_TimeMS'

/.../Middlewares/ST/STemWin/Lib/libSTemWin540_CM7_GCC.a(GUI_Core.o): In function `GUI_Init':GUI_Core.c:(.text.GUI_Init+0xbc): undefined reference to `GUI_X_Init'

I added the 'lib-' prefix to the library and included following flags to gcc:

-I/home/jure/Projects/ARMdev_stuff/STM32Cube_FW_F7_V1.11.0/Middlewares/ST/STemWin/inc

-L/home/jure/Projects/ARMdev_stuff/STM32Cube_FW_F7_V1.11.0/Middlewares/ST/STemWin/Lib

-lSTemWin540_CM7_GCC

-lSTemWin540_CM7_GCC_ARGB

-lSTemWin540_CM7_GCC_ot

-lSTemWin540_CM7_GCC_ot_ARGB

-

mfloat-abi

=hard

-

mfpu

=fpv5-sp-d16

I am using STM32F7 discovery board, stm32cube framework (HAL) and no RTOS or anything.

I didn't change any code in the Hello World example, which is written exactly for this platform. What should I do?
    This topic has been closed for replies.
    Best answer by Imen.D
    Posted on May 17, 2018 at 13:08

    Hello

    vidmarjur

    ,

    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.

    With Regards,

    Imen

    2 replies

    Imen.DBest answer
    ST Technical Moderator
    May 17, 2018
    Posted on May 17, 2018 at 13:08

    Hello

    vidmarjur

    ,

    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.

    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
    Jur Div
    Jur DivAuthor
    Associate II
    May 17, 2018
    Posted on May 17, 2018 at 14:23

    Yes, this resolves the issue!

    How come that this file is not already in src/ folder of the given Hello World example? o.0

    Documentation (Getting started with STemWin) didn't mention that it's necessary to include GUI_X.c explicitly.

    Well, however it compiles now.

    Thank you for your help and time !