I'm trying to link 3rd party library (no source code available) that's compiled for ESP32 but it uses a set of math library functions like roundf, fmaxf, sinf, ...

I see these implemented as special functions accessed through macros in fastmath.h but, of course, they cannot be used as they don't materialize into binaries with the symbols to enable linking to the library that's not obviously using those functions.

I did more investigation and by manually linking libm.a, I resolved most of the issues. Shouldn't this be part of the linking process by default as linker would remove all the functions that are not being used anyway?

Who is online

About Us

Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. ESP8266EX and ESP32 are some of our products.