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

STemWin library linking problem

  • May 16, 2018
  • 1 reply
  • 1110 views
Posted on May 16, 2018 at 16:49

Hello!

I am trying to integrate STemWin graphic library into my project for STM32F7 discovery board, and cannot compile/link it correctly.

After writing (copying) a simple hello world example and including all necessary files and paths- i get following errors:

<path-to-toolchain>/arm-none-eabi/bin/ld:

error: <path-to-cubePackage>/Middlewares/ST/STemWin/Lib/libSTemWin540_CM7_GCC_ARGB.a(FComic24B_ASCII.o)

uses VFP register arguments, <build-path>/firmware.elf does not

Referiing to

https://stackoverflow.com/questions/9753749/arm-compilation-error-vfp-registered-used-by-executable-not-object-file

it has something to do with compilation / linking flags and floating point unit. Since the library comes in prebuilt binary form, how can I know which compilation/linking flags to add to my program?

Where should I look, to figure out how STemWin library (part of stm32cubeF7 package) is compiled?

I am not using an OS, just stm32cube (HAL drivers / BSP). I 'didn't touch' the library, except adding 'lib-' prefix to the file for easier inclusion to my program.

Thanks for help,

Jur

#stm32f7 #stemwin #stm32-cube #stemwin-stm32f746discovery #linking
This topic has been closed for replies.
Best answer by Tesla DeLorean
Posted on May 16, 2018 at 19:57

The SW4STM32 project has

fpu.fpv5-sp-d16

floatabi.hard

1 reply

Tesla DeLorean
Guru
May 16, 2018
Posted on May 16, 2018 at 17:10

Determine what you're doing currently, and then do the opposite. The option space isn't that large.

-mfloat-abi=softfp

or

-mfloat-abi=hardfp

Look also if it is building for single or double precision FPU

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Jur Div
Jur DivAuthor
Associate II
May 16, 2018
Posted on May 16, 2018 at 18:57

I tried all combinations (of course), but none of them solved the issue. I am adding theese flags to both the compiler and linker, still doesn't work.

I thought there must be a better way than guessing? Would it be possible to get the 'gcc command' with which were the STemWin libraries compiled (in stm32cube f7 package)?

Would it be possible to get the build options and flags for one of the examples included in stm32cube? For example how exactly was: STM32Cube_FW_F7_V1.11.0/Projects/STM32746G-Discovery/Applications/STemWin/STemWin_HelloWorld example compiled?
Tesla DeLorean
Guru
May 16, 2018
Posted on May 16, 2018 at 19:52

Tools like Keil embedded the command line options into the object file. At a glance GNU/GCC in this case did not. I will look at the project setting.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..