Skip to main content
MNils.2
Associate II
Jan 8, 2025 9:39 AM UTC
Solved

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

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.

This topic has been closed for replies.
MNils.2
MNils.2Best answer
Associate II
Jan 15, 2025 7:38 AM UTC

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

3 replies

ST Employee
Jan 14, 2025 4:37 PM UTC

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.
Jan 15, 2025 12:20 AM UTC

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

 

 

 

MNils.2
MNils.2AuthorBest answer
Associate II
Jan 15, 2025 7:38 AM UTC

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