Skip to main content
MNils.2
Associate II
January 8, 2025
Solved

Build error with gcc and cortex_m7/gcc/libtouchgfx-float-abi-hard.a

  • January 8, 2025
  • 2 replies
  • 754 views

Hi, 
how exactly is the cortex_m7/gcc/libtouchgfx-float-abi-hard.a built (i.e compile and link options)?

For example if a make a object dump on the lib I get:
touchgfx::muldiv(long, long, long)

But the header file use int32_t instead of long and that gives a link error.
undefined reference to `touchgfx::muldiv(int, int, int)

 

If I change the header file to use long instead it builds.

Best answer by MNils.2

I´m using Zephyr toolchain, apperently the default definition of int32_t is int in Zephyr.
However there is a config option for this that solves my problem.
CONFIG_ENFORCE_ZEPHYR_STDINT=n

2 replies

ST Employee
January 14, 2025

Hi All,

 

This post has been escalated to the ST Online Support Team for additional assistance.  We'll contact you directly.

 

Regards,
Jake

ST Support

Pavel A.
Super User
January 15, 2025

Strange. The int32_t type usually is defined as long, not int. Do you redefine it somewhere?

 

 

 

MNils.2
MNils.2AuthorBest answer
Associate II
January 15, 2025

I´m using Zephyr toolchain, apperently the default definition of int32_t is int in Zephyr.
However there is a config option for this that solves my problem.
CONFIG_ENFORCE_ZEPHYR_STDINT=n