cancel
Showing results for 
Search instead for 
Did you mean: 

STemWin library linking problem

Jur Div
Associate II
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
1 ACCEPTED SOLUTION

Accepted Solutions
Posted on May 16, 2018 at 19:57

The SW4STM32 project has

fpu.fpv5-sp-d16

floatabi.hard

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

View solution in original post

5 REPLIES 5
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 Venmo Up vote any posts that you find helpful, it shows what's working..
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?
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 Venmo Up vote any posts that you find helpful, it shows what's working..
Posted on May 16, 2018 at 19:57

The SW4STM32 project has

fpu.fpv5-sp-d16

floatabi.hard

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Posted on May 16, 2018 at 20:13

YES, that's it!

Thank you very much!